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

* three.js: Fixed terrain example (was still using Scene.add())

上级 5b1a64e7
......@@ -101,7 +101,6 @@
var debugContext;
init();
loop();
setInterval(loop, 1000/60);
function init() {
......
......@@ -95,7 +95,7 @@
mesh = new THREE.Mesh( plane, material );
mesh.rotation.x = -90 * Math.PI / 180;
mesh.overdraw = true;
scene.add(mesh);
scene.addObject(mesh);
renderer = new THREE.CanvasRenderer();
renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
......
......@@ -435,10 +435,10 @@ THREE.Matrix4.makeOrtho = function( left, right, top, bottom, near, far ) {
m = new THREE.Matrix4();
w = right - left;
h = top - bottom; // bottom - top
h = top - bottom;
p = far - near;
x = ( right + left ) / w;
y = ( top + bottom ) / h; // ( bottom + top ) / h
y = ( top + bottom ) / h;
z = ( far + near ) / p;
m.n11 = 2 / w; m.n12 = 0; m.n13 = 0; m.n14 = -x;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册