Three.Legacy.js 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511
  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.error( 'THREE.Matrix3: .multiplyVector3Array() has been removed.' );
  283. },
  284. applyToBuffer: function( buffer, offset, length ) {
  285. console.warn( 'THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.' );
  286. return this.applyToBufferAttribute( buffer );
  287. },
  288. applyToVector3Array: function( array, offset, length ) {
  289. console.error( 'THREE.Matrix3: .applyToVector3Array() has been removed.' );
  290. }
  291. } );
  292. Object.assign( Matrix4.prototype, {
  293. extractPosition: function ( m ) {
  294. console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );
  295. return this.copyPosition( m );
  296. },
  297. flattenToArrayOffset: function ( array, offset ) {
  298. console.warn( "THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead." );
  299. return this.toArray( array, offset );
  300. },
  301. getPosition: function () {
  302. var v1;
  303. return function getPosition() {
  304. if ( v1 === undefined ) v1 = new Vector3();
  305. console.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );
  306. return v1.setFromMatrixColumn( this, 3 );
  307. };
  308. }(),
  309. setRotationFromQuaternion: function ( q ) {
  310. console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );
  311. return this.makeRotationFromQuaternion( q );
  312. },
  313. multiplyToArray: function () {
  314. console.warn( 'THREE.Matrix4: .multiplyToArray() has been removed.' );
  315. },
  316. multiplyVector3: function ( vector ) {
  317. console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  318. return vector.applyMatrix4( this );
  319. },
  320. multiplyVector4: function ( vector ) {
  321. console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  322. return vector.applyMatrix4( this );
  323. },
  324. multiplyVector3Array: function ( a ) {
  325. console.error( 'THREE.Matrix4: .multiplyVector3Array() has been removed.' );
  326. },
  327. rotateAxis: function ( v ) {
  328. console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );
  329. v.transformDirection( this );
  330. },
  331. crossVector: function ( vector ) {
  332. console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );
  333. return vector.applyMatrix4( this );
  334. },
  335. translate: function () {
  336. console.error( 'THREE.Matrix4: .translate() has been removed.' );
  337. },
  338. rotateX: function () {
  339. console.error( 'THREE.Matrix4: .rotateX() has been removed.' );
  340. },
  341. rotateY: function () {
  342. console.error( 'THREE.Matrix4: .rotateY() has been removed.' );
  343. },
  344. rotateZ: function () {
  345. console.error( 'THREE.Matrix4: .rotateZ() has been removed.' );
  346. },
  347. rotateByAxis: function () {
  348. console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );
  349. },
  350. applyToBuffer: function( buffer, offset, length ) {
  351. console.warn( 'THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.' );
  352. return this.applyToBufferAttribute( buffer );
  353. },
  354. applyToVector3Array: function( array, offset, length ) {
  355. console.error( 'THREE.Matrix4: .applyToVector3Array() has been removed.' );
  356. },
  357. makeFrustum: function( left, right, bottom, top, near, far ) {
  358. console.warn( 'THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.' );
  359. return this.makePerspective( left, right, top, bottom, near, far );
  360. }
  361. } );
  362. Plane.prototype.isIntersectionLine = function ( line ) {
  363. console.warn( 'THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().' );
  364. return this.intersectsLine( line );
  365. };
  366. Quaternion.prototype.multiplyVector3 = function ( vector ) {
  367. console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );
  368. return vector.applyQuaternion( this );
  369. };
  370. Object.assign( Ray.prototype, {
  371. isIntersectionBox: function ( box ) {
  372. console.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' );
  373. return this.intersectsBox( box );
  374. },
  375. isIntersectionPlane: function ( plane ) {
  376. console.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' );
  377. return this.intersectsPlane( plane );
  378. },
  379. isIntersectionSphere: function ( sphere ) {
  380. console.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' );
  381. return this.intersectsSphere( sphere );
  382. }
  383. } );
  384. Object.assign( Shape.prototype, {
  385. extrude: function ( options ) {
  386. console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );
  387. return new ExtrudeGeometry( this, options );
  388. },
  389. makeGeometry: function ( options ) {
  390. console.warn( 'THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.' );
  391. return new ShapeGeometry( this, options );
  392. }
  393. } );
  394. Object.assign( Vector2.prototype, {
  395. fromAttribute: function ( attribute, index, offset ) {
  396. console.error( 'THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  397. return this.fromBufferAttribute( attribute, index, offset );
  398. }
  399. } );
  400. Object.assign( Vector3.prototype, {
  401. setEulerFromRotationMatrix: function () {
  402. console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );
  403. },
  404. setEulerFromQuaternion: function () {
  405. console.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );
  406. },
  407. getPositionFromMatrix: function ( m ) {
  408. console.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );
  409. return this.setFromMatrixPosition( m );
  410. },
  411. getScaleFromMatrix: function ( m ) {
  412. console.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );
  413. return this.setFromMatrixScale( m );
  414. },
  415. getColumnFromMatrix: function ( index, matrix ) {
  416. console.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );
  417. return this.setFromMatrixColumn( matrix, index );
  418. },
  419. applyProjection: function ( m ) {
  420. console.warn( 'THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.' );
  421. return this.applyMatrix4( m );
  422. },
  423. fromAttribute: function ( attribute, index, offset ) {
  424. console.error( 'THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  425. return this.fromBufferAttribute( attribute, index, offset );
  426. }
  427. } );
  428. Object.assign( Vector4.prototype, {
  429. fromAttribute: function ( attribute, index, offset ) {
  430. console.error( 'THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().' );
  431. return this.fromBufferAttribute( attribute, index, offset );
  432. }
  433. } );
  434. //
  435. Geometry.prototype.computeTangents = function () {
  436. console.warn( 'THREE.Geometry: .computeTangents() has been removed.' );
  437. };
  438. Object.assign( Object3D.prototype, {
  439. getChildByName: function ( name ) {
  440. console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );
  441. return this.getObjectByName( name );
  442. },
  443. renderDepth: function () {
  444. console.warn( 'THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.' );
  445. },
  446. translate: function ( distance, axis ) {
  447. console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );
  448. return this.translateOnAxis( axis, distance );
  449. }
  450. } );
  451. Object.defineProperties( Object3D.prototype, {
  452. eulerOrder: {
  453. get: function () {
  454. console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
  455. return this.rotation.order;
  456. },
  457. set: function ( value ) {
  458. console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );
  459. this.rotation.order = value;
  460. }
  461. },
  462. useQuaternion: {
  463. get: function () {
  464. console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
  465. },
  466. set: function () {
  467. console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );
  468. }
  469. }
  470. } );
  471. Object.defineProperties( LOD.prototype, {
  472. objects: {
  473. get: function () {
  474. console.warn( 'THREE.LOD: .objects has been renamed to .levels.' );
  475. return this.levels;
  476. }
  477. }
  478. } );
  479. Object.defineProperty( Skeleton.prototype, 'useVertexTexture', {
  480. get: function () {
  481. console.warn( 'THREE.Skeleton: useVertexTexture has been removed.' );
  482. },
  483. set: function () {
  484. console.warn( 'THREE.Skeleton: useVertexTexture has been removed.' );
  485. }
  486. } );
  487. Object.defineProperty( Curve.prototype, '__arcLengthDivisions', {
  488. get: function () {
  489. console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
  490. return this.arcLengthDivisions;
  491. },
  492. set: function ( value ) {
  493. console.warn( 'THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.' );
  494. this.arcLengthDivisions = value;
  495. }
  496. } );
  497. //
  498. PerspectiveCamera.prototype.setLens = function ( focalLength, filmGauge ) {
  499. console.warn( "THREE.PerspectiveCamera.setLens is deprecated. " +
  500. "Use .setFocalLength and .filmGauge for a photographic setup." );
  501. if ( filmGauge !== undefined ) this.filmGauge = filmGauge;
  502. this.setFocalLength( focalLength );
  503. };
  504. //
  505. Object.defineProperties( Light.prototype, {
  506. onlyShadow: {
  507. set: function () {
  508. console.warn( 'THREE.Light: .onlyShadow has been removed.' );
  509. }
  510. },
  511. shadowCameraFov: {
  512. set: function ( value ) {
  513. console.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' );
  514. this.shadow.camera.fov = value;
  515. }
  516. },
  517. shadowCameraLeft: {
  518. set: function ( value ) {
  519. console.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' );
  520. this.shadow.camera.left = value;
  521. }
  522. },
  523. shadowCameraRight: {
  524. set: function ( value ) {
  525. console.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' );
  526. this.shadow.camera.right = value;
  527. }
  528. },
  529. shadowCameraTop: {
  530. set: function ( value ) {
  531. console.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' );
  532. this.shadow.camera.top = value;
  533. }
  534. },
  535. shadowCameraBottom: {
  536. set: function ( value ) {
  537. console.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' );
  538. this.shadow.camera.bottom = value;
  539. }
  540. },
  541. shadowCameraNear: {
  542. set: function ( value ) {
  543. console.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' );
  544. this.shadow.camera.near = value;
  545. }
  546. },
  547. shadowCameraFar: {
  548. set: function ( value ) {
  549. console.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' );
  550. this.shadow.camera.far = value;
  551. }
  552. },
  553. shadowCameraVisible: {
  554. set: function () {
  555. console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.' );
  556. }
  557. },
  558. shadowBias: {
  559. set: function ( value ) {
  560. console.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' );
  561. this.shadow.bias = value;
  562. }
  563. },
  564. shadowDarkness: {
  565. set: function () {
  566. console.warn( 'THREE.Light: .shadowDarkness has been removed.' );
  567. }
  568. },
  569. shadowMapWidth: {
  570. set: function ( value ) {
  571. console.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' );
  572. this.shadow.mapSize.width = value;
  573. }
  574. },
  575. shadowMapHeight: {
  576. set: function ( value ) {
  577. console.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' );
  578. this.shadow.mapSize.height = value;
  579. }
  580. }
  581. } );
  582. //
  583. Object.defineProperties( BufferAttribute.prototype, {
  584. length: {
  585. get: function () {
  586. console.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' );
  587. return this.array.length;
  588. }
  589. }
  590. } );
  591. Object.assign( BufferGeometry.prototype, {
  592. addIndex: function ( index ) {
  593. console.warn( 'THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().' );
  594. this.setIndex( index );
  595. },
  596. addDrawCall: function ( start, count, indexOffset ) {
  597. if ( indexOffset !== undefined ) {
  598. console.warn( 'THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.' );
  599. }
  600. console.warn( 'THREE.BufferGeometry: .addDrawCall() is now .addGroup().' );
  601. this.addGroup( start, count );
  602. },
  603. clearDrawCalls: function () {
  604. console.warn( 'THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().' );
  605. this.clearGroups();
  606. },
  607. computeTangents: function () {
  608. console.warn( 'THREE.BufferGeometry: .computeTangents() has been removed.' );
  609. },
  610. computeOffsets: function () {
  611. console.warn( 'THREE.BufferGeometry: .computeOffsets() has been removed.' );
  612. }
  613. } );
  614. Object.defineProperties( BufferGeometry.prototype, {
  615. drawcalls: {
  616. get: function () {
  617. console.error( 'THREE.BufferGeometry: .drawcalls has been renamed to .groups.' );
  618. return this.groups;
  619. }
  620. },
  621. offsets: {
  622. get: function () {
  623. console.warn( 'THREE.BufferGeometry: .offsets has been renamed to .groups.' );
  624. return this.groups;
  625. }
  626. }
  627. } );
  628. //
  629. Object.defineProperties( Uniform.prototype, {
  630. dynamic: {
  631. set: function () {
  632. console.warn( 'THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.' );
  633. }
  634. },
  635. onUpdate: {
  636. value: function () {
  637. console.warn( 'THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.' );
  638. return this;
  639. }
  640. }
  641. } );
  642. //
  643. Object.defineProperties( Material.prototype, {
  644. wrapAround: {
  645. get: function () {
  646. console.warn( 'THREE.Material: .wrapAround has been removed.' );
  647. },
  648. set: function () {
  649. console.warn( 'THREE.Material: .wrapAround has been removed.' );
  650. }
  651. },
  652. wrapRGB: {
  653. get: function () {
  654. console.warn( 'THREE.Material: .wrapRGB has been removed.' );
  655. return new Color();
  656. }
  657. }
  658. } );
  659. Object.defineProperties( MeshPhongMaterial.prototype, {
  660. metal: {
  661. get: function () {
  662. console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.' );
  663. return false;
  664. },
  665. set: function () {
  666. console.warn( 'THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead' );
  667. }
  668. }
  669. } );
  670. Object.defineProperties( ShaderMaterial.prototype, {
  671. derivatives: {
  672. get: function () {
  673. console.warn( 'THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
  674. return this.extensions.derivatives;
  675. },
  676. set: function ( value ) {
  677. console.warn( 'THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );
  678. this.extensions.derivatives = value;
  679. }
  680. }
  681. } );
  682. //
  683. Object.assign( WebGLRenderer.prototype, {
  684. getCurrentRenderTarget: function () {
  685. console.warn( 'THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().' );
  686. return this.getRenderTarget();
  687. },
  688. supportsFloatTextures: function () {
  689. console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
  690. return this.extensions.get( 'OES_texture_float' );
  691. },
  692. supportsHalfFloatTextures: function () {
  693. console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' );
  694. return this.extensions.get( 'OES_texture_half_float' );
  695. },
  696. supportsStandardDerivatives: function () {
  697. console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' );
  698. return this.extensions.get( 'OES_standard_derivatives' );
  699. },
  700. supportsCompressedTextureS3TC: function () {
  701. console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' );
  702. return this.extensions.get( 'WEBGL_compressed_texture_s3tc' );
  703. },
  704. supportsCompressedTexturePVRTC: function () {
  705. console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' );
  706. return this.extensions.get( 'WEBGL_compressed_texture_pvrtc' );
  707. },
  708. supportsBlendMinMax: function () {
  709. console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' );
  710. return this.extensions.get( 'EXT_blend_minmax' );
  711. },
  712. supportsVertexTextures: function () {
  713. console.warn( 'THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.' );
  714. return this.capabilities.vertexTextures;
  715. },
  716. supportsInstancedArrays: function () {
  717. console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' );
  718. return this.extensions.get( 'ANGLE_instanced_arrays' );
  719. },
  720. enableScissorTest: function ( boolean ) {
  721. console.warn( 'THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().' );
  722. this.setScissorTest( boolean );
  723. },
  724. initMaterial: function () {
  725. console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
  726. },
  727. addPrePlugin: function () {
  728. console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
  729. },
  730. addPostPlugin: function () {
  731. console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
  732. },
  733. updateShadowMap: function () {
  734. console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
  735. }
  736. } );
  737. Object.defineProperties( WebGLRenderer.prototype, {
  738. shadowMapEnabled: {
  739. get: function () {
  740. return this.shadowMap.enabled;
  741. },
  742. set: function ( value ) {
  743. console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
  744. this.shadowMap.enabled = value;
  745. }
  746. },
  747. shadowMapType: {
  748. get: function () {
  749. return this.shadowMap.type;
  750. },
  751. set: function ( value ) {
  752. console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
  753. this.shadowMap.type = value;
  754. }
  755. },
  756. shadowMapCullFace: {
  757. get: function () {
  758. return this.shadowMap.cullFace;
  759. },
  760. set: function ( value ) {
  761. console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.' );
  762. this.shadowMap.cullFace = value;
  763. }
  764. }
  765. } );
  766. Object.defineProperties( WebGLShadowMap.prototype, {
  767. cullFace: {
  768. get: function () {
  769. return this.renderReverseSided ? CullFaceFront : CullFaceBack;
  770. },
  771. set: function ( cullFace ) {
  772. var value = ( cullFace !== CullFaceBack );
  773. console.warn( "WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to " + value + "." );
  774. this.renderReverseSided = value;
  775. }
  776. }
  777. } );
  778. //
  779. Object.defineProperties( WebGLRenderTarget.prototype, {
  780. wrapS: {
  781. get: function () {
  782. console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
  783. return this.texture.wrapS;
  784. },
  785. set: function ( value ) {
  786. console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );
  787. this.texture.wrapS = value;
  788. }
  789. },
  790. wrapT: {
  791. get: function () {
  792. console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
  793. return this.texture.wrapT;
  794. },
  795. set: function ( value ) {
  796. console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );
  797. this.texture.wrapT = value;
  798. }
  799. },
  800. magFilter: {
  801. get: function () {
  802. console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
  803. return this.texture.magFilter;
  804. },
  805. set: function ( value ) {
  806. console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );
  807. this.texture.magFilter = value;
  808. }
  809. },
  810. minFilter: {
  811. get: function () {
  812. console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
  813. return this.texture.minFilter;
  814. },
  815. set: function ( value ) {
  816. console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );
  817. this.texture.minFilter = value;
  818. }
  819. },
  820. anisotropy: {
  821. get: function () {
  822. console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
  823. return this.texture.anisotropy;
  824. },
  825. set: function ( value ) {
  826. console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );
  827. this.texture.anisotropy = value;
  828. }
  829. },
  830. offset: {
  831. get: function () {
  832. console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
  833. return this.texture.offset;
  834. },
  835. set: function ( value ) {
  836. console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );
  837. this.texture.offset = value;
  838. }
  839. },
  840. repeat: {
  841. get: function () {
  842. console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
  843. return this.texture.repeat;
  844. },
  845. set: function ( value ) {
  846. console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );
  847. this.texture.repeat = value;
  848. }
  849. },
  850. format: {
  851. get: function () {
  852. console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
  853. return this.texture.format;
  854. },
  855. set: function ( value ) {
  856. console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );
  857. this.texture.format = value;
  858. }
  859. },
  860. type: {
  861. get: function () {
  862. console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
  863. return this.texture.type;
  864. },
  865. set: function ( value ) {
  866. console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );
  867. this.texture.type = value;
  868. }
  869. },
  870. generateMipmaps: {
  871. get: function () {
  872. console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
  873. return this.texture.generateMipmaps;
  874. },
  875. set: function ( value ) {
  876. console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );
  877. this.texture.generateMipmaps = value;
  878. }
  879. }
  880. } );
  881. //
  882. Audio.prototype.load = function ( file ) {
  883. console.warn( 'THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.' );
  884. var scope = this;
  885. var audioLoader = new AudioLoader();
  886. audioLoader.load( file, function ( buffer ) {
  887. scope.setBuffer( buffer );
  888. } );
  889. return this;
  890. };
  891. AudioAnalyser.prototype.getData = function () {
  892. console.warn( 'THREE.AudioAnalyser: .getData() is now .getFrequencyData().' );
  893. return this.getFrequencyData();
  894. };
  895. //
  896. export var GeometryUtils = {
  897. merge: function ( geometry1, geometry2, materialIndexOffset ) {
  898. console.warn( 'THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.' );
  899. var matrix;
  900. if ( geometry2.isMesh ) {
  901. geometry2.matrixAutoUpdate && geometry2.updateMatrix();
  902. matrix = geometry2.matrix;
  903. geometry2 = geometry2.geometry;
  904. }
  905. geometry1.merge( geometry2, matrix, materialIndexOffset );
  906. },
  907. center: function ( geometry ) {
  908. console.warn( 'THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.' );
  909. return geometry.center();
  910. }
  911. };
  912. export var ImageUtils = {
  913. crossOrigin: undefined,
  914. loadTexture: function ( url, mapping, onLoad, onError ) {
  915. console.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' );
  916. var loader = new TextureLoader();
  917. loader.setCrossOrigin( this.crossOrigin );
  918. var texture = loader.load( url, onLoad, undefined, onError );
  919. if ( mapping ) texture.mapping = mapping;
  920. return texture;
  921. },
  922. loadTextureCube: function ( urls, mapping, onLoad, onError ) {
  923. console.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' );
  924. var loader = new CubeTextureLoader();
  925. loader.setCrossOrigin( this.crossOrigin );
  926. var texture = loader.load( urls, onLoad, undefined, onError );
  927. if ( mapping ) texture.mapping = mapping;
  928. return texture;
  929. },
  930. loadCompressedTexture: function () {
  931. console.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' );
  932. },
  933. loadCompressedTextureCube: function () {
  934. console.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' );
  935. }
  936. };
  937. //
  938. export function Projector() {
  939. console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
  940. this.projectVector = function ( vector, camera ) {
  941. console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
  942. vector.project( camera );
  943. };
  944. this.unprojectVector = function ( vector, camera ) {
  945. console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
  946. vector.unproject( camera );
  947. };
  948. this.pickingRay = function () {
  949. console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
  950. };
  951. }
  952. //
  953. export function CanvasRenderer() {
  954. console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
  955. this.domElement = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
  956. this.clear = function () {};
  957. this.render = function () {};
  958. this.setClearColor = function () {};
  959. this.setSize = function () {};
  960. }
粤ICP备19079148号