Three.Legacy.js 54 KB

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