|
@@ -65,6 +65,8 @@ class Texture extends EventDispatcher {
|
|
// update. You need to explicitly call Material.needsUpdate to trigger it to recompile.
|
|
// update. You need to explicitly call Material.needsUpdate to trigger it to recompile.
|
|
this.encoding = encoding;
|
|
this.encoding = encoding;
|
|
|
|
|
|
|
|
+ this.userData = {};
|
|
|
|
+
|
|
this.version = 0;
|
|
this.version = 0;
|
|
this.onUpdate = null;
|
|
this.onUpdate = null;
|
|
|
|
|
|
@@ -119,6 +121,8 @@ class Texture extends EventDispatcher {
|
|
this.unpackAlignment = source.unpackAlignment;
|
|
this.unpackAlignment = source.unpackAlignment;
|
|
this.encoding = source.encoding;
|
|
this.encoding = source.encoding;
|
|
|
|
|
|
|
|
+ this.userData = JSON.parse( JSON.stringify( source.userData ) );
|
|
|
|
+
|
|
return this;
|
|
return this;
|
|
|
|
|
|
}
|
|
}
|
|
@@ -225,6 +229,8 @@ class Texture extends EventDispatcher {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if ( JSON.stringify( this.userData ) !== '{}' ) output.userData = this.userData;
|
|
|
|
+
|
|
if ( ! isRootObject ) {
|
|
if ( ! isRootObject ) {
|
|
|
|
|
|
meta.textures[ this.uuid ] = output;
|
|
meta.textures[ this.uuid ] = output;
|