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

Examples: Reduced amount of objects in webgl_instancing

上级 770ddc2e
......@@ -17,7 +17,7 @@
var camera, scene, renderer, stats;
var mesh;
var amount = 12;
var amount = 10;
var count = Math.pow( amount, 3 );
var dummy = new THREE.Object3D();
......@@ -27,7 +27,7 @@
function init() {
camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, 0.1, 1000 );
camera.position.set( 10, 10, 10 );
camera.position.set( 9, 9, 9 );
camera.lookAt( 0, 0, 0 );
scene = new THREE.Scene();
......@@ -104,7 +104,7 @@
for ( var z = 0; z < amount; z ++ ) {
dummy.position.set( 6 - x, 6 - y, 6 - z );
dummy.position.set( 5 - x, 5 - y, 5 - z );
dummy.rotation.y = ( Math.sin( x / 4 + time ) + Math.sin( y / 4 + time ) + Math.sin( z / 4 + time ) );
dummy.rotation.z = dummy.rotation.y * 2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册