|
@@ -26520,26 +26520,24 @@ WebGL1Renderer.prototype = Object.assign( Object.create( WebGLRenderer.prototype
|
|
|
|
|
|
} );
|
|
|
|
|
|
-function FogExp2( color, density ) {
|
|
|
+class FogExp2 {
|
|
|
|
|
|
- this.name = '';
|
|
|
-
|
|
|
- this.color = new Color( color );
|
|
|
- this.density = ( density !== undefined ) ? density : 0.00025;
|
|
|
+ constructor( color, density ) {
|
|
|
|
|
|
-}
|
|
|
+ this.name = '';
|
|
|
|
|
|
-Object.assign( FogExp2.prototype, {
|
|
|
+ this.color = new Color( color );
|
|
|
+ this.density = ( density !== undefined ) ? density : 0.00025;
|
|
|
|
|
|
- isFogExp2: true,
|
|
|
+ }
|
|
|
|
|
|
- clone: function () {
|
|
|
+ clone() {
|
|
|
|
|
|
return new FogExp2( this.color, this.density );
|
|
|
|
|
|
- },
|
|
|
+ }
|
|
|
|
|
|
- toJSON: function ( /* meta */ ) {
|
|
|
+ toJSON( /* meta */ ) {
|
|
|
|
|
|
return {
|
|
|
type: 'FogExp2',
|
|
@@ -26549,30 +26547,30 @@ Object.assign( FogExp2.prototype, {
|
|
|
|
|
|
}
|
|
|
|
|
|
-} );
|
|
|
+}
|
|
|
|
|
|
-function Fog( color, near, far ) {
|
|
|
+FogExp2.prototype.isFogExp2 = true;
|
|
|
|
|
|
- this.name = '';
|
|
|
+class Fog {
|
|
|
|
|
|
- this.color = new Color( color );
|
|
|
+ constructor( color, near, far ) {
|
|
|
|
|
|
- this.near = ( near !== undefined ) ? near : 1;
|
|
|
- this.far = ( far !== undefined ) ? far : 1000;
|
|
|
+ this.name = '';
|
|
|
|
|
|
-}
|
|
|
+ this.color = new Color( color );
|
|
|
|
|
|
-Object.assign( Fog.prototype, {
|
|
|
+ this.near = ( near !== undefined ) ? near : 1;
|
|
|
+ this.far = ( far !== undefined ) ? far : 1000;
|
|
|
|
|
|
- isFog: true,
|
|
|
+ }
|
|
|
|
|
|
- clone: function () {
|
|
|
+ clone() {
|
|
|
|
|
|
return new Fog( this.color, this.near, this.far );
|
|
|
|
|
|
- },
|
|
|
+ }
|
|
|
|
|
|
- toJSON: function ( /* meta */ ) {
|
|
|
+ toJSON( /* meta */ ) {
|
|
|
|
|
|
return {
|
|
|
type: 'Fog',
|
|
@@ -26583,39 +26581,36 @@ Object.assign( Fog.prototype, {
|
|
|
|
|
|
}
|
|
|
|
|
|
-} );
|
|
|
-
|
|
|
-function Scene() {
|
|
|
-
|
|
|
- Object3D.call( this );
|
|
|
+}
|
|
|
|
|
|
- this.type = 'Scene';
|
|
|
+Fog.prototype.isFog = true;
|
|
|
|
|
|
- this.background = null;
|
|
|
- this.environment = null;
|
|
|
- this.fog = null;
|
|
|
+class Scene extends Object3D {
|
|
|
|
|
|
- this.overrideMaterial = null;
|
|
|
+ constructor() {
|
|
|
|
|
|
- this.autoUpdate = true; // checked by the renderer
|
|
|
+ super();
|
|
|
+ this.type = 'Scene';
|
|
|
|
|
|
- if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
|
|
|
+ this.background = null;
|
|
|
+ this.environment = null;
|
|
|
+ this.fog = null;
|
|
|
|
|
|
- __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef
|
|
|
+ this.overrideMaterial = null;
|
|
|
|
|
|
- }
|
|
|
+ this.autoUpdate = true; // checked by the renderer
|
|
|
|
|
|
-}
|
|
|
+ if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
|
|
|
|
|
|
-Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
+ __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef
|
|
|
|
|
|
- constructor: Scene,
|
|
|
+ }
|
|
|
|
|
|
- isScene: true,
|
|
|
+ }
|
|
|
|
|
|
- copy: function ( source, recursive ) {
|
|
|
+ copy( source, recursive ) {
|
|
|
|
|
|
- Object3D.prototype.copy.call( this, source, recursive );
|
|
|
+ super.copy( source, recursive );
|
|
|
|
|
|
if ( source.background !== null ) this.background = source.background.clone();
|
|
|
if ( source.environment !== null ) this.environment = source.environment.clone();
|
|
@@ -26628,11 +26623,11 @@ Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
return this;
|
|
|
|
|
|
- },
|
|
|
+ }
|
|
|
|
|
|
- toJSON: function ( meta ) {
|
|
|
+ toJSON( meta ) {
|
|
|
|
|
|
- const data = Object3D.prototype.toJSON.call( this, meta );
|
|
|
+ const data = super.toJSON( meta );
|
|
|
|
|
|
if ( this.background !== null ) data.object.background = this.background.toJSON( meta );
|
|
|
if ( this.environment !== null ) data.object.environment = this.environment.toJSON( meta );
|
|
@@ -26642,7 +26637,9 @@ Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
}
|
|
|
|
|
|
-} );
|
|
|
+}
|
|
|
+
|
|
|
+Scene.prototype.isScene = true;
|
|
|
|
|
|
function InterleavedBuffer( array, stride ) {
|
|
|
|