Three.Legacy.js 55 KB

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