mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
35 lines
487 B
JavaScript
35 lines
487 B
JavaScript
/**
|
|
* @author sunag / http://www.sunag.com.br/
|
|
*/
|
|
|
|
THREE.NodeFrame = function ( time ) {
|
|
|
|
this.time = time !== undefined ? time : 0;
|
|
|
|
this.frameId = 0;
|
|
|
|
};
|
|
|
|
THREE.NodeFrame.prototype.update = function ( delta ) {
|
|
|
|
++this.frameId;
|
|
|
|
this.time += delta;
|
|
this.delta = delta;
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
THREE.NodeFrame.prototype.updateNode = function ( node ) {
|
|
|
|
if ( node.frameId === this.frameId ) return this;
|
|
|
|
node.updateFrame( this );
|
|
|
|
node.frameId = this.frameId;
|
|
|
|
return this;
|
|
|
|
};
|