Three.Legacy.js 55 KB

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