Skip to content

Commit 12692ad

Browse files
committed
Updated builds.
1 parent f48e908 commit 12692ad

File tree

2 files changed

+147
-161
lines changed

2 files changed

+147
-161
lines changed

build/three.js

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,23 +2501,13 @@ THREE.Vector3.prototype = {
25012501

25022502
},
25032503

2504-
projectOnVector: function () {
2504+
projectOnVector: function ( vector ) {
25052505

2506-
var v1, dot;
2507-
2508-
return function projectOnVector( vector ) {
2509-
2510-
if ( v1 === undefined ) v1 = new THREE.Vector3();
2511-
2512-
v1.copy( vector ).normalize();
2513-
2514-
dot = this.dot( v1 );
2515-
2516-
return this.copy( v1 ).multiplyScalar( dot );
2517-
2518-
};
2519-
2520-
}(),
2506+
var scalar = vector.dot( this ) / vector.lengthSq();
2507+
2508+
return this.copy( vector ).multiplyScalar( scalar );
2509+
2510+
},
25212511

25222512
projectOnPlane: function () {
25232513

@@ -8410,7 +8400,7 @@ THREE.Layers.prototype = {
84108400

84118401
} else if ( camera instanceof THREE.OrthographicCamera ) {
84128402

8413-
this.ray.origin.set( coords.x, coords.y, - 1 ).unproject( camera );
8403+
this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera
84148404
this.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );
84158405

84168406
} else {
@@ -29980,7 +29970,7 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
2998029970

2998129971
function createTexture( type, target, count ) {
2998229972

29983-
var data = new Uint8Array( 3 );
29973+
var data = new Uint8Array( 4 ); // 4 is required to match default unpack alignment of 4.
2998429974
var texture = gl.createTexture();
2998529975

2998629976
gl.bindTexture( type, texture );
@@ -29989,7 +29979,7 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
2998929979

2999029980
for ( var i = 0; i < count; i ++ ) {
2999129981

29992-
gl.texImage2D( target + i, 0, gl.RGB, 1, 1, 0, gl.RGB, gl.UNSIGNED_BYTE, data );
29982+
gl.texImage2D( target + i, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, data );
2999329983

2999429984
}
2999529985

@@ -39620,7 +39610,7 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
3962039610
var v2 = p[ indices[ i + 1 ] ];
3962139611
var v3 = p[ indices[ i + 2 ] ];
3962239612

39623-
faces[ j ] = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ], undefined, j );
39613+
faces[ j ] = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ] );
3962439614

3962539615
}
3962639616

@@ -39697,9 +39687,9 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
3969739687

3969839688
// Approximate a curved face with recursively sub-divided triangles.
3969939689

39700-
function make( v1, v2, v3, materialIndex ) {
39690+
function make( v1, v2, v3 ) {
3970139691

39702-
var face = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ], undefined, materialIndex );
39692+
var face = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ] );
3970339693
that.faces.push( face );
3970439694

3970539695
centroid.copy( v1 ).add( v2 ).add( v3 ).divideScalar( 3 );
@@ -39725,8 +39715,6 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
3972539715
var c = prepare( that.vertices[ face.c ] );
3972639716
var v = [];
3972739717

39728-
var materialIndex = face.materialIndex;
39729-
3973039718
// Construct all of the vertices for this subdivision.
3973139719

3973239720
for ( var i = 0 ; i <= cols; i ++ ) {
@@ -39766,17 +39754,15 @@ THREE.PolyhedronGeometry = function ( vertices, indices, radius, detail ) {
3976639754
make(
3976739755
v[ i ][ k + 1 ],
3976839756
v[ i + 1 ][ k ],
39769-
v[ i ][ k ],
39770-
materialIndex
39757+
v[ i ][ k ]
3977139758
);
3977239759

3977339760
} else {
3977439761

3977539762
make(
3977639763
v[ i ][ k + 1 ],
3977739764
v[ i + 1 ][ k + 1 ],
39778-
v[ i + 1 ][ k ],
39779-
materialIndex
39765+
v[ i + 1 ][ k ]
3978039766
);
3978139767

3978239768
}

0 commit comments

Comments
 (0)