Change to onload execution
use onLoad instead of right away so the body dom element isn't null
This commit is contained in:
parent
1ebee3c8e5
commit
4a34761f72
@ -19,8 +19,13 @@ var canvas_t=[];
|
||||
var context_t=[];
|
||||
var clock = new THREE.Clock();
|
||||
var WIDTH = window.innerWidth , HEIGHT = window.innerHeight
|
||||
|
||||
window.onload = function() {
|
||||
init();
|
||||
animate();
|
||||
render();
|
||||
}
|
||||
|
||||
|
||||
function init() {
|
||||
scene = new THREE.Scene();
|
||||
@ -158,7 +163,6 @@ function render () {
|
||||
renderer.render( scene, camera );
|
||||
|
||||
}
|
||||
render();
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user