|
185 | 185 |
|
186 | 186 | } ); |
187 | 187 |
|
188 | | - var REVISION = '93dev'; |
| 188 | + var REVISION = '93'; |
189 | 189 | var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 }; |
190 | 190 | var CullFaceNone = 0; |
191 | 191 | var CullFaceBack = 1; |
|
1092 | 1092 |
|
1093 | 1093 | return function extractRotation( m ) { |
1094 | 1094 |
|
| 1095 | + // this method does not support reflection matrices |
| 1096 | + |
1095 | 1097 | var te = this.elements; |
1096 | 1098 | var me = m.elements; |
1097 | 1099 |
|
|
1102 | 1104 | te[ 0 ] = me[ 0 ] * scaleX; |
1103 | 1105 | te[ 1 ] = me[ 1 ] * scaleX; |
1104 | 1106 | te[ 2 ] = me[ 2 ] * scaleX; |
| 1107 | + te[ 3 ] = 0; |
1105 | 1108 |
|
1106 | 1109 | te[ 4 ] = me[ 4 ] * scaleY; |
1107 | 1110 | te[ 5 ] = me[ 5 ] * scaleY; |
1108 | 1111 | te[ 6 ] = me[ 6 ] * scaleY; |
| 1112 | + te[ 7 ] = 0; |
1109 | 1113 |
|
1110 | 1114 | te[ 8 ] = me[ 8 ] * scaleZ; |
1111 | 1115 | te[ 9 ] = me[ 9 ] * scaleZ; |
1112 | 1116 | 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; |
1113 | 1123 |
|
1114 | 1124 | return this; |
1115 | 1125 |
|
|
28111 | 28121 | ExtrudeGeometry.prototype = Object.create( Geometry.prototype ); |
28112 | 28122 | ExtrudeGeometry.prototype.constructor = ExtrudeGeometry; |
28113 | 28123 |
|
| 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 | + |
28114 | 28135 | // ExtrudeBufferGeometry |
28115 | 28136 |
|
28116 | 28137 | function ExtrudeBufferGeometry( shapes, options ) { |
|
28779 | 28800 | ExtrudeBufferGeometry.prototype = Object.create( BufferGeometry.prototype ); |
28780 | 28801 | ExtrudeBufferGeometry.prototype.constructor = ExtrudeBufferGeometry; |
28781 | 28802 |
|
| 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 | + |
28782 | 28816 | var WorldUVGenerator = { |
28783 | 28817 |
|
28784 | 28818 | generateTopUV: function ( geometry, vertices, indexA, indexB, indexC ) { |
|
28836 | 28870 | } |
28837 | 28871 | }; |
28838 | 28872 |
|
| 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 | + |
28839 | 28903 | /** |
28840 | 28904 | * @author zz85 / http://www.lab4games.net/zz85/blog |
28841 | 28905 | * @author alteredq / http://alteredqualia.com/ |
|
29419 | 29483 |
|
29420 | 29484 | var shapes = this.parameters.shapes; |
29421 | 29485 |
|
29422 | | - return toJSON( shapes, data ); |
| 29486 | + return toJSON$1( shapes, data ); |
29423 | 29487 |
|
29424 | 29488 | }; |
29425 | 29489 |
|
@@ -29564,13 +29628,13 @@ |
29564 | 29628 |
|
29565 | 29629 | var shapes = this.parameters.shapes; |
29566 | 29630 |
|
29567 | | - return toJSON( shapes, data ); |
| 29631 | + return toJSON$1( shapes, data ); |
29568 | 29632 |
|
29569 | 29633 | }; |
29570 | 29634 |
|
29571 | 29635 | // |
29572 | 29636 |
|
29573 | | - function toJSON( shapes, data ) { |
| 29637 | + function toJSON$1( shapes, data ) { |
29574 | 29638 |
|
29575 | 29639 | data.shapes = []; |
29576 | 29640 |
|
|
30173 | 30237 |
|
30174 | 30238 |
|
30175 | 30239 |
|
30176 | | - var Geometries = Object.freeze({ |
| 30240 | + var Geometries = /*#__PURE__*/Object.freeze({ |
30177 | 30241 | WireframeGeometry: WireframeGeometry, |
30178 | 30242 | ParametricGeometry: ParametricGeometry, |
30179 | 30243 | ParametricBufferGeometry: ParametricBufferGeometry, |
|
30943 | 31007 |
|
30944 | 31008 |
|
30945 | 31009 |
|
30946 | | - var Materials = Object.freeze({ |
| 31010 | + var Materials = /*#__PURE__*/Object.freeze({ |
30947 | 31011 | ShadowMaterial: ShadowMaterial, |
30948 | 31012 | SpriteMaterial: SpriteMaterial, |
30949 | 31013 | RawShaderMaterial: RawShaderMaterial, |
|
31622 | 31686 | * @author mrdoob / http://mrdoob.com/ |
31623 | 31687 | */ |
31624 | 31688 |
|
| 31689 | + |
31625 | 31690 | function ImageLoader( manager ) { |
31626 | 31691 |
|
31627 | 31692 | this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager; |
|
31724 | 31789 | * @author mrdoob / http://mrdoob.com/ |
31725 | 31790 | */ |
31726 | 31791 |
|
| 31792 | + |
31727 | 31793 | function CubeTextureLoader( manager ) { |
31728 | 31794 |
|
31729 | 31795 | this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager; |
|
31794 | 31860 | * @author mrdoob / http://mrdoob.com/ |
31795 | 31861 | */ |
31796 | 31862 |
|
| 31863 | + |
31797 | 31864 | function TextureLoader( manager ) { |
31798 | 31865 |
|
31799 | 31866 | this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager; |
|
32514 | 32581 | // |
32515 | 32582 |
|
32516 | 32583 | 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(); |
32520 | 32585 |
|
32521 | 32586 | function CatmullRomCurve3( points, closed, curveType, tension ) { |
32522 | 32587 |
|
|
33301 | 33366 |
|
33302 | 33367 |
|
33303 | 33368 |
|
33304 | | - var Curves = Object.freeze({ |
| 33369 | + var Curves = /*#__PURE__*/Object.freeze({ |
33305 | 33370 | ArcCurve: ArcCurve, |
33306 | 33371 | CatmullRomCurve3: CatmullRomCurve3, |
33307 | 33372 | CubicBezierCurve: CubicBezierCurve, |
|
37524 | 37589 |
|
37525 | 37590 | break; |
37526 | 37591 |
|
| 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 | + |
37527 | 37621 | case 'BufferGeometry': |
37528 | 37622 |
|
37529 | 37623 | geometry = bufferGeometryLoader.parse( data ); |
|
38050 | 38144 | * @author thespite / http://clicktorelease.com/ |
38051 | 38145 | */ |
38052 | 38146 |
|
| 38147 | + |
38053 | 38148 | function ImageBitmapLoader( manager ) { |
38054 | 38149 |
|
38055 | 38150 | if ( typeof createImageBitmap === 'undefined' ) { |
|
38435 | 38530 | * @author mrdoob / http://mrdoob.com/ |
38436 | 38531 | */ |
38437 | 38532 |
|
| 38533 | + |
38438 | 38534 | function Font( data ) { |
38439 | 38535 |
|
38440 | 38536 | this.type = 'Font'; |
|
44476 | 44572 | * headWidth - Number |
44477 | 44573 | */ |
44478 | 44574 |
|
44479 | | - var lineGeometry; |
44480 | | - var coneGeometry; |
| 44575 | + var lineGeometry, coneGeometry; |
44481 | 44576 |
|
44482 | 44577 | function ArrowHelper( dir, origin, length, color, headLength, headWidth ) { |
44483 | 44578 |
|
|
0 commit comments