|
@@ -7260,9 +7260,9 @@ class Object3D extends EventDispatcher {
|
|
|
this.matrixWorld = new Matrix4();
|
|
|
|
|
|
this.matrixAutoUpdate = Object3D.DEFAULT_MATRIX_AUTO_UPDATE;
|
|
|
- this.matrixWorldNeedsUpdate = false;
|
|
|
|
|
|
this.matrixWorldAutoUpdate = Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE; // checked by the renderer
|
|
|
+ this.matrixWorldNeedsUpdate = false;
|
|
|
|
|
|
this.layers = new Layers();
|
|
|
this.visible = true;
|
|
@@ -8129,9 +8129,9 @@ class Object3D extends EventDispatcher {
|
|
|
this.matrixWorld.copy( source.matrixWorld );
|
|
|
|
|
|
this.matrixAutoUpdate = source.matrixAutoUpdate;
|
|
|
- this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;
|
|
|
|
|
|
this.matrixWorldAutoUpdate = source.matrixWorldAutoUpdate;
|
|
|
+ this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;
|
|
|
|
|
|
this.layers.mask = source.layers.mask;
|
|
|
this.visible = source.visible;
|
|
@@ -18145,6 +18145,60 @@ function WebGLObjects( gl, geometries, attributes, info ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+class DepthTexture extends Texture {
|
|
|
+
|
|
|
+ constructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) {
|
|
|
+
|
|
|
+ format = format !== undefined ? format : DepthFormat;
|
|
|
+
|
|
|
+ if ( format !== DepthFormat && format !== DepthStencilFormat ) {
|
|
|
+
|
|
|
+ throw new Error( 'DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat' );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( type === undefined && format === DepthFormat ) type = UnsignedIntType;
|
|
|
+ if ( type === undefined && format === DepthStencilFormat ) type = UnsignedInt248Type;
|
|
|
+
|
|
|
+ super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
|
|
|
+
|
|
|
+ this.isDepthTexture = true;
|
|
|
+
|
|
|
+ this.image = { width: width, height: height };
|
|
|
+
|
|
|
+ this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
|
|
|
+ this.minFilter = minFilter !== undefined ? minFilter : NearestFilter;
|
|
|
+
|
|
|
+ this.flipY = false;
|
|
|
+ this.generateMipmaps = false;
|
|
|
+
|
|
|
+ this.compareFunction = null;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ copy( source ) {
|
|
|
+
|
|
|
+ super.copy( source );
|
|
|
+
|
|
|
+ this.compareFunction = source.compareFunction;
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ toJSON( meta ) {
|
|
|
+
|
|
|
+ const data = super.toJSON( meta );
|
|
|
+
|
|
|
+ if ( this.compareFunction !== null ) data.compareFunction = this.compareFunction;
|
|
|
+
|
|
|
+ return data;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* Uniforms of a program.
|
|
|
* Those form a tree structure with a special top-level container for the root,
|
|
@@ -18190,6 +18244,10 @@ function WebGLObjects( gl, geometries, attributes, info ) {
|
|
|
|
|
|
|
|
|
const emptyTexture = /*@__PURE__*/ new Texture();
|
|
|
+
|
|
|
+const emptyShadowTexture = /*@__PURE__*/ new DepthTexture( 1, 1 );
|
|
|
+emptyShadowTexture.compareFunction = LessEqualCompare;
|
|
|
+
|
|
|
const emptyArrayTexture = /*@__PURE__*/ new DataArrayTexture();
|
|
|
const empty3dTexture = /*@__PURE__*/ new Data3DTexture();
|
|
|
const emptyCubeTexture = /*@__PURE__*/ new CubeTexture();
|
|
@@ -18706,7 +18764,9 @@ function setValueT1( gl, v, textures ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- textures.setTexture2D( v || emptyTexture, unit );
|
|
|
+ const emptyTexture2D = ( this.type === gl.SAMPLER_2D_SHADOW ) ? emptyShadowTexture : emptyTexture;
|
|
|
+
|
|
|
+ textures.setTexture2D( v || emptyTexture2D, unit );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -19090,6 +19150,7 @@ class SingleUniform {
|
|
|
this.id = id;
|
|
|
this.addr = addr;
|
|
|
this.cache = [];
|
|
|
+ this.type = activeInfo.type;
|
|
|
this.setValue = getSingularSetter( activeInfo.type );
|
|
|
|
|
|
// this.path = activeInfo.name; // DEBUG
|
|
@@ -19105,6 +19166,7 @@ class PureArrayUniform {
|
|
|
this.id = id;
|
|
|
this.addr = addr;
|
|
|
this.cache = [];
|
|
|
+ this.type = activeInfo.type;
|
|
|
this.size = activeInfo.size;
|
|
|
this.setValue = getPureArraySetter( activeInfo.type );
|
|
|
|
|
@@ -26626,60 +26688,6 @@ class WebXRController {
|
|
|
|
|
|
}
|
|
|
|
|
|
-class DepthTexture extends Texture {
|
|
|
-
|
|
|
- constructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) {
|
|
|
-
|
|
|
- format = format !== undefined ? format : DepthFormat;
|
|
|
-
|
|
|
- if ( format !== DepthFormat && format !== DepthStencilFormat ) {
|
|
|
-
|
|
|
- throw new Error( 'DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat' );
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- if ( type === undefined && format === DepthFormat ) type = UnsignedIntType;
|
|
|
- if ( type === undefined && format === DepthStencilFormat ) type = UnsignedInt248Type;
|
|
|
-
|
|
|
- super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
|
|
|
-
|
|
|
- this.isDepthTexture = true;
|
|
|
-
|
|
|
- this.image = { width: width, height: height };
|
|
|
-
|
|
|
- this.magFilter = magFilter !== undefined ? magFilter : NearestFilter;
|
|
|
- this.minFilter = minFilter !== undefined ? minFilter : NearestFilter;
|
|
|
-
|
|
|
- this.flipY = false;
|
|
|
- this.generateMipmaps = false;
|
|
|
-
|
|
|
- this.compareFunction = null;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- copy( source ) {
|
|
|
-
|
|
|
- super.copy( source );
|
|
|
-
|
|
|
- this.compareFunction = source.compareFunction;
|
|
|
-
|
|
|
- return this;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- toJSON( meta ) {
|
|
|
-
|
|
|
- const data = super.toJSON( meta );
|
|
|
-
|
|
|
- if ( this.compareFunction !== null ) data.compareFunction = this.compareFunction;
|
|
|
-
|
|
|
- return data;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
class WebXRManager extends EventDispatcher {
|
|
|
|
|
|
constructor( renderer, gl ) {
|
|
@@ -35634,6 +35642,7 @@ class LineCurve3 extends Curve {
|
|
|
this.v2 = v2;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
getPoint( t, optionalTarget = new Vector3() ) {
|
|
|
|
|
|
const point = optionalTarget;
|
|
@@ -35652,6 +35661,7 @@ class LineCurve3 extends Curve {
|
|
|
return point;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
// Line curve is linear, so we can overwrite default getPointAt
|
|
|
getPointAt( u, optionalTarget ) {
|
|
|
|
|
@@ -35681,6 +35691,7 @@ class LineCurve3 extends Curve {
|
|
|
return this;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
toJSON() {
|
|
|
|
|
|
const data = super.toJSON();
|
|
@@ -35691,6 +35702,7 @@ class LineCurve3 extends Curve {
|
|
|
return data;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
fromJSON( json ) {
|
|
|
|
|
|
super.fromJSON( json );
|