Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit adb27e0

Browse files
committed
Renamed *Geometry2 to *TypedGeometry
1 parent 218e847 commit adb27e0

10 files changed

+33
-33
lines changed

editor/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<script src="../examples/js/BufferGeometryUtils.js"></script>
3838

3939
<script src="../examples/js/exporters/BufferGeometryExporter.js"></script>
40-
<script src="../examples/js/exporters/Geometry2Exporter.js"></script>
40+
<script src="../examples/js/exporters/TypedGeometryExporter.js"></script>
4141
<script src="../examples/js/exporters/GeometryExporter.js"></script>
4242
<script src="../examples/js/exporters/MaterialExporter.js"></script>
4343
<script src="../examples/js/exporters/ObjectExporter.js"></script>

examples/js/exporters/Geometry2Exporter.js renamed to examples/js/exporters/TypedGeometryExporter.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
* @author mrdoob / http://mrdoob.com/
33
*/
44

5-
THREE.Geometry2Exporter = function () {};
5+
THREE.TypedGeometryExporter = function () {};
66

7-
THREE.Geometry2Exporter.prototype = {
7+
THREE.TypedGeometryExporter.prototype = {
88

9-
constructor: THREE.Geometry2Exporter,
9+
constructor: THREE.TypedGeometryExporter,
1010

1111
parse: function ( geometry ) {
1212

1313
var output = {
1414
metadata: {
1515
version: 4.0,
16-
type: 'Geometry2',
17-
generator: 'Geometry2Exporter'
16+
type: 'TypedGeometry',
17+
generator: 'TypedGeometryExporter'
1818
}
1919
};
2020

examples/js/loaders/STLLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ THREE.STLLoader.prototype.parseBinary = function ( data ) {
108108

109109
var offset = 0;
110110

111-
var geometry = new THREE.Geometry2( faces );
111+
var geometry = new THREE.TypedGeometry( faces );
112112

113113
for ( var face = 0; face < faces; face ++ ) {
114114

examples/js/wip/CircleGeometry2.js renamed to examples/js/wip/CircleTypedGeometry.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author mrdoob / http://mrdoob.com/
44
*/
55

6-
THREE.CircleGeometry2 = function ( radius, segments, thetaStart, thetaLength ) {
6+
THREE.CircleTypedGeometry = function ( radius, segments, thetaStart, thetaLength ) {
77

88
this.parameters = {
99
radius: radius,
@@ -64,12 +64,12 @@ THREE.CircleGeometry2 = function ( radius, segments, thetaStart, thetaLength ) {
6464

6565
}
6666

67-
THREE.IndexedGeometry2.call( this );
67+
THREE.IndexedTypedGeometry.call( this );
6868

6969
this.setArrays( indices, vertices, normals, uvs );
7070

7171
this.boundingSphere = new THREE.Sphere( new THREE.Vector3(), radius );
7272

7373
};
7474

75-
THREE.CircleGeometry2.prototype = Object.create( THREE.IndexedGeometry2.prototype );
75+
THREE.CircleTypedGeometry.prototype = Object.create( THREE.IndexedTypedGeometry.prototype );

examples/js/wip/IndexedGeometry2.js renamed to examples/js/wip/IndexedTypedGeometry.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
* @author mrdoob / http://mrdoob.com/
33
*/
44

5-
THREE.IndexedGeometry2 = function () {
5+
THREE.IndexedTypedGeometry = function () {
66

77
THREE.BufferGeometry.call( this );
88

99
};
1010

11-
THREE.IndexedGeometry2.prototype = Object.create( THREE.BufferGeometry.prototype );
11+
THREE.IndexedTypedGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );
1212

13-
THREE.IndexedGeometry2.prototype.setArrays = function ( indices, vertices, normals, uvs ) {
13+
THREE.IndexedTypedGeometry.prototype.setArrays = function ( indices, vertices, normals, uvs ) {
1414

1515
this.indices = indices;
1616
this.vertices = vertices;

examples/js/wip/PlaneGeometry2.js renamed to examples/js/wip/PlaneTypedGeometry.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Plane.as
44
*/
55

6-
THREE.PlaneGeometry2 = function ( width, height, widthSegments, heightSegments ) {
6+
THREE.PlaneTypedGeometry = function ( width, height, widthSegments, heightSegments ) {
77

88
this.parameters = {
99
width: width,
@@ -81,11 +81,11 @@ THREE.PlaneGeometry2 = function ( width, height, widthSegments, heightSegments )
8181

8282
}
8383

84-
THREE.IndexedGeometry2.call( this );
84+
THREE.IndexedTypedGeometry.call( this );
8585

8686
this.setArrays( indices, vertices, normals, uvs );
8787
this.computeBoundingSphere();
8888

8989
};
9090

91-
THREE.PlaneGeometry2.prototype = Object.create( THREE.IndexedGeometry2.prototype );
91+
THREE.PlaneTypedGeometry.prototype = Object.create( THREE.IndexedTypedGeometry.prototype );

examples/js/wip/Geometry2.js renamed to examples/js/wip/TypedGeometry.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @author mrdoob / http://mrdoob.com/
33
*/
44

5-
THREE.Geometry2 = function ( size ) {
5+
THREE.TypedGeometry = function ( size ) {
66

77
THREE.BufferGeometry.call( this );
88

@@ -20,9 +20,9 @@ THREE.Geometry2 = function ( size ) {
2020

2121
};
2222

23-
THREE.Geometry2.prototype = Object.create( THREE.BufferGeometry.prototype );
23+
THREE.TypedGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );
2424

25-
THREE.Geometry2.prototype.setArrays = function ( vertices, normals, uvs ) {
25+
THREE.TypedGeometry.prototype.setArrays = function ( vertices, normals, uvs ) {
2626

2727
this.vertices = vertices;
2828
this.normals = normals;
@@ -36,7 +36,7 @@ THREE.Geometry2.prototype.setArrays = function ( vertices, normals, uvs ) {
3636

3737
};
3838

39-
THREE.Geometry2.prototype.merge = ( function () {
39+
THREE.TypedGeometry.prototype.merge = ( function () {
4040

4141
var offset = 0;
4242
var normalMatrix = new THREE.Matrix3();
@@ -52,7 +52,7 @@ THREE.Geometry2.prototype.merge = ( function () {
5252
var normals = this.attributes[ 'normal' ].array;
5353
var uvs = this.attributes[ 'uv' ].array;
5454

55-
if ( geometry instanceof THREE.Geometry2 ) {
55+
if ( geometry instanceof THREE.TypedGeometry ) {
5656

5757
var vertices2 = geometry.attributes[ 'position' ].array;
5858
var normals2 = geometry.attributes[ 'normal' ].array;
@@ -73,7 +73,7 @@ THREE.Geometry2.prototype.merge = ( function () {
7373

7474
}
7575

76-
} else if ( geometry instanceof THREE.IndexedGeometry2 ) {
76+
} else if ( geometry instanceof THREE.IndexedTypedGeometry ) {
7777

7878
var indices2 = geometry.attributes[ 'index' ].array;
7979
var vertices2 = geometry.attributes[ 'position' ].array;

examples/webgl_geometry_minecraft.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
<script src="js/Detector.js"></script>
5050
<script src="js/libs/stats.min.js"></script>
5151

52-
<script src="js/wip/Geometry2.js"></script>
53-
<script src="js/wip/IndexedGeometry2.js"></script>
54-
<script src="js/wip/PlaneGeometry2.js"></script>
52+
<script src="js/wip/TypedGeometry.js"></script>
53+
<script src="js/wip/IndexedTypedGeometry.js"></script>
54+
<script src="js/wip/PlaneTypedGeometry.js"></script>
5555

5656
<script>
5757

@@ -96,38 +96,38 @@
9696

9797
var matrix = new THREE.Matrix4();
9898

99-
var pxGeometry = new THREE.PlaneGeometry2( 100, 100 );
99+
var pxGeometry = new THREE.PlaneTypedGeometry( 100, 100 );
100100
pxGeometry.uvs[ 1 ] = 0.5;
101101
pxGeometry.uvs[ 3 ] = 0.5;
102102
pxGeometry.applyMatrix( matrix.makeRotationY( Math.PI / 2 ) );
103103
pxGeometry.applyMatrix( matrix.makeTranslation( 50, 0, 0 ) );
104104

105-
var nxGeometry = new THREE.PlaneGeometry2( 100, 100 );
105+
var nxGeometry = new THREE.PlaneTypedGeometry( 100, 100 );
106106
nxGeometry.uvs[ 1 ] = 0.5;
107107
nxGeometry.uvs[ 3 ] = 0.5;
108108
nxGeometry.applyMatrix( matrix.makeRotationY( - Math.PI / 2 ) );
109109
nxGeometry.applyMatrix( matrix.makeTranslation( - 50, 0, 0 ) );
110110

111-
var pyGeometry = new THREE.PlaneGeometry2( 100, 100 );
111+
var pyGeometry = new THREE.PlaneTypedGeometry( 100, 100 );
112112
pyGeometry.uvs[ 5 ] = 0.5;
113113
pyGeometry.uvs[ 7 ] = 0.5;
114114
pyGeometry.applyMatrix( matrix.makeRotationX( - Math.PI / 2 ) );
115115
pyGeometry.applyMatrix( matrix.makeTranslation( 0, 50, 0 ) );
116116

117-
var pzGeometry = new THREE.PlaneGeometry2( 100, 100 );
117+
var pzGeometry = new THREE.PlaneTypedGeometry( 100, 100 );
118118
pzGeometry.uvs[ 1 ] = 0.5;
119119
pzGeometry.uvs[ 3 ] = 0.5;
120120
pzGeometry.applyMatrix( matrix.makeTranslation( 0, 0, 50 ) );
121121

122-
var nzGeometry = new THREE.PlaneGeometry2( 100, 100 );
122+
var nzGeometry = new THREE.PlaneTypedGeometry( 100, 100 );
123123
nzGeometry.uvs[ 1 ] = 0.5;
124124
nzGeometry.uvs[ 3 ] = 0.5;
125125
nzGeometry.applyMatrix( matrix.makeRotationY( Math.PI ) );
126126
nzGeometry.applyMatrix( matrix.makeTranslation( 0, 0, -50 ) );
127127

128128
//
129129

130-
var geometry = new THREE.Geometry2( worldWidth * worldDepth * 2 ); // 2 triangles
130+
var geometry = new THREE.TypedGeometry( worldWidth * worldDepth * 2 ); // 2 triangles
131131

132132
for ( var z = 0; z < worldDepth; z ++ ) {
133133

examples/webgl_gpgpu_birds.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@
381381
var points = triangles * 3;
382382

383383
THREE.BufferGeometry.call( this );
384-
// THREE.Geometry2.call( this, points );
385384

386385
var vertices = new THREE.Float32Attribute( points, 3 );
387386
var birdColors = new THREE.Float32Attribute( points, 3 );
@@ -457,7 +456,7 @@
457456

458457
}
459458

460-
THREE.BirdGeometry.prototype = Object.create( THREE.BufferGeometry.prototype ); // Geometry2
459+
THREE.BirdGeometry.prototype = Object.create( THREE.BufferGeometry.prototype );
461460

462461

463462
var container, stats;

examples/webgl_loader_stl.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<script src="../build/three.min.js"></script>
4646

4747
<script src="js/loaders/STLLoader.js"></script>
48+
<script src="js/wip/TypedGeometry.js"></script>
4849

4950
<script src="js/Detector.js"></script>
5051
<script src="js/libs/stats.min.js"></script>

0 commit comments

Comments
 (0)