Scene.js 784 B

1234567891011121314151617181920212223242526272829303132333435
  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.clone = function ( object ) {
  14. if ( object === undefined ) object = new THREE.Scene();
  15. THREE.Object3D.prototype.clone.call( this, object );
  16. if ( this.fog !== null ) object.fog = this.fog.clone();
  17. if ( this.overrideMaterial !== null ) object.overrideMaterial = this.overrideMaterial.clone();
  18. object.autoUpdate = this.autoUpdate;
  19. object.matrixAutoUpdate = this.matrixAutoUpdate;
  20. return object;
  21. };
粤ICP备19079148号