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

Add EventDispatcher to RaytracingRenderer #6136

Merged
merged 3 commits into from
Feb 25, 2015
Merged

Conversation

chuckfairy
Copy link
Contributor

I think it would be a good idea to have an event dispatched after the render is finished with the RaytracingRenderer. There is no real way of telling right now and since it acts a bit differently then the other renderers I think it would beneficial.

I use it in my THREE.WebMExporter example here
http://chuckfairy.com/THREE.WebMExporter/examples/raytracing.html

Thanks for all the hard work guys!

Added EventDispatcher prototype and added renderfinish event
if ( blockY >= canvasHeight ) return;
if ( blockY >= canvasHeight ) {

dispatch( { type: "renderfinish" } );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would call the event complete instead.

@mrdoob
Copy link
Owner

mrdoob commented Feb 25, 2015

Nice idea!

@chuckfairy
Copy link
Contributor Author

I agree renderfinish was a bit awkward of an event name. Made the change!

if ( blockY >= canvasHeight ) return;
if ( blockY >= canvasHeight ) {

dispatch( { type: "complete" } );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet another tweak... Why not just doing scope.dispatchEvent( { type: "complete" } )?

@chuckfairy
Copy link
Contributor Author

Another great tweak. Just made the change.

@mrdoob mrdoob merged commit 46b3f65 into mrdoob:dev Feb 25, 2015
@mrdoob
Copy link
Owner

mrdoob commented Feb 25, 2015

Many thanks!

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