Three.Legacy.js 54 KB

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