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