Three.Legacy.js 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229
  1. import { Audio } from './audio/Audio.js';
  2. import { AudioAnalyser } from './audio/AudioAnalyser.js';
  3. import { PerspectiveCamera } from './cameras/PerspectiveCamera.js';
  4. import {
  5. FlatShading,
  6. sRGBEncoding,
  7. LinearEncoding,
  8. StaticDrawUsage,
  9. DynamicDrawUsage,
  10. TrianglesDrawMode
  11. } from './constants.js';
  12. import {
  13. Float64BufferAttribute,
  14. Float32BufferAttribute,
  15. Uint32BufferAttribute,
  16. Int32BufferAttribute,
  17. Uint16BufferAttribute,
  18. Int16BufferAttribute,
  19. Uint8ClampedBufferAttribute,
  20. Uint8BufferAttribute,
  21. Int8BufferAttribute,
  22. BufferAttribute
  23. } from './core/BufferAttribute.js';
  24. import { BufferGeometry } from './core/BufferGeometry.js';
  25. import { InstancedBufferGeometry } from './core/InstancedBufferGeometry.js';
  26. import { InterleavedBuffer } from './core/InterleavedBuffer.js';
  27. import { Face3 } from './core/Face3.js';
  28. import { Geometry } from './core/Geometry.js';
  29. import { Object3D } from './core/Object3D.js';
  30. import { Uniform } from './core/Uniform.js';
  31. import { Raycaster } from './core/Raycaster.js';
  32. import { Curve } from './extras/core/Curve.js';
  33. import { CurvePath } from './extras/core/CurvePath.js';
  34. import { Path } from './extras/core/Path.js';
  35. import { CatmullRomCurve3 } from './extras/curves/CatmullRomCurve3.js';
  36. import { AxesHelper } from './helpers/AxesHelper.js';
  37. import { BoxHelper } from './helpers/BoxHelper.js';
  38. import { GridHelper } from './helpers/GridHelper.js';
  39. import { SkeletonHelper } from './helpers/SkeletonHelper.js';
  40. import { BoxGeometry } from './geometries/BoxGeometry.js';
  41. import { EdgesGeometry } from './geometries/EdgesGeometry.js';
  42. import { ExtrudeGeometry } from './geometries/ExtrudeGeometry.js';
  43. import { ExtrudeBufferGeometry } from './geometries/ExtrudeGeometry.js';
  44. import { ShapeGeometry } from './geometries/ShapeGeometry.js';
  45. import { WireframeGeometry } from './geometries/WireframeGeometry.js';
  46. import { Light } from './lights/Light.js';
  47. import { Loader } from './loaders/Loader.js';
  48. import { LoaderUtils } from './loaders/LoaderUtils.js';
  49. import { FileLoader } from './loaders/FileLoader.js';
  50. import { AudioLoader } from './loaders/AudioLoader.js';
  51. import { CubeTextureLoader } from './loaders/CubeTextureLoader.js';
  52. import { DataTextureLoader } from './loaders/DataTextureLoader.js';
  53. import { ObjectLoader } from './loaders/ObjectLoader.js';
  54. import { TextureLoader } from './loaders/TextureLoader.js';
  55. import { Material } from './materials/Material.js';
  56. import { LineBasicMaterial } from './materials/LineBasicMaterial.js';
  57. import { MeshPhongMaterial } from './materials/MeshPhongMaterial.js';
  58. import { MeshPhysicalMaterial } from './materials/MeshPhysicalMaterial.js';
  59. import { PointsMaterial } from './materials/PointsMaterial.js';
  60. import { ShaderMaterial } from './materials/ShaderMaterial.js';
  61. import { Box2 } from './math/Box2.js';
  62. import { Box3 } from './math/Box3.js';
  63. import { Sphere } from './math/Sphere.js';
  64. import { Color } from './math/Color.js';
  65. import { Frustum } from './math/Frustum.js';
  66. import { Line3 } from './math/Line3.js';
  67. import { MathUtils } from './math/MathUtils.js';
  68. import { Matrix3 } from './math/Matrix3.js';
  69. import { Matrix4 } from './math/Matrix4.js';
  70. import { Plane } from './math/Plane.js';
  71. import { Quaternion } from './math/Quaternion.js';
  72. import { Ray } from './math/Ray.js';
  73. import { Triangle } from './math/Triangle.js';
  74. import { Vector2 } from './math/Vector2.js';
  75. import { Vector3 } from './math/Vector3.js';
  76. import { Vector4 } from './math/Vector4.js';
  77. import { Mesh } from './objects/Mesh.js';
  78. import { LineSegments } from './objects/LineSegments.js';
  79. import { LOD } from './objects/LOD.js';
  80. import { Points } from './objects/Points.js';
  81. import { Sprite } from './objects/Sprite.js';
  82. import { Skeleton } from './objects/Skeleton.js';
  83. import { SkinnedMesh } from './objects/SkinnedMesh.js';
  84. import { WebGLRenderer } from './renderers/WebGLRenderer.js';
  85. import { WebGLRenderTarget } from './renderers/WebGLRenderTarget.js';
  86. import { WebGLCubeRenderTarget } from './renderers/WebGLCubeRenderTarget.js';
  87. import { WebGLShadowMap } from './renderers/webgl/WebGLShadowMap.js';
  88. import { ImageUtils } from './extras/ImageUtils.js';
  89. import { Shape } from './extras/core/Shape.js';
  90. import { CubeCamera } from './cameras/CubeCamera.js';
  91. 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. Object.assign( ObjectLoader.prototype, {
  304. setTexturePath: function ( value ) {
  305. console.warn( 'THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().' );
  306. return this.setResourcePath( value );
  307. }
  308. } );
  309. //
  310. Object.assign( Box2.prototype, {
  311. center: function ( optionalTarget ) {
  312. console.warn( 'THREE.Box2: .center() has been renamed to .getCenter().' );
  313. return this.getCenter( optionalTarget );
  314. },
  315. empty: function () {
  316. console.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );
  317. return this.isEmpty();
  318. },
  319. isIntersectionBox: function ( box ) {
  320. console.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' );
  321. return this.intersectsBox( box );
  322. },
  323. size: function ( optionalTarget ) {
  324. console.warn( 'THREE.Box2: .size() has been renamed to .getSize().' );
  325. return this.getSize( optionalTarget );
  326. }
  327. } );
  328. Object.assign( Box3.prototype, {
  329. center: function ( optionalTarget ) {
  330. console.warn( 'THREE.Box3: .center() has been renamed to .getCenter().' );
  331. return this.getCenter( optionalTarget );
  332. },
  333. empty: function () {
  334. console.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' );
  335. return this.isEmpty();
  336. },
  337. isIntersectionBox: function ( box ) {
  338. console.warn( 'THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().' );
  339. return this.intersectsBox( box );
  340. },
  341. isIntersectionSphere: function ( sphere ) {
  342. console.warn( 'THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
  343. return this.intersectsSphere( sphere );
  344. },
  345. size: function ( optionalTarget ) {
  346. console.warn( 'THREE.Box3: .size() has been renamed to .getSize().' );
  347. return this.getSize( optionalTarget );
  348. }
  349. } );
  350. Object.assign( Sphere.prototype, {
  351. empty: function () {
  352. console.warn( 'THREE.Sphere: .empty() has been renamed to .isEmpty().' );
  353. return this.isEmpty();
  354. },
  355. } );
  356. Frustum.prototype.setFromMatrix = function ( m ) {
  357. console.warn( 'THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix().' );
  358. return this.setFromProjectionMatrix( m );
  359. };
  360. Line3.prototype.center = function ( optionalTarget ) {
  361. console.warn( 'THREE.Line3: .center() has been renamed to .getCenter().' );
  362. return this.getCenter( optionalTarget );
  363. };
  364. Object.assign( MathUtils, {
  365. random16: function () {
  366. console.warn( 'THREE.Math: .random16() has been deprecated. Use Math.random() instead.' );
  367. return Math.random();
  368. },
  369. nearestPowerOfTwo: function ( value ) {
  370. console.warn( 'THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().' );
  371. return MathUtils.floorPowerOfTwo( value );
  372. },
  373. nextPowerOfTwo: function ( value ) {
  374. console.warn( 'THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().' );
  375. return MathUtils.ceilPowerOfTwo( value );
  376. }
  377. } );
  378. Object.assign( Matrix3.prototype, {
  379. flattenToArrayOffset: function ( array, offset ) {
  380. console.warn( "THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead." );
  381. return this.toArray( array, offset );
  382. },
  383. multiplyVector3: function ( vector ) {
  384. console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );
  385. return vector.applyMatrix3( this );
  386. },
  387. multiplyVector3Array: function ( /* a */ ) {
  388. console.error( 'THREE.Matrix3: .multiplyVector3Array() has been removed.' );
  389. },
  390. applyToBufferAttribute: function ( attribute ) {
  391. console.warn( 'THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead.' );
  392. return attribute.applyMatrix3( this );
  393. },
  394. applyToVector3Array: function ( /* array, offset, length */ ) {
  395. console.error( 'THREE.Matrix3: .applyToVector3Array() has been removed.' );
  396. }
  397. } );
  398. Object.assign( Matrix4.prototype, {
  399. extractPosition: function ( m ) {
  400. console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );
  401. return this.copyPosition( m );
  402. },
  403. flattenToArrayOffset: function ( array, offset ) {
  404. console.warn( "THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead." );
  405. return this.toArray( array, offset );
  406. },
  407. getPosition: function () {
  408. console.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );
  409. return new Vector3().setFromMatrixColumn( this, 3 );
  410. },
  411. setRotationFromQuaternion: function ( q ) {
  412. console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
  413. return this.makeRotationFromQuaternion( q );
  414. },
  415. multiplyToArray: function () {
  416. console.warn( 'THREE.Matrix4: .multiplyToArray() has been removed.' );
  417. },
  418. multiplyVector3: function ( vector ) {
  419. console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  420. return vector.applyMatrix4( this );
  421. },
  422. multiplyVector4: function ( vector ) {
  423. console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  424. return vector.applyMatrix4( this );
  425. },
  426. multiplyVector3Array: function ( /* a */ ) {
  427. console.error( 'THREE.Matrix4: .multiplyVector3Array() has been removed.' );
  428. },
  429. rotateAxis: function ( v ) {
  430. console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );
  431. v.transformDirection( this );
  432. },
  433. crossVector: function ( vector ) {
  434. console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  435. return vector.applyMatrix4( this );
  436. },
  437. translate: function () {
  438. console.error( 'THREE.Matrix4: .translate() has been removed.' );
  439. },
  440. rotateX: function () {
  441. console.error( 'THREE.Matrix4: .rotateX() has been removed.' );
  442. },
  443. rotateY: function () {
  444. console.error( 'THREE.Matrix4: .rotateY() has been removed.' );
  445. },
  446. rotateZ: function () {
  447. console.error( 'THREE.Matrix4: .rotateZ() has been removed.' );
  448. },
  449. rotateByAxis: function () {
  450. console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );
  451. },
  452. applyToBufferAttribute: function ( attribute ) {
  453. console.warn( 'THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead.' );
  454. return attribute.applyMatrix4( this );
  455. },
  456. applyToVector3Array: function ( /* array, offset, length */ ) {
  457. console.error( 'THREE.Matrix4: .applyToVector3Array() has been removed.' );
  458. },
  459. makeFrustum: function ( left, right, bottom, top, near, far ) {
  460. console.warn( 'THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.' );
  461. return this.makePerspective( left, right, top, bottom, near, far );
  462. }
  463. } );
  464. Plane.prototype.isIntersectionLine = function ( line ) {
  465. console.warn( 'THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().' );
  466. return this.intersectsLine( line );
  467. };
  468. Quaternion.prototype.multiplyVector3 = function ( vector ) {
  469. console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );
  470. return vector.applyQuaternion( this );
  471. };
  472. Object.assign( Ray.prototype, {
  473. isIntersectionBox: function ( box ) {
  474. console.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' );
  475. return this.intersectsBox( box );
  476. },
  477. isIntersectionPlane: function ( plane ) {
  478. console.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' );
  479. return this.intersectsPlane( plane );
  480. },
  481. isIntersectionSphere: function ( sphere ) {
  482. console.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
  483. return this.intersectsSphere( sphere );
  484. }
  485. } );
  486. Object.assign( Triangle.prototype, {
  487. area: function () {
  488. console.warn( 'THREE.Triangle: .area() has been renamed to .getArea().' );
  489. return this.getArea();
  490. },
  491. barycoordFromPoint: function ( point, target ) {
  492. console.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' );
  493. return this.getBarycoord( point, target );
  494. },
  495. midpoint: function ( target ) {
  496. console.warn( 'THREE.Triangle: .midpoint() has been renamed to .getMidpoint().' );
  497. return this.getMidpoint( target );
  498. },
  499. normal: function ( target ) {
  500. console.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' );
  501. return this.getNormal( target );
  502. },
  503. plane: function ( target ) {
  504. console.warn( 'THREE.Triangle: .plane() has been renamed to .getPlane().' );
  505. return this.getPlane( target );
  506. }
  507. } );
  508. Object.assign( Triangle, {
  509. barycoordFromPoint: function ( point, a, b, c, target ) {
  510. console.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' );
  511. return Triangle.getBarycoord( point, a, b, c, target );
  512. },
  513. normal: function ( a, b, c, target ) {
  514. console.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' );
  515. return Triangle.getNormal( a, b, c, target );
  516. }
  517. } );
  518. Object.assign( Shape.prototype, {
  519. extractAllPoints: function ( divisions ) {
  520. console.warn( 'THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.' );
  521. return this.extractPoints( divisions );
  522. },
  523. extrude: function ( options ) {
  524. console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );
  525. return new ExtrudeGeometry( this, options );
  526. },
  527. makeGeometry: function ( options ) {
  528. console.warn( 'THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.' );
  529. return new ShapeGeometry( this, options );
  530. }
  531. } );
  532. Object.assign( Vector2.prototype, {
  533. fromAttribute: function ( attribute, index, offset ) {
  534. console.warn( 'THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  535. return this.fromBufferAttribute( attribute, index, offset );
  536. },
  537. distanceToManhattan: function ( v ) {
  538. console.warn( 'THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );
  539. return this.manhattanDistanceTo( v );
  540. },
  541. lengthManhattan: function () {
  542. console.warn( 'THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().' );
  543. return this.manhattanLength();
  544. }
  545. } );
  546. Object.assign( Vector3.prototype, {
  547. setEulerFromRotationMatrix: function () {
  548. console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );
  549. },
  550. setEulerFromQuaternion: function () {
  551. console.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );
  552. },
  553. getPositionFromMatrix: function ( m ) {
  554. console.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );
  555. return this.setFromMatrixPosition( m );
  556. },
  557. getScaleFromMatrix: function ( m ) {
  558. console.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );
  559. return this.setFromMatrixScale( m );
  560. },
  561. getColumnFromMatrix: function ( index, matrix ) {
  562. console.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );
  563. return this.setFromMatrixColumn( matrix, index );
  564. },
  565. applyProjection: function ( m ) {
  566. console.warn( 'THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.' );
  567. return this.applyMatrix4( m );
  568. },
  569. fromAttribute: function ( attribute, index, offset ) {
  570. console.warn( 'THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  571. return this.fromBufferAttribute( attribute, index, offset );
  572. },
  573. distanceToManhattan: function ( v ) {
  574. console.warn( 'THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );
  575. return this.manhattanDistanceTo( v );
  576. },
  577. lengthManhattan: function () {
  578. console.warn( 'THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().' );
  579. return this.manhattanLength();
  580. }
  581. } );
  582. Object.assign( Vector4.prototype, {
  583. fromAttribute: function ( attribute, index, offset ) {
  584. console.warn( 'THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  585. return this.fromBufferAttribute( attribute, index, offset );
  586. },
  587. lengthManhattan: function () {
  588. console.warn( 'THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().' );
  589. return this.manhattanLength();
  590. }
  591. } );
  592. //
  593. Object.assign( Geometry.prototype, {
  594. computeTangents: function () {
  595. console.error( 'THREE.Geometry: .computeTangents() has been removed.' );
  596. },
  597. computeLineDistances: function () {
  598. console.error( 'THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.' );
  599. },
  600. applyMatrix: function ( matrix ) {
  601. console.warn( 'THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4().' );
  602. return this.applyMatrix4( matrix );
  603. }
  604. } );
  605. Object.assign( Object3D.prototype, {
  606. getChildByName: function ( name ) {
  607. console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );
  608. return this.getObjectByName( name );
  609. },
  610. renderDepth: function () {
  611. console.warn( 'THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.' );
  612. },
  613. translate: function ( distance, axis ) {
  614. console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );
  615. return this.translateOnAxis( axis, distance );
  616. },
  617. getWorldRotation: function () {
  618. console.error( 'THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.' );
  619. },
  620. applyMatrix: function ( matrix ) {
  621. console.warn( 'THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().' );
  622. return this.applyMatrix4( matrix );
  623. }
  624. } );
  625. Object.defineProperties( Object3D.prototype, {
  626. eulerOrder: {
  627. get: function () {
  628. console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
  629. return this.rotation.order;
  630. },
  631. set: function ( value ) {
  632. console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
  633. this.rotation.order = value;
  634. }
  635. },
  636. useQuaternion: {
  637. get: function () {
  638. console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
  639. },
  640. set: function () {
  641. console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
  642. }
  643. }
  644. } );
  645. Object.assign( Mesh.prototype, {
  646. setDrawMode: function () {
  647. console.error( 'THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' );
  648. },
  649. } );
  650. Object.defineProperties( Mesh.prototype, {
  651. drawMode: {
  652. get: function () {
  653. console.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.' );
  654. return TrianglesDrawMode;
  655. },
  656. set: function () {
  657. console.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' );
  658. }
  659. }
  660. } );
  661. Object.defineProperties( LOD.prototype, {
  662. objects: {
  663. get: function () {
  664. console.warn( 'THREE.LOD: .objects has been renamed to .levels.' );
  665. return this.levels;
  666. }
  667. }
  668. } );
  669. Object.defineProperty( Skeleton.prototype, 'useVertexTexture', {
  670. get: function () {
  671. console.warn( 'THREE.Skeleton: useVertexTexture has been removed.' );
  672. },
  673. set: function () {
  674. console.warn( 'THREE.Skeleton: useVertexTexture has been removed.' );
  675. }
  676. } );
  677. SkinnedMesh.prototype.initBones = function () {
  678. console.error( 'THREE.SkinnedMesh: initBones() has been removed.' );
  679. };
  680. Object.defineProperty( Curve.prototype, '__arcLengthDivisions', {
  681. get: function () {
  682. console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
  683. return this.arcLengthDivisions;
  684. },
  685. set: function ( value ) {
  686. console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
  687. this.arcLengthDivisions = value;
  688. }
  689. } );
  690. //
  691. PerspectiveCamera.prototype.setLens = function ( focalLength, filmGauge ) {
  692. console.warn( "THREE.PerspectiveCamera.setLens is deprecated. " +
  693. "Use .setFocalLength and .filmGauge for a photographic setup." );
  694. if ( filmGauge !== undefined ) this.filmGauge = filmGauge;
  695. this.setFocalLength( focalLength );
  696. };
  697. //
  698. Object.defineProperties( Light.prototype, {
  699. onlyShadow: {
  700. set: function () {
  701. console.warn( 'THREE.Light: .onlyShadow has been removed.' );
  702. }
  703. },
  704. shadowCameraFov: {
  705. set: function ( value ) {
  706. console.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' );
  707. this.shadow.camera.fov = value;
  708. }
  709. },
  710. shadowCameraLeft: {
  711. set: function ( value ) {
  712. console.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' );
  713. this.shadow.camera.left = value;
  714. }
  715. },
  716. shadowCameraRight: {
  717. set: function ( value ) {
  718. console.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' );
  719. this.shadow.camera.right = value;
  720. }
  721. },
  722. shadowCameraTop: {
  723. set: function ( value ) {
  724. console.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' );
  725. this.shadow.camera.top = value;
  726. }
  727. },
  728. shadowCameraBottom: {
  729. set: function ( value ) {
  730. console.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' );
  731. this.shadow.camera.bottom = value;
  732. }
  733. },
  734. shadowCameraNear: {
  735. set: function ( value ) {
  736. console.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' );
  737. this.shadow.camera.near = value;
  738. }
  739. },
  740. shadowCameraFar: {
  741. set: function ( value ) {
  742. console.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' );
  743. this.shadow.camera.far = value;
  744. }
  745. },
  746. shadowCameraVisible: {
  747. set: function () {
  748. console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.' );
  749. }
  750. },
  751. shadowBias: {
  752. set: function ( value ) {
  753. console.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' );
  754. this.shadow.bias = value;
  755. }
  756. },
  757. shadowDarkness: {
  758. set: function () {
  759. console.warn( 'THREE.Light: .shadowDarkness has been removed.' );
  760. }
  761. },
  762. shadowMapWidth: {
  763. set: function ( value ) {
  764. console.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' );
  765. this.shadow.mapSize.width = value;
  766. }
  767. },
  768. shadowMapHeight: {
  769. set: function ( value ) {
  770. console.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' );
  771. this.shadow.mapSize.height = value;
  772. }
  773. }
  774. } );
  775. //
  776. Object.defineProperties( BufferAttribute.prototype, {
  777. length: {
  778. get: function () {
  779. console.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' );
  780. return this.array.length;
  781. }
  782. },
  783. dynamic: {
  784. get: function () {
  785. console.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );
  786. return this.usage === DynamicDrawUsage;
  787. },
  788. set: function ( /* value */ ) {
  789. console.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );
  790. this.setUsage( DynamicDrawUsage );
  791. }
  792. }
  793. } );
  794. Object.assign( BufferAttribute.prototype, {
  795. setDynamic: function ( value ) {
  796. console.warn( 'THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.' );
  797. this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );
  798. return this;
  799. },
  800. copyIndicesArray: function ( /* indices */ ) {
  801. console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );
  802. },
  803. setArray: function ( /* array */ ) {
  804. console.error( 'THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
  805. }
  806. } );
  807. Object.assign( BufferGeometry.prototype, {
  808. addIndex: function ( index ) {
  809. console.warn( 'THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().' );
  810. this.setIndex( index );
  811. },
  812. addAttribute: function ( name, attribute ) {
  813. console.warn( 'THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute().' );
  814. if ( ! ( attribute && attribute.isBufferAttribute ) && ! ( attribute && attribute.isInterleavedBufferAttribute ) ) {
  815. console.warn( 'THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).' );
  816. return this.setAttribute( name, new BufferAttribute( arguments[ 1 ], arguments[ 2 ] ) );
  817. }
  818. if ( name === 'index' ) {
  819. console.warn( 'THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.' );
  820. this.setIndex( attribute );
  821. return this;
  822. }
  823. return this.setAttribute( name, attribute );
  824. },
  825. addDrawCall: function ( start, count, indexOffset ) {
  826. if ( indexOffset !== undefined ) {
  827. console.warn( 'THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.' );
  828. }
  829. console.warn( 'THREE.BufferGeometry: .addDrawCall() is now .addGroup().' );
  830. this.addGroup( start, count );
  831. },
  832. clearDrawCalls: function () {
  833. console.warn( 'THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().' );
  834. this.clearGroups();
  835. },
  836. computeTangents: function () {
  837. console.warn( 'THREE.BufferGeometry: .computeTangents() has been removed.' );
  838. },
  839. computeOffsets: function () {
  840. console.warn( 'THREE.BufferGeometry: .computeOffsets() has been removed.' );
  841. },
  842. removeAttribute: function ( name ) {
  843. console.warn( 'THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute().' );
  844. return this.deleteAttribute( name );
  845. },
  846. applyMatrix: function ( matrix ) {
  847. console.warn( 'THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4().' );
  848. return this.applyMatrix4( matrix );
  849. }
  850. } );
  851. Object.defineProperties( BufferGeometry.prototype, {
  852. drawcalls: {
  853. get: function () {
  854. console.error( 'THREE.BufferGeometry: .drawcalls has been renamed to .groups.' );
  855. return this.groups;
  856. }
  857. },
  858. offsets: {
  859. get: function () {
  860. console.warn( 'THREE.BufferGeometry: .offsets has been renamed to .groups.' );
  861. return this.groups;
  862. }
  863. }
  864. } );
  865. Object.defineProperties( InstancedBufferGeometry.prototype, {
  866. maxInstancedCount: {
  867. get: function () {
  868. console.warn( 'THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount.' );
  869. return this.instanceCount;
  870. },
  871. set: function ( value ) {
  872. console.warn( 'THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount.' );
  873. this.instanceCount = value;
  874. }
  875. }
  876. } );
  877. Object.defineProperties( Raycaster.prototype, {
  878. linePrecision: {
  879. get: function () {
  880. console.warn( 'THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.' );
  881. return this.params.Line.threshold;
  882. },
  883. set: function ( value ) {
  884. console.warn( 'THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.' );
  885. this.params.Line.threshold = value;
  886. }
  887. }
  888. } );
  889. Object.defineProperties( InterleavedBuffer.prototype, {
  890. dynamic: {
  891. get: function () {
  892. console.warn( 'THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.' );
  893. return this.usage === DynamicDrawUsage;
  894. },
  895. set: function ( value ) {
  896. console.warn( 'THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.' );
  897. this.setUsage( value );
  898. }
  899. }
  900. } );
  901. Object.assign( InterleavedBuffer.prototype, {
  902. setDynamic: function ( value ) {
  903. console.warn( 'THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.' );
  904. this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );
  905. return this;
  906. },
  907. setArray: function ( /* array */ ) {
  908. console.error( 'THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
  909. }
  910. } );
  911. //
  912. Object.assign( ExtrudeBufferGeometry.prototype, {
  913. getArrays: function () {
  914. console.error( 'THREE.ExtrudeBufferGeometry: .getArrays() has been removed.' );
  915. },
  916. addShapeList: function () {
  917. console.error( 'THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.' );
  918. },
  919. addShape: function () {
  920. console.error( 'THREE.ExtrudeBufferGeometry: .addShape() 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. }