Three.Legacy.js 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. import { Audio } from './audio/Audio.js';
  5. import { AudioAnalyser } from './audio/AudioAnalyser.js';
  6. import { PerspectiveCamera } from './cameras/PerspectiveCamera.js';
  7. import { CullFaceFront, CullFaceBack } from './constants.js';
  8. import {
  9. Float64BufferAttribute,
  10. Float32BufferAttribute,
  11. Uint32BufferAttribute,
  12. Int32BufferAttribute,
  13. Uint16BufferAttribute,
  14. Int16BufferAttribute,
  15. Uint8ClampedBufferAttribute,
  16. Uint8BufferAttribute,
  17. Int8BufferAttribute,
  18. BufferAttribute
  19. } from './core/BufferAttribute.js';
  20. import { BufferGeometry } from './core/BufferGeometry.js';
  21. import { Face3 } from './core/Face3.js';
  22. import { Geometry } from './core/Geometry';
  23. import { Object3D } from './core/Object3D.js';
  24. import { Uniform } from './core/Uniform';
  25. import { Curve } from './extras/core/Curve.js';
  26. import { CatmullRomCurve3 } from './extras/curves/CatmullRomCurve3.js';
  27. import { BoxHelper } from './helpers/BoxHelper';
  28. import { GridHelper } from './helpers/GridHelper.js';
  29. import { BoxGeometry } from './geometries/BoxGeometry.js';
  30. import { EdgesGeometry } from './geometries/EdgesGeometry.js';
  31. import { ExtrudeGeometry } from './geometries/ExtrudeGeometry.js';
  32. import { ShapeGeometry } from './geometries/ShapeGeometry.js';
  33. import { WireframeGeometry } from './geometries/WireframeGeometry.js';
  34. import { Light } from './lights/Light.js';
  35. import { FileLoader } from './loaders/FileLoader.js';
  36. import { AudioLoader } from './loaders/AudioLoader.js';
  37. import { CubeTextureLoader } from './loaders/CubeTextureLoader.js';
  38. import { DataTextureLoader } from './loaders/DataTextureLoader.js';
  39. import { TextureLoader } from './loaders/TextureLoader.js';
  40. import { Material } from './materials/Material.js';
  41. import { LineBasicMaterial } from './materials/LineBasicMaterial.js';
  42. import { MeshPhongMaterial } from './materials/MeshPhongMaterial.js';
  43. import { PointsMaterial } from './materials/PointsMaterial.js';
  44. import { ShaderMaterial } from './materials/ShaderMaterial.js';
  45. import { Box2 } from './math/Box2.js';
  46. import { Box3 } from './math/Box3.js';
  47. import { Color } from './math/Color.js';
  48. import { Line3 } from './math/Line3.js';
  49. import { _Math } from './math/Math.js';
  50. import { Matrix3 } from './math/Matrix3.js';
  51. import { Matrix4 } from './math/Matrix4.js';
  52. import { Plane } from './math/Plane.js';
  53. import { Quaternion } from './math/Quaternion.js';
  54. import { Ray } from './math/Ray.js';
  55. import { Vector2 } from './math/Vector2.js';
  56. import { Vector3 } from './math/Vector3.js';
  57. import { Vector4 } from './math/Vector4.js';
  58. import { LineSegments } from './objects/LineSegments.js';
  59. import { LOD } from './objects/LOD.js';
  60. import { Points } from './objects/Points.js';
  61. import { Sprite } from './objects/Sprite.js';
  62. import { Skeleton } from './objects/Skeleton.js';
  63. import { WebGLRenderer } from './renderers/WebGLRenderer.js';
  64. import { WebGLRenderTarget } from './renderers/WebGLRenderTarget.js';
  65. import { WebGLShadowMap } from './renderers/webgl/WebGLShadowMap.js';
  66. import { Shape } from './extras/core/Shape.js';
  67. export { BoxGeometry as CubeGeometry };
  68. export function Face4( a, b, c, d, normal, color, materialIndex ) {
  69. console.warn( 'THREE.Face4 has been removed. A THREE.Face3 will be created instead.' );
  70. return new Face3( a, b, c, normal, color, materialIndex );
  71. }
  72. export var LineStrip = 0;
  73. export var LinePieces = 1;
  74. export function MeshFaceMaterial( materials ) {
  75. console.warn( 'THREE.MeshFaceMaterial has been removed. Use an Array instead.' );
  76. return materials;
  77. }
  78. export function MultiMaterial( materials ) {
  79. if ( materials === undefined ) materials = [];
  80. console.warn( 'THREE.MultiMaterial has been removed. Use an Array instead.' );
  81. materials.isMultiMaterial = true;
  82. materials.materials = materials;
  83. materials.clone = function () {
  84. return materials.slice();
  85. };
  86. return materials;
  87. }
  88. export function PointCloud( geometry, material ) {
  89. console.warn( 'THREE.PointCloud has been renamed to THREE.Points.' );
  90. return new Points( geometry, material );
  91. }
  92. export function Particle( material ) {
  93. console.warn( 'THREE.Particle has been renamed to THREE.Sprite.' );
  94. return new Sprite( material );
  95. }
  96. export function ParticleSystem( geometry, material ) {
  97. console.warn( 'THREE.ParticleSystem has been renamed to THREE.Points.' );
  98. return new Points( geometry, material );
  99. }
  100. export function PointCloudMaterial( parameters ) {
  101. console.warn( 'THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.' );
  102. return new PointsMaterial( parameters );
  103. }
  104. export function ParticleBasicMaterial( parameters ) {
  105. console.warn( 'THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.' );
  106. return new PointsMaterial( parameters );
  107. }
  108. export function ParticleSystemMaterial( parameters ) {
  109. console.warn( 'THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.' );
  110. return new PointsMaterial( parameters );
  111. }
  112. export function Vertex( x, y, z ) {
  113. console.warn( 'THREE.Vertex has been removed. Use THREE.Vector3 instead.' );
  114. return new Vector3( x, y, z );
  115. }
  116. //
  117. export function DynamicBufferAttribute( array, itemSize ) {
  118. console.warn( 'THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead.' );
  119. return new BufferAttribute( array, itemSize ).setDynamic( true );
  120. }
  121. export function Int8Attribute( array, itemSize ) {
  122. console.warn( 'THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.' );
  123. return new Int8BufferAttribute( array, itemSize );
  124. }
  125. export function Uint8Attribute( array, itemSize ) {
  126. console.warn( 'THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.' );
  127. return new Uint8BufferAttribute( array, itemSize );
  128. }
  129. export function Uint8ClampedAttribute( array, itemSize ) {
  130. console.warn( 'THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.' );
  131. return new Uint8ClampedBufferAttribute( array, itemSize );
  132. }
  133. export function Int16Attribute( array, itemSize ) {
  134. console.warn( 'THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.' );
  135. return new Int16BufferAttribute( array, itemSize );
  136. }
  137. export function Uint16Attribute( array, itemSize ) {
  138. console.warn( 'THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.' );
  139. return new Uint16BufferAttribute( array, itemSize );
  140. }
  141. export function Int32Attribute( array, itemSize ) {
  142. console.warn( 'THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.' );
  143. return new Int32BufferAttribute( array, itemSize );
  144. }
  145. export function Uint32Attribute( array, itemSize ) {
  146. console.warn( 'THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.' );
  147. return new Uint32BufferAttribute( array, itemSize );
  148. }
  149. export function Float32Attribute( array, itemSize ) {
  150. console.warn( 'THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.' );
  151. return new Float32BufferAttribute( array, itemSize );
  152. }
  153. export function Float64Attribute( array, itemSize ) {
  154. console.warn( 'THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.' );
  155. return new Float64BufferAttribute( array, itemSize );
  156. }
  157. //
  158. Curve.create = function ( construct, getPoint ) {
  159. console.log( 'THREE.Curve.create() has been deprecated' );
  160. construct.prototype = Object.create( Curve.prototype );
  161. construct.prototype.constructor = construct;
  162. construct.prototype.getPoint = getPoint;
  163. return construct;
  164. };
  165. //
  166. export function ClosedSplineCurve3( points ) {
  167. console.warn( 'THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' );
  168. CatmullRomCurve3.call( this, points );
  169. this.type = 'catmullrom';
  170. this.closed = true;
  171. }
  172. ClosedSplineCurve3.prototype = Object.create( CatmullRomCurve3.prototype );
  173. //
  174. export function SplineCurve3( points ) {
  175. console.warn( 'THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.' );
  176. CatmullRomCurve3.call( this, points );
  177. this.type = 'catmullrom';
  178. }
  179. SplineCurve3.prototype = Object.create( CatmullRomCurve3.prototype );
  180. //
  181. export function Spline( points ) {
  182. console.warn( 'THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.' );
  183. CatmullRomCurve3.call( this, points );
  184. this.type = 'catmullrom';
  185. }
  186. Spline.prototype = Object.create( CatmullRomCurve3.prototype );
  187. Object.assign( Spline.prototype, {
  188. initFromArray: function ( a ) {
  189. console.error( 'THREE.Spline: .initFromArray() has been removed.' );
  190. },
  191. getControlPointsArray: function ( optionalTarget ) {
  192. console.error( 'THREE.Spline: .getControlPointsArray() has been removed.' );
  193. },
  194. reparametrizeByArcLength: function ( samplingCoef ) {
  195. console.error( 'THREE.Spline: .reparametrizeByArcLength() has been removed.' );
  196. }
  197. } );
  198. //
  199. export function BoundingBoxHelper( object, color ) {
  200. console.warn( 'THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.' );
  201. return new BoxHelper( object, color );
  202. }
  203. export function EdgesHelper( object, hex ) {
  204. console.warn( 'THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.' );
  205. return new LineSegments( new EdgesGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) );
  206. }
  207. GridHelper.prototype.setColors = function () {
  208. console.error( 'THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.' );
  209. };
  210. export function WireframeHelper( object, hex ) {
  211. console.warn( 'THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.' );
  212. return new LineSegments( new WireframeGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) );
  213. }
  214. //
  215. export function XHRLoader( manager ) {
  216. console.warn( 'THREE.XHRLoader has been renamed to THREE.FileLoader.' );
  217. return new FileLoader( manager );
  218. }
  219. export function BinaryTextureLoader( manager ) {
  220. console.warn( 'THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.' );
  221. return new DataTextureLoader( manager );
  222. }
  223. //
  224. Object.assign( Box2.prototype, {
  225. center: function ( optionalTarget ) {
  226. console.warn( 'THREE.Box2: .center() has been renamed to .getCenter().' );
  227. return this.getCenter( optionalTarget );
  228. },
  229. empty: function () {
  230. console.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );
  231. return this.isEmpty();
  232. },
  233. isIntersectionBox: function ( box ) {
  234. console.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' );
  235. return this.intersectsBox( box );
  236. },
  237. size: function ( optionalTarget ) {
  238. console.warn( 'THREE.Box2: .size() has been renamed to .getSize().' );
  239. return this.getSize( optionalTarget );
  240. }
  241. } );
  242. Object.assign( Box3.prototype, {
  243. center: function ( optionalTarget ) {
  244. console.warn( 'THREE.Box3: .center() has been renamed to .getCenter().' );
  245. return this.getCenter( optionalTarget );
  246. },
  247. empty: function () {
  248. console.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' );
  249. return this.isEmpty();
  250. },
  251. isIntersectionBox: function ( box ) {
  252. console.warn( 'THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().' );
  253. return this.intersectsBox( box );
  254. },
  255. isIntersectionSphere: function ( sphere ) {
  256. console.warn( 'THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
  257. return this.intersectsSphere( sphere );
  258. },
  259. size: function ( optionalTarget ) {
  260. console.warn( 'THREE.Box3: .size() has been renamed to .getSize().' );
  261. return this.getSize( optionalTarget );
  262. }
  263. } );
  264. Line3.prototype.center = function ( optionalTarget ) {
  265. console.warn( 'THREE.Line3: .center() has been renamed to .getCenter().' );
  266. return this.getCenter( optionalTarget );
  267. };
  268. _Math.random16 = function () {
  269. console.warn( 'THREE.Math.random16() has been deprecated. Use Math.random() instead.' );
  270. return Math.random();
  271. };
  272. Object.assign( Matrix3.prototype, {
  273. flattenToArrayOffset: function ( array, offset ) {
  274. console.warn( "THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead." );
  275. return this.toArray( array, offset );
  276. },
  277. multiplyVector3: function ( vector ) {
  278. console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );
  279. return vector.applyMatrix3( this );
  280. },
  281. multiplyVector3Array: function ( a ) {
  282. console.warn( 'THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
  283. return this.applyToVector3Array( a );
  284. },
  285. applyToBuffer: function( buffer, offset, length ) {
  286. console.warn( 'THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.' );
  287. return this.applyToBufferAttribute( buffer );
  288. },
  289. applyToVector3Array: function( array, offset, length ) {
  290. console.error( 'THREE.Matrix3: .applyToVector3Array() has been removed.' );
  291. }
  292. } );
  293. Object.assign( Matrix4.prototype, {
  294. extractPosition: function ( m ) {
  295. console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );
  296. return this.copyPosition( m );
  297. },
  298. flattenToArrayOffset: function ( array, offset ) {
  299. console.warn( "THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead." );
  300. return this.toArray( array, offset );
  301. },
  302. getPosition: function () {
  303. var v1;
  304. return function getPosition() {
  305. if ( v1 === undefined ) v1 = new Vector3();
  306. console.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );
  307. return v1.setFromMatrixColumn( this, 3 );
  308. };
  309. }(),
  310. setRotationFromQuaternion: function ( q ) {
  311. console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
  312. return this.makeRotationFromQuaternion( q );
  313. },
  314. multiplyToArray: function () {
  315. console.warn( 'THREE.Matrix4: .multiplyToArray() has been removed.' );
  316. },
  317. multiplyVector3: function ( vector ) {
  318. console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  319. return vector.applyMatrix4( this );
  320. },
  321. multiplyVector4: function ( vector ) {
  322. console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  323. return vector.applyMatrix4( this );
  324. },
  325. multiplyVector3Array: function ( a ) {
  326. console.warn( 'THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
  327. return this.applyToVector3Array( a );
  328. },
  329. rotateAxis: function ( v ) {
  330. console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );
  331. v.transformDirection( this );
  332. },
  333. crossVector: function ( vector ) {
  334. console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  335. return vector.applyMatrix4( this );
  336. },
  337. translate: function () {
  338. console.error( 'THREE.Matrix4: .translate() has been removed.' );
  339. },
  340. rotateX: function () {
  341. console.error( 'THREE.Matrix4: .rotateX() has been removed.' );
  342. },
  343. rotateY: function () {
  344. console.error( 'THREE.Matrix4: .rotateY() has been removed.' );
  345. },
  346. rotateZ: function () {
  347. console.error( 'THREE.Matrix4: .rotateZ() has been removed.' );
  348. },
  349. rotateByAxis: function () {
  350. console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );
  351. },
  352. applyToBuffer: function( buffer, offset, length ) {
  353. console.warn( 'THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.' );
  354. return this.applyToBufferAttribute( buffer );
  355. },
  356. applyToVector3Array: function( array, offset, length ) {
  357. console.error( 'THREE.Matrix4: .applyToVector3Array() has been removed.' );
  358. },
  359. makeFrustum: function( left, right, bottom, top, near, far ) {
  360. console.warn( 'THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.' );
  361. return this.makePerspective( left, right, top, bottom, near, far );
  362. }
  363. } );
  364. Plane.prototype.isIntersectionLine = function ( line ) {
  365. console.warn( 'THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().' );
  366. return this.intersectsLine( line );
  367. };
  368. Quaternion.prototype.multiplyVector3 = function ( vector ) {
  369. console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );
  370. return vector.applyQuaternion( this );
  371. };
  372. Object.assign( Ray.prototype, {
  373. isIntersectionBox: function ( box ) {
  374. console.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' );
  375. return this.intersectsBox( box );
  376. },
  377. isIntersectionPlane: function ( plane ) {
  378. console.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' );
  379. return this.intersectsPlane( plane );
  380. },
  381. isIntersectionSphere: function ( sphere ) {
  382. console.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
  383. return this.intersectsSphere( sphere );
  384. }
  385. } );
  386. Object.assign( Shape.prototype, {
  387. extrude: function ( options ) {
  388. console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );
  389. return new ExtrudeGeometry( this, options );
  390. },
  391. makeGeometry: function ( options ) {
  392. console.warn( 'THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.' );
  393. return new ShapeGeometry( this, options );
  394. }
  395. } );
  396. Object.assign( Vector2.prototype, {
  397. fromAttribute: function ( attribute, index, offset ) {
  398. console.error( 'THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  399. return this.fromBufferAttribute( attribute, index, offset );
  400. }
  401. } );
  402. Object.assign( Vector3.prototype, {
  403. setEulerFromRotationMatrix: function () {
  404. console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );
  405. },
  406. setEulerFromQuaternion: function () {
  407. console.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );
  408. },
  409. getPositionFromMatrix: function ( m ) {
  410. console.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );
  411. return this.setFromMatrixPosition( m );
  412. },
  413. getScaleFromMatrix: function ( m ) {
  414. console.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );
  415. return this.setFromMatrixScale( m );
  416. },
  417. getColumnFromMatrix: function ( index, matrix ) {
  418. console.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );
  419. return this.setFromMatrixColumn( matrix, index );
  420. },
  421. applyProjection: function ( m ) {
  422. console.warn( 'THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.' );
  423. return this.applyMatrix4( m );
  424. },
  425. fromAttribute: function ( attribute, index, offset ) {
  426. console.error( 'THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  427. return this.fromBufferAttribute( attribute, index, offset );
  428. }
  429. } );
  430. Object.assign( Vector4.prototype, {
  431. fromAttribute: function ( attribute, index, offset ) {
  432. console.error( 'THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  433. return this.fromBufferAttribute( attribute, index, offset );
  434. }
  435. } );
  436. //
  437. Geometry.prototype.computeTangents = function () {
  438. console.warn( 'THREE.Geometry: .computeTangents() has been removed.' );
  439. };
  440. Object.assign( Object3D.prototype, {
  441. getChildByName: function ( name ) {
  442. console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );
  443. return this.getObjectByName( name );
  444. },
  445. renderDepth: function () {
  446. console.warn( 'THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.' );
  447. },
  448. translate: function ( distance, axis ) {
  449. console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );
  450. return this.translateOnAxis( axis, distance );
  451. }
  452. } );
  453. Object.defineProperties( Object3D.prototype, {
  454. eulerOrder: {
  455. get: function () {
  456. console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
  457. return this.rotation.order;
  458. },
  459. set: function ( value ) {
  460. console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
  461. this.rotation.order = value;
  462. }
  463. },
  464. useQuaternion: {
  465. get: function () {
  466. console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
  467. },
  468. set: function () {
  469. console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
  470. }
  471. }
  472. } );
  473. Object.defineProperties( LOD.prototype, {
  474. objects: {
  475. get: function () {
  476. console.warn( 'THREE.LOD: .objects has been renamed to .levels.' );
  477. return this.levels;
  478. }
  479. }
  480. } );
  481. Object.defineProperty( Skeleton.prototype, 'useVertexTexture', {
  482. get: function () {
  483. console.warn( 'THREE.Skeleton: useVertexTexture has been removed.' );
  484. },
  485. set: function () {
  486. console.warn( 'THREE.Skeleton: useVertexTexture has been removed.' );
  487. }
  488. } );
  489. Object.defineProperty( Curve.prototype, '__arcLengthDivisions', {
  490. get: function () {
  491. console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
  492. return this.arcLengthDivisions;
  493. },
  494. set: function ( value ) {
  495. console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
  496. this.arcLengthDivisions = value;
  497. }
  498. } );
  499. //
  500. PerspectiveCamera.prototype.setLens = function ( focalLength, filmGauge ) {
  501. console.warn( "THREE.PerspectiveCamera.setLens is deprecated. " +
  502. "Use .setFocalLength and .filmGauge for a photographic setup." );
  503. if ( filmGauge !== undefined ) this.filmGauge = filmGauge;
  504. this.setFocalLength( focalLength );
  505. };
  506. //
  507. Object.defineProperties( Light.prototype, {
  508. onlyShadow: {
  509. set: function () {
  510. console.warn( 'THREE.Light: .onlyShadow has been removed.' );
  511. }
  512. },
  513. shadowCameraFov: {
  514. set: function ( value ) {
  515. console.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' );
  516. this.shadow.camera.fov = value;
  517. }
  518. },
  519. shadowCameraLeft: {
  520. set: function ( value ) {
  521. console.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' );
  522. this.shadow.camera.left = value;
  523. }
  524. },
  525. shadowCameraRight: {
  526. set: function ( value ) {
  527. console.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' );
  528. this.shadow.camera.right = value;
  529. }
  530. },
  531. shadowCameraTop: {
  532. set: function ( value ) {
  533. console.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' );
  534. this.shadow.camera.top = value;
  535. }
  536. },
  537. shadowCameraBottom: {
  538. set: function ( value ) {
  539. console.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' );
  540. this.shadow.camera.bottom = value;
  541. }
  542. },
  543. shadowCameraNear: {
  544. set: function ( value ) {
  545. console.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' );
  546. this.shadow.camera.near = value;
  547. }
  548. },
  549. shadowCameraFar: {
  550. set: function ( value ) {
  551. console.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' );
  552. this.shadow.camera.far = value;
  553. }
  554. },
  555. shadowCameraVisible: {
  556. set: function () {
  557. console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.' );
  558. }
  559. },
  560. shadowBias: {
  561. set: function ( value ) {
  562. console.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' );
  563. this.shadow.bias = value;
  564. }
  565. },
  566. shadowDarkness: {
  567. set: function () {
  568. console.warn( 'THREE.Light: .shadowDarkness has been removed.' );
  569. }
  570. },
  571. shadowMapWidth: {
  572. set: function ( value ) {
  573. console.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' );
  574. this.shadow.mapSize.width = value;
  575. }
  576. },
  577. shadowMapHeight: {
  578. set: function ( value ) {
  579. console.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' );
  580. this.shadow.mapSize.height = value;
  581. }
  582. }
  583. } );
  584. //
  585. Object.defineProperties( BufferAttribute.prototype, {
  586. length: {
  587. get: function () {
  588. console.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' );
  589. return this.array.length;
  590. }
  591. }
  592. } );
  593. Object.assign( BufferGeometry.prototype, {
  594. addIndex: function ( index ) {
  595. console.warn( 'THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().' );
  596. this.setIndex( index );
  597. },
  598. addDrawCall: function ( start, count, indexOffset ) {
  599. if ( indexOffset !== undefined ) {
  600. console.warn( 'THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.' );
  601. }
  602. console.warn( 'THREE.BufferGeometry: .addDrawCall() is now .addGroup().' );
  603. this.addGroup( start, count );
  604. },
  605. clearDrawCalls: function () {
  606. console.warn( 'THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().' );
  607. this.clearGroups();
  608. },
  609. computeTangents: function () {
  610. console.warn( 'THREE.BufferGeometry: .computeTangents() has been removed.' );
  611. },
  612. computeOffsets: function () {
  613. console.warn( 'THREE.BufferGeometry: .computeOffsets() has been removed.' );
  614. }
  615. } );
  616. Object.defineProperties( BufferGeometry.prototype, {
  617. drawcalls: {
  618. get: function () {
  619. console.error( 'THREE.BufferGeometry: .drawcalls has been renamed to .groups.' );
  620. return this.groups;
  621. }
  622. },
  623. offsets: {
  624. get: function () {
  625. console.warn( 'THREE.BufferGeometry: .offsets has been renamed to .groups.' );
  626. return this.groups;
  627. }
  628. }
  629. } );
  630. //
  631. Object.defineProperties( Uniform.prototype, {
  632. dynamic: {
  633. set: function () {
  634. console.warn( 'THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.' );
  635. }
  636. },
  637. onUpdate: {
  638. value: function () {
  639. console.warn( 'THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.' );
  640. return this;
  641. }
  642. }
  643. } );
  644. //
  645. Object.defineProperties( Material.prototype, {
  646. wrapAround: {
  647. get: function () {
  648. console.warn( 'THREE.Material: .wrapAround has been removed.' );
  649. },
  650. set: function () {
  651. console.warn( 'THREE.Material: .wrapAround has been removed.' );
  652. }
  653. },
  654. wrapRGB: {
  655. get: function () {
  656. console.warn( 'THREE.Material: .wrapRGB has been removed.' );
  657. return new Color();
  658. }
  659. }
  660. } );
  661. Object.defineProperties( MeshPhongMaterial.prototype, {
  662. metal: {
  663. get: function () {
  664. console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.' );
  665. return false;
  666. },
  667. set: function () {
  668. console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead' );
  669. }
  670. }
  671. } );
  672. Object.defineProperties( ShaderMaterial.prototype, {
  673. derivatives: {
  674. get: function () {
  675. console.warn( 'THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
  676. return this.extensions.derivatives;
  677. },
  678. set: function ( value ) {
  679. console.warn( 'THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
  680. this.extensions.derivatives = value;
  681. }
  682. }
  683. } );
  684. //
  685. Object.assign( WebGLRenderer.prototype, {
  686. getCurrentRenderTarget: function () {
  687. console.warn( 'THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().' );
  688. return this.getRenderTarget();
  689. },
  690. supportsFloatTextures: function () {
  691. console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
  692. return this.extensions.get( 'OES_texture_float' );
  693. },
  694. supportsHalfFloatTextures: function () {
  695. console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' );
  696. return this.extensions.get( 'OES_texture_half_float' );
  697. },
  698. supportsStandardDerivatives: function () {
  699. console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' );
  700. return this.extensions.get( 'OES_standard_derivatives' );
  701. },
  702. supportsCompressedTextureS3TC: function () {
  703. console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' );
  704. return this.extensions.get( 'WEBGL_compressed_texture_s3tc' );
  705. },
  706. supportsCompressedTexturePVRTC: function () {
  707. console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' );
  708. return this.extensions.get( 'WEBGL_compressed_texture_pvrtc' );
  709. },
  710. supportsBlendMinMax: function () {
  711. console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' );
  712. return this.extensions.get( 'EXT_blend_minmax' );
  713. },
  714. supportsVertexTextures: function () {
  715. console.warn( 'THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.' );
  716. return this.capabilities.vertexTextures;
  717. },
  718. supportsInstancedArrays: function () {
  719. console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' );
  720. return this.extensions.get( 'ANGLE_instanced_arrays' );
  721. },
  722. enableScissorTest: function ( boolean ) {
  723. console.warn( 'THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().' );
  724. this.setScissorTest( boolean );
  725. },
  726. initMaterial: function () {
  727. console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
  728. },
  729. addPrePlugin: function () {
  730. console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
  731. },
  732. addPostPlugin: function () {
  733. console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
  734. },
  735. updateShadowMap: function () {
  736. console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
  737. }
  738. } );
  739. Object.defineProperties( WebGLRenderer.prototype, {
  740. shadowMapEnabled: {
  741. get: function () {
  742. return this.shadowMap.enabled;
  743. },
  744. set: function ( value ) {
  745. console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
  746. this.shadowMap.enabled = value;
  747. }
  748. },
  749. shadowMapType: {
  750. get: function () {
  751. return this.shadowMap.type;
  752. },
  753. set: function ( value ) {
  754. console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
  755. this.shadowMap.type = value;
  756. }
  757. },
  758. shadowMapCullFace: {
  759. get: function () {
  760. return this.shadowMap.cullFace;
  761. },
  762. set: function ( value ) {
  763. console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.' );
  764. this.shadowMap.cullFace = value;
  765. }
  766. }
  767. } );
  768. Object.defineProperties( WebGLShadowMap.prototype, {
  769. cullFace: {
  770. get: function () {
  771. return this.renderReverseSided ? CullFaceFront : CullFaceBack;
  772. },
  773. set: function ( cullFace ) {
  774. var value = ( cullFace !== CullFaceBack );
  775. console.warn( "WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to " + value + "." );
  776. this.renderReverseSided = value;
  777. }
  778. }
  779. } );
  780. //
  781. Object.defineProperties( WebGLRenderTarget.prototype, {
  782. wrapS: {
  783. get: function () {
  784. console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
  785. return this.texture.wrapS;
  786. },
  787. set: function ( value ) {
  788. console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
  789. this.texture.wrapS = value;
  790. }
  791. },
  792. wrapT: {
  793. get: function () {
  794. console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
  795. return this.texture.wrapT;
  796. },
  797. set: function ( value ) {
  798. console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
  799. this.texture.wrapT = value;
  800. }
  801. },
  802. magFilter: {
  803. get: function () {
  804. console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
  805. return this.texture.magFilter;
  806. },
  807. set: function ( value ) {
  808. console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
  809. this.texture.magFilter = value;
  810. }
  811. },
  812. minFilter: {
  813. get: function () {
  814. console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
  815. return this.texture.minFilter;
  816. },
  817. set: function ( value ) {
  818. console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
  819. this.texture.minFilter = value;
  820. }
  821. },
  822. anisotropy: {
  823. get: function () {
  824. console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
  825. return this.texture.anisotropy;
  826. },
  827. set: function ( value ) {
  828. console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
  829. this.texture.anisotropy = value;
  830. }
  831. },
  832. offset: {
  833. get: function () {
  834. console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
  835. return this.texture.offset;
  836. },
  837. set: function ( value ) {
  838. console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
  839. this.texture.offset = value;
  840. }
  841. },
  842. repeat: {
  843. get: function () {
  844. console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
  845. return this.texture.repeat;
  846. },
  847. set: function ( value ) {
  848. console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
  849. this.texture.repeat = value;
  850. }
  851. },
  852. format: {
  853. get: function () {
  854. console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
  855. return this.texture.format;
  856. },
  857. set: function ( value ) {
  858. console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
  859. this.texture.format = value;
  860. }
  861. },
  862. type: {
  863. get: function () {
  864. console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
  865. return this.texture.type;
  866. },
  867. set: function ( value ) {
  868. console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
  869. this.texture.type = value;
  870. }
  871. },
  872. generateMipmaps: {
  873. get: function () {
  874. console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
  875. return this.texture.generateMipmaps;
  876. },
  877. set: function ( value ) {
  878. console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
  879. this.texture.generateMipmaps = value;
  880. }
  881. }
  882. } );
  883. //
  884. Audio.prototype.load = function ( file ) {
  885. console.warn( 'THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.' );
  886. var scope = this;
  887. var audioLoader = new AudioLoader();
  888. audioLoader.load( file, function ( buffer ) {
  889. scope.setBuffer( buffer );
  890. } );
  891. return this;
  892. };
  893. AudioAnalyser.prototype.getData = function () {
  894. console.warn( 'THREE.AudioAnalyser: .getData() is now .getFrequencyData().' );
  895. return this.getFrequencyData();
  896. };
  897. //
  898. export var GeometryUtils = {
  899. merge: function ( geometry1, geometry2, materialIndexOffset ) {
  900. console.warn( 'THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.' );
  901. var matrix;
  902. if ( geometry2.isMesh ) {
  903. geometry2.matrixAutoUpdate && geometry2.updateMatrix();
  904. matrix = geometry2.matrix;
  905. geometry2 = geometry2.geometry;
  906. }
  907. geometry1.merge( geometry2, matrix, materialIndexOffset );
  908. },
  909. center: function ( geometry ) {
  910. console.warn( 'THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.' );
  911. return geometry.center();
  912. }
  913. };
  914. export var ImageUtils = {
  915. crossOrigin: undefined,
  916. loadTexture: function ( url, mapping, onLoad, onError ) {
  917. console.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' );
  918. var loader = new TextureLoader();
  919. loader.setCrossOrigin( this.crossOrigin );
  920. var texture = loader.load( url, onLoad, undefined, onError );
  921. if ( mapping ) texture.mapping = mapping;
  922. return texture;
  923. },
  924. loadTextureCube: function ( urls, mapping, onLoad, onError ) {
  925. console.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' );
  926. var loader = new CubeTextureLoader();
  927. loader.setCrossOrigin( this.crossOrigin );
  928. var texture = loader.load( urls, onLoad, undefined, onError );
  929. if ( mapping ) texture.mapping = mapping;
  930. return texture;
  931. },
  932. loadCompressedTexture: function () {
  933. console.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' );
  934. },
  935. loadCompressedTextureCube: function () {
  936. console.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' );
  937. }
  938. };
  939. //
  940. export function Projector() {
  941. console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
  942. this.projectVector = function ( vector, camera ) {
  943. console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
  944. vector.project( camera );
  945. };
  946. this.unprojectVector = function ( vector, camera ) {
  947. console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
  948. vector.unproject( camera );
  949. };
  950. this.pickingRay = function () {
  951. console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
  952. };
  953. }
  954. //
  955. export function CanvasRenderer() {
  956. console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
  957. this.domElement = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
  958. this.clear = function () {};
  959. this.render = function () {};
  960. this.setClearColor = function () {};
  961. this.setSize = function () {};
  962. }
粤ICP备19079148号