提交 4bf5eb90 编写于 作者: M Mr.doob

Updated builds.

上级 1819c5b3
...@@ -26462,38 +26462,34 @@ ...@@ -26462,38 +26462,34 @@
} ); } );
function FogExp2( color, density ) { var FogExp2 = function FogExp2( color, density ) {
this.name = ''; this.name = '';
this.color = new Color( color ); this.color = new Color( color );
this.density = ( density !== undefined ) ? density : 0.00025; this.density = ( density !== undefined ) ? density : 0.00025;
} };
Object.assign( FogExp2.prototype, {
isFogExp2: true,
clone: function () { FogExp2.prototype.clone = function clone () {
return new FogExp2( this.color, this.density ); return new FogExp2( this.color, this.density );
}, };
toJSON: function ( /* meta */ ) { FogExp2.prototype.toJSON = function toJSON ( /* meta */ ) {
return { return {
type: 'FogExp2', type: 'FogExp2',
color: this.color.getHex(), color: this.color.getHex(),
density: this.density density: this.density
}; };
} };
} ); FogExp2.prototype.isFogExp2 = true;
function Fog( color, near, far ) { var Fog = function Fog( color, near, far ) {
this.name = ''; this.name = '';
...@@ -26502,60 +26498,52 @@ ...@@ -26502,60 +26498,52 @@
this.near = ( near !== undefined ) ? near : 1; this.near = ( near !== undefined ) ? near : 1;
this.far = ( far !== undefined ) ? far : 1000; this.far = ( far !== undefined ) ? far : 1000;
} };
Object.assign( Fog.prototype, {
isFog: true,
clone: function () { Fog.prototype.clone = function clone () {
return new Fog( this.color, this.near, this.far ); return new Fog( this.color, this.near, this.far );
}, };
toJSON: function ( /* meta */ ) { Fog.prototype.toJSON = function toJSON ( /* meta */ ) {
return { return {
type: 'Fog', type: 'Fog',
color: this.color.getHex(), color: this.color.getHex(),
near: this.near, near: this.near,
far: this.far far: this.far
}; };
} };
} ); Fog.prototype.isFog = true;
function Scene() { function Scene() {
Object3D.call( this ); Object3D.call(this);
this.type = 'Scene';
this.type = 'Scene'; this.background = null;
this.environment = null;
this.fog = null;
this.background = null; this.overrideMaterial = null;
this.environment = null;
this.fog = null;
this.overrideMaterial = null; this.autoUpdate = true; // checked by the renderer
this.autoUpdate = true; // checked by the renderer if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef
__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef }
} }
} Scene.prototype = Object.create( Object3D.prototype );
Scene.prototype.constructor = Scene;
Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
constructor: Scene,
isScene: true, Scene.prototype.copy = function copy ( source, recursive ) {
copy: function ( source, recursive ) {
Object3D.prototype.copy.call( this, source, recursive ); Object3D.prototype.copy.call( this, source, recursive );
...@@ -26570,9 +26558,9 @@ ...@@ -26570,9 +26558,9 @@
return this; return this;
}, };
toJSON: function ( meta ) { Scene.prototype.toJSON = function toJSON ( meta ) {
var data = Object3D.prototype.toJSON.call( this, meta ); var data = Object3D.prototype.toJSON.call( this, meta );
...@@ -26582,9 +26570,9 @@ ...@@ -26582,9 +26570,9 @@
return data; return data;
} };
} ); Scene.prototype.isScene = true;
function InterleavedBuffer( array, stride ) { function InterleavedBuffer( array, stride ) {
此差异已折叠。
...@@ -26520,26 +26520,24 @@ WebGL1Renderer.prototype = Object.assign( Object.create( WebGLRenderer.prototype ...@@ -26520,26 +26520,24 @@ WebGL1Renderer.prototype = Object.assign( Object.create( WebGLRenderer.prototype
} ); } );
function FogExp2( color, density ) { class FogExp2 {
this.name = ''; constructor( color, density ) {
this.color = new Color( color );
this.density = ( density !== undefined ) ? density : 0.00025;
} 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 ); return new FogExp2( this.color, this.density );
}, }
toJSON: function ( /* meta */ ) { toJSON( /* meta */ ) {
return { return {
type: 'FogExp2', type: 'FogExp2',
...@@ -26549,30 +26547,30 @@ Object.assign( FogExp2.prototype, { ...@@ -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.name = '';
this.far = ( far !== undefined ) ? far : 1000;
} 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 ); return new Fog( this.color, this.near, this.far );
}, }
toJSON: function ( /* meta */ ) { toJSON( /* meta */ ) {
return { return {
type: 'Fog', type: 'Fog',
...@@ -26583,39 +26581,36 @@ Object.assign( Fog.prototype, { ...@@ -26583,39 +26581,36 @@ Object.assign( Fog.prototype, {
} }
} ); }
function Scene() {
Object3D.call( this );
this.type = 'Scene'; Fog.prototype.isFog = true;
this.background = null; class Scene extends Object3D {
this.environment = null;
this.fog = null;
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.background !== null ) this.background = source.background.clone();
if ( source.environment !== null ) this.environment = source.environment.clone(); if ( source.environment !== null ) this.environment = source.environment.clone();
...@@ -26628,11 +26623,11 @@ Scene.prototype = Object.assign( Object.create( Object3D.prototype ), { ...@@ -26628,11 +26623,11 @@ Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
return this; 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.background !== null ) data.object.background = this.background.toJSON( meta );
if ( this.environment !== null ) data.object.environment = this.environment.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 ), { ...@@ -26642,7 +26637,9 @@ Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
} }
} ); }
Scene.prototype.isScene = true;
function InterleavedBuffer( array, stride ) { function InterleavedBuffer( array, stride ) {
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册