提交 83787b69 编写于 作者: M Mr.doob

Use BoxLineGeometry in webvr examples.

上级 279a4e1a
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
<script src="../build/three.js"></script> <script src="../build/three.js"></script>
<script src="js/vr/WebVR.js"></script> <script src="js/vr/WebVR.js"></script>
<script src="js/geometries/BoxLineGeometry.js"></script>
<script> <script>
var container; var container;
...@@ -57,9 +59,9 @@ ...@@ -57,9 +59,9 @@
camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 0.1, 10 ); camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 0.1, 10 );
room = new THREE.Mesh( room = new THREE.LineSegments(
new THREE.BoxBufferGeometry( 6, 6, 6, 8, 8, 8 ), new THREE.BoxLineGeometry( 6, 6, 6, 10, 10, 10 ),
new THREE.MeshBasicMaterial( { color: 0x808080, wireframe: true } ) new THREE.LineBasicMaterial( { color: 0x808080 } )
); );
room.geometry.translate( 0, 3, 0 ); room.geometry.translate( 0, 3, 0 );
scene.add( room ); scene.add( room );
......
...@@ -22,9 +22,10 @@ ...@@ -22,9 +22,10 @@
<body> <body>
<script src="../build/three.js"></script> <script src="../build/three.js"></script>
<script src="js/vr/WebVR.js"></script> <script src="js/vr/WebVR.js"></script>
<script src="js/geometries/BoxLineGeometry.js"></script>
<script> <script>
var clock = new THREE.Clock(); var clock = new THREE.Clock();
...@@ -71,9 +72,9 @@ ...@@ -71,9 +72,9 @@
crosshair.position.z = - 2; crosshair.position.z = - 2;
camera.add( crosshair ); camera.add( crosshair );
room = new THREE.Mesh( room = new THREE.LineSegments(
new THREE.BoxBufferGeometry( 6, 6, 6, 8, 8, 8 ), new THREE.BoxLineGeometry( 6, 6, 6, 10, 10, 10 ),
new THREE.MeshBasicMaterial( { color: 0x404040, wireframe: true } ) new THREE.LineBasicMaterial( { color: 0x808080 } )
); );
room.position.y = 3; room.position.y = 3;
scene.add( room ); scene.add( room );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册