-
-
Save AlexTiTanium/7369851 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Start main render loop | |
*/ | |
beginRenderToContainer: function(container){ | |
// Prepare render | |
this.scene.defaultCamera.updateProjectionMatrix(); | |
this.container = container; | |
this.clock.start(); | |
// Create render | |
this.renderer = new Renderer(this.container, this.scene); | |
// Schedule firs render step | |
self.requestAnimationFrame(this.renderStep.bind(this)); | |
// Notify script engine and other about render start | |
this.events.trigger('render:start'); | |
// Save last time | |
this.lastTime = this.clock.getElapsedTime(); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment