Scene.js 748 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. THREE.Scene = function () {
  5. THREE.Object3D.call( this );
  6. this.type = 'Scene';
  7. this.fog = null;
  8. this.overrideMaterial = null;
  9. this.autoUpdate = true; // checked by the renderer
  10. };
  11. THREE.Scene.prototype = Object.create( THREE.Object3D.prototype );
  12. THREE.Scene.prototype.constructor = THREE.Scene;
  13. THREE.Scene.prototype.copy = function ( source, recursive ) {
  14. THREE.Object3D.prototype.copy.call( this, source, recursive );
  15. if ( source.fog !== null ) this.fog = source.fog.clone();
  16. if ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone();
  17. this.autoUpdate = source.autoUpdate;
  18. this.matrixAutoUpdate = source.matrixAutoUpdate;
  19. return this;
  20. };
粤ICP备19079148号