2
0

Three.Legacy.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. Object.defineProperties( THREE.Box2.prototype, {
  5. empty: {
  6. value: function () {
  7. console.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );
  8. return this.isEmpty();
  9. }
  10. },
  11. isIntersectionBox: {
  12. value: function ( box ) {
  13. console.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' );
  14. return this.intersectsBox( box );
  15. }
  16. }
  17. } );
  18. Object.defineProperties( THREE.Box3.prototype, {
  19. empty: {
  20. value: function () {
  21. console.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' );
  22. return this.isEmpty();
  23. }
  24. },
  25. isIntersectionBox: {
  26. value: function ( box ) {
  27. console.warn( 'THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().' );
  28. return this.intersectsBox( box );
  29. }
  30. },
  31. isIntersectionSphere: {
  32. value: function ( sphere ) {
  33. console.warn( 'THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
  34. return this.intersectsSphere( sphere );
  35. }
  36. }
  37. } );
  38. Object.defineProperties( THREE.Matrix3.prototype, {
  39. multiplyVector3: {
  40. value: function ( vector ) {
  41. console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );
  42. return vector.applyMatrix3( this );
  43. }
  44. },
  45. multiplyVector3Array: {
  46. value: function ( a ) {
  47. console.warn( 'THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
  48. return this.applyToVector3Array( a );
  49. }
  50. }
  51. } );
  52. Object.defineProperties( THREE.Matrix4.prototype, {
  53. extractPosition: {
  54. value: function ( m ) {
  55. console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );
  56. return this.copyPosition( m );
  57. }
  58. },
  59. setRotationFromQuaternion: {
  60. value: function ( q ) {
  61. console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
  62. return this.makeRotationFromQuaternion( q );
  63. }
  64. },
  65. multiplyVector3: {
  66. value: function ( vector ) {
  67. console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.' );
  68. return vector.applyProjection( this );
  69. }
  70. },
  71. multiplyVector4: {
  72. value: function ( vector ) {
  73. console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  74. return vector.applyMatrix4( this );
  75. }
  76. },
  77. multiplyVector3Array: {
  78. value: function ( a ) {
  79. console.warn( 'THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.' );
  80. return this.applyToVector3Array( a );
  81. }
  82. },
  83. rotateAxis: {
  84. value: function ( v ) {
  85. console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );
  86. v.transformDirection( this );
  87. }
  88. },
  89. crossVector: {
  90. value: function ( vector ) {
  91. console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  92. return vector.applyMatrix4( this );
  93. }
  94. },
  95. translate: {
  96. value: function ( v ) {
  97. console.error( 'THREE.Matrix4: .translate() has been removed.' );
  98. }
  99. },
  100. rotateX: {
  101. value: function ( angle ) {
  102. console.error( 'THREE.Matrix4: .rotateX() has been removed.' );
  103. }
  104. },
  105. rotateY: {
  106. value: function ( angle ) {
  107. console.error( 'THREE.Matrix4: .rotateY() has been removed.' );
  108. }
  109. },
  110. rotateZ: {
  111. value: function ( angle ) {
  112. console.error( 'THREE.Matrix4: .rotateZ() has been removed.' );
  113. }
  114. },
  115. rotateByAxis: {
  116. value: function ( axis, angle ) {
  117. console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );
  118. }
  119. }
  120. } );
  121. Object.defineProperties( THREE.Plane.prototype, {
  122. isIntersectionLine: {
  123. value: function ( line ) {
  124. console.warn( 'THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().' );
  125. return this.intersectsLine( line );
  126. }
  127. }
  128. } );
  129. Object.defineProperties( THREE.Quaternion.prototype, {
  130. multiplyVector3: {
  131. value: function ( vector ) {
  132. console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );
  133. return vector.applyQuaternion( this );
  134. }
  135. }
  136. } );
  137. Object.defineProperties( THREE.Ray.prototype, {
  138. isIntersectionBox: {
  139. value: function ( box ) {
  140. console.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' );
  141. return this.intersectsBox( box );
  142. }
  143. },
  144. isIntersectionPlane: {
  145. value: function ( plane ) {
  146. console.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' );
  147. return this.intersectsPlane( plane );
  148. }
  149. },
  150. isIntersectionSphere: {
  151. value: function ( sphere ) {
  152. console.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
  153. return this.intersectsSphere( sphere );
  154. }
  155. }
  156. } );
  157. Object.defineProperties( THREE.Vector3.prototype, {
  158. setEulerFromRotationMatrix: {
  159. value: function () {
  160. console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );
  161. }
  162. },
  163. setEulerFromQuaternion: {
  164. value: function () {
  165. console.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );
  166. }
  167. },
  168. getPositionFromMatrix: {
  169. value: function ( m ) {
  170. console.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );
  171. return this.setFromMatrixPosition( m );
  172. }
  173. },
  174. getScaleFromMatrix: {
  175. value: function ( m ) {
  176. console.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );
  177. return this.setFromMatrixScale( m );
  178. }
  179. },
  180. getColumnFromMatrix: {
  181. value: function ( index, matrix ) {
  182. console.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );
  183. return this.setFromMatrixColumn( index, matrix );
  184. }
  185. }
  186. } );
  187. //
  188. THREE.Face4 = function ( a, b, c, d, normal, color, materialIndex ) {
  189. console.warn( 'THREE.Face4 has been removed. A THREE.Face3 will be created instead.' );
  190. return new THREE.Face3( a, b, c, normal, color, materialIndex );
  191. };
  192. THREE.Vertex = function ( x, y, z ) {
  193. console.warn( 'THREE.Vertex has been removed. Use THREE.Vector3 instead.' );
  194. return new THREE.Vector3( x, y, z );
  195. };
  196. //
  197. Object.defineProperties( THREE.Object3D.prototype, {
  198. eulerOrder: {
  199. get: function () {
  200. console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
  201. return this.rotation.order;
  202. },
  203. set: function ( value ) {
  204. console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
  205. this.rotation.order = value;
  206. }
  207. },
  208. getChildByName: {
  209. value: function ( name ) {
  210. console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );
  211. return this.getObjectByName( name );
  212. }
  213. },
  214. renderDepth: {
  215. set: function ( value ) {
  216. console.warn( 'THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.' );
  217. }
  218. },
  219. translate: {
  220. value: function ( distance, axis ) {
  221. console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );
  222. return this.translateOnAxis( axis, distance );
  223. }
  224. },
  225. useQuaternion: {
  226. get: function () {
  227. console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
  228. },
  229. set: function ( value ) {
  230. console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
  231. }
  232. }
  233. } );
  234. //
  235. Object.defineProperties( THREE, {
  236. PointCloud: {
  237. value: function ( geometry, material ) {
  238. console.warn( 'THREE.PointCloud has been renamed to THREE.Points.' );
  239. return new THREE.Points( geometry, material );
  240. }
  241. },
  242. ParticleSystem: {
  243. value: function ( geometry, material ) {
  244. console.warn( 'THREE.ParticleSystem has been renamed to THREE.Points.' );
  245. return new THREE.Points( geometry, material );
  246. }
  247. }
  248. } );
  249. //
  250. Object.defineProperties( THREE.Light.prototype, {
  251. onlyShadow: {
  252. set: function ( value ) {
  253. console.warn( 'THREE.Light: .onlyShadow has been removed.' );
  254. }
  255. },
  256. shadowCameraFov: {
  257. set: function ( value ) {
  258. console.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' );
  259. this.shadow.camera.fov = value;
  260. }
  261. },
  262. shadowCameraLeft: {
  263. set: function ( value ) {
  264. console.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' );
  265. this.shadow.camera.left = value;
  266. }
  267. },
  268. shadowCameraRight: {
  269. set: function ( value ) {
  270. console.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' );
  271. this.shadow.camera.right = value;
  272. }
  273. },
  274. shadowCameraTop: {
  275. set: function ( value ) {
  276. console.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' );
  277. this.shadow.camera.top = value;
  278. }
  279. },
  280. shadowCameraBottom: {
  281. set: function ( value ) {
  282. console.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' );
  283. this.shadow.camera.bottom = value;
  284. }
  285. },
  286. shadowCameraNear: {
  287. set: function ( value ) {
  288. console.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' );
  289. this.shadow.camera.near = value;
  290. }
  291. },
  292. shadowCameraFar: {
  293. set: function ( value ) {
  294. console.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' );
  295. this.shadow.camera.far = value;
  296. }
  297. },
  298. shadowCameraVisible: {
  299. set: function ( value ) {
  300. console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.' );
  301. }
  302. },
  303. shadowBias: {
  304. set: function ( value ) {
  305. console.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' );
  306. this.shadow.bias = value;
  307. }
  308. },
  309. shadowDarkness: {
  310. set: function ( value ) {
  311. console.warn( 'THREE.Light: .shadowDarkness has been removed.' );
  312. }
  313. },
  314. shadowMapWidth: {
  315. set: function ( value ) {
  316. console.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' );
  317. this.shadow.mapSize.width = value;
  318. }
  319. },
  320. shadowMapHeight: {
  321. set: function ( value ) {
  322. console.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' );
  323. this.shadow.mapSize.height = value;
  324. }
  325. }
  326. } );
  327. //
  328. Object.defineProperties( THREE.BufferAttribute.prototype, {
  329. length: {
  330. get: function () {
  331. console.warn( 'THREE.BufferAttribute: .length has been deprecated. Please use .count.' );
  332. return this.array.length;
  333. }
  334. }
  335. } );
  336. Object.defineProperties( THREE.BufferGeometry.prototype, {
  337. drawcalls: {
  338. get: function () {
  339. console.error( 'THREE.BufferGeometry: .drawcalls has been renamed to .groups.' );
  340. return this.groups;
  341. }
  342. },
  343. offsets: {
  344. get: function () {
  345. console.warn( 'THREE.BufferGeometry: .offsets has been renamed to .groups.' );
  346. return this.groups;
  347. }
  348. },
  349. addIndex: {
  350. value: function ( index ) {
  351. console.warn( 'THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().' );
  352. this.setIndex( index );
  353. }
  354. },
  355. addDrawCall: {
  356. value: function ( start, count, indexOffset ) {
  357. if ( indexOffset !== undefined ) {
  358. console.warn( 'THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.' );
  359. }
  360. console.warn( 'THREE.BufferGeometry: .addDrawCall() is now .addGroup().' );
  361. this.addGroup( start, count );
  362. }
  363. },
  364. clearDrawCalls: {
  365. value: function () {
  366. console.warn( 'THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().' );
  367. this.clearGroups();
  368. }
  369. },
  370. computeTangents: {
  371. value: function () {
  372. console.warn( 'THREE.BufferGeometry: .computeTangents() has been removed.' );
  373. }
  374. },
  375. computeOffsets: {
  376. value: function () {
  377. console.warn( 'THREE.BufferGeometry: .computeOffsets() has been removed.' );
  378. }
  379. }
  380. } );
  381. //
  382. Object.defineProperties( THREE.Material.prototype, {
  383. wrapAround: {
  384. get: function () {
  385. console.warn( 'THREE.' + this.type + ': .wrapAround has been removed.' );
  386. },
  387. set: function ( value ) {
  388. console.warn( 'THREE.' + this.type + ': .wrapAround has been removed.' );
  389. }
  390. },
  391. wrapRGB: {
  392. get: function () {
  393. console.warn( 'THREE.' + this.type + ': .wrapRGB has been removed.' );
  394. return new THREE.Color();
  395. }
  396. }
  397. } );
  398. Object.defineProperties( THREE, {
  399. PointCloudMaterial: {
  400. value: function ( parameters ) {
  401. console.warn( 'THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.' );
  402. return new THREE.PointsMaterial( parameters );
  403. }
  404. },
  405. ParticleBasicMaterial: {
  406. value: function ( parameters ) {
  407. console.warn( 'THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.' );
  408. return new THREE.PointsMaterial( parameters );
  409. }
  410. },
  411. ParticleSystemMaterial:{
  412. value: function ( parameters ) {
  413. console.warn( 'THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.' );
  414. return new THREE.PointsMaterial( parameters );
  415. }
  416. }
  417. } );
  418. Object.defineProperties( THREE.MeshPhongMaterial.prototype, {
  419. metal: {
  420. get: function () {
  421. console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.' );
  422. return false;
  423. },
  424. set: function ( value ) {
  425. console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead' );
  426. }
  427. }
  428. } );
  429. Object.defineProperties( THREE.ShaderMaterial.prototype, {
  430. derivatives: {
  431. get: function () {
  432. console.warn( 'THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
  433. return this.extensions.derivatives;
  434. },
  435. set: function ( value ) {
  436. console.warn( 'THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
  437. this.extensions.derivatives = value;
  438. }
  439. }
  440. } );
  441. //
  442. Object.defineProperties( THREE.WebGLRenderer.prototype, {
  443. supportsFloatTextures: {
  444. value: function () {
  445. console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
  446. return this.extensions.get( 'OES_texture_float' );
  447. }
  448. },
  449. supportsHalfFloatTextures: {
  450. value: function () {
  451. console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' );
  452. return this.extensions.get( 'OES_texture_half_float' );
  453. }
  454. },
  455. supportsStandardDerivatives: {
  456. value: function () {
  457. console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' );
  458. return this.extensions.get( 'OES_standard_derivatives' );
  459. }
  460. },
  461. supportsCompressedTextureS3TC: {
  462. value: function () {
  463. console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' );
  464. return this.extensions.get( 'WEBGL_compressed_texture_s3tc' );
  465. }
  466. },
  467. supportsCompressedTexturePVRTC: {
  468. value: function () {
  469. console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' );
  470. return this.extensions.get( 'WEBGL_compressed_texture_pvrtc' );
  471. }
  472. },
  473. supportsBlendMinMax: {
  474. value: function () {
  475. console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' );
  476. return this.extensions.get( 'EXT_blend_minmax' );
  477. }
  478. },
  479. supportsVertexTextures: {
  480. value: function () {
  481. return this.capabilities.vertexTextures;
  482. }
  483. },
  484. supportsInstancedArrays: {
  485. value: function () {
  486. console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' );
  487. return this.extensions.get( 'ANGLE_instanced_arrays' );
  488. }
  489. },
  490. enableScissorTest: {
  491. value: function ( boolean ) {
  492. console.warn( 'THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().' );
  493. this.setScissorTest( boolean );
  494. }
  495. },
  496. initMaterial: {
  497. value: function () {
  498. console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
  499. }
  500. },
  501. addPrePlugin: {
  502. value: function () {
  503. console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
  504. }
  505. },
  506. addPostPlugin: {
  507. value: function () {
  508. console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
  509. }
  510. },
  511. updateShadowMap: {
  512. value: function () {
  513. console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
  514. }
  515. },
  516. shadowMapEnabled: {
  517. get: function () {
  518. return this.shadowMap.enabled;
  519. },
  520. set: function ( value ) {
  521. console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
  522. this.shadowMap.enabled = value;
  523. }
  524. },
  525. shadowMapType: {
  526. get: function () {
  527. return this.shadowMap.type;
  528. },
  529. set: function ( value ) {
  530. console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
  531. this.shadowMap.type = value;
  532. }
  533. },
  534. shadowMapCullFace: {
  535. get: function () {
  536. return this.shadowMap.cullFace;
  537. },
  538. set: function ( value ) {
  539. console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.' );
  540. this.shadowMap.cullFace = value;
  541. }
  542. }
  543. } );
  544. //
  545. Object.defineProperties( THREE.WebGLRenderTarget.prototype, {
  546. wrapS: {
  547. get: function () {
  548. console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
  549. return this.texture.wrapS;
  550. },
  551. set: function ( value ) {
  552. console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
  553. this.texture.wrapS = value;
  554. }
  555. },
  556. wrapT: {
  557. get: function () {
  558. console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
  559. return this.texture.wrapT;
  560. },
  561. set: function ( value ) {
  562. console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
  563. this.texture.wrapT = value;
  564. }
  565. },
  566. magFilter: {
  567. get: function () {
  568. console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
  569. return this.texture.magFilter;
  570. },
  571. set: function ( value ) {
  572. console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
  573. this.texture.magFilter = value;
  574. }
  575. },
  576. minFilter: {
  577. get: function () {
  578. console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
  579. return this.texture.minFilter;
  580. },
  581. set: function ( value ) {
  582. console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
  583. this.texture.minFilter = value;
  584. }
  585. },
  586. anisotropy: {
  587. get: function () {
  588. console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
  589. return this.texture.anisotropy;
  590. },
  591. set: function ( value ) {
  592. console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
  593. this.texture.anisotropy = value;
  594. }
  595. },
  596. offset: {
  597. get: function () {
  598. console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
  599. return this.texture.offset;
  600. },
  601. set: function ( value ) {
  602. console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
  603. this.texture.offset = value;
  604. }
  605. },
  606. repeat: {
  607. get: function () {
  608. console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
  609. return this.texture.repeat;
  610. },
  611. set: function ( value ) {
  612. console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
  613. this.texture.repeat = value;
  614. }
  615. },
  616. format: {
  617. get: function () {
  618. console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
  619. return this.texture.format;
  620. },
  621. set: function ( value ) {
  622. console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
  623. this.texture.format = value;
  624. }
  625. },
  626. type: {
  627. get: function () {
  628. console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
  629. return this.texture.type;
  630. },
  631. set: function ( value ) {
  632. console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
  633. this.texture.type = value;
  634. }
  635. },
  636. generateMipmaps: {
  637. get: function () {
  638. console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
  639. return this.texture.generateMipmaps;
  640. },
  641. set: function ( value ) {
  642. console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
  643. this.texture.generateMipmaps = value;
  644. }
  645. }
  646. } );
  647. //
  648. Object.defineProperties( THREE.Audio.prototype, {
  649. load: {
  650. value: function ( file ) {
  651. console.warn( 'THREE.Audio: .load has been deprecated. Please use THREE.AudioLoader.' );
  652. var scope = this;
  653. var audioLoader = new THREE.AudioLoader();
  654. audioLoader.load( file, function ( buffer ) {
  655. scope.setBuffer( buffer );
  656. } );
  657. return this;
  658. }
  659. }
  660. } );
  661. //
  662. THREE.GeometryUtils = {
  663. merge: function ( geometry1, geometry2, materialIndexOffset ) {
  664. console.warn( 'THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.' );
  665. var matrix;
  666. if ( geometry2 instanceof THREE.Mesh ) {
  667. geometry2.matrixAutoUpdate && geometry2.updateMatrix();
  668. matrix = geometry2.matrix;
  669. geometry2 = geometry2.geometry;
  670. }
  671. geometry1.merge( geometry2, matrix, materialIndexOffset );
  672. },
  673. center: function ( geometry ) {
  674. console.warn( 'THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.' );
  675. return geometry.center();
  676. }
  677. };
  678. THREE.ImageUtils = {
  679. crossOrigin: undefined,
  680. loadTexture: function ( url, mapping, onLoad, onError ) {
  681. console.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' );
  682. var loader = new THREE.TextureLoader();
  683. loader.setCrossOrigin( this.crossOrigin );
  684. var texture = loader.load( url, onLoad, undefined, onError );
  685. if ( mapping ) texture.mapping = mapping;
  686. return texture;
  687. },
  688. loadTextureCube: function ( urls, mapping, onLoad, onError ) {
  689. console.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' );
  690. var loader = new THREE.CubeTextureLoader();
  691. loader.setCrossOrigin( this.crossOrigin );
  692. var texture = loader.load( urls, onLoad, undefined, onError );
  693. if ( mapping ) texture.mapping = mapping;
  694. return texture;
  695. },
  696. loadCompressedTexture: function () {
  697. console.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' );
  698. },
  699. loadCompressedTextureCube: function () {
  700. console.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' );
  701. }
  702. };
  703. //
  704. THREE.Projector = function () {
  705. console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
  706. this.projectVector = function ( vector, camera ) {
  707. console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
  708. vector.project( camera );
  709. };
  710. this.unprojectVector = function ( vector, camera ) {
  711. console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
  712. vector.unproject( camera );
  713. };
  714. this.pickingRay = function ( vector, camera ) {
  715. console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
  716. };
  717. };
  718. //
  719. THREE.CanvasRenderer = function () {
  720. console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
  721. this.domElement = document.createElement( 'canvas' );
  722. this.clear = function () {};
  723. this.render = function () {};
  724. this.setClearColor = function () {};
  725. this.setSize = function () {};
  726. };
  727. //
  728. THREE.MeshFaceMaterial = THREE.MultiMaterial;