1 |
|
2 |
|
3 |
|
4 |
|
5 | import { Audio } from './audio/Audio.js';
|
6 | import { AudioAnalyser } from './audio/AudioAnalyser.js';
|
7 | import { PerspectiveCamera } from './cameras/PerspectiveCamera.js';
|
8 | import { FlatShading } from './constants.js';
|
9 | import {
|
10 | Float64BufferAttribute,
|
11 | Float32BufferAttribute,
|
12 | Uint32BufferAttribute,
|
13 | Int32BufferAttribute,
|
14 | Uint16BufferAttribute,
|
15 | Int16BufferAttribute,
|
16 | Uint8ClampedBufferAttribute,
|
17 | Uint8BufferAttribute,
|
18 | Int8BufferAttribute,
|
19 | BufferAttribute
|
20 | } from './core/BufferAttribute.js';
|
21 | import { BufferGeometry } from './core/BufferGeometry.js';
|
22 | import { Face3 } from './core/Face3.js';
|
23 | import { Geometry } from './core/Geometry.js';
|
24 | import { Object3D } from './core/Object3D.js';
|
25 | import { Uniform } from './core/Uniform.js';
|
26 | import { Curve } from './extras/core/Curve.js';
|
27 | import { CurvePath } from './extras/core/CurvePath.js';
|
28 | import { Path } from './extras/core/Path.js';
|
29 | import { CatmullRomCurve3 } from './extras/curves/CatmullRomCurve3.js';
|
30 | import { AxesHelper } from './helpers/AxesHelper.js';
|
31 | import { BoxHelper } from './helpers/BoxHelper.js';
|
32 | import { GridHelper } from './helpers/GridHelper.js';
|
33 | import { SkeletonHelper } from './helpers/SkeletonHelper.js';
|
34 | import { BoxGeometry } from './geometries/BoxGeometry.js';
|
35 | import { EdgesGeometry } from './geometries/EdgesGeometry.js';
|
36 | import { ExtrudeGeometry } from './geometries/ExtrudeGeometry.js';
|
37 | import { ExtrudeBufferGeometry } from './geometries/ExtrudeGeometry.js';
|
38 | import { ShapeGeometry } from './geometries/ShapeGeometry.js';
|
39 | import { WireframeGeometry } from './geometries/WireframeGeometry.js';
|
40 | import { Light } from './lights/Light.js';
|
41 | import { Loader } from './loaders/Loader.js';
|
42 | import { LoaderUtils } from './loaders/LoaderUtils.js';
|
43 | import { FileLoader } from './loaders/FileLoader.js';
|
44 | import { AudioLoader } from './loaders/AudioLoader.js';
|
45 | import { CubeTextureLoader } from './loaders/CubeTextureLoader.js';
|
46 | import { DataTextureLoader } from './loaders/DataTextureLoader.js';
|
47 | import { TextureLoader } from './loaders/TextureLoader.js';
|
48 | import { Material } from './materials/Material.js';
|
49 | import { LineBasicMaterial } from './materials/LineBasicMaterial.js';
|
50 | import { MeshPhongMaterial } from './materials/MeshPhongMaterial.js';
|
51 | import { PointsMaterial } from './materials/PointsMaterial.js';
|
52 | import { ShaderMaterial } from './materials/ShaderMaterial.js';
|
53 | import { Box2 } from './math/Box2.js';
|
54 | import { Box3 } from './math/Box3.js';
|
55 | import { Color } from './math/Color.js';
|
56 | import { Line3 } from './math/Line3.js';
|
57 | import { _Math } from './math/Math.js';
|
58 | import { Matrix3 } from './math/Matrix3.js';
|
59 | import { Matrix4 } from './math/Matrix4.js';
|
60 | import { Plane } from './math/Plane.js';
|
61 | import { Quaternion } from './math/Quaternion.js';
|
62 | import { Ray } from './math/Ray.js';
|
63 | import { Triangle } from './math/Triangle.js';
|
64 | import { Vector2 } from './math/Vector2.js';
|
65 | import { Vector3 } from './math/Vector3.js';
|
66 | import { Vector4 } from './math/Vector4.js';
|
67 | import { LineSegments } from './objects/LineSegments.js';
|
68 | import { LOD } from './objects/LOD.js';
|
69 | import { Points } from './objects/Points.js';
|
70 | import { Sprite } from './objects/Sprite.js';
|
71 | import { Skeleton } from './objects/Skeleton.js';
|
72 | import { WebGLRenderer } from './renderers/WebGLRenderer.js';
|
73 | import { WebGLRenderTarget } from './renderers/WebGLRenderTarget.js';
|
74 | import { WebGLShadowMap } from './renderers/webgl/WebGLShadowMap.js';
|
75 | import { WebVRManager } from './renderers/webvr/WebVRManager.js';
|
76 | import { Shape } from './extras/core/Shape.js';
|
77 | import { CubeCamera } from './cameras/CubeCamera.js';
|
78 |
|
79 | export { BoxGeometry as CubeGeometry };
|
80 |
|
81 | export function Face4( a, b, c, d, normal, color, materialIndex ) {
|
82 |
|
83 | console.warn( 'THREE.Face4 has been removed. A THREE.Face3 will be created instead.' );
|
84 | return new Face3( a, b, c, normal, color, materialIndex );
|
85 |
|
86 | }
|
87 |
|
88 | export var LineStrip = 0;
|
89 |
|
90 | export var LinePieces = 1;
|
91 |
|
92 | export function MeshFaceMaterial( materials ) {
|
93 |
|
94 | console.warn( 'THREE.MeshFaceMaterial has been removed. Use an Array instead.' );
|
95 | return materials;
|
96 |
|
97 | }
|
98 |
|
99 | export function MultiMaterial( materials ) {
|
100 |
|
101 | if ( materials === undefined ) materials = [];
|
102 |
|
103 | console.warn( 'THREE.MultiMaterial has been removed. Use an Array instead.' );
|
104 | materials.isMultiMaterial = true;
|
105 | materials.materials = materials;
|
106 | materials.clone = function () {
|
107 |
|
108 | return materials.slice();
|
109 |
|
110 | };
|
111 | return materials;
|
112 |
|
113 | }
|
114 |
|
115 | export function PointCloud( geometry, material ) {
|
116 |
|
117 | console.warn( 'THREE.PointCloud has been renamed to THREE.Points.' );
|
118 | return new Points( geometry, material );
|
119 |
|
120 | }
|
121 |
|
122 | export function Particle( material ) {
|
123 |
|
124 | console.warn( 'THREE.Particle has been renamed to THREE.Sprite.' );
|
125 | return new Sprite( material );
|
126 |
|
127 | }
|
128 |
|
129 | export function ParticleSystem( geometry, material ) {
|
130 |
|
131 | console.warn( 'THREE.ParticleSystem has been renamed to THREE.Points.' );
|
132 | return new Points( geometry, material );
|
133 |
|
134 | }
|
135 |
|
136 | export function PointCloudMaterial( parameters ) {
|
137 |
|
138 | console.warn( 'THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.' );
|
139 | return new PointsMaterial( parameters );
|
140 |
|
141 | }
|
142 |
|
143 | export function ParticleBasicMaterial( parameters ) {
|
144 |
|
145 | console.warn( 'THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.' );
|
146 | return new PointsMaterial( parameters );
|
147 |
|
148 | }
|
149 |
|
150 | export function ParticleSystemMaterial( parameters ) {
|
151 |
|
152 | console.warn( 'THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.' );
|
153 | return new PointsMaterial( parameters );
|
154 |
|
155 | }
|
156 |
|
157 | export function Vertex( x, y, z ) {
|
158 |
|
159 | console.warn( 'THREE.Vertex has been removed. Use THREE.Vector3 instead.' );
|
160 | return new Vector3( x, y, z );
|
161 |
|
162 | }
|
163 |
|
164 |
|
165 |
|
166 | export function DynamicBufferAttribute( array, itemSize ) {
|
167 |
|
168 | console.warn( 'THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead.' );
|
169 | return new BufferAttribute( array, itemSize ).setDynamic( true );
|
170 |
|
171 | }
|
172 |
|
173 | export function Int8Attribute( array, itemSize ) {
|
174 |
|
175 | console.warn( 'THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.' );
|
176 | return new Int8BufferAttribute( array, itemSize );
|
177 |
|
178 | }
|
179 |
|
180 | export function Uint8Attribute( array, itemSize ) {
|
181 |
|
182 | console.warn( 'THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.' );
|
183 | return new Uint8BufferAttribute( array, itemSize );
|
184 |
|
185 | }
|
186 |
|
187 | export function Uint8ClampedAttribute( array, itemSize ) {
|
188 |
|
189 | console.warn( 'THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.' );
|
190 | return new Uint8ClampedBufferAttribute( array, itemSize );
|
191 |
|
192 | }
|
193 |
|
194 | export function Int16Attribute( array, itemSize ) {
|
195 |
|
196 | console.warn( 'THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.' );
|
197 | return new Int16BufferAttribute( array, itemSize );
|
198 |
|
199 | }
|
200 |
|
201 | export function Uint16Attribute( array, itemSize ) {
|
202 |
|
203 | console.warn( 'THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.' );
|
204 | return new Uint16BufferAttribute( array, itemSize );
|
205 |
|
206 | }
|
207 |
|
208 | export function Int32Attribute( array, itemSize ) {
|
209 |
|
210 | console.warn( 'THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.' );
|
211 | return new Int32BufferAttribute( array, itemSize );
|
212 |
|
213 | }
|
214 |
|
215 | export function Uint32Attribute( array, itemSize ) {
|
216 |
|
217 | console.warn( 'THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.' );
|
218 | return new Uint32BufferAttribute( array, itemSize );
|
219 |
|
220 | }
|
221 |
|
222 | export function Float32Attribute( array, itemSize ) {
|
223 |
|
224 | console.warn( 'THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.' );
|
225 | return new Float32BufferAttribute( array, itemSize );
|
226 |
|
227 | }
|
228 |
|
229 | export function Float64Attribute( array, itemSize ) {
|
230 |
|
231 | console.warn( 'THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.' );
|
232 | return new Float64BufferAttribute( array, itemSize );
|
233 |
|
234 | }
|
235 |
|
236 |
|
237 |
|
238 | Curve.create = function ( construct, getPoint ) {
|
239 |
|
240 | console.log( 'THREE.Curve.create() has been deprecated' );
|
241 |
|
242 | construct.prototype = Object.create( Curve.prototype );
|
243 | construct.prototype.constructor = construct;
|
244 | construct.prototype.getPoint = getPoint;
|
245 |
|
246 | return construct;
|
247 |
|
248 | };
|
249 |
|
250 |
|
251 |
|
252 | Object.assign( CurvePath.prototype, {
|
253 |
|
254 | createPointsGeometry: function ( divisions ) {
|
255 |
|
256 | console.warn( 'THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.' );
|
257 |
|
258 |
|
259 |
|
260 | var pts = this.getPoints( divisions );
|
261 | return this.createGeometry( pts );
|
262 |
|
263 | },
|
264 |
|
265 | createSpacedPointsGeometry: function ( divisions ) {
|
266 |
|
267 | console.warn( 'THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.' );
|
268 |
|
269 |
|
270 |
|
271 | var pts = this.getSpacedPoints( divisions );
|
272 | return this.createGeometry( pts );
|
273 |
|
274 | },
|
275 |
|
276 | createGeometry: function ( points ) {
|
277 |
|
278 | console.warn( 'THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.' );
|
279 |
|
280 | var geometry = new Geometry();
|
281 |
|
282 | for ( var i = 0, l = points.length; i < l; i ++ ) {
|
283 |
|
284 | var point = points[ i ];
|
285 | geometry.vertices.push( new Vector3( point.x, point.y, point.z || 0 ) );
|
286 |
|
287 | }
|
288 |
|
289 | return geometry;
|
290 |
|
291 | }
|
292 |
|
293 | } );
|
294 |
|
295 |
|
296 |
|
297 | Object.assign( Path.prototype, {
|
298 |
|
299 | fromPoints: function ( points ) {
|
300 |
|
301 | console.warn( 'THREE.Path: .fromPoints() has been renamed to .setFromPoints().' );
|
302 | this.setFromPoints( points );
|
303 |
|
304 | }
|
305 |
|
306 | } );
|
307 |
|
308 |
|
309 |
|
310 | export function ClosedSplineCurve3( points ) {
|
311 |
|
312 | console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' );
|
313 |
|
314 | CatmullRomCurve3.call( this, points );
|
315 | this.type = 'catmullrom';
|
316 | this.closed = true;
|
317 |
|
318 | }
|
319 |
|
320 | ClosedSplineCurve3.prototype = Object.create( CatmullRomCurve3.prototype );
|
321 |
|
322 |
|
323 |
|
324 | export function SplineCurve3( points ) {
|
325 |
|
326 | console.warn( 'THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' );
|
327 |
|
328 | CatmullRomCurve3.call( this, points );
|
329 | this.type = 'catmullrom';
|
330 |
|
331 | }
|
332 |
|
333 | SplineCurve3.prototype = Object.create( CatmullRomCurve3.prototype );
|
334 |
|
335 |
|
336 |
|
337 | export function Spline( points ) {
|
338 |
|
339 | console.warn( 'THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.' );
|
340 |
|
341 | CatmullRomCurve3.call( this, points );
|
342 | this.type = 'catmullrom';
|
343 |
|
344 | }
|
345 |
|
346 | Spline.prototype = Object.create( CatmullRomCurve3.prototype );
|
347 |
|
348 | Object.assign( Spline.prototype, {
|
349 |
|
350 | initFromArray: function ( /* a */ ) {
|
351 |
|
352 | console.error( 'THREE.Spline: .initFromArray() has been removed.' );
|
353 |
|
354 | },
|
355 | getControlPointsArray: function ( /* optionalTarget */ ) {
|
356 |
|
357 | console.error( 'THREE.Spline: .getControlPointsArray() has been removed.' );
|
358 |
|
359 | },
|
360 | reparametrizeByArcLength: function ( /* samplingCoef */ ) {
|
361 |
|
362 | console.error( 'THREE.Spline: .reparametrizeByArcLength() has been removed.' );
|
363 |
|
364 | }
|
365 |
|
366 | } );
|
367 |
|
368 |
|
369 |
|
370 | export function AxisHelper( size ) {
|
371 |
|
372 | console.warn( 'THREE.AxisHelper has been renamed to THREE.AxesHelper.' );
|
373 | return new AxesHelper( size );
|
374 |
|
375 | }
|
376 |
|
377 | export function BoundingBoxHelper( object, color ) {
|
378 |
|
379 | console.warn( 'THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.' );
|
380 | return new BoxHelper( object, color );
|
381 |
|
382 | }
|
383 |
|
384 | export function EdgesHelper( object, hex ) {
|
385 |
|
386 | console.warn( 'THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.' );
|
387 | return new LineSegments( new EdgesGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) );
|
388 |
|
389 | }
|
390 |
|
391 | GridHelper.prototype.setColors = function () {
|
392 |
|
393 | console.error( 'THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.' );
|
394 |
|
395 | };
|
396 |
|
397 | SkeletonHelper.prototype.update = function () {
|
398 |
|
399 | console.error( 'THREE.SkeletonHelper: update() no longer needs to be called.' );
|
400 |
|
401 | };
|
402 |
|
403 | export function WireframeHelper( object, hex ) {
|
404 |
|
405 | console.warn( 'THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.' );
|
406 | return new LineSegments( new WireframeGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) );
|
407 |
|
408 | }
|
409 |
|
410 |
|
411 |
|
412 | Object.assign( Loader.prototype, {
|
413 |
|
414 | extractUrlBase: function ( url ) {
|
415 |
|
416 | console.warn( 'THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.' );
|
417 | return LoaderUtils.extractUrlBase( url );
|
418 |
|
419 | }
|
420 |
|
421 | } );
|
422 |
|
423 | export function XHRLoader( manager ) {
|
424 |
|
425 | console.warn( 'THREE.XHRLoader has been renamed to THREE.FileLoader.' );
|
426 | return new FileLoader( manager );
|
427 |
|
428 | }
|
429 |
|
430 | export function BinaryTextureLoader( manager ) {
|
431 |
|
432 | console.warn( 'THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.' );
|
433 | return new DataTextureLoader( manager );
|
434 |
|
435 | }
|
436 |
|
437 |
|
438 |
|
439 | Object.assign( Box2.prototype, {
|
440 |
|
441 | center: function ( optionalTarget ) {
|
442 |
|
443 | console.warn( 'THREE.Box2: .center() has been renamed to .getCenter().' );
|
444 | return this.getCenter( optionalTarget );
|
445 |
|
446 | },
|
447 | empty: function () {
|
448 |
|
449 | console.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );
|
450 | return this.isEmpty();
|
451 |
|
452 | },
|
453 | isIntersectionBox: function ( box ) {
|
454 |
|
455 | console.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' );
|
456 | return this.intersectsBox( box );
|
457 |
|
458 | },
|
459 | size: function ( optionalTarget ) {
|
460 |
|
461 | console.warn( 'THREE.Box2: .size() has been renamed to .getSize().' );
|
462 | return this.getSize( optionalTarget );
|
463 |
|
464 | }
|
465 | } );
|
466 |
|
467 | Object.assign( Box3.prototype, {
|
468 |
|
469 | center: function ( optionalTarget ) {
|
470 |
|
471 | console.warn( 'THREE.Box3: .center() has been renamed to .getCenter().' );
|
472 | return this.getCenter( optionalTarget );
|
473 |
|
474 | },
|
475 | empty: function () {
|
476 |
|
477 | console.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' );
|
478 | return this.isEmpty();
|
479 |
|
480 | },
|
481 | isIntersectionBox: function ( box ) {
|
482 |
|
483 | console.warn( 'THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().' );
|
484 | return this.intersectsBox( box );
|
485 |
|
486 | },
|
487 | isIntersectionSphere: function ( sphere ) {
|
488 |
|
489 | console.warn( 'THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
|
490 | return this.intersectsSphere( sphere );
|
491 |
|
492 | },
|
493 | size: function ( optionalTarget ) {
|
494 |
|
495 | console.warn( 'THREE.Box3: .size() has been renamed to .getSize().' );
|
496 | return this.getSize( optionalTarget );
|
497 |
|
498 | }
|
499 | } );
|
500 |
|
501 | Line3.prototype.center = function ( optionalTarget ) {
|
502 |
|
503 | console.warn( 'THREE.Line3: .center() has been renamed to .getCenter().' );
|
504 | return this.getCenter( optionalTarget );
|
505 |
|
506 | };
|
507 |
|
508 | Object.assign( _Math, {
|
509 |
|
510 | random16: function () {
|
511 |
|
512 | console.warn( 'THREE.Math: .random16() has been deprecated. Use Math.random() instead.' );
|
513 | return Math.random();
|
514 |
|
515 | },
|
516 |
|
517 | nearestPowerOfTwo: function ( value ) {
|
518 |
|
519 | console.warn( 'THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().' );
|
520 | return _Math.floorPowerOfTwo( value );
|
521 |
|
522 | },
|
523 |
|
524 | nextPowerOfTwo: function ( value ) {
|
525 |
|
526 | console.warn( 'THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().' );
|
527 | return _Math.ceilPowerOfTwo( value );
|
528 |
|
529 | }
|
530 |
|
531 | } );
|
532 |
|
533 | Object.assign( Matrix3.prototype, {
|
534 |
|
535 | flattenToArrayOffset: function ( array, offset ) {
|
536 |
|
537 | console.warn( "THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead." );
|
538 | return this.toArray( array, offset );
|
539 |
|
540 | },
|
541 | multiplyVector3: function ( vector ) {
|
542 |
|
543 | console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );
|
544 | return vector.applyMatrix3( this );
|
545 |
|
546 | },
|
547 | multiplyVector3Array: function ( /* a */ ) {
|
548 |
|
549 | console.error( 'THREE.Matrix3: .multiplyVector3Array() has been removed.' );
|
550 |
|
551 | },
|
552 | applyToBuffer: function ( buffer /*, offset, length */ ) {
|
553 |
|
554 | console.warn( 'THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.' );
|
555 | return this.applyToBufferAttribute( buffer );
|
556 |
|
557 | },
|
558 | applyToVector3Array: function ( /* array, offset, length */ ) {
|
559 |
|
560 | console.error( 'THREE.Matrix3: .applyToVector3Array() has been removed.' );
|
561 |
|
562 | }
|
563 |
|
564 | } );
|
565 |
|
566 | Object.assign( Matrix4.prototype, {
|
567 |
|
568 | extractPosition: function ( m ) {
|
569 |
|
570 | console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );
|
571 | return this.copyPosition( m );
|
572 |
|
573 | },
|
574 | flattenToArrayOffset: function ( array, offset ) {
|
575 |
|
576 | console.warn( "THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead." );
|
577 | return this.toArray( array, offset );
|
578 |
|
579 | },
|
580 | getPosition: function () {
|
581 |
|
582 | var v1;
|
583 |
|
584 | return function getPosition() {
|
585 |
|
586 | if ( v1 === undefined ) v1 = new Vector3();
|
587 | console.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );
|
588 | return v1.setFromMatrixColumn( this, 3 );
|
589 |
|
590 | };
|
591 |
|
592 | }(),
|
593 | setRotationFromQuaternion: function ( q ) {
|
594 |
|
595 | console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
|
596 | return this.makeRotationFromQuaternion( q );
|
597 |
|
598 | },
|
599 | multiplyToArray: function () {
|
600 |
|
601 | console.warn( 'THREE.Matrix4: .multiplyToArray() has been removed.' );
|
602 |
|
603 | },
|
604 | multiplyVector3: function ( vector ) {
|
605 |
|
606 | console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
|
607 | return vector.applyMatrix4( this );
|
608 |
|
609 | },
|
610 | multiplyVector4: function ( vector ) {
|
611 |
|
612 | console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
|
613 | return vector.applyMatrix4( this );
|
614 |
|
615 | },
|
616 | multiplyVector3Array: function ( /* a */ ) {
|
617 |
|
618 | console.error( 'THREE.Matrix4: .multiplyVector3Array() has been removed.' );
|
619 |
|
620 | },
|
621 | rotateAxis: function ( v ) {
|
622 |
|
623 | console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );
|
624 | v.transformDirection( this );
|
625 |
|
626 | },
|
627 | crossVector: function ( vector ) {
|
628 |
|
629 | console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
|
630 | return vector.applyMatrix4( this );
|
631 |
|
632 | },
|
633 | translate: function () {
|
634 |
|
635 | console.error( 'THREE.Matrix4: .translate() has been removed.' );
|
636 |
|
637 | },
|
638 | rotateX: function () {
|
639 |
|
640 | console.error( 'THREE.Matrix4: .rotateX() has been removed.' );
|
641 |
|
642 | },
|
643 | rotateY: function () {
|
644 |
|
645 | console.error( 'THREE.Matrix4: .rotateY() has been removed.' );
|
646 |
|
647 | },
|
648 | rotateZ: function () {
|
649 |
|
650 | console.error( 'THREE.Matrix4: .rotateZ() has been removed.' );
|
651 |
|
652 | },
|
653 | rotateByAxis: function () {
|
654 |
|
655 | console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );
|
656 |
|
657 | },
|
658 | applyToBuffer: function ( buffer /*, offset, length */ ) {
|
659 |
|
660 | console.warn( 'THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.' );
|
661 | return this.applyToBufferAttribute( buffer );
|
662 |
|
663 | },
|
664 | applyToVector3Array: function ( /* array, offset, length */ ) {
|
665 |
|
666 | console.error( 'THREE.Matrix4: .applyToVector3Array() has been removed.' );
|
667 |
|
668 | },
|
669 | makeFrustum: function ( left, right, bottom, top, near, far ) {
|
670 |
|
671 | console.warn( 'THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.' );
|
672 | return this.makePerspective( left, right, top, bottom, near, far );
|
673 |
|
674 | }
|
675 |
|
676 | } );
|
677 |
|
678 | Plane.prototype.isIntersectionLine = function ( line ) {
|
679 |
|
680 | console.warn( 'THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().' );
|
681 | return this.intersectsLine( line );
|
682 |
|
683 | };
|
684 |
|
685 | Quaternion.prototype.multiplyVector3 = function ( vector ) {
|
686 |
|
687 | console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );
|
688 | return vector.applyQuaternion( this );
|
689 |
|
690 | };
|
691 |
|
692 | Object.assign( Ray.prototype, {
|
693 |
|
694 | isIntersectionBox: function ( box ) {
|
695 |
|
696 | console.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' );
|
697 | return this.intersectsBox( box );
|
698 |
|
699 | },
|
700 | isIntersectionPlane: function ( plane ) {
|
701 |
|
702 | console.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' );
|
703 | return this.intersectsPlane( plane );
|
704 |
|
705 | },
|
706 | isIntersectionSphere: function ( sphere ) {
|
707 |
|
708 | console.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
|
709 | return this.intersectsSphere( sphere );
|
710 |
|
711 | }
|
712 |
|
713 | } );
|
714 |
|
715 | Object.assign( Triangle.prototype, {
|
716 |
|
717 | area: function () {
|
718 |
|
719 | console.warn( 'THREE.Triangle: .area() has been renamed to .getArea().' );
|
720 | return this.getArea();
|
721 |
|
722 | },
|
723 | barycoordFromPoint: function ( point, target ) {
|
724 |
|
725 | console.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' );
|
726 | return this.getBarycoord( point, target );
|
727 |
|
728 | },
|
729 | midpoint: function ( target ) {
|
730 |
|
731 | console.warn( 'THREE.Triangle: .midpoint() has been renamed to .getMidpoint().' );
|
732 | return this.getMidpoint( target );
|
733 |
|
734 | },
|
735 | normal: function ( target ) {
|
736 |
|
737 | console.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' );
|
738 | return this.getNormal( target );
|
739 |
|
740 | },
|
741 | plane: function ( target ) {
|
742 |
|
743 | console.warn( 'THREE.Triangle: .plane() has been renamed to .getPlane().' );
|
744 | return this.getPlane( target );
|
745 |
|
746 | }
|
747 |
|
748 | } );
|
749 |
|
750 | Object.assign( Triangle, {
|
751 |
|
752 | barycoordFromPoint: function ( point, a, b, c, target ) {
|
753 |
|
754 | console.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' );
|
755 | return Triangle.getBarycoord( point, a, b, c, target );
|
756 |
|
757 | },
|
758 | normal: function ( a, b, c, target ) {
|
759 |
|
760 | console.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' );
|
761 | return Triangle.getNormal( a, b, c, target );
|
762 |
|
763 | }
|
764 |
|
765 | } );
|
766 |
|
767 | Object.assign( Shape.prototype, {
|
768 |
|
769 | extractAllPoints: function ( divisions ) {
|
770 |
|
771 | console.warn( 'THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.' );
|
772 | return this.extractPoints( divisions );
|
773 |
|
774 | },
|
775 | extrude: function ( options ) {
|
776 |
|
777 | console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );
|
778 | return new ExtrudeGeometry( this, options );
|
779 |
|
780 | },
|
781 | makeGeometry: function ( options ) {
|
782 |
|
783 | console.warn( 'THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.' );
|
784 | return new ShapeGeometry( this, options );
|
785 |
|
786 | }
|
787 |
|
788 | } );
|
789 |
|
790 | Object.assign( Vector2.prototype, {
|
791 |
|
792 | fromAttribute: function ( attribute, index, offset ) {
|
793 |
|
794 | console.warn( 'THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().' );
|
795 | return this.fromBufferAttribute( attribute, index, offset );
|
796 |
|
797 | },
|
798 | distanceToManhattan: function ( v ) {
|
799 |
|
800 | console.warn( 'THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );
|
801 | return this.manhattanDistanceTo( v );
|
802 |
|
803 | },
|
804 | lengthManhattan: function () {
|
805 |
|
806 | console.warn( 'THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().' );
|
807 | return this.manhattanLength();
|
808 |
|
809 | }
|
810 |
|
811 | } );
|
812 |
|
813 | Object.assign( Vector3.prototype, {
|
814 |
|
815 | setEulerFromRotationMatrix: function () {
|
816 |
|
817 | console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );
|
818 |
|
819 | },
|
820 | setEulerFromQuaternion: function () {
|
821 |
|
822 | console.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );
|
823 |
|
824 | },
|
825 | getPositionFromMatrix: function ( m ) {
|
826 |
|
827 | console.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );
|
828 | return this.setFromMatrixPosition( m );
|
829 |
|
830 | },
|
831 | getScaleFromMatrix: function ( m ) {
|
832 |
|
833 | console.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );
|
834 | return this.setFromMatrixScale( m );
|
835 |
|
836 | },
|
837 | getColumnFromMatrix: function ( index, matrix ) {
|
838 |
|
839 | console.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );
|
840 | return this.setFromMatrixColumn( matrix, index );
|
841 |
|
842 | },
|
843 | applyProjection: function ( m ) {
|
844 |
|
845 | console.warn( 'THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.' );
|
846 | return this.applyMatrix4( m );
|
847 |
|
848 | },
|
849 | fromAttribute: function ( attribute, index, offset ) {
|
850 |
|
851 | console.warn( 'THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().' );
|
852 | return this.fromBufferAttribute( attribute, index, offset );
|
853 |
|
854 | },
|
855 | distanceToManhattan: function ( v ) {
|
856 |
|
857 | console.warn( 'THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );
|
858 | return this.manhattanDistanceTo( v );
|
859 |
|
860 | },
|
861 | lengthManhattan: function () {
|
862 |
|
863 | console.warn( 'THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().' );
|
864 | return this.manhattanLength();
|
865 |
|
866 | }
|
867 |
|
868 | } );
|
869 |
|
870 | Object.assign( Vector4.prototype, {
|
871 |
|
872 | fromAttribute: function ( attribute, index, offset ) {
|
873 |
|
874 | console.warn( 'THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().' );
|
875 | return this.fromBufferAttribute( attribute, index, offset );
|
876 |
|
877 | },
|
878 | lengthManhattan: function () {
|
879 |
|
880 | console.warn( 'THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().' );
|
881 | return this.manhattanLength();
|
882 |
|
883 | }
|
884 |
|
885 | } );
|
886 |
|
887 |
|
888 |
|
889 | Object.assign( Geometry.prototype, {
|
890 |
|
891 | computeTangents: function () {
|
892 |
|
893 | console.error( 'THREE.Geometry: .computeTangents() has been removed.' );
|
894 |
|
895 | },
|
896 | computeLineDistances: function () {
|
897 |
|
898 | console.error( 'THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.' );
|
899 |
|
900 | }
|
901 |
|
902 | } );
|
903 |
|
904 | Object.assign( Object3D.prototype, {
|
905 |
|
906 | getChildByName: function ( name ) {
|
907 |
|
908 | console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );
|
909 | return this.getObjectByName( name );
|
910 |
|
911 | },
|
912 | renderDepth: function () {
|
913 |
|
914 | console.warn( 'THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.' );
|
915 |
|
916 | },
|
917 | translate: function ( distance, axis ) {
|
918 |
|
919 | console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );
|
920 | return this.translateOnAxis( axis, distance );
|
921 |
|
922 | },
|
923 | getWorldRotation: function () {
|
924 |
|
925 | console.error( 'THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.' );
|
926 |
|
927 | }
|
928 |
|
929 | } );
|
930 |
|
931 | Object.defineProperties( Object3D.prototype, {
|
932 |
|
933 | eulerOrder: {
|
934 | get: function () {
|
935 |
|
936 | console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
|
937 | return this.rotation.order;
|
938 |
|
939 | },
|
940 | set: function ( value ) {
|
941 |
|
942 | console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
|
943 | this.rotation.order = value;
|
944 |
|
945 | }
|
946 | },
|
947 | useQuaternion: {
|
948 | get: function () {
|
949 |
|
950 | console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
|
951 |
|
952 | },
|
953 | set: function () {
|
954 |
|
955 | console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
|
956 |
|
957 | }
|
958 | }
|
959 |
|
960 | } );
|
961 |
|
962 | Object.defineProperties( LOD.prototype, {
|
963 |
|
964 | objects: {
|
965 | get: function () {
|
966 |
|
967 | console.warn( 'THREE.LOD: .objects has been renamed to .levels.' );
|
968 | return this.levels;
|
969 |
|
970 | }
|
971 | }
|
972 |
|
973 | } );
|
974 |
|
975 | Object.defineProperty( Skeleton.prototype, 'useVertexTexture', {
|
976 |
|
977 | get: function () {
|
978 |
|
979 | console.warn( 'THREE.Skeleton: useVertexTexture has been removed.' );
|
980 |
|
981 | },
|
982 | set: function () {
|
983 |
|
984 | console.warn( 'THREE.Skeleton: useVertexTexture has been removed.' );
|
985 |
|
986 | }
|
987 |
|
988 | } );
|
989 |
|
990 | Object.defineProperty( Curve.prototype, '__arcLengthDivisions', {
|
991 |
|
992 | get: function () {
|
993 |
|
994 | console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
|
995 | return this.arcLengthDivisions;
|
996 |
|
997 | },
|
998 | set: function ( value ) {
|
999 |
|
1000 | console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
|
1001 | this.arcLengthDivisions = value;
|
1002 |
|
1003 | }
|
1004 |
|
1005 | } );
|
1006 |
|
1007 |
|
1008 |
|
1009 | PerspectiveCamera.prototype.setLens = function ( focalLength, filmGauge ) {
|
1010 |
|
1011 | console.warn( "THREE.PerspectiveCamera.setLens is deprecated. " +
|
1012 | "Use .setFocalLength and .filmGauge for a photographic setup." );
|
1013 |
|
1014 | if ( filmGauge !== undefined ) this.filmGauge = filmGauge;
|
1015 | this.setFocalLength( focalLength );
|
1016 |
|
1017 | };
|
1018 |
|
1019 |
|
1020 |
|
1021 | Object.defineProperties( Light.prototype, {
|
1022 | onlyShadow: {
|
1023 | set: function () {
|
1024 |
|
1025 | console.warn( 'THREE.Light: .onlyShadow has been removed.' );
|
1026 |
|
1027 | }
|
1028 | },
|
1029 | shadowCameraFov: {
|
1030 | set: function ( value ) {
|
1031 |
|
1032 | console.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' );
|
1033 | this.shadow.camera.fov = value;
|
1034 |
|
1035 | }
|
1036 | },
|
1037 | shadowCameraLeft: {
|
1038 | set: function ( value ) {
|
1039 |
|
1040 | console.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' );
|
1041 | this.shadow.camera.left = value;
|
1042 |
|
1043 | }
|
1044 | },
|
1045 | shadowCameraRight: {
|
1046 | set: function ( value ) {
|
1047 |
|
1048 | console.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' );
|
1049 | this.shadow.camera.right = value;
|
1050 |
|
1051 | }
|
1052 | },
|
1053 | shadowCameraTop: {
|
1054 | set: function ( value ) {
|
1055 |
|
1056 | console.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' );
|
1057 | this.shadow.camera.top = value;
|
1058 |
|
1059 | }
|
1060 | },
|
1061 | shadowCameraBottom: {
|
1062 | set: function ( value ) {
|
1063 |
|
1064 | console.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' );
|
1065 | this.shadow.camera.bottom = value;
|
1066 |
|
1067 | }
|
1068 | },
|
1069 | shadowCameraNear: {
|
1070 | set: function ( value ) {
|
1071 |
|
1072 | console.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' );
|
1073 | this.shadow.camera.near = value;
|
1074 |
|
1075 | }
|
1076 | },
|
1077 | shadowCameraFar: {
|
1078 | set: function ( value ) {
|
1079 |
|
1080 | console.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' );
|
1081 | this.shadow.camera.far = value;
|
1082 |
|
1083 | }
|
1084 | },
|
1085 | shadowCameraVisible: {
|
1086 | set: function () {
|
1087 |
|
1088 | console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.' );
|
1089 |
|
1090 | }
|
1091 | },
|
1092 | shadowBias: {
|
1093 | set: function ( value ) {
|
1094 |
|
1095 | console.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' );
|
1096 | this.shadow.bias = value;
|
1097 |
|
1098 | }
|
1099 | },
|
1100 | shadowDarkness: {
|
1101 | set: function () {
|
1102 |
|
1103 | console.warn( 'THREE.Light: .shadowDarkness has been removed.' );
|
1104 |
|
1105 | }
|
1106 | },
|
1107 | shadowMapWidth: {
|
1108 | set: function ( value ) {
|
1109 |
|
1110 | console.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' );
|
1111 | this.shadow.mapSize.width = value;
|
1112 |
|
1113 | }
|
1114 | },
|
1115 | shadowMapHeight: {
|
1116 | set: function ( value ) {
|
1117 |
|
1118 | console.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' );
|
1119 | this.shadow.mapSize.height = value;
|
1120 |
|
1121 | }
|
1122 | }
|
1123 | } );
|
1124 |
|
1125 |
|
1126 |
|
1127 | Object.defineProperties( BufferAttribute.prototype, {
|
1128 |
|
1129 | length: {
|
1130 | get: function () {
|
1131 |
|
1132 | console.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' );
|
1133 | return this.array.length;
|
1134 |
|
1135 | }
|
1136 | },
|
1137 | copyIndicesArray: function ( /* indices */ ) {
|
1138 |
|
1139 | console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );
|
1140 |
|
1141 | }
|
1142 |
|
1143 | } );
|
1144 |
|
1145 | Object.assign( BufferGeometry.prototype, {
|
1146 |
|
1147 | addIndex: function ( index ) {
|
1148 |
|
1149 | console.warn( 'THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().' );
|
1150 | this.setIndex( index );
|
1151 |
|
1152 | },
|
1153 | addDrawCall: function ( start, count, indexOffset ) {
|
1154 |
|
1155 | if ( indexOffset !== undefined ) {
|
1156 |
|
1157 | console.warn( 'THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.' );
|
1158 |
|
1159 | }
|
1160 | console.warn( 'THREE.BufferGeometry: .addDrawCall() is now .addGroup().' );
|
1161 | this.addGroup( start, count );
|
1162 |
|
1163 | },
|
1164 | clearDrawCalls: function () {
|
1165 |
|
1166 | console.warn( 'THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().' );
|
1167 | this.clearGroups();
|
1168 |
|
1169 | },
|
1170 | computeTangents: function () {
|
1171 |
|
1172 | console.warn( 'THREE.BufferGeometry: .computeTangents() has been removed.' );
|
1173 |
|
1174 | },
|
1175 | computeOffsets: function () {
|
1176 |
|
1177 | console.warn( 'THREE.BufferGeometry: .computeOffsets() has been removed.' );
|
1178 |
|
1179 | }
|
1180 |
|
1181 | } );
|
1182 |
|
1183 | Object.defineProperties( BufferGeometry.prototype, {
|
1184 |
|
1185 | drawcalls: {
|
1186 | get: function () {
|
1187 |
|
1188 | console.error( 'THREE.BufferGeometry: .drawcalls has been renamed to .groups.' );
|
1189 | return this.groups;
|
1190 |
|
1191 | }
|
1192 | },
|
1193 | offsets: {
|
1194 | get: function () {
|
1195 |
|
1196 | console.warn( 'THREE.BufferGeometry: .offsets has been renamed to .groups.' );
|
1197 | return this.groups;
|
1198 |
|
1199 | }
|
1200 | }
|
1201 |
|
1202 | } );
|
1203 |
|
1204 |
|
1205 |
|
1206 | Object.assign( ExtrudeBufferGeometry.prototype, {
|
1207 |
|
1208 | getArrays: function () {
|
1209 |
|
1210 | console.error( 'THREE.ExtrudeBufferGeometry: .getArrays() has been removed.' );
|
1211 |
|
1212 | },
|
1213 |
|
1214 | addShapeList: function () {
|
1215 |
|
1216 | console.error( 'THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.' );
|
1217 |
|
1218 | },
|
1219 |
|
1220 | addShape: function () {
|
1221 |
|
1222 | console.error( 'THREE.ExtrudeBufferGeometry: .addShape() has been removed.' );
|
1223 |
|
1224 | }
|
1225 |
|
1226 | } );
|
1227 |
|
1228 |
|
1229 |
|
1230 | Object.defineProperties( Uniform.prototype, {
|
1231 |
|
1232 | dynamic: {
|
1233 | set: function () {
|
1234 |
|
1235 | console.warn( 'THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.' );
|
1236 |
|
1237 | }
|
1238 | },
|
1239 | onUpdate: {
|
1240 | value: function () {
|
1241 |
|
1242 | console.warn( 'THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.' );
|
1243 | return this;
|
1244 |
|
1245 | }
|
1246 | }
|
1247 |
|
1248 | } );
|
1249 |
|
1250 |
|
1251 |
|
1252 | Object.defineProperties( Material.prototype, {
|
1253 |
|
1254 | wrapAround: {
|
1255 | get: function () {
|
1256 |
|
1257 | console.warn( 'THREE.Material: .wrapAround has been removed.' );
|
1258 |
|
1259 | },
|
1260 | set: function () {
|
1261 |
|
1262 | console.warn( 'THREE.Material: .wrapAround has been removed.' );
|
1263 |
|
1264 | }
|
1265 | },
|
1266 | wrapRGB: {
|
1267 | get: function () {
|
1268 |
|
1269 | console.warn( 'THREE.Material: .wrapRGB has been removed.' );
|
1270 | return new Color();
|
1271 |
|
1272 | }
|
1273 | },
|
1274 |
|
1275 | shading: {
|
1276 | get: function () {
|
1277 |
|
1278 | console.error( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );
|
1279 |
|
1280 | },
|
1281 | set: function ( value ) {
|
1282 |
|
1283 | console.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );
|
1284 | this.flatShading = ( value === FlatShading );
|
1285 |
|
1286 | }
|
1287 | }
|
1288 |
|
1289 | } );
|
1290 |
|
1291 | Object.defineProperties( MeshPhongMaterial.prototype, {
|
1292 |
|
1293 | metal: {
|
1294 | get: function () {
|
1295 |
|
1296 | console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.' );
|
1297 | return false;
|
1298 |
|
1299 | },
|
1300 | set: function () {
|
1301 |
|
1302 | console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead' );
|
1303 |
|
1304 | }
|
1305 | }
|
1306 |
|
1307 | } );
|
1308 |
|
1309 | Object.defineProperties( ShaderMaterial.prototype, {
|
1310 |
|
1311 | derivatives: {
|
1312 | get: function () {
|
1313 |
|
1314 | console.warn( 'THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
|
1315 | return this.extensions.derivatives;
|
1316 |
|
1317 | },
|
1318 | set: function ( value ) {
|
1319 |
|
1320 | console.warn( 'THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
|
1321 | this.extensions.derivatives = value;
|
1322 |
|
1323 | }
|
1324 | }
|
1325 |
|
1326 | } );
|
1327 |
|
1328 |
|
1329 |
|
1330 | Object.assign( WebGLRenderer.prototype, {
|
1331 |
|
1332 | getCurrentRenderTarget: function () {
|
1333 |
|
1334 | console.warn( 'THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().' );
|
1335 | return this.getRenderTarget();
|
1336 |
|
1337 | },
|
1338 |
|
1339 | getMaxAnisotropy: function () {
|
1340 |
|
1341 | console.warn( 'THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().' );
|
1342 | return this.capabilities.getMaxAnisotropy();
|
1343 |
|
1344 | },
|
1345 |
|
1346 | getPrecision: function () {
|
1347 |
|
1348 | console.warn( 'THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.' );
|
1349 | return this.capabilities.precision;
|
1350 |
|
1351 | },
|
1352 |
|
1353 | resetGLState: function () {
|
1354 |
|
1355 | console.warn( 'THREE.WebGLRenderer: .resetGLState() is now .state.reset().' );
|
1356 | return this.state.reset();
|
1357 |
|
1358 | },
|
1359 |
|
1360 | supportsFloatTextures: function () {
|
1361 |
|
1362 | console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
|
1363 | return this.extensions.get( 'OES_texture_float' );
|
1364 |
|
1365 | },
|
1366 | supportsHalfFloatTextures: function () {
|
1367 |
|
1368 | console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' );
|
1369 | return this.extensions.get( 'OES_texture_half_float' );
|
1370 |
|
1371 | },
|
1372 | supportsStandardDerivatives: function () {
|
1373 |
|
1374 | console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' );
|
1375 | return this.extensions.get( 'OES_standard_derivatives' );
|
1376 |
|
1377 | },
|
1378 | supportsCompressedTextureS3TC: function () {
|
1379 |
|
1380 | console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' );
|
1381 | return this.extensions.get( 'WEBGL_compressed_texture_s3tc' );
|
1382 |
|
1383 | },
|
1384 | supportsCompressedTexturePVRTC: function () {
|
1385 |
|
1386 | console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' );
|
1387 | return this.extensions.get( 'WEBGL_compressed_texture_pvrtc' );
|
1388 |
|
1389 | },
|
1390 | supportsBlendMinMax: function () {
|
1391 |
|
1392 | console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' );
|
1393 | return this.extensions.get( 'EXT_blend_minmax' );
|
1394 |
|
1395 | },
|
1396 | supportsVertexTextures: function () {
|
1397 |
|
1398 | console.warn( 'THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.' );
|
1399 | return this.capabilities.vertexTextures;
|
1400 |
|
1401 | },
|
1402 | supportsInstancedArrays: function () {
|
1403 |
|
1404 | console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' );
|
1405 | return this.extensions.get( 'ANGLE_instanced_arrays' );
|
1406 |
|
1407 | },
|
1408 | enableScissorTest: function ( boolean ) {
|
1409 |
|
1410 | console.warn( 'THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().' );
|
1411 | this.setScissorTest( boolean );
|
1412 |
|
1413 | },
|
1414 | initMaterial: function () {
|
1415 |
|
1416 | console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
|
1417 |
|
1418 | },
|
1419 | addPrePlugin: function () {
|
1420 |
|
1421 | console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
|
1422 |
|
1423 | },
|
1424 | addPostPlugin: function () {
|
1425 |
|
1426 | console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
|
1427 |
|
1428 | },
|
1429 | updateShadowMap: function () {
|
1430 |
|
1431 | console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
|
1432 |
|
1433 | },
|
1434 | setFaceCulling: function () {
|
1435 |
|
1436 | console.warn( 'THREE.WebGLRenderer: .setFaceCulling() has been removed.' );
|
1437 |
|
1438 | }
|
1439 |
|
1440 | } );
|
1441 |
|
1442 | Object.defineProperties( WebGLRenderer.prototype, {
|
1443 |
|
1444 | shadowMapEnabled: {
|
1445 | get: function () {
|
1446 |
|
1447 | return this.shadowMap.enabled;
|
1448 |
|
1449 | },
|
1450 | set: function ( value ) {
|
1451 |
|
1452 | console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
|
1453 | this.shadowMap.enabled = value;
|
1454 |
|
1455 | }
|
1456 | },
|
1457 | shadowMapType: {
|
1458 | get: function () {
|
1459 |
|
1460 | return this.shadowMap.type;
|
1461 |
|
1462 | },
|
1463 | set: function ( value ) {
|
1464 |
|
1465 | console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
|
1466 | this.shadowMap.type = value;
|
1467 |
|
1468 | }
|
1469 | },
|
1470 | shadowMapCullFace: {
|
1471 | get: function () {
|
1472 |
|
1473 | console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.' );
|
1474 | return undefined;
|
1475 |
|
1476 | },
|
1477 | set: function ( /* value */ ) {
|
1478 |
|
1479 | console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.' );
|
1480 |
|
1481 | }
|
1482 | }
|
1483 | } );
|
1484 |
|
1485 | Object.defineProperties( WebGLShadowMap.prototype, {
|
1486 |
|
1487 | cullFace: {
|
1488 | get: function () {
|
1489 |
|
1490 | console.warn( 'THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.' );
|
1491 | return undefined;
|
1492 |
|
1493 | },
|
1494 | set: function ( /* cullFace */ ) {
|
1495 |
|
1496 | console.warn( 'THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.' );
|
1497 |
|
1498 | }
|
1499 | },
|
1500 | renderReverseSided: {
|
1501 | get: function () {
|
1502 |
|
1503 | console.warn( 'THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.' );
|
1504 | return undefined;
|
1505 |
|
1506 | },
|
1507 | set: function () {
|
1508 |
|
1509 | console.warn( 'THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.' );
|
1510 |
|
1511 | }
|
1512 | },
|
1513 | renderSingleSided: {
|
1514 | get: function () {
|
1515 |
|
1516 | console.warn( 'THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.' );
|
1517 | return undefined;
|
1518 |
|
1519 | },
|
1520 | set: function () {
|
1521 |
|
1522 | console.warn( 'THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.' );
|
1523 |
|
1524 | }
|
1525 | }
|
1526 |
|
1527 | } );
|
1528 |
|
1529 |
|
1530 |
|
1531 | Object.defineProperties( WebGLRenderTarget.prototype, {
|
1532 |
|
1533 | wrapS: {
|
1534 | get: function () {
|
1535 |
|
1536 | console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
|
1537 | return this.texture.wrapS;
|
1538 |
|
1539 | },
|
1540 | set: function ( value ) {
|
1541 |
|
1542 | console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
|
1543 | this.texture.wrapS = value;
|
1544 |
|
1545 | }
|
1546 | },
|
1547 | wrapT: {
|
1548 | get: function () {
|
1549 |
|
1550 | console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
|
1551 | return this.texture.wrapT;
|
1552 |
|
1553 | },
|
1554 | set: function ( value ) {
|
1555 |
|
1556 | console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
|
1557 | this.texture.wrapT = value;
|
1558 |
|
1559 | }
|
1560 | },
|
1561 | magFilter: {
|
1562 | get: function () {
|
1563 |
|
1564 | console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
|
1565 | return this.texture.magFilter;
|
1566 |
|
1567 | },
|
1568 | set: function ( value ) {
|
1569 |
|
1570 | console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
|
1571 | this.texture.magFilter = value;
|
1572 |
|
1573 | }
|
1574 | },
|
1575 | minFilter: {
|
1576 | get: function () {
|
1577 |
|
1578 | console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
|
1579 | return this.texture.minFilter;
|
1580 |
|
1581 | },
|
1582 | set: function ( value ) {
|
1583 |
|
1584 | console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
|
1585 | this.texture.minFilter = value;
|
1586 |
|
1587 | }
|
1588 | },
|
1589 | anisotropy: {
|
1590 | get: function () {
|
1591 |
|
1592 | console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
|
1593 | return this.texture.anisotropy;
|
1594 |
|
1595 | },
|
1596 | set: function ( value ) {
|
1597 |
|
1598 | console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
|
1599 | this.texture.anisotropy = value;
|
1600 |
|
1601 | }
|
1602 | },
|
1603 | offset: {
|
1604 | get: function () {
|
1605 |
|
1606 | console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
|
1607 | return this.texture.offset;
|
1608 |
|
1609 | },
|
1610 | set: function ( value ) {
|
1611 |
|
1612 | console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
|
1613 | this.texture.offset = value;
|
1614 |
|
1615 | }
|
1616 | },
|
1617 | repeat: {
|
1618 | get: function () {
|
1619 |
|
1620 | console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
|
1621 | return this.texture.repeat;
|
1622 |
|
1623 | },
|
1624 | set: function ( value ) {
|
1625 |
|
1626 | console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
|
1627 | this.texture.repeat = value;
|
1628 |
|
1629 | }
|
1630 | },
|
1631 | format: {
|
1632 | get: function () {
|
1633 |
|
1634 | console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
|
1635 | return this.texture.format;
|
1636 |
|
1637 | },
|
1638 | set: function ( value ) {
|
1639 |
|
1640 | console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
|
1641 | this.texture.format = value;
|
1642 |
|
1643 | }
|
1644 | },
|
1645 | type: {
|
1646 | get: function () {
|
1647 |
|
1648 | console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
|
1649 | return this.texture.type;
|
1650 |
|
1651 | },
|
1652 | set: function ( value ) {
|
1653 |
|
1654 | console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
|
1655 | this.texture.type = value;
|
1656 |
|
1657 | }
|
1658 | },
|
1659 | generateMipmaps: {
|
1660 | get: function () {
|
1661 |
|
1662 | console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
|
1663 | return this.texture.generateMipmaps;
|
1664 |
|
1665 | },
|
1666 | set: function ( value ) {
|
1667 |
|
1668 | console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
|
1669 | this.texture.generateMipmaps = value;
|
1670 |
|
1671 | }
|
1672 | }
|
1673 |
|
1674 | } );
|
1675 |
|
1676 |
|
1677 |
|
1678 | Object.defineProperties( WebVRManager.prototype, {
|
1679 |
|
1680 | standing: {
|
1681 | set: function ( /* value */ ) {
|
1682 |
|
1683 | console.warn( 'THREE.WebVRManager: .standing has been removed.' );
|
1684 |
|
1685 | }
|
1686 | }
|
1687 |
|
1688 | } );
|
1689 |
|
1690 |
|
1691 |
|
1692 | Audio.prototype.load = function ( file ) {
|
1693 |
|
1694 | console.warn( 'THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.' );
|
1695 | var scope = this;
|
1696 | var audioLoader = new AudioLoader();
|
1697 | audioLoader.load( file, function ( buffer ) {
|
1698 |
|
1699 | scope.setBuffer( buffer );
|
1700 |
|
1701 | } );
|
1702 | return this;
|
1703 |
|
1704 | };
|
1705 |
|
1706 | AudioAnalyser.prototype.getData = function () {
|
1707 |
|
1708 | console.warn( 'THREE.AudioAnalyser: .getData() is now .getFrequencyData().' );
|
1709 | return this.getFrequencyData();
|
1710 |
|
1711 | };
|
1712 |
|
1713 |
|
1714 |
|
1715 | CubeCamera.prototype.updateCubeMap = function ( renderer, scene ) {
|
1716 |
|
1717 | console.warn( 'THREE.CubeCamera: .updateCubeMap() is now .update().' );
|
1718 | return this.update( renderer, scene );
|
1719 |
|
1720 | };
|
1721 |
|
1722 |
|
1723 |
|
1724 | export var GeometryUtils = {
|
1725 |
|
1726 | merge: function ( geometry1, geometry2, materialIndexOffset ) {
|
1727 |
|
1728 | console.warn( 'THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.' );
|
1729 | var matrix;
|
1730 |
|
1731 | if ( geometry2.isMesh ) {
|
1732 |
|
1733 | geometry2.matrixAutoUpdate && geometry2.updateMatrix();
|
1734 |
|
1735 | matrix = geometry2.matrix;
|
1736 | geometry2 = geometry2.geometry;
|
1737 |
|
1738 | }
|
1739 |
|
1740 | geometry1.merge( geometry2, matrix, materialIndexOffset );
|
1741 |
|
1742 | },
|
1743 |
|
1744 | center: function ( geometry ) {
|
1745 |
|
1746 | console.warn( 'THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.' );
|
1747 | return geometry.center();
|
1748 |
|
1749 | }
|
1750 |
|
1751 | };
|
1752 |
|
1753 | export var ImageUtils = {
|
1754 |
|
1755 | crossOrigin: undefined,
|
1756 |
|
1757 | loadTexture: function ( url, mapping, onLoad, onError ) {
|
1758 |
|
1759 | console.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' );
|
1760 |
|
1761 | var loader = new TextureLoader();
|
1762 | loader.setCrossOrigin( this.crossOrigin );
|
1763 |
|
1764 | var texture = loader.load( url, onLoad, undefined, onError );
|
1765 |
|
1766 | if ( mapping ) texture.mapping = mapping;
|
1767 |
|
1768 | return texture;
|
1769 |
|
1770 | },
|
1771 |
|
1772 | loadTextureCube: function ( urls, mapping, onLoad, onError ) {
|
1773 |
|
1774 | console.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' );
|
1775 |
|
1776 | var loader = new CubeTextureLoader();
|
1777 | loader.setCrossOrigin( this.crossOrigin );
|
1778 |
|
1779 | var texture = loader.load( urls, onLoad, undefined, onError );
|
1780 |
|
1781 | if ( mapping ) texture.mapping = mapping;
|
1782 |
|
1783 | return texture;
|
1784 |
|
1785 | },
|
1786 |
|
1787 | loadCompressedTexture: function () {
|
1788 |
|
1789 | console.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' );
|
1790 |
|
1791 | },
|
1792 |
|
1793 | loadCompressedTextureCube: function () {
|
1794 |
|
1795 | console.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' );
|
1796 |
|
1797 | }
|
1798 |
|
1799 | };
|
1800 |
|
1801 |
|
1802 |
|
1803 | export function Projector() {
|
1804 |
|
1805 | console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
|
1806 |
|
1807 | this.projectVector = function ( vector, camera ) {
|
1808 |
|
1809 | console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
|
1810 | vector.project( camera );
|
1811 |
|
1812 | };
|
1813 |
|
1814 | this.unprojectVector = function ( vector, camera ) {
|
1815 |
|
1816 | console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
|
1817 | vector.unproject( camera );
|
1818 |
|
1819 | };
|
1820 |
|
1821 | this.pickingRay = function () {
|
1822 |
|
1823 | console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
|
1824 |
|
1825 | };
|
1826 |
|
1827 | }
|
1828 |
|
1829 |
|
1830 |
|
1831 | export function CanvasRenderer() {
|
1832 |
|
1833 | console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
|
1834 |
|
1835 | this.domElement = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
|
1836 | this.clear = function () {};
|
1837 | this.render = function () {};
|
1838 | this.setClearColor = function () {};
|
1839 | this.setSize = function () {};
|
1840 |
|
1841 | }
|
1842 |
|
1843 |
|
1844 |
|
1845 | export var SceneUtils = {
|
1846 |
|
1847 | createMultiMaterialObject: function ( /* geometry, materials */ ) {
|
1848 |
|
1849 | console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' );
|
1850 |
|
1851 | },
|
1852 |
|
1853 | detach: function ( /* child, parent, scene */ ) {
|
1854 |
|
1855 | console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' );
|
1856 |
|
1857 | },
|
1858 |
|
1859 | attach: function ( /* child, scene, parent */ ) {
|
1860 |
|
1861 | console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' );
|
1862 |
|
1863 | }
|
1864 |
|
1865 | };
|
1866 |
|
1867 |
|
1868 |
|
1869 | export function LensFlare() {
|
1870 |
|
1871 | console.error( 'THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js' );
|
1872 |
|
1873 | }
|