提交 08b05d39 编写于 作者: M Mr.doob

Simplified Babylon example.

上级 93534a11
......@@ -39,7 +39,6 @@
var camera, controls, scene, renderer;
init();
animate();
function init() {
......@@ -52,13 +51,6 @@
scene = new THREE.Scene();
var ambient = new THREE.AmbientLight( 0x101030 );
scene.add( ambient );
var directionalLight = new THREE.DirectionalLight( 0xffeedd );
directionalLight.position.set( 0, 0, 1 );
scene.add( directionalLight );
// texture
var manager = new THREE.LoadingManager();
......@@ -91,13 +83,17 @@
if ( object instanceof THREE.Mesh ) {
object.material = new THREE.MeshPhongMaterial( { color: Math.random() * 0xffffff } );
object.material = new THREE.MeshPhongMaterial( {
color: Math.random() * 0xffffff
} );
}
} );
scene.add( babylonScene );
scene = babylonScene;
animate();
}, onProgress, onError );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册