Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeFrame #13239

Merged
merged 5 commits into from
Feb 4, 2018
Merged

NodeFrame #13239

merged 5 commits into from
Feb 4, 2018

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Feb 3, 2018

Prevents that nodes shared in differents materials be updated more than once in the same frame.

  • NodeFrame - Update node frame manager
  • TimerNode - GLOBAL, LOCAL and DELTA scope
  • LightNode - TOTAL scope (thinking ahead)

New usage

var frame = new THREE.NodeFrame();
//...
frame.update( deltaTime ); // update delta time ( new frame )
frame.updateFrame( material1 ); // update nodes of material1
frame.updateFrame( material2 ); // ..
frame.updateFrame( material3 );
//..
// or update a single node
frame.updateFrame( node );
/*
// or
frame.update( deltaTime )
	.updateFrame( material1 )
	.updateFrame( material2 )
	.updateFrame( material3 );
*/

Old usage

material1.updateFrame( deltaTime );
material2.updateFrame( deltaTime );
material3.updateFrame( deltaTime );

@sunag
Copy link
Collaborator Author

sunag commented Feb 4, 2018

add THREE.TimerNode.DELTA it can be useful.

@mrdoob mrdoob merged commit 779815e into mrdoob:dev Feb 4, 2018
@mrdoob
Copy link
Owner

mrdoob commented Feb 4, 2018

Thanks!

@mrdoob mrdoob added this to the r90 milestone Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants