Skip to content

Commit 35ae830

Browse files
committed
r93
1 parent 6bb8268 commit 35ae830

File tree

6 files changed

+746
-554
lines changed

6 files changed

+746
-554
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Please also include a live example if possible. You can start from these templat
1919
##### Three.js version
2020

2121
- [ ] Dev
22-
- [ ] r92
22+
- [ ] r93
2323
- [ ] ...
2424

2525
##### Browser

build/three.js

Lines changed: 107 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185

186186
} );
187187

188-
var REVISION = '93dev';
188+
var REVISION = '93';
189189
var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
190190
var CullFaceNone = 0;
191191
var CullFaceBack = 1;
@@ -1092,6 +1092,8 @@
10921092

10931093
return function extractRotation( m ) {
10941094

1095+
// this method does not support reflection matrices
1096+
10951097
var te = this.elements;
10961098
var me = m.elements;
10971099

@@ -1102,14 +1104,22 @@
11021104
te[ 0 ] = me[ 0 ] * scaleX;
11031105
te[ 1 ] = me[ 1 ] * scaleX;
11041106
te[ 2 ] = me[ 2 ] * scaleX;
1107+
te[ 3 ] = 0;
11051108

11061109
te[ 4 ] = me[ 4 ] * scaleY;
11071110
te[ 5 ] = me[ 5 ] * scaleY;
11081111
te[ 6 ] = me[ 6 ] * scaleY;
1112+
te[ 7 ] = 0;
11091113

11101114
te[ 8 ] = me[ 8 ] * scaleZ;
11111115
te[ 9 ] = me[ 9 ] * scaleZ;
11121116
te[ 10 ] = me[ 10 ] * scaleZ;
1117+
te[ 11 ] = 0;
1118+
1119+
te[ 12 ] = 0;
1120+
te[ 13 ] = 0;
1121+
te[ 14 ] = 0;
1122+
te[ 15 ] = 1;
11131123

11141124
return this;
11151125

@@ -28111,6 +28121,17 @@
2811128121
ExtrudeGeometry.prototype = Object.create( Geometry.prototype );
2811228122
ExtrudeGeometry.prototype.constructor = ExtrudeGeometry;
2811328123

28124+
ExtrudeGeometry.prototype.toJSON = function () {
28125+
28126+
var data = Geometry.prototype.toJSON.call( this );
28127+
28128+
var shapes = this.parameters.shapes;
28129+
var options = this.parameters.options;
28130+
28131+
return toJSON( shapes, options, data );
28132+
28133+
};
28134+
2811428135
// ExtrudeBufferGeometry
2811528136

2811628137
function ExtrudeBufferGeometry( shapes, options ) {
@@ -28779,6 +28800,19 @@
2877928800
ExtrudeBufferGeometry.prototype = Object.create( BufferGeometry.prototype );
2878028801
ExtrudeBufferGeometry.prototype.constructor = ExtrudeBufferGeometry;
2878128802

28803+
ExtrudeBufferGeometry.prototype.toJSON = function () {
28804+
28805+
var data = BufferGeometry.prototype.toJSON.call( this );
28806+
28807+
var shapes = this.parameters.shapes;
28808+
var options = this.parameters.options;
28809+
28810+
return toJSON( shapes, options, data );
28811+
28812+
};
28813+
28814+
//
28815+
2878228816
var WorldUVGenerator = {
2878328817

2878428818
generateTopUV: function ( geometry, vertices, indexA, indexB, indexC ) {
@@ -28836,6 +28870,36 @@
2883628870
}
2883728871
};
2883828872

28873+
function toJSON( shapes, options, data ) {
28874+
28875+
//
28876+
28877+
data.shapes = [];
28878+
28879+
if ( Array.isArray( shapes ) ) {
28880+
28881+
for ( var i = 0, l = shapes.length; i < l; i ++ ) {
28882+
28883+
var shape = shapes[ i ];
28884+
28885+
data.shapes.push( shape.uuid );
28886+
28887+
}
28888+
28889+
} else {
28890+
28891+
data.shapes.push( shapes.uuid );
28892+
28893+
}
28894+
28895+
//
28896+
28897+
if ( options.extrudePath !== undefined ) data.options.extrudePath = options.extrudePath.toJSON();
28898+
28899+
return data;
28900+
28901+
}
28902+
2883928903
/**
2884028904
* @author zz85 / http://www.lab4games.net/zz85/blog
2884128905
* @author alteredq / http://alteredqualia.com/
@@ -29419,7 +29483,7 @@
2941929483

2942029484
var shapes = this.parameters.shapes;
2942129485

29422-
return toJSON( shapes, data );
29486+
return toJSON$1( shapes, data );
2942329487

2942429488
};
2942529489

@@ -29564,13 +29628,13 @@
2956429628

2956529629
var shapes = this.parameters.shapes;
2956629630

29567-
return toJSON( shapes, data );
29631+
return toJSON$1( shapes, data );
2956829632

2956929633
};
2957029634

2957129635
//
2957229636

29573-
function toJSON( shapes, data ) {
29637+
function toJSON$1( shapes, data ) {
2957429638

2957529639
data.shapes = [];
2957629640

@@ -30173,7 +30237,7 @@
3017330237

3017430238

3017530239

30176-
var Geometries = Object.freeze({
30240+
var Geometries = /*#__PURE__*/Object.freeze({
3017730241
WireframeGeometry: WireframeGeometry,
3017830242
ParametricGeometry: ParametricGeometry,
3017930243
ParametricBufferGeometry: ParametricBufferGeometry,
@@ -30943,7 +31007,7 @@
3094331007

3094431008

3094531009

30946-
var Materials = Object.freeze({
31010+
var Materials = /*#__PURE__*/Object.freeze({
3094731011
ShadowMaterial: ShadowMaterial,
3094831012
SpriteMaterial: SpriteMaterial,
3094931013
RawShaderMaterial: RawShaderMaterial,
@@ -31622,6 +31686,7 @@
3162231686
* @author mrdoob / http://mrdoob.com/
3162331687
*/
3162431688

31689+
3162531690
function ImageLoader( manager ) {
3162631691

3162731692
this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager;
@@ -31724,6 +31789,7 @@
3172431789
* @author mrdoob / http://mrdoob.com/
3172531790
*/
3172631791

31792+
3172731793
function CubeTextureLoader( manager ) {
3172831794

3172931795
this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager;
@@ -31794,6 +31860,7 @@
3179431860
* @author mrdoob / http://mrdoob.com/
3179531861
*/
3179631862

31863+
3179731864
function TextureLoader( manager ) {
3179831865

3179931866
this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager;
@@ -32514,9 +32581,7 @@
3251432581
//
3251532582

3251632583
var tmp = new Vector3();
32517-
var px = new CubicPoly();
32518-
var py = new CubicPoly();
32519-
var pz = new CubicPoly();
32584+
var px = new CubicPoly(), py = new CubicPoly(), pz = new CubicPoly();
3252032585

3252132586
function CatmullRomCurve3( points, closed, curveType, tension ) {
3252232587

@@ -33301,7 +33366,7 @@
3330133366

3330233367

3330333368

33304-
var Curves = Object.freeze({
33369+
var Curves = /*#__PURE__*/Object.freeze({
3330533370
ArcCurve: ArcCurve,
3330633371
CatmullRomCurve3: CatmullRomCurve3,
3330733372
CubicBezierCurve: CubicBezierCurve,
@@ -37524,6 +37589,35 @@
3752437589

3752537590
break;
3752637591

37592+
37593+
case 'ExtrudeGeometry':
37594+
case 'ExtrudeBufferGeometry':
37595+
37596+
var geometryShapes = [];
37597+
37598+
for ( var j = 0, jl = data.shapes.length; j < jl; j ++ ) {
37599+
37600+
var shape = shapes[ data.shapes[ j ] ];
37601+
37602+
geometryShapes.push( shape );
37603+
37604+
}
37605+
37606+
var extrudePath = data.options.extrudePath;
37607+
37608+
if ( extrudePath !== undefined ) {
37609+
37610+
data.options.extrudePath = new Curves[ extrudePath.type ]().fromJSON( extrudePath );
37611+
37612+
}
37613+
37614+
geometry = new Geometries[ data.type ](
37615+
geometryShapes,
37616+
data.options
37617+
);
37618+
37619+
break;
37620+
3752737621
case 'BufferGeometry':
3752837622

3752937623
geometry = bufferGeometryLoader.parse( data );
@@ -38050,6 +38144,7 @@
3805038144
* @author thespite / http://clicktorelease.com/
3805138145
*/
3805238146

38147+
3805338148
function ImageBitmapLoader( manager ) {
3805438149

3805538150
if ( typeof createImageBitmap === 'undefined' ) {
@@ -38435,6 +38530,7 @@
3843538530
* @author mrdoob / http://mrdoob.com/
3843638531
*/
3843738532

38533+
3843838534
function Font( data ) {
3843938535

3844038536
this.type = 'Font';
@@ -44476,8 +44572,7 @@
4447644572
* headWidth - Number
4447744573
*/
4447844574

44479-
var lineGeometry;
44480-
var coneGeometry;
44575+
var lineGeometry, coneGeometry;
4448144576

4448244577
function ArrowHelper( dir, origin, length, color, headLength, headWidth ) {
4448344578

0 commit comments

Comments
 (0)