Skip to content

Instantly share code, notes, and snippets.

@RenaudRohlinger
Last active March 30, 2020 06:35
Show Gist options
  • Save RenaudRohlinger/0fe7e9516f0675a84aa8b0a07e68b0c6 to your computer and use it in GitHub Desktop.
Save RenaudRohlinger/0fe7e9516f0675a84aa8b0a07e68b0c6 to your computer and use it in GitHub Desktop.
function render() {
renderer.render( scene, camera );
}
function animate() {
// render the 3D scene
render();
requestAnimationFrame( animate );
}
// Call the three scene initialisation, attach the resize event and start the animation requestAnimationFrame.
function init () {
initThree()
resize()
window.addEventListener('resize', resize, { passive: true
})
addInstancedMesh()
animate()
}
init()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment