提交 270ed7a4 编写于 作者: M Mr.doob

Updated builds.

上级 d2695efa
......@@ -602,6 +602,8 @@
if ( y === void 0 ) y = 0;
Object.defineProperty( this, 'isVector2', { value: true } );
this.x = x;
this.y = y;
......@@ -1079,10 +1081,10 @@
Object.defineProperties( Vector2.prototype, prototypeAccessors );
Vector2.prototype.isVector2 = true;
var Matrix3 = function Matrix3() {
Object.defineProperty( this, 'isMatrix3', { value: true } );
this.elements = [
1, 0, 0,
......@@ -1423,8 +1425,6 @@
};
Matrix3.prototype.isMatrix3 = true;
var _canvas;
var ImageUtils = {
......@@ -1804,6 +1804,8 @@
if ( w === void 0 ) w = 1;
Object.defineProperty( this, 'isVector4', { value: true } );
this.x = x;
this.y = y;
this.z = z;
......@@ -2448,8 +2450,6 @@
Object.defineProperties( Vector4.prototype, prototypeAccessors$1 );
Vector4.prototype.isVector4 = true;
/*
In options, we can specify:
* Texture parameters for an auto-generated target texture
......@@ -2571,6 +2571,8 @@
if ( w === void 0 ) w = 1;
Object.defineProperty( this, 'isQuaternion', { value: true } );
this._x = x;
this._y = y;
this._z = z;
......@@ -3208,14 +3210,14 @@
Object.defineProperties( Quaternion.prototype, prototypeAccessors$2 );
Quaternion.prototype.isQuaternion = true;
var Vector3 = function Vector3( x, y, z ) {
if ( x === void 0 ) x = 0;
if ( y === void 0 ) y = 0;
if ( z === void 0 ) z = 0;
Object.defineProperty( this, 'isVector3', { value: true } );
this.x = x;
this.y = y;
this.z = z;
......@@ -3927,13 +3929,13 @@
};
Vector3.prototype.isVector3 = true;
var _vector = new Vector3();
var _quaternion = new Quaternion();
var Box3 = function Box3( min, max ) {
Object.defineProperty( this, 'isBox3', { value: true } );
this.min = ( min !== undefined ) ? min : new Vector3( + Infinity, + Infinity, + Infinity );
this.max = ( max !== undefined ) ? max : new Vector3( - Infinity, - Infinity, - Infinity );
......@@ -4444,8 +4446,6 @@
}
Box3.prototype.isBox3 = true;
var _points = [
new Vector3(),
new Vector3(),
......@@ -5162,6 +5162,8 @@
var Matrix4 = function Matrix4() {
Object.defineProperty( this, 'isMatrix4', { value: true } );
this.elements = [
1, 0, 0, 0,
......@@ -6023,8 +6025,6 @@
};
Matrix4.prototype.isMatrix4 = true;
var _v1$1 = new Vector3();
var _m1 = new Matrix4();
var _zero = new Vector3( 0, 0, 0 );
......@@ -6040,6 +6040,8 @@
if ( order === void 0 ) order = Euler.DefaultOrder;
Object.defineProperty( this, 'isEuler', { value: true } );
this._x = x;
this._y = y;
this._z = z;
......@@ -6355,7 +6357,6 @@
Euler.DefaultOrder = 'XYZ';
Euler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ];
Euler.prototype.isEuler = true;
var _matrix = new Matrix4();
var _quaternion$1 = new Quaternion();
......@@ -7260,6 +7261,8 @@
var Plane = function Plane( normal, constant ) {
Object.defineProperty( this, 'isPlane', { value: true } );
// normal is assumed to be normalized
this.normal = ( normal !== undefined ) ? normal : new Vector3( 1, 0, 0 );
......@@ -7470,8 +7473,6 @@
};
Plane.prototype.isPlane = true;
var _v0$1 = new Vector3();
var _v1$3 = new Vector3();
var _v2$1 = new Vector3();
......@@ -7842,6 +7843,8 @@
var Color = function Color( r, g, b ) {
Object.defineProperty( this, 'isColor', { value: true } );
if ( g === undefined && b === undefined ) {
// r is THREE.Color, hex or string
......@@ -8386,7 +8389,6 @@
};
Color.NAMES = _colorKeywords;
Color.prototype.isColor = true;
Color.prototype.r = 1;
Color.prototype.g = 1;
Color.prototype.b = 1;
......@@ -13765,9 +13767,6 @@
var mesh = new Mesh( geometry, material );
var currentMinFilter = texture.minFilter;
var currentRenderList = renderer.getRenderList();
var currentRenderTarget = renderer.getRenderTarget();
var currentRenderState = renderer.getRenderState();
// Avoid blurred poles
if ( texture.minFilter === LinearMipmapLinearFilter ) { texture.minFilter = LinearFilter; }
......@@ -13777,10 +13776,6 @@
texture.minFilter = currentMinFilter;
renderer.setRenderTarget( currentRenderTarget );
renderer.setRenderList( currentRenderList );
renderer.setRenderState( currentRenderState );
mesh.geometry.dispose();
mesh.material.dispose();
......@@ -15605,8 +15600,6 @@
var cachedAttribute = cachedAttributes[ key ];
var geometryAttribute = geometryAttributes[ key ];
if ( geometryAttribute.isGLBufferAttribute ) { return true; }
if ( cachedAttribute === undefined ) { return true; }
if ( cachedAttribute.attribute !== geometryAttribute ) { return true; }
......@@ -16384,10 +16377,18 @@
if ( image && image.height > 0 ) {
var currentRenderList = renderer.getRenderList();
var currentRenderTarget = renderer.getRenderTarget();
var currentRenderState = renderer.getRenderState();
var renderTarget = new WebGLCubeRenderTarget( image.height / 2 );
renderTarget.fromEquirectangularTexture( renderer, texture );
cubemaps.set( texture, renderTarget );
renderer.setRenderTarget( currentRenderTarget );
renderer.setRenderList( currentRenderList );
renderer.setRenderState( currentRenderState );
return mapTextureMapping( renderTarget.texture, texture.mapping );
} else {
......@@ -26518,6 +26519,8 @@
var FogExp2 = function FogExp2( color, density ) {
Object.defineProperty( this, 'isFogExp2', { value: true } );
this.name = '';
this.color = new Color( color );
......@@ -26541,10 +26544,10 @@
};
FogExp2.prototype.isFogExp2 = true;
var Fog = function Fog( color, near, far ) {
Object.defineProperty( this, 'isFog', { value: true } );
this.name = '';
this.color = new Color( color );
......@@ -26571,11 +26574,12 @@
};
Fog.prototype.isFog = true;
function Scene() {
Object3D.call(this);
Object.defineProperty( this, 'isScene', { value: true } );
this.type = 'Scene';
this.background = null;
......@@ -26626,8 +26630,6 @@
};
Scene.prototype.isScene = true;
function InterleavedBuffer( array, stride ) {
this.array = array;
......@@ -39688,6 +39690,8 @@
var SphericalHarmonics3 = function SphericalHarmonics3() {
Object.defineProperty( this, 'isSphericalHarmonics3', { value: true } );
this.coefficients = [];
for ( var i = 0; i < 9; i ++ ) {
......@@ -39915,8 +39919,6 @@
};
SphericalHarmonics3.prototype.isSphericalHarmonics3 = true;
function LightProbe( sh, intensity ) {
Light.call( this, undefined, intensity );
......@@ -46355,6 +46357,8 @@
var Box2 = function Box2( min, max ) {
Object.defineProperty( this, 'isBox2', { value: true } );
this.min = ( min !== undefined ) ? min : new Vector2( + Infinity, + Infinity );
this.max = ( max !== undefined ) ? max : new Vector2( - Infinity, - Infinity );
此差异已折叠。
......@@ -595,6 +595,8 @@ class Vector2 {
constructor( x = 0, y = 0 ) {
Object.defineProperty( this, 'isVector2', { value: true } );
this.x = x;
this.y = y;
......@@ -1070,12 +1072,12 @@ class Vector2 {
}
Vector2.prototype.isVector2 = true;
class Matrix3 {
constructor() {
Object.defineProperty( this, 'isMatrix3', { value: true } );
this.elements = [
1, 0, 0,
......@@ -1418,8 +1420,6 @@ class Matrix3 {
}
Matrix3.prototype.isMatrix3 = true;
let _canvas;
const ImageUtils = {
......@@ -1796,6 +1796,8 @@ class Vector4 {
constructor( x = 0, y = 0, z = 0, w = 1 ) {
Object.defineProperty( this, 'isVector4', { value: true } );
this.x = x;
this.y = y;
this.z = z;
......@@ -2438,8 +2440,6 @@ class Vector4 {
}
Vector4.prototype.isVector4 = true;
/*
In options, we can specify:
* Texture parameters for an auto-generated target texture
......@@ -2558,6 +2558,8 @@ class Quaternion {
constructor( x = 0, y = 0, z = 0, w = 1 ) {
Object.defineProperty( this, 'isQuaternion', { value: true } );
this._x = x;
this._y = y;
this._z = z;
......@@ -3193,12 +3195,12 @@ class Quaternion {
}
Quaternion.prototype.isQuaternion = true;
class Vector3 {
constructor( x = 0, y = 0, z = 0 ) {
Object.defineProperty( this, 'isVector3', { value: true } );
this.x = x;
this.y = y;
this.z = z;
......@@ -3912,8 +3914,6 @@ class Vector3 {
}
Vector3.prototype.isVector3 = true;
const _vector = new Vector3();
const _quaternion = new Quaternion();
......@@ -3921,6 +3921,8 @@ class Box3 {
constructor( min, max ) {
Object.defineProperty( this, 'isBox3', { value: true } );
this.min = ( min !== undefined ) ? min : new Vector3( + Infinity, + Infinity, + Infinity );
this.max = ( max !== undefined ) ? max : new Vector3( - Infinity, - Infinity, - Infinity );
......@@ -4433,8 +4435,6 @@ function satForAxes( axes, v0, v1, v2, extents ) {
}
Box3.prototype.isBox3 = true;
const _points = [
new Vector3(),
new Vector3(),
......@@ -5161,6 +5161,8 @@ class Matrix4 {
constructor() {
Object.defineProperty( this, 'isMatrix4', { value: true } );
this.elements = [
1, 0, 0, 0,
......@@ -6024,8 +6026,6 @@ class Matrix4 {
}
Matrix4.prototype.isMatrix4 = true;
const _v1$1 = new Vector3();
const _m1 = new Matrix4();
const _zero = new Vector3( 0, 0, 0 );
......@@ -6038,6 +6038,8 @@ class Euler {
constructor( x = 0, y = 0, z = 0, order = Euler.DefaultOrder ) {
Object.defineProperty( this, 'isEuler', { value: true } );
this._x = x;
this._y = y;
this._z = z;
......@@ -6351,7 +6353,6 @@ class Euler {
Euler.DefaultOrder = 'XYZ';
Euler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ];
Euler.prototype.isEuler = true;
const _matrix = new Matrix4();
const _quaternion$1 = new Quaternion();
......@@ -7262,6 +7263,8 @@ class Plane {
constructor( normal, constant ) {
Object.defineProperty( this, 'isPlane', { value: true } );
// normal is assumed to be normalized
this.normal = ( normal !== undefined ) ? normal : new Vector3( 1, 0, 0 );
......@@ -7474,8 +7477,6 @@ class Plane {
}
Plane.prototype.isPlane = true;
const _v0$1 = new Vector3();
const _v1$3 = new Vector3();
const _v2$1 = new Vector3();
......@@ -7852,6 +7853,8 @@ class Color {
constructor( r, g, b ) {
Object.defineProperty( this, 'isColor', { value: true } );
if ( g === undefined && b === undefined ) {
// r is THREE.Color, hex or string
......@@ -8398,7 +8401,6 @@ class Color {
}
Color.NAMES = _colorKeywords;
Color.prototype.isColor = true;
Color.prototype.r = 1;
Color.prototype.g = 1;
Color.prototype.b = 1;
......@@ -13815,9 +13817,6 @@ WebGLCubeRenderTarget.prototype.fromEquirectangularTexture = function ( renderer
const mesh = new Mesh( geometry, material );
const currentMinFilter = texture.minFilter;
const currentRenderList = renderer.getRenderList();
const currentRenderTarget = renderer.getRenderTarget();
const currentRenderState = renderer.getRenderState();
// Avoid blurred poles
if ( texture.minFilter === LinearMipmapLinearFilter ) texture.minFilter = LinearFilter;
......@@ -13827,10 +13826,6 @@ WebGLCubeRenderTarget.prototype.fromEquirectangularTexture = function ( renderer
texture.minFilter = currentMinFilter;
renderer.setRenderTarget( currentRenderTarget );
renderer.setRenderList( currentRenderList );
renderer.setRenderState( currentRenderState );
mesh.geometry.dispose();
mesh.material.dispose();
......@@ -15662,8 +15657,6 @@ function WebGLBindingStates( gl, extensions, attributes, capabilities ) {
const cachedAttribute = cachedAttributes[ key ];
const geometryAttribute = geometryAttributes[ key ];
if ( geometryAttribute.isGLBufferAttribute ) return true;
if ( cachedAttribute === undefined ) return true;
if ( cachedAttribute.attribute !== geometryAttribute ) return true;
......@@ -16441,10 +16434,18 @@ function WebGLCubeMaps( renderer ) {
if ( image && image.height > 0 ) {
const currentRenderList = renderer.getRenderList();
const currentRenderTarget = renderer.getRenderTarget();
const currentRenderState = renderer.getRenderState();
const renderTarget = new WebGLCubeRenderTarget( image.height / 2 );
renderTarget.fromEquirectangularTexture( renderer, texture );
cubemaps.set( texture, renderTarget );
renderer.setRenderTarget( currentRenderTarget );
renderer.setRenderList( currentRenderList );
renderer.setRenderState( currentRenderState );
return mapTextureMapping( renderTarget.texture, texture.mapping );
} else {
......@@ -26582,6 +26583,8 @@ class FogExp2 {
constructor( color, density ) {
Object.defineProperty( this, 'isFogExp2', { value: true } );
this.name = '';
this.color = new Color( color );
......@@ -26607,12 +26610,12 @@ class FogExp2 {
}
FogExp2.prototype.isFogExp2 = true;
class Fog {
constructor( color, near, far ) {
Object.defineProperty( this, 'isFog', { value: true } );
this.name = '';
this.color = new Color( color );
......@@ -26641,13 +26644,14 @@ class Fog {
}
Fog.prototype.isFog = true;
class Scene extends Object3D {
constructor() {
super();
Object.defineProperty( this, 'isScene', { value: true } );
this.type = 'Scene';
this.background = null;
......@@ -26697,8 +26701,6 @@ class Scene extends Object3D {
}
Scene.prototype.isScene = true;
function InterleavedBuffer( array, stride ) {
this.array = array;
......@@ -39795,6 +39797,8 @@ class SphericalHarmonics3 {
constructor() {
Object.defineProperty( this, 'isSphericalHarmonics3', { value: true } );
this.coefficients = [];
for ( let i = 0; i < 9; i ++ ) {
......@@ -40024,8 +40028,6 @@ class SphericalHarmonics3 {
}
SphericalHarmonics3.prototype.isSphericalHarmonics3 = true;
function LightProbe( sh, intensity ) {
Light.call( this, undefined, intensity );
......@@ -46489,6 +46491,8 @@ class Box2 {
constructor( min, max ) {
Object.defineProperty( this, 'isBox2', { value: true } );
this.min = ( min !== undefined ) ? min : new Vector2( + Infinity, + Infinity );
this.max = ( max !== undefined ) ? max : new Vector2( - Infinity, - Infinity );
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册