From a5d9511f4a20cc165ef44a61a7329bc51dbedccf Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 28 Sep 2021 16:43:11 +0200 Subject: [PATCH] fix: deprecated use of traitlets --- js/scripts/prop-types.js | 2 +- pythreejs/traits.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/scripts/prop-types.js b/js/scripts/prop-types.js index 2df6fd22..057f81d5 100644 --- a/js/scripts/prop-types.js +++ b/js/scripts/prop-types.js @@ -448,7 +448,7 @@ class UniformDict extends DictType { const nullableStr = this.getNullableStr(); return `Dict(default_value=${ this.getPythonDefaultValue() - }, trait=Uniform(allow_none=True), ${ + }, value_trait=Uniform(allow_none=True), ${ nullableStr })${this.getTagString()}`; } diff --git a/pythreejs/traits.py b/pythreejs/traits.py index d35dae8b..4be1710e 100644 --- a/pythreejs/traits.py +++ b/pythreejs/traits.py @@ -266,7 +266,7 @@ class Uniform(Dict): """A dict holding uniforms for a ShaderMaterial""" def __init__(self, default_value=Undefined, **kwargs): - super(Uniform, self).__init__(traits=dict( + super(Uniform, self).__init__(per_key_traits=dict( value=Union(( Int(), Float(), Color(), Instance('pythreejs.Texture'), List(trait=Union((