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

Fixed minecraft examples.

上级 714a93d3
......@@ -78,7 +78,7 @@
position: absolute;
left: 300px;
width: -webkit-calc(100% - 300px);
width: -webkit-calc(100% - 300px); /* Safari */
width: calc(100% - 300px);
height: 100%;
border: 0px;
......
......@@ -94,29 +94,34 @@
var pxGeometry = new THREE.PlaneGeometry( 100, 100 );
pxGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
pxGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
pxGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
pxGeometry.applyMatrix( matrix.makeRotationY( Math.PI / 2 ) );
pxGeometry.applyMatrix( matrix.makeTranslation( 50, 0, 0 ) );
var nxGeometry = new THREE.PlaneGeometry( 100, 100 );
nxGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
nxGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
nxGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
nxGeometry.applyMatrix( matrix.makeRotationY( - Math.PI / 2 ) );
nxGeometry.applyMatrix( matrix.makeTranslation( - 50, 0, 0 ) );
var pyGeometry = new THREE.PlaneGeometry( 100, 100 );
pyGeometry.faceVertexUvs[ 0 ][ 0 ][ 1 ].y = 0.5;
pyGeometry.faceVertexUvs[ 0 ][ 1 ][ 0 ].y = 0.5;
pyGeometry.faceVertexUvs[ 0 ][ 1 ][ 1 ].y = 0.5;
pyGeometry.applyMatrix( matrix.makeRotationX( - Math.PI / 2 ) );
pyGeometry.applyMatrix( matrix.makeTranslation( 0, 50, 0 ) );
var pzGeometry = new THREE.PlaneGeometry( 100, 100 );
pzGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
pzGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
pzGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
pzGeometry.applyMatrix( matrix.makeTranslation( 0, 0, 50 ) );
var nzGeometry = new THREE.PlaneGeometry( 100, 100 );
nzGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
nzGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
nzGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
nzGeometry.applyMatrix( matrix.makeRotationY( Math.PI ) );
nzGeometry.applyMatrix( matrix.makeTranslation( 0, 0, -50 ) );
......
......@@ -106,6 +106,7 @@
pxGeometry.faces[ 0 ].vertexColors.push( light, shadow, light );
pxGeometry.faces[ 1 ].vertexColors.push( shadow, shadow, light );
pxGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
pxGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
pxGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
pxGeometry.applyMatrix( matrix.makeRotationY( Math.PI / 2 ) );
pxGeometry.applyMatrix( matrix.makeTranslation( 50, 0, 0 ) );
......@@ -114,6 +115,7 @@
nxGeometry.faces[ 0 ].vertexColors.push( light, shadow, light );
nxGeometry.faces[ 1 ].vertexColors.push( shadow, shadow, light );
nxGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
nxGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
nxGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
nxGeometry.applyMatrix( matrix.makeRotationY( - Math.PI / 2 ) );
nxGeometry.applyMatrix( matrix.makeTranslation( - 50, 0, 0 ) );
......@@ -122,6 +124,7 @@
pyGeometry.faces[ 0 ].vertexColors.push( light, light, light );
pyGeometry.faces[ 1 ].vertexColors.push( light, light, light );
pyGeometry.faceVertexUvs[ 0 ][ 0 ][ 1 ].y = 0.5;
pyGeometry.faceVertexUvs[ 0 ][ 1 ][ 0 ].y = 0.5;
pyGeometry.faceVertexUvs[ 0 ][ 1 ][ 1 ].y = 0.5;
pyGeometry.applyMatrix( matrix.makeRotationX( - Math.PI / 2 ) );
pyGeometry.applyMatrix( matrix.makeTranslation( 0, 50, 0 ) );
......@@ -130,6 +133,7 @@
py2Geometry.faces[ 0 ].vertexColors.push( light, light, light );
py2Geometry.faces[ 1 ].vertexColors.push( light, light, light );
py2Geometry.faceVertexUvs[ 0 ][ 0 ][ 1 ].y = 0.5;
py2Geometry.faceVertexUvs[ 0 ][ 1 ][ 0 ].y = 0.5;
py2Geometry.faceVertexUvs[ 0 ][ 1 ][ 1 ].y = 0.5;
py2Geometry.applyMatrix( matrix.makeRotationX( - Math.PI / 2 ) );
py2Geometry.applyMatrix( matrix.makeRotationY( Math.PI / 2 ) );
......@@ -139,6 +143,7 @@
pzGeometry.faces[ 0 ].vertexColors.push( light, shadow, light );
pzGeometry.faces[ 1 ].vertexColors.push( shadow, shadow, light );
pzGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
pzGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
pzGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
pzGeometry.applyMatrix( matrix.makeTranslation( 0, 0, 50 ) );
......@@ -146,6 +151,7 @@
nzGeometry.faces[ 0 ].vertexColors.push( light, shadow, light );
nzGeometry.faces[ 1 ].vertexColors.push( shadow, shadow, light );
nzGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
nzGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
nzGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
nzGeometry.applyMatrix( matrix.makeRotationY( Math.PI ) );
nzGeometry.applyMatrix( matrix.makeTranslation( 0, 0, - 50 ) );
......
......@@ -95,32 +95,38 @@
var pxGeometry = new THREE.PlaneGeometry( 100, 100 );
pxGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
pxGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
pxGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
pxGeometry.applyMatrix( matrix.makeRotationY( Math.PI / 2 ) );
pxGeometry.applyMatrix( matrix.makeTranslation( 50, 0, 0 ) );
var nxGeometry = new THREE.PlaneGeometry( 100, 100 );
nxGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
nxGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
nxGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
nxGeometry.applyMatrix( matrix.makeRotationY( - Math.PI / 2 ) );
nxGeometry.applyMatrix( matrix.makeTranslation( - 50, 0, 0 ) );
var pyGeometry = new THREE.PlaneGeometry( 100, 100 );
pyGeometry.faceVertexUvs[ 0 ][ 0 ][ 1 ].y = 0.5;
pyGeometry.faceVertexUvs[ 0 ][ 1 ][ 0 ].y = 0.5;
pyGeometry.faceVertexUvs[ 0 ][ 1 ][ 1 ].y = 0.5;
pyGeometry.applyMatrix( matrix.makeRotationX( - Math.PI / 2 ) );
pyGeometry.applyMatrix( matrix.makeTranslation( 0, 50, 0 ) );
var pzGeometry = new THREE.PlaneGeometry( 100, 100 );
pzGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
pzGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
pzGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
pzGeometry.applyMatrix( matrix.makeTranslation( 0, 0, 50 ) );
var nzGeometry = new THREE.PlaneGeometry( 100, 100 );
nzGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
nzGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
nzGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
nzGeometry.applyMatrix( matrix.makeRotationY( Math.PI ) );
nzGeometry.applyMatrix( matrix.makeTranslation( 0, 0, -50 ) );
//
var geometry = new THREE.Geometry();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册