|
@@ -39,7 +39,7 @@ THREE.Material = function () {
|
|
|
|
|
|
this.visible = true;
|
|
|
|
|
|
- this.needsUpdate = true;
|
|
|
+ this._needsUpdate = true;
|
|
|
|
|
|
};
|
|
|
|
|
@@ -47,6 +47,20 @@ THREE.Material.prototype = {
|
|
|
|
|
|
constructor: THREE.Material,
|
|
|
|
|
|
+ get needsUpdate () {
|
|
|
+
|
|
|
+ return this._needsUpdate;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ set needsUpdate ( value ) {
|
|
|
+
|
|
|
+ if ( value === true ) this.update();
|
|
|
+
|
|
|
+ this._needsUpdate = value;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
setValues: function ( values ) {
|
|
|
|
|
|
if ( values === undefined ) return;
|
|
@@ -198,6 +212,12 @@ THREE.Material.prototype = {
|
|
|
|
|
|
},
|
|
|
|
|
|
+ update: function () {
|
|
|
+
|
|
|
+ this.dispatchEvent( { type: 'update' } );
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
dispose: function () {
|
|
|
|
|
|
this.dispatchEvent( { type: 'dispose' } );
|