Three.Legacy.js 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. import { Audio } from './audio/Audio.js';
  5. import { AudioAnalyser } from './audio/AudioAnalyser.js';
  6. import { PerspectiveCamera } from './cameras/PerspectiveCamera.js';
  7. import {
  8. FlatShading,
  9. sRGBEncoding,
  10. LinearEncoding,
  11. StaticDrawUsage,
  12. DynamicDrawUsage,
  13. TrianglesDrawMode
  14. } from './constants.js';
  15. import {
  16. Float64BufferAttribute,
  17. Float32BufferAttribute,
  18. Uint32BufferAttribute,
  19. Int32BufferAttribute,
  20. Uint16BufferAttribute,
  21. Int16BufferAttribute,
  22. Uint8ClampedBufferAttribute,
  23. Uint8BufferAttribute,
  24. Int8BufferAttribute,
  25. BufferAttribute
  26. } from './core/BufferAttribute.js';
  27. import { BufferGeometry } from './core/BufferGeometry.js';
  28. import { InstancedBufferGeometry } from './core/InstancedBufferGeometry.js';
  29. import { InterleavedBuffer } from './core/InterleavedBuffer.js';
  30. import { Face3 } from './core/Face3.js';
  31. import { Geometry } from './core/Geometry.js';
  32. import { Object3D } from './core/Object3D.js';
  33. import { Uniform } from './core/Uniform.js';
  34. import { Raycaster } from './core/Raycaster.js';
  35. import { Curve } from './extras/core/Curve.js';
  36. import { CurvePath } from './extras/core/CurvePath.js';
  37. import { Path } from './extras/core/Path.js';
  38. import { CatmullRomCurve3 } from './extras/curves/CatmullRomCurve3.js';
  39. import { AxesHelper } from './helpers/AxesHelper.js';
  40. import { BoxHelper } from './helpers/BoxHelper.js';
  41. import { GridHelper } from './helpers/GridHelper.js';
  42. import { SkeletonHelper } from './helpers/SkeletonHelper.js';
  43. import { BoxGeometry } from './geometries/BoxGeometry.js';
  44. import { EdgesGeometry } from './geometries/EdgesGeometry.js';
  45. import { ExtrudeGeometry } from './geometries/ExtrudeGeometry.js';
  46. import { ExtrudeBufferGeometry } from './geometries/ExtrudeGeometry.js';
  47. import { ShapeGeometry } from './geometries/ShapeGeometry.js';
  48. import { WireframeGeometry } from './geometries/WireframeGeometry.js';
  49. import { Light } from './lights/Light.js';
  50. import { Loader } from './loaders/Loader.js';
  51. import { LoaderUtils } from './loaders/LoaderUtils.js';
  52. import { FileLoader } from './loaders/FileLoader.js';
  53. import { AudioLoader } from './loaders/AudioLoader.js';
  54. import { CubeTextureLoader } from './loaders/CubeTextureLoader.js';
  55. import { DataTextureLoader } from './loaders/DataTextureLoader.js';
  56. import { ObjectLoader } from './loaders/ObjectLoader.js';
  57. import { TextureLoader } from './loaders/TextureLoader.js';
  58. import { Material } from './materials/Material.js';
  59. import { LineBasicMaterial } from './materials/LineBasicMaterial.js';
  60. import { MeshPhongMaterial } from './materials/MeshPhongMaterial.js';
  61. import { MeshPhysicalMaterial } from './materials/MeshPhysicalMaterial.js';
  62. import { PointsMaterial } from './materials/PointsMaterial.js';
  63. import { ShaderMaterial } from './materials/ShaderMaterial.js';
  64. import { Box2 } from './math/Box2.js';
  65. import { Box3 } from './math/Box3.js';
  66. import { Sphere } from './math/Sphere.js';
  67. import { Color } from './math/Color.js';
  68. import { Frustum } from './math/Frustum.js';
  69. import { Line3 } from './math/Line3.js';
  70. import { MathUtils } from './math/MathUtils.js';
  71. import { Matrix3 } from './math/Matrix3.js';
  72. import { Matrix4 } from './math/Matrix4.js';
  73. import { Plane } from './math/Plane.js';
  74. import { Quaternion } from './math/Quaternion.js';
  75. import { Ray } from './math/Ray.js';
  76. import { Triangle } from './math/Triangle.js';
  77. import { Vector2 } from './math/Vector2.js';
  78. import { Vector3 } from './math/Vector3.js';
  79. import { Vector4 } from './math/Vector4.js';
  80. import { Mesh } from './objects/Mesh.js';
  81. import { LineSegments } from './objects/LineSegments.js';
  82. import { LOD } from './objects/LOD.js';
  83. import { Points } from './objects/Points.js';
  84. import { Sprite } from './objects/Sprite.js';
  85. import { Skeleton } from './objects/Skeleton.js';
  86. import { SkinnedMesh } from './objects/SkinnedMesh.js';
  87. import { WebGLRenderer } from './renderers/WebGLRenderer.js';
  88. import { WebGLRenderTarget } from './renderers/WebGLRenderTarget.js';
  89. import { WebGLCubeRenderTarget } from './renderers/WebGLCubeRenderTarget.js';
  90. import { WebGLShadowMap } from './renderers/webgl/WebGLShadowMap.js';
  91. import { ImageUtils } from './extras/ImageUtils.js';
  92. import { Shape } from './extras/core/Shape.js';
  93. import { CubeCamera } from './cameras/CubeCamera.js';
  94. export { BoxGeometry as CubeGeometry };
  95. export { MathUtils as Math };
  96. export function Face4( a, b, c, d, normal, color, materialIndex ) {
  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. export const LineStrip = 0;
  101. export const LinePieces = 1;
  102. export const NoColors = 0;
  103. export const FaceColors = 1;
  104. export const VertexColors = 2;
  105. export function MeshFaceMaterial( materials ) {
  106. console.warn( 'THREE.MeshFaceMaterial has been removed. Use an Array instead.' );
  107. return materials;
  108. }
  109. export function MultiMaterial( materials ) {
  110. if ( materials === undefined ) materials = [];
  111. console.warn( 'THREE.MultiMaterial has been removed. Use an Array instead.' );
  112. materials.isMultiMaterial = true;
  113. materials.materials = materials;
  114. materials.clone = function () {
  115. return materials.slice();
  116. };
  117. return materials;
  118. }
  119. export function PointCloud( geometry, material ) {
  120. console.warn( 'THREE.PointCloud has been renamed to THREE.Points.' );
  121. return new Points( geometry, material );
  122. }
  123. export function Particle( material ) {
  124. console.warn( 'THREE.Particle has been renamed to THREE.Sprite.' );
  125. return new Sprite( material );
  126. }
  127. export function ParticleSystem( geometry, material ) {
  128. console.warn( 'THREE.ParticleSystem has been renamed to THREE.Points.' );
  129. return new Points( geometry, material );
  130. }
  131. export function PointCloudMaterial( parameters ) {
  132. console.warn( 'THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.' );
  133. return new PointsMaterial( parameters );
  134. }
  135. export function ParticleBasicMaterial( parameters ) {
  136. console.warn( 'THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.' );
  137. return new PointsMaterial( parameters );
  138. }
  139. export function ParticleSystemMaterial( parameters ) {
  140. console.warn( 'THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.' );
  141. return new PointsMaterial( parameters );
  142. }
  143. export function Vertex( x, y, z ) {
  144. console.warn( 'THREE.Vertex has been removed. Use THREE.Vector3 instead.' );
  145. return new Vector3( x, y, z );
  146. }
  147. //
  148. export function DynamicBufferAttribute( array, itemSize ) {
  149. console.warn( 'THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead.' );
  150. return new BufferAttribute( array, itemSize ).setUsage( DynamicDrawUsage );
  151. }
  152. export function Int8Attribute( array, itemSize ) {
  153. console.warn( 'THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.' );
  154. return new Int8BufferAttribute( array, itemSize );
  155. }
  156. export function Uint8Attribute( array, itemSize ) {
  157. console.warn( 'THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.' );
  158. return new Uint8BufferAttribute( array, itemSize );
  159. }
  160. export function Uint8ClampedAttribute( array, itemSize ) {
  161. console.warn( 'THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.' );
  162. return new Uint8ClampedBufferAttribute( array, itemSize );
  163. }
  164. export function Int16Attribute( array, itemSize ) {
  165. console.warn( 'THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.' );
  166. return new Int16BufferAttribute( array, itemSize );
  167. }
  168. export function Uint16Attribute( array, itemSize ) {
  169. console.warn( 'THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.' );
  170. return new Uint16BufferAttribute( array, itemSize );
  171. }
  172. export function Int32Attribute( array, itemSize ) {
  173. console.warn( 'THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.' );
  174. return new Int32BufferAttribute( array, itemSize );
  175. }
  176. export function Uint32Attribute( array, itemSize ) {
  177. console.warn( 'THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.' );
  178. return new Uint32BufferAttribute( array, itemSize );
  179. }
  180. export function Float32Attribute( array, itemSize ) {
  181. console.warn( 'THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.' );
  182. return new Float32BufferAttribute( array, itemSize );
  183. }
  184. export function Float64Attribute( array, itemSize ) {
  185. console.warn( 'THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.' );
  186. return new Float64BufferAttribute( array, itemSize );
  187. }
  188. //
  189. Curve.create = function ( construct, getPoint ) {
  190. console.log( 'THREE.Curve.create() has been deprecated' );
  191. construct.prototype = Object.create( Curve.prototype );
  192. construct.prototype.constructor = construct;
  193. construct.prototype.getPoint = getPoint;
  194. return construct;
  195. };
  196. //
  197. Object.assign( CurvePath.prototype, {
  198. createPointsGeometry: function ( divisions ) {
  199. console.warn( 'THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.' );
  200. // generate geometry from path points (for Line or Points objects)
  201. const pts = this.getPoints( divisions );
  202. return this.createGeometry( pts );
  203. },
  204. createSpacedPointsGeometry: function ( divisions ) {
  205. console.warn( 'THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.' );
  206. // generate geometry from equidistant sampling along the path
  207. const pts = this.getSpacedPoints( divisions );
  208. return this.createGeometry( pts );
  209. },
  210. createGeometry: function ( points ) {
  211. console.warn( 'THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.' );
  212. const geometry = new Geometry();
  213. for ( let i = 0, l = points.length; i < l; i ++ ) {
  214. const point = points[ i ];
  215. geometry.vertices.push( new Vector3( point.x, point.y, point.z || 0 ) );
  216. }
  217. return geometry;
  218. }
  219. } );
  220. //
  221. Object.assign( Path.prototype, {
  222. fromPoints: function ( points ) {
  223. console.warn( 'THREE.Path: .fromPoints() has been renamed to .setFromPoints().' );
  224. return this.setFromPoints( points );
  225. }
  226. } );
  227. //
  228. export function ClosedSplineCurve3( points ) {
  229. console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' );
  230. CatmullRomCurve3.call( this, points );
  231. this.type = 'catmullrom';
  232. this.closed = true;
  233. }
  234. ClosedSplineCurve3.prototype = Object.create( CatmullRomCurve3.prototype );
  235. //
  236. export function SplineCurve3( points ) {
  237. console.warn( 'THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' );
  238. CatmullRomCurve3.call( this, points );
  239. this.type = 'catmullrom';
  240. }
  241. SplineCurve3.prototype = Object.create( CatmullRomCurve3.prototype );
  242. //
  243. export function Spline( points ) {
  244. console.warn( 'THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.' );
  245. CatmullRomCurve3.call( this, points );
  246. this.type = 'catmullrom';
  247. }
  248. Spline.prototype = Object.create( CatmullRomCurve3.prototype );
  249. Object.assign( Spline.prototype, {
  250. initFromArray: function ( /* a */ ) {
  251. console.error( 'THREE.Spline: .initFromArray() has been removed.' );
  252. },
  253. getControlPointsArray: function ( /* optionalTarget */ ) {
  254. console.error( 'THREE.Spline: .getControlPointsArray() has been removed.' );
  255. },
  256. reparametrizeByArcLength: function ( /* samplingCoef */ ) {
  257. console.error( 'THREE.Spline: .reparametrizeByArcLength() has been removed.' );
  258. }
  259. } );
  260. //
  261. export function AxisHelper( size ) {
  262. console.warn( 'THREE.AxisHelper has been renamed to THREE.AxesHelper.' );
  263. return new AxesHelper( size );
  264. }
  265. export function BoundingBoxHelper( object, color ) {
  266. console.warn( 'THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.' );
  267. return new BoxHelper( object, color );
  268. }
  269. export function EdgesHelper( object, hex ) {
  270. console.warn( 'THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.' );
  271. return new LineSegments( new EdgesGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) );
  272. }
  273. GridHelper.prototype.setColors = function () {
  274. console.error( 'THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.' );
  275. };
  276. SkeletonHelper.prototype.update = function () {
  277. console.error( 'THREE.SkeletonHelper: update() no longer needs to be called.' );
  278. };
  279. export function WireframeHelper( object, hex ) {
  280. console.warn( 'THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.' );
  281. return new LineSegments( new WireframeGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) );
  282. }
  283. //
  284. Object.assign( Loader.prototype, {
  285. extractUrlBase: function ( url ) {
  286. console.warn( 'THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.' );
  287. return LoaderUtils.extractUrlBase( url );
  288. }
  289. } );
  290. Loader.Handlers = {
  291. add: function ( /* regex, loader */ ) {
  292. console.error( 'THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.' );
  293. },
  294. get: function ( /* file */ ) {
  295. console.error( 'THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.' );
  296. }
  297. };
  298. export function XHRLoader( manager ) {
  299. console.warn( 'THREE.XHRLoader has been renamed to THREE.FileLoader.' );
  300. return new FileLoader( manager );
  301. }
  302. export function BinaryTextureLoader( manager ) {
  303. console.warn( 'THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.' );
  304. return new DataTextureLoader( manager );
  305. }
  306. Object.assign( ObjectLoader.prototype, {
  307. setTexturePath: function ( value ) {
  308. console.warn( 'THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().' );
  309. return this.setResourcePath( value );
  310. }
  311. } );
  312. //
  313. Object.assign( Box2.prototype, {
  314. center: function ( optionalTarget ) {
  315. console.warn( 'THREE.Box2: .center() has been renamed to .getCenter().' );
  316. return this.getCenter( optionalTarget );
  317. },
  318. empty: function () {
  319. console.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );
  320. return this.isEmpty();
  321. },
  322. isIntersectionBox: function ( box ) {
  323. console.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' );
  324. return this.intersectsBox( box );
  325. },
  326. size: function ( optionalTarget ) {
  327. console.warn( 'THREE.Box2: .size() has been renamed to .getSize().' );
  328. return this.getSize( optionalTarget );
  329. }
  330. } );
  331. Object.assign( Box3.prototype, {
  332. center: function ( optionalTarget ) {
  333. console.warn( 'THREE.Box3: .center() has been renamed to .getCenter().' );
  334. return this.getCenter( optionalTarget );
  335. },
  336. empty: function () {
  337. console.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' );
  338. return this.isEmpty();
  339. },
  340. isIntersectionBox: function ( box ) {
  341. console.warn( 'THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().' );
  342. return this.intersectsBox( box );
  343. },
  344. isIntersectionSphere: function ( sphere ) {
  345. console.warn( 'THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
  346. return this.intersectsSphere( sphere );
  347. },
  348. size: function ( optionalTarget ) {
  349. console.warn( 'THREE.Box3: .size() has been renamed to .getSize().' );
  350. return this.getSize( optionalTarget );
  351. }
  352. } );
  353. Object.assign( Sphere.prototype, {
  354. empty: function () {
  355. console.warn( 'THREE.Sphere: .empty() has been renamed to .isEmpty().' );
  356. return this.isEmpty();
  357. },
  358. } );
  359. Frustum.prototype.setFromMatrix = function ( m ) {
  360. console.warn( 'THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix().' );
  361. return this.setFromProjectionMatrix( m );
  362. };
  363. Line3.prototype.center = function ( optionalTarget ) {
  364. console.warn( 'THREE.Line3: .center() has been renamed to .getCenter().' );
  365. return this.getCenter( optionalTarget );
  366. };
  367. Object.assign( MathUtils, {
  368. random16: function () {
  369. console.warn( 'THREE.Math: .random16() has been deprecated. Use Math.random() instead.' );
  370. return Math.random();
  371. },
  372. nearestPowerOfTwo: function ( value ) {
  373. console.warn( 'THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().' );
  374. return MathUtils.floorPowerOfTwo( value );
  375. },
  376. nextPowerOfTwo: function ( value ) {
  377. console.warn( 'THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().' );
  378. return MathUtils.ceilPowerOfTwo( value );
  379. }
  380. } );
  381. Object.assign( Matrix3.prototype, {
  382. flattenToArrayOffset: function ( array, offset ) {
  383. console.warn( "THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead." );
  384. return this.toArray( array, offset );
  385. },
  386. multiplyVector3: function ( vector ) {
  387. console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );
  388. return vector.applyMatrix3( this );
  389. },
  390. multiplyVector3Array: function ( /* a */ ) {
  391. console.error( 'THREE.Matrix3: .multiplyVector3Array() has been removed.' );
  392. },
  393. applyToBufferAttribute: function ( attribute ) {
  394. console.warn( 'THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead.' );
  395. return attribute.applyMatrix3( this );
  396. },
  397. applyToVector3Array: function ( /* array, offset, length */ ) {
  398. console.error( 'THREE.Matrix3: .applyToVector3Array() has been removed.' );
  399. }
  400. } );
  401. Object.assign( Matrix4.prototype, {
  402. extractPosition: function ( m ) {
  403. console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );
  404. return this.copyPosition( m );
  405. },
  406. flattenToArrayOffset: function ( array, offset ) {
  407. console.warn( "THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead." );
  408. return this.toArray( array, offset );
  409. },
  410. getPosition: function () {
  411. console.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );
  412. return new Vector3().setFromMatrixColumn( this, 3 );
  413. },
  414. setRotationFromQuaternion: function ( q ) {
  415. console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
  416. return this.makeRotationFromQuaternion( q );
  417. },
  418. multiplyToArray: function () {
  419. console.warn( 'THREE.Matrix4: .multiplyToArray() has been removed.' );
  420. },
  421. multiplyVector3: function ( vector ) {
  422. console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  423. return vector.applyMatrix4( this );
  424. },
  425. multiplyVector4: function ( vector ) {
  426. console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  427. return vector.applyMatrix4( this );
  428. },
  429. multiplyVector3Array: function ( /* a */ ) {
  430. console.error( 'THREE.Matrix4: .multiplyVector3Array() has been removed.' );
  431. },
  432. rotateAxis: function ( v ) {
  433. console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );
  434. v.transformDirection( this );
  435. },
  436. crossVector: function ( vector ) {
  437. console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  438. return vector.applyMatrix4( this );
  439. },
  440. translate: function () {
  441. console.error( 'THREE.Matrix4: .translate() has been removed.' );
  442. },
  443. rotateX: function () {
  444. console.error( 'THREE.Matrix4: .rotateX() has been removed.' );
  445. },
  446. rotateY: function () {
  447. console.error( 'THREE.Matrix4: .rotateY() has been removed.' );
  448. },
  449. rotateZ: function () {
  450. console.error( 'THREE.Matrix4: .rotateZ() has been removed.' );
  451. },
  452. rotateByAxis: function () {
  453. console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );
  454. },
  455. applyToBufferAttribute: function ( attribute ) {
  456. console.warn( 'THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead.' );
  457. return attribute.applyMatrix4( this );
  458. },
  459. applyToVector3Array: function ( /* array, offset, length */ ) {
  460. console.error( 'THREE.Matrix4: .applyToVector3Array() has been removed.' );
  461. },
  462. makeFrustum: function ( left, right, bottom, top, near, far ) {
  463. console.warn( 'THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.' );
  464. return this.makePerspective( left, right, top, bottom, near, far );
  465. }
  466. } );
  467. Plane.prototype.isIntersectionLine = function ( line ) {
  468. console.warn( 'THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().' );
  469. return this.intersectsLine( line );
  470. };
  471. Quaternion.prototype.multiplyVector3 = function ( vector ) {
  472. console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );
  473. return vector.applyQuaternion( this );
  474. };
  475. Object.assign( Ray.prototype, {
  476. isIntersectionBox: function ( box ) {
  477. console.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' );
  478. return this.intersectsBox( box );
  479. },
  480. isIntersectionPlane: function ( plane ) {
  481. console.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' );
  482. return this.intersectsPlane( plane );
  483. },
  484. isIntersectionSphere: function ( sphere ) {
  485. console.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
  486. return this.intersectsSphere( sphere );
  487. }
  488. } );
  489. Object.assign( Triangle.prototype, {
  490. area: function () {
  491. console.warn( 'THREE.Triangle: .area() has been renamed to .getArea().' );
  492. return this.getArea();
  493. },
  494. barycoordFromPoint: function ( point, target ) {
  495. console.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' );
  496. return this.getBarycoord( point, target );
  497. },
  498. midpoint: function ( target ) {
  499. console.warn( 'THREE.Triangle: .midpoint() has been renamed to .getMidpoint().' );
  500. return this.getMidpoint( target );
  501. },
  502. normal: function ( target ) {
  503. console.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' );
  504. return this.getNormal( target );
  505. },
  506. plane: function ( target ) {
  507. console.warn( 'THREE.Triangle: .plane() has been renamed to .getPlane().' );
  508. return this.getPlane( target );
  509. }
  510. } );
  511. Object.assign( Triangle, {
  512. barycoordFromPoint: function ( point, a, b, c, target ) {
  513. console.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' );
  514. return Triangle.getBarycoord( point, a, b, c, target );
  515. },
  516. normal: function ( a, b, c, target ) {
  517. console.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' );
  518. return Triangle.getNormal( a, b, c, target );
  519. }
  520. } );
  521. Object.assign( Shape.prototype, {
  522. extractAllPoints: function ( divisions ) {
  523. console.warn( 'THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.' );
  524. return this.extractPoints( divisions );
  525. },
  526. extrude: function ( options ) {
  527. console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );
  528. return new ExtrudeGeometry( this, options );
  529. },
  530. makeGeometry: function ( options ) {
  531. console.warn( 'THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.' );
  532. return new ShapeGeometry( this, options );
  533. }
  534. } );
  535. Object.assign( Vector2.prototype, {
  536. fromAttribute: function ( attribute, index, offset ) {
  537. console.warn( 'THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  538. return this.fromBufferAttribute( attribute, index, offset );
  539. },
  540. distanceToManhattan: function ( v ) {
  541. console.warn( 'THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );
  542. return this.manhattanDistanceTo( v );
  543. },
  544. lengthManhattan: function () {
  545. console.warn( 'THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().' );
  546. return this.manhattanLength();
  547. }
  548. } );
  549. Object.assign( Vector3.prototype, {
  550. setEulerFromRotationMatrix: function () {
  551. console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );
  552. },
  553. setEulerFromQuaternion: function () {
  554. console.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );
  555. },
  556. getPositionFromMatrix: function ( m ) {
  557. console.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );
  558. return this.setFromMatrixPosition( m );
  559. },
  560. getScaleFromMatrix: function ( m ) {
  561. console.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );
  562. return this.setFromMatrixScale( m );
  563. },
  564. getColumnFromMatrix: function ( index, matrix ) {
  565. console.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );
  566. return this.setFromMatrixColumn( matrix, index );
  567. },
  568. applyProjection: function ( m ) {
  569. console.warn( 'THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.' );
  570. return this.applyMatrix4( m );
  571. },
  572. fromAttribute: function ( attribute, index, offset ) {
  573. console.warn( 'THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  574. return this.fromBufferAttribute( attribute, index, offset );
  575. },
  576. distanceToManhattan: function ( v ) {
  577. console.warn( 'THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );
  578. return this.manhattanDistanceTo( v );
  579. },
  580. lengthManhattan: function () {
  581. console.warn( 'THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().' );
  582. return this.manhattanLength();
  583. }
  584. } );
  585. Object.assign( Vector4.prototype, {
  586. fromAttribute: function ( attribute, index, offset ) {
  587. console.warn( 'THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  588. return this.fromBufferAttribute( attribute, index, offset );
  589. },
  590. lengthManhattan: function () {
  591. console.warn( 'THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().' );
  592. return this.manhattanLength();
  593. }
  594. } );
  595. //
  596. Object.assign( Geometry.prototype, {
  597. computeTangents: function () {
  598. console.error( 'THREE.Geometry: .computeTangents() has been removed.' );
  599. },
  600. computeLineDistances: function () {
  601. console.error( 'THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.' );
  602. },
  603. applyMatrix: function ( matrix ) {
  604. console.warn( 'THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4().' );
  605. return this.applyMatrix4( matrix );
  606. }
  607. } );
  608. Object.assign( Object3D.prototype, {
  609. getChildByName: function ( name ) {
  610. console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );
  611. return this.getObjectByName( name );
  612. },
  613. renderDepth: function () {
  614. console.warn( 'THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.' );
  615. },
  616. translate: function ( distance, axis ) {
  617. console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );
  618. return this.translateOnAxis( axis, distance );
  619. },
  620. getWorldRotation: function () {
  621. console.error( 'THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.' );
  622. },
  623. applyMatrix: function ( matrix ) {
  624. console.warn( 'THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().' );
  625. return this.applyMatrix4( matrix );
  626. }
  627. } );
  628. Object.defineProperties( Object3D.prototype, {
  629. eulerOrder: {
  630. get: function () {
  631. console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
  632. return this.rotation.order;
  633. },
  634. set: function ( value ) {
  635. console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
  636. this.rotation.order = value;
  637. }
  638. },
  639. useQuaternion: {
  640. get: function () {
  641. console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
  642. },
  643. set: function () {
  644. console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
  645. }
  646. }
  647. } );
  648. Object.assign( Mesh.prototype, {
  649. setDrawMode: function () {
  650. console.error( 'THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' );
  651. },
  652. } );
  653. Object.defineProperties( Mesh.prototype, {
  654. drawMode: {
  655. get: function () {
  656. console.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.' );
  657. return TrianglesDrawMode;
  658. },
  659. set: function () {
  660. console.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' );
  661. }
  662. }
  663. } );
  664. Object.defineProperties( LOD.prototype, {
  665. objects: {
  666. get: function () {
  667. console.warn( 'THREE.LOD: .objects has been renamed to .levels.' );
  668. return this.levels;
  669. }
  670. }
  671. } );
  672. Object.defineProperty( Skeleton.prototype, 'useVertexTexture', {
  673. get: function () {
  674. console.warn( 'THREE.Skeleton: useVertexTexture has been removed.' );
  675. },
  676. set: function () {
  677. console.warn( 'THREE.Skeleton: useVertexTexture has been removed.' );
  678. }
  679. } );
  680. SkinnedMesh.prototype.initBones = function () {
  681. console.error( 'THREE.SkinnedMesh: initBones() has been removed.' );
  682. };
  683. Object.defineProperty( Curve.prototype, '__arcLengthDivisions', {
  684. get: function () {
  685. console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
  686. return this.arcLengthDivisions;
  687. },
  688. set: function ( value ) {
  689. console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
  690. this.arcLengthDivisions = value;
  691. }
  692. } );
  693. //
  694. PerspectiveCamera.prototype.setLens = function ( focalLength, filmGauge ) {
  695. console.warn( "THREE.PerspectiveCamera.setLens is deprecated. " +
  696. "Use .setFocalLength and .filmGauge for a photographic setup." );
  697. if ( filmGauge !== undefined ) this.filmGauge = filmGauge;
  698. this.setFocalLength( focalLength );
  699. };
  700. //
  701. Object.defineProperties( Light.prototype, {
  702. onlyShadow: {
  703. set: function () {
  704. console.warn( 'THREE.Light: .onlyShadow has been removed.' );
  705. }
  706. },
  707. shadowCameraFov: {
  708. set: function ( value ) {
  709. console.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' );
  710. this.shadow.camera.fov = value;
  711. }
  712. },
  713. shadowCameraLeft: {
  714. set: function ( value ) {
  715. console.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' );
  716. this.shadow.camera.left = value;
  717. }
  718. },
  719. shadowCameraRight: {
  720. set: function ( value ) {
  721. console.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' );
  722. this.shadow.camera.right = value;
  723. }
  724. },
  725. shadowCameraTop: {
  726. set: function ( value ) {
  727. console.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' );
  728. this.shadow.camera.top = value;
  729. }
  730. },
  731. shadowCameraBottom: {
  732. set: function ( value ) {
  733. console.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' );
  734. this.shadow.camera.bottom = value;
  735. }
  736. },
  737. shadowCameraNear: {
  738. set: function ( value ) {
  739. console.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' );
  740. this.shadow.camera.near = value;
  741. }
  742. },
  743. shadowCameraFar: {
  744. set: function ( value ) {
  745. console.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' );
  746. this.shadow.camera.far = value;
  747. }
  748. },
  749. shadowCameraVisible: {
  750. set: function () {
  751. console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.' );
  752. }
  753. },
  754. shadowBias: {
  755. set: function ( value ) {
  756. console.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' );
  757. this.shadow.bias = value;
  758. }
  759. },
  760. shadowDarkness: {
  761. set: function () {
  762. console.warn( 'THREE.Light: .shadowDarkness has been removed.' );
  763. }
  764. },
  765. shadowMapWidth: {
  766. set: function ( value ) {
  767. console.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' );
  768. this.shadow.mapSize.width = value;
  769. }
  770. },
  771. shadowMapHeight: {
  772. set: function ( value ) {
  773. console.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' );
  774. this.shadow.mapSize.height = value;
  775. }
  776. }
  777. } );
  778. //
  779. Object.defineProperties( BufferAttribute.prototype, {
  780. length: {
  781. get: function () {
  782. console.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' );
  783. return this.array.length;
  784. }
  785. },
  786. dynamic: {
  787. get: function () {
  788. console.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );
  789. return this.usage === DynamicDrawUsage;
  790. },
  791. set: function ( /* value */ ) {
  792. console.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );
  793. this.setUsage( DynamicDrawUsage );
  794. }
  795. }
  796. } );
  797. Object.assign( BufferAttribute.prototype, {
  798. setDynamic: function ( value ) {
  799. console.warn( 'THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.' );
  800. this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );
  801. return this;
  802. },
  803. copyIndicesArray: function ( /* indices */ ) {
  804. console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );
  805. },
  806. setArray: function ( /* array */ ) {
  807. console.error( 'THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
  808. }
  809. } );
  810. Object.assign( BufferGeometry.prototype, {
  811. addIndex: function ( index ) {
  812. console.warn( 'THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().' );
  813. this.setIndex( index );
  814. },
  815. addAttribute: function ( name, attribute ) {
  816. console.warn( 'THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute().' );
  817. if ( ! ( attribute && attribute.isBufferAttribute ) && ! ( attribute && attribute.isInterleavedBufferAttribute ) ) {
  818. console.warn( 'THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).' );
  819. return this.setAttribute( name, new BufferAttribute( arguments[ 1 ], arguments[ 2 ] ) );
  820. }
  821. if ( name === 'index' ) {
  822. console.warn( 'THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.' );
  823. this.setIndex( attribute );
  824. return this;
  825. }
  826. return this.setAttribute( name, attribute );
  827. },
  828. addDrawCall: function ( start, count, indexOffset ) {
  829. if ( indexOffset !== undefined ) {
  830. console.warn( 'THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.' );
  831. }
  832. console.warn( 'THREE.BufferGeometry: .addDrawCall() is now .addGroup().' );
  833. this.addGroup( start, count );
  834. },
  835. clearDrawCalls: function () {
  836. console.warn( 'THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().' );
  837. this.clearGroups();
  838. },
  839. computeTangents: function () {
  840. console.warn( 'THREE.BufferGeometry: .computeTangents() has been removed.' );
  841. },
  842. computeOffsets: function () {
  843. console.warn( 'THREE.BufferGeometry: .computeOffsets() has been removed.' );
  844. },
  845. removeAttribute: function ( name ) {
  846. console.warn( 'THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute().' );
  847. return this.deleteAttribute( name );
  848. },
  849. applyMatrix: function ( matrix ) {
  850. console.warn( 'THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4().' );
  851. return this.applyMatrix4( matrix );
  852. }
  853. } );
  854. Object.defineProperties( BufferGeometry.prototype, {
  855. drawcalls: {
  856. get: function () {
  857. console.error( 'THREE.BufferGeometry: .drawcalls has been renamed to .groups.' );
  858. return this.groups;
  859. }
  860. },
  861. offsets: {
  862. get: function () {
  863. console.warn( 'THREE.BufferGeometry: .offsets has been renamed to .groups.' );
  864. return this.groups;
  865. }
  866. }
  867. } );
  868. Object.defineProperties( InstancedBufferGeometry.prototype, {
  869. maxInstancedCount: {
  870. get: function () {
  871. console.warn( 'THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount.' );
  872. return this.instanceCount;
  873. },
  874. set: function ( value ) {
  875. console.warn( 'THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount.' );
  876. this.instanceCount = value;
  877. }
  878. }
  879. } );
  880. Object.defineProperties( Raycaster.prototype, {
  881. linePrecision: {
  882. get: function () {
  883. console.warn( 'THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.' );
  884. return this.params.Line.threshold;
  885. },
  886. set: function ( value ) {
  887. console.warn( 'THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.' );
  888. this.params.Line.threshold = value;
  889. }
  890. }
  891. } );
  892. Object.defineProperties( InterleavedBuffer.prototype, {
  893. dynamic: {
  894. get: function () {
  895. console.warn( 'THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.' );
  896. return this.usage === DynamicDrawUsage;
  897. },
  898. set: function ( value ) {
  899. console.warn( 'THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.' );
  900. this.setUsage( value );
  901. }
  902. }
  903. } );
  904. Object.assign( InterleavedBuffer.prototype, {
  905. setDynamic: function ( value ) {
  906. console.warn( 'THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.' );
  907. this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );
  908. return this;
  909. },
  910. setArray: function ( /* array */ ) {
  911. console.error( 'THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
  912. }
  913. } );
  914. //
  915. Object.assign( ExtrudeBufferGeometry.prototype, {
  916. getArrays: function () {
  917. console.error( 'THREE.ExtrudeBufferGeometry: .getArrays() has been removed.' );
  918. },
  919. addShapeList: function () {
  920. console.error( 'THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.' );
  921. },
  922. addShape: function () {
  923. console.error( 'THREE.ExtrudeBufferGeometry: .addShape() has been removed.' );
  924. }
  925. } );
  926. //
  927. Object.defineProperties( Uniform.prototype, {
  928. dynamic: {
  929. set: function () {
  930. console.warn( 'THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.' );
  931. }
  932. },
  933. onUpdate: {
  934. value: function () {
  935. console.warn( 'THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.' );
  936. return this;
  937. }
  938. }
  939. } );
  940. //
  941. Object.defineProperties( Material.prototype, {
  942. wrapAround: {
  943. get: function () {
  944. console.warn( 'THREE.Material: .wrapAround has been removed.' );
  945. },
  946. set: function () {
  947. console.warn( 'THREE.Material: .wrapAround has been removed.' );
  948. }
  949. },
  950. overdraw: {
  951. get: function () {
  952. console.warn( 'THREE.Material: .overdraw has been removed.' );
  953. },
  954. set: function () {
  955. console.warn( 'THREE.Material: .overdraw has been removed.' );
  956. }
  957. },
  958. wrapRGB: {
  959. get: function () {
  960. console.warn( 'THREE.Material: .wrapRGB has been removed.' );
  961. return new Color();
  962. }
  963. },
  964. shading: {
  965. get: function () {
  966. console.error( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );
  967. },
  968. set: function ( value ) {
  969. console.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );
  970. this.flatShading = ( value === FlatShading );
  971. }
  972. },
  973. stencilMask: {
  974. get: function () {
  975. console.warn( 'THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.' );
  976. return this.stencilFuncMask;
  977. },
  978. set: function ( value ) {
  979. console.warn( 'THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.' );
  980. this.stencilFuncMask = value;
  981. }
  982. }
  983. } );
  984. Object.defineProperties( MeshPhongMaterial.prototype, {
  985. metal: {
  986. get: function () {
  987. console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.' );
  988. return false;
  989. },
  990. set: function () {
  991. console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead' );
  992. }
  993. }
  994. } );
  995. Object.defineProperties( MeshPhysicalMaterial.prototype, {
  996. transparency: {
  997. get: function () {
  998. console.warn( 'THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission.' );
  999. return this.transmission;
  1000. },
  1001. set: function ( value ) {
  1002. console.warn( 'THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission.' );
  1003. this.transmission = value;
  1004. }
  1005. }
  1006. } );
  1007. Object.defineProperties( ShaderMaterial.prototype, {
  1008. derivatives: {
  1009. get: function () {
  1010. console.warn( 'THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
  1011. return this.extensions.derivatives;
  1012. },
  1013. set: function ( value ) {
  1014. console.warn( 'THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
  1015. this.extensions.derivatives = value;
  1016. }
  1017. }
  1018. } );
  1019. //
  1020. Object.assign( WebGLRenderer.prototype, {
  1021. clearTarget: function ( renderTarget, color, depth, stencil ) {
  1022. console.warn( 'THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.' );
  1023. this.setRenderTarget( renderTarget );
  1024. this.clear( color, depth, stencil );
  1025. },
  1026. animate: function ( callback ) {
  1027. console.warn( 'THREE.WebGLRenderer: .animate() is now .setAnimationLoop().' );
  1028. this.setAnimationLoop( callback );
  1029. },
  1030. getCurrentRenderTarget: function () {
  1031. console.warn( 'THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().' );
  1032. return this.getRenderTarget();
  1033. },
  1034. getMaxAnisotropy: function () {
  1035. console.warn( 'THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().' );
  1036. return this.capabilities.getMaxAnisotropy();
  1037. },
  1038. getPrecision: function () {
  1039. console.warn( 'THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.' );
  1040. return this.capabilities.precision;
  1041. },
  1042. resetGLState: function () {
  1043. console.warn( 'THREE.WebGLRenderer: .resetGLState() is now .state.reset().' );
  1044. return this.state.reset();
  1045. },
  1046. supportsFloatTextures: function () {
  1047. console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
  1048. return this.extensions.get( 'OES_texture_float' );
  1049. },
  1050. supportsHalfFloatTextures: function () {
  1051. console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' );
  1052. return this.extensions.get( 'OES_texture_half_float' );
  1053. },
  1054. supportsStandardDerivatives: function () {
  1055. console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' );
  1056. return this.extensions.get( 'OES_standard_derivatives' );
  1057. },
  1058. supportsCompressedTextureS3TC: function () {
  1059. console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' );
  1060. return this.extensions.get( 'WEBGL_compressed_texture_s3tc' );
  1061. },
  1062. supportsCompressedTexturePVRTC: function () {
  1063. console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' );
  1064. return this.extensions.get( 'WEBGL_compressed_texture_pvrtc' );
  1065. },
  1066. supportsBlendMinMax: function () {
  1067. console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' );
  1068. return this.extensions.get( 'EXT_blend_minmax' );
  1069. },
  1070. supportsVertexTextures: function () {
  1071. console.warn( 'THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.' );
  1072. return this.capabilities.vertexTextures;
  1073. },
  1074. supportsInstancedArrays: function () {
  1075. console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' );
  1076. return this.extensions.get( 'ANGLE_instanced_arrays' );
  1077. },
  1078. enableScissorTest: function ( boolean ) {
  1079. console.warn( 'THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().' );
  1080. this.setScissorTest( boolean );
  1081. },
  1082. initMaterial: function () {
  1083. console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
  1084. },
  1085. addPrePlugin: function () {
  1086. console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
  1087. },
  1088. addPostPlugin: function () {
  1089. console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
  1090. },
  1091. updateShadowMap: function () {
  1092. console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
  1093. },
  1094. setFaceCulling: function () {
  1095. console.warn( 'THREE.WebGLRenderer: .setFaceCulling() has been removed.' );
  1096. },
  1097. allocTextureUnit: function () {
  1098. console.warn( 'THREE.WebGLRenderer: .allocTextureUnit() has been removed.' );
  1099. },
  1100. setTexture: function () {
  1101. console.warn( 'THREE.WebGLRenderer: .setTexture() has been removed.' );
  1102. },
  1103. setTexture2D: function () {
  1104. console.warn( 'THREE.WebGLRenderer: .setTexture2D() has been removed.' );
  1105. },
  1106. setTextureCube: function () {
  1107. console.warn( 'THREE.WebGLRenderer: .setTextureCube() has been removed.' );
  1108. },
  1109. getActiveMipMapLevel: function () {
  1110. console.warn( 'THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel().' );
  1111. return this.getActiveMipmapLevel();
  1112. }
  1113. } );
  1114. Object.defineProperties( WebGLRenderer.prototype, {
  1115. shadowMapEnabled: {
  1116. get: function () {
  1117. return this.shadowMap.enabled;
  1118. },
  1119. set: function ( value ) {
  1120. console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
  1121. this.shadowMap.enabled = value;
  1122. }
  1123. },
  1124. shadowMapType: {
  1125. get: function () {
  1126. return this.shadowMap.type;
  1127. },
  1128. set: function ( value ) {
  1129. console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
  1130. this.shadowMap.type = value;
  1131. }
  1132. },
  1133. shadowMapCullFace: {
  1134. get: function () {
  1135. console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.' );
  1136. return undefined;
  1137. },
  1138. set: function ( /* value */ ) {
  1139. console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.' );
  1140. }
  1141. },
  1142. context: {
  1143. get: function () {
  1144. console.warn( 'THREE.WebGLRenderer: .context has been removed. Use .getContext() instead.' );
  1145. return this.getContext();
  1146. }
  1147. },
  1148. vr: {
  1149. get: function () {
  1150. console.warn( 'THREE.WebGLRenderer: .vr has been renamed to .xr' );
  1151. return this.xr;
  1152. }
  1153. },
  1154. gammaInput: {
  1155. get: function () {
  1156. console.warn( 'THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.' );
  1157. return false;
  1158. },
  1159. set: function () {
  1160. console.warn( 'THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.' );
  1161. }
  1162. },
  1163. gammaOutput: {
  1164. get: function () {
  1165. console.warn( 'THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.' );
  1166. return false;
  1167. },
  1168. set: function ( value ) {
  1169. console.warn( 'THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.' );
  1170. this.outputEncoding = ( value === true ) ? sRGBEncoding : LinearEncoding;
  1171. }
  1172. },
  1173. toneMappingWhitePoint: {
  1174. get: function () {
  1175. console.warn( 'THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.' );
  1176. return 1.0;
  1177. },
  1178. set: function () {
  1179. console.warn( 'THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.' );
  1180. }
  1181. },
  1182. } );
  1183. Object.defineProperties( WebGLShadowMap.prototype, {
  1184. cullFace: {
  1185. get: function () {
  1186. console.warn( 'THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.' );
  1187. return undefined;
  1188. },
  1189. set: function ( /* cullFace */ ) {
  1190. console.warn( 'THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.' );
  1191. }
  1192. },
  1193. renderReverseSided: {
  1194. get: function () {
  1195. console.warn( 'THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.' );
  1196. return undefined;
  1197. },
  1198. set: function () {
  1199. console.warn( 'THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.' );
  1200. }
  1201. },
  1202. renderSingleSided: {
  1203. get: function () {
  1204. console.warn( 'THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.' );
  1205. return undefined;
  1206. },
  1207. set: function () {
  1208. console.warn( 'THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.' );
  1209. }
  1210. }
  1211. } );
  1212. export function WebGLRenderTargetCube( width, height, options ) {
  1213. console.warn( 'THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options ).' );
  1214. return new WebGLCubeRenderTarget( width, options );
  1215. }
  1216. //
  1217. Object.defineProperties( WebGLRenderTarget.prototype, {
  1218. wrapS: {
  1219. get: function () {
  1220. console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
  1221. return this.texture.wrapS;
  1222. },
  1223. set: function ( value ) {
  1224. console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
  1225. this.texture.wrapS = value;
  1226. }
  1227. },
  1228. wrapT: {
  1229. get: function () {
  1230. console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
  1231. return this.texture.wrapT;
  1232. },
  1233. set: function ( value ) {
  1234. console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
  1235. this.texture.wrapT = value;
  1236. }
  1237. },
  1238. magFilter: {
  1239. get: function () {
  1240. console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
  1241. return this.texture.magFilter;
  1242. },
  1243. set: function ( value ) {
  1244. console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
  1245. this.texture.magFilter = value;
  1246. }
  1247. },
  1248. minFilter: {
  1249. get: function () {
  1250. console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
  1251. return this.texture.minFilter;
  1252. },
  1253. set: function ( value ) {
  1254. console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
  1255. this.texture.minFilter = value;
  1256. }
  1257. },
  1258. anisotropy: {
  1259. get: function () {
  1260. console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
  1261. return this.texture.anisotropy;
  1262. },
  1263. set: function ( value ) {
  1264. console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
  1265. this.texture.anisotropy = value;
  1266. }
  1267. },
  1268. offset: {
  1269. get: function () {
  1270. console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
  1271. return this.texture.offset;
  1272. },
  1273. set: function ( value ) {
  1274. console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
  1275. this.texture.offset = value;
  1276. }
  1277. },
  1278. repeat: {
  1279. get: function () {
  1280. console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
  1281. return this.texture.repeat;
  1282. },
  1283. set: function ( value ) {
  1284. console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
  1285. this.texture.repeat = value;
  1286. }
  1287. },
  1288. format: {
  1289. get: function () {
  1290. console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
  1291. return this.texture.format;
  1292. },
  1293. set: function ( value ) {
  1294. console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
  1295. this.texture.format = value;
  1296. }
  1297. },
  1298. type: {
  1299. get: function () {
  1300. console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
  1301. return this.texture.type;
  1302. },
  1303. set: function ( value ) {
  1304. console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
  1305. this.texture.type = value;
  1306. }
  1307. },
  1308. generateMipmaps: {
  1309. get: function () {
  1310. console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
  1311. return this.texture.generateMipmaps;
  1312. },
  1313. set: function ( value ) {
  1314. console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
  1315. this.texture.generateMipmaps = value;
  1316. }
  1317. }
  1318. } );
  1319. //
  1320. Object.defineProperties( Audio.prototype, {
  1321. load: {
  1322. value: function ( file ) {
  1323. console.warn( 'THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.' );
  1324. const scope = this;
  1325. const audioLoader = new AudioLoader();
  1326. audioLoader.load( file, function ( buffer ) {
  1327. scope.setBuffer( buffer );
  1328. } );
  1329. return this;
  1330. }
  1331. },
  1332. startTime: {
  1333. set: function () {
  1334. console.warn( 'THREE.Audio: .startTime is now .play( delay ).' );
  1335. }
  1336. }
  1337. } );
  1338. AudioAnalyser.prototype.getData = function () {
  1339. console.warn( 'THREE.AudioAnalyser: .getData() is now .getFrequencyData().' );
  1340. return this.getFrequencyData();
  1341. };
  1342. //
  1343. CubeCamera.prototype.updateCubeMap = function ( renderer, scene ) {
  1344. console.warn( 'THREE.CubeCamera: .updateCubeMap() is now .update().' );
  1345. return this.update( renderer, scene );
  1346. };
  1347. //
  1348. export const GeometryUtils = {
  1349. merge: function ( geometry1, geometry2, materialIndexOffset ) {
  1350. console.warn( 'THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.' );
  1351. let matrix;
  1352. if ( geometry2.isMesh ) {
  1353. geometry2.matrixAutoUpdate && geometry2.updateMatrix();
  1354. matrix = geometry2.matrix;
  1355. geometry2 = geometry2.geometry;
  1356. }
  1357. geometry1.merge( geometry2, matrix, materialIndexOffset );
  1358. },
  1359. center: function ( geometry ) {
  1360. console.warn( 'THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.' );
  1361. return geometry.center();
  1362. }
  1363. };
  1364. ImageUtils.crossOrigin = undefined;
  1365. ImageUtils.loadTexture = function ( url, mapping, onLoad, onError ) {
  1366. console.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' );
  1367. const loader = new TextureLoader();
  1368. loader.setCrossOrigin( this.crossOrigin );
  1369. const texture = loader.load( url, onLoad, undefined, onError );
  1370. if ( mapping ) texture.mapping = mapping;
  1371. return texture;
  1372. };
  1373. ImageUtils.loadTextureCube = function ( urls, mapping, onLoad, onError ) {
  1374. console.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' );
  1375. const loader = new CubeTextureLoader();
  1376. loader.setCrossOrigin( this.crossOrigin );
  1377. const texture = loader.load( urls, onLoad, undefined, onError );
  1378. if ( mapping ) texture.mapping = mapping;
  1379. return texture;
  1380. };
  1381. ImageUtils.loadCompressedTexture = function () {
  1382. console.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' );
  1383. };
  1384. ImageUtils.loadCompressedTextureCube = function () {
  1385. console.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' );
  1386. };
  1387. //
  1388. export function CanvasRenderer() {
  1389. console.error( 'THREE.CanvasRenderer has been removed' );
  1390. }
  1391. //
  1392. export function JSONLoader() {
  1393. console.error( 'THREE.JSONLoader has been removed.' );
  1394. }
  1395. //
  1396. export const SceneUtils = {
  1397. createMultiMaterialObject: function ( /* geometry, materials */ ) {
  1398. console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' );
  1399. },
  1400. detach: function ( /* child, parent, scene */ ) {
  1401. console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' );
  1402. },
  1403. attach: function ( /* child, scene, parent */ ) {
  1404. console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' );
  1405. }
  1406. };
  1407. //
  1408. export function LensFlare() {
  1409. console.error( 'THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js' );
  1410. }