const geometry = new THREE.BoxGeometry( 1, 1, 1 ); const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); const cube = new THREE.Mesh( geometry, material ); AB.world.newRun = function() { ABWorld.renderer = new THREE.WebGLRenderer ( { antialias: true } ); ABWorld.init3d(5, 5, 0xf0f0f0); ABWorld.scene.add(cube); } AB.world.nextStep = function() { cube.rotation.x += 0.05; cube.rotation.y += 0.05; }