Browse Source

Fixed minecraft example. Continue using new geometries.

Mr.doob 11 years ago
parent
commit
536a4f2c1c

+ 1 - 1
examples/js/wip/CircleGeometry2.js

@@ -72,4 +72,4 @@ THREE.CircleGeometry2 = function ( radius, segments, thetaStart, thetaLength ) {
 
 
 };
 };
 
 
-THREE.CircleGeometry.prototype = Object.create( THREE.IndexedGeometry2.prototype );
+THREE.CircleGeometry2.prototype = Object.create( THREE.IndexedGeometry2.prototype );

+ 1 - 1
examples/js/wip/PlaneGeometry2.js

@@ -88,4 +88,4 @@ THREE.PlaneGeometry2 = function ( width, height, widthSegments, heightSegments )
 
 
 };
 };
 
 
-THREE.PlaneGeometry.prototype = Object.create( THREE.IndexedGeometry2.prototype );
+THREE.PlaneGeometry2.prototype = Object.create( THREE.IndexedGeometry2.prototype );

+ 9 - 5
examples/webgl_geometry_minecraft.html

@@ -49,6 +49,10 @@
 		<script src="js/Detector.js"></script>
 		<script src="js/Detector.js"></script>
 		<script src="js/libs/stats.min.js"></script>
 		<script src="js/libs/stats.min.js"></script>
 
 
+		<script src="js/wip/Geometry2.js"></script>
+		<script src="js/wip/IndexedGeometry2.js"></script>
+		<script src="js/wip/PlaneGeometry2.js"></script>
+
 		<script>
 		<script>
 
 
 			if ( ! Detector.webgl ) {
 			if ( ! Detector.webgl ) {
@@ -92,21 +96,21 @@
 
 
 				var matrix = new THREE.Matrix4();
 				var matrix = new THREE.Matrix4();
 
 
-				var pxGeometry = new THREE.PlaneGeometry( 100, 100 );
+				var pxGeometry = new THREE.PlaneGeometry2( 100, 100 );
 				// pxGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
 				// pxGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
 				// pxGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
 				// pxGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
 				// pxGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
 				// pxGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
 				pxGeometry.applyMatrix( matrix.makeRotationY( Math.PI / 2 ) );
 				pxGeometry.applyMatrix( matrix.makeRotationY( Math.PI / 2 ) );
 				pxGeometry.applyMatrix( matrix.makeTranslation( 50, 0, 0 ) );
 				pxGeometry.applyMatrix( matrix.makeTranslation( 50, 0, 0 ) );
 
 
-				var nxGeometry = new THREE.PlaneGeometry( 100, 100 );
+				var nxGeometry = new THREE.PlaneGeometry2( 100, 100 );
 				// nxGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
 				// nxGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
 				// nxGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
 				// nxGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
 				// nxGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
 				// nxGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
 				nxGeometry.applyMatrix( matrix.makeRotationY( - Math.PI / 2 ) );
 				nxGeometry.applyMatrix( matrix.makeRotationY( - Math.PI / 2 ) );
 				nxGeometry.applyMatrix( matrix.makeTranslation( - 50, 0, 0 ) );
 				nxGeometry.applyMatrix( matrix.makeTranslation( - 50, 0, 0 ) );
 
 
-				var pyGeometry = new THREE.PlaneGeometry( 100, 100 );
+				var pyGeometry = new THREE.PlaneGeometry2( 100, 100 );
 				pyGeometry.uvs[ 5 ] = 0.5;
 				pyGeometry.uvs[ 5 ] = 0.5;
 				pyGeometry.uvs[ 7 ] = 0.5;
 				pyGeometry.uvs[ 7 ] = 0.5;
 				// pyGeometry.faceVertexUvs[ 0 ][ 0 ][ 1 ].y = 0.5;
 				// pyGeometry.faceVertexUvs[ 0 ][ 0 ][ 1 ].y = 0.5;
@@ -115,13 +119,13 @@
 				pyGeometry.applyMatrix( matrix.makeRotationX( - Math.PI / 2 ) );
 				pyGeometry.applyMatrix( matrix.makeRotationX( - Math.PI / 2 ) );
 				pyGeometry.applyMatrix( matrix.makeTranslation( 0, 50, 0 ) );
 				pyGeometry.applyMatrix( matrix.makeTranslation( 0, 50, 0 ) );
 
 
-				var pzGeometry = new THREE.PlaneGeometry( 100, 100 );
+				var pzGeometry = new THREE.PlaneGeometry2( 100, 100 );
 				// pzGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
 				// pzGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
 				// pzGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
 				// pzGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
 				// pzGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
 				// pzGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
 				pzGeometry.applyMatrix( matrix.makeTranslation( 0, 0, 50 ) );
 				pzGeometry.applyMatrix( matrix.makeTranslation( 0, 0, 50 ) );
 
 
-				var nzGeometry = new THREE.PlaneGeometry( 100, 100 );
+				var nzGeometry = new THREE.PlaneGeometry2( 100, 100 );
 				// nzGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
 				// nzGeometry.faceVertexUvs[ 0 ][ 0 ][ 0 ].y = 0.5;
 				// nzGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
 				// nzGeometry.faceVertexUvs[ 0 ][ 0 ][ 2 ].y = 0.5;
 				// nzGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;
 				// nzGeometry.faceVertexUvs[ 0 ][ 1 ][ 2 ].y = 0.5;