super-three 0.154.1 → 0.156.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/three.cjs +360 -160
- package/build/three.js +360 -160
- package/build/three.min.js +1 -1
- package/build/three.module.js +355 -161
- package/build/three.module.min.js +1 -1
- package/examples/jsm/controls/OrbitControls.js +155 -25
- package/examples/jsm/csm/CSMShader.js +35 -1
- package/examples/jsm/environments/RoomEnvironment.js +1 -1
- package/examples/jsm/exporters/USDZExporter.js +1 -0
- package/examples/jsm/interactive/SelectionHelper.js +7 -0
- package/examples/jsm/libs/tween.module.js +790 -735
- package/examples/jsm/libs/utif.module.js +1644 -1558
- package/examples/jsm/loaders/DDSLoader.js +46 -3
- package/examples/jsm/loaders/EXRLoader.js +4 -4
- package/examples/jsm/loaders/FBXLoader.js +3 -1
- package/examples/jsm/loaders/GLTFLoader.js +25 -10
- package/examples/jsm/loaders/KTX2Loader.js +128 -79
- package/examples/jsm/loaders/LDrawLoader.js +1 -1
- package/examples/jsm/loaders/LogLuvLoader.js +2 -2
- package/examples/jsm/loaders/MMDLoader.js +10 -7
- package/examples/jsm/loaders/NRRDLoader.js +3 -3
- package/examples/jsm/loaders/PLYLoader.js +1 -1
- package/examples/jsm/loaders/RGBELoader.js +48 -66
- package/examples/jsm/loaders/STLLoader.js +7 -0
- package/examples/jsm/loaders/TGALoader.js +10 -10
- package/examples/jsm/loaders/VRMLLoader.js +1 -1
- package/examples/jsm/misc/GPUComputationRenderer.js +0 -9
- package/examples/jsm/misc/Volume.js +4 -6
- package/examples/jsm/nodes/Nodes.js +8 -6
- package/examples/jsm/nodes/accessors/BufferAttributeNode.js +29 -3
- package/examples/jsm/nodes/accessors/CubeTextureNode.js +20 -3
- package/examples/jsm/nodes/accessors/ExtendedMaterialNode.js +15 -4
- package/examples/jsm/nodes/accessors/InstanceNode.js +8 -8
- package/examples/jsm/nodes/accessors/LineMaterialNode.js +31 -0
- package/examples/jsm/nodes/accessors/MaterialNode.js +73 -61
- package/examples/jsm/nodes/accessors/MaterialReferenceNode.js +3 -0
- package/examples/jsm/nodes/accessors/Object3DNode.js +2 -2
- package/examples/jsm/nodes/accessors/SceneNode.js +6 -0
- package/examples/jsm/nodes/accessors/TextureNode.js +54 -9
- package/examples/jsm/nodes/accessors/TextureStoreNode.js +29 -0
- package/examples/jsm/nodes/core/AttributeNode.js +2 -2
- package/examples/jsm/nodes/core/LightingModel.js +7 -9
- package/examples/jsm/nodes/core/Node.js +28 -3
- package/examples/jsm/nodes/core/NodeBuilder.js +94 -12
- package/examples/jsm/nodes/core/NodeUniform.js +1 -1
- package/examples/jsm/nodes/core/OutputStructNode.js +58 -0
- package/examples/jsm/nodes/core/PropertyNode.js +6 -0
- package/examples/jsm/nodes/core/StackNode.js +4 -4
- package/examples/jsm/nodes/core/StructTypeNode.js +24 -0
- package/examples/jsm/nodes/display/BumpMapNode.js +77 -0
- package/examples/jsm/nodes/display/NormalMapNode.js +2 -2
- package/examples/jsm/nodes/display/ViewportNode.js +19 -5
- package/examples/jsm/nodes/functions/BSDF/BRDF_GGX.js +10 -2
- package/examples/jsm/nodes/functions/BSDF/Schlick_to_F0.js +13 -0
- package/examples/jsm/nodes/functions/PhongLightingModel.js +53 -14
- package/examples/jsm/nodes/functions/PhysicalLightingModel.js +236 -97
- package/examples/jsm/nodes/geometry/RangeNode.js +2 -2
- package/examples/jsm/nodes/gpgpu/ComputeNode.js +13 -0
- package/examples/jsm/nodes/lighting/AONode.js +1 -1
- package/examples/jsm/nodes/lighting/AnalyticLightNode.js +58 -20
- package/examples/jsm/nodes/lighting/DirectionalLightNode.js +7 -10
- package/examples/jsm/nodes/lighting/EnvironmentNode.js +22 -12
- package/examples/jsm/nodes/lighting/HemisphereLightNode.js +1 -1
- package/examples/jsm/nodes/lighting/LightingContextNode.js +12 -9
- package/examples/jsm/nodes/lighting/PointLightNode.js +7 -10
- package/examples/jsm/nodes/lighting/SpotLightNode.js +7 -10
- package/examples/jsm/nodes/materials/LineDashedNodeMaterial.js +54 -0
- package/examples/jsm/nodes/materials/Materials.js +2 -0
- package/examples/jsm/nodes/materials/MeshLambertNodeMaterial.js +34 -0
- package/examples/jsm/nodes/materials/MeshNormalNodeMaterial.js +2 -0
- package/examples/jsm/nodes/materials/MeshPhongNodeMaterial.js +2 -2
- package/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.js +19 -2
- package/examples/jsm/nodes/materials/MeshStandardNodeMaterial.js +2 -2
- package/examples/jsm/nodes/materials/NodeMaterial.js +61 -26
- package/examples/jsm/nodes/materials/SpriteNodeMaterial.js +2 -2
- package/examples/jsm/nodes/math/HashNode.js +35 -0
- package/examples/jsm/nodes/shadernode/ShaderNode.js +6 -2
- package/examples/jsm/nodes/utils/SplitNode.js +1 -1
- package/examples/jsm/objects/Reflector.js +1 -9
- package/examples/jsm/objects/Refractor.js +0 -8
- package/examples/jsm/offscreen/scene.js +0 -1
- package/examples/jsm/postprocessing/FilmPass.js +3 -5
- package/examples/jsm/postprocessing/MaskPass.js +4 -1
- package/examples/jsm/postprocessing/OutputPass.js +33 -14
- package/examples/jsm/postprocessing/RenderPass.js +30 -12
- package/examples/jsm/postprocessing/SAOPass.js +23 -98
- package/examples/jsm/postprocessing/SSAOPass.js +10 -30
- package/examples/jsm/postprocessing/UnrealBloomPass.js +21 -17
- package/examples/jsm/renderers/common/Backend.js +11 -8
- package/examples/jsm/renderers/common/Background.js +22 -20
- package/examples/jsm/renderers/common/Binding.js +14 -0
- package/examples/jsm/renderers/common/Bindings.js +7 -10
- package/examples/jsm/renderers/common/Geometries.js +1 -1
- package/examples/jsm/renderers/common/Pipelines.js +96 -47
- package/examples/jsm/renderers/common/RenderContext.js +1 -0
- package/examples/jsm/renderers/common/RenderContexts.js +41 -5
- package/examples/jsm/renderers/common/RenderList.js +12 -4
- package/examples/jsm/renderers/common/RenderObject.js +26 -6
- package/examples/jsm/renderers/common/RenderObjects.js +10 -7
- package/examples/jsm/renderers/common/Renderer.js +82 -42
- package/examples/jsm/renderers/common/SampledTexture.js +2 -1
- package/examples/jsm/renderers/common/Sampler.js +1 -1
- package/examples/jsm/renderers/common/StorageBuffer.js +1 -1
- package/examples/jsm/renderers/common/Textures.js +172 -20
- package/examples/jsm/renderers/common/nodes/NodeSampledTexture.js +2 -2
- package/examples/jsm/renderers/common/nodes/NodeSampler.js +1 -1
- package/examples/jsm/renderers/common/nodes/Nodes.js +58 -13
- package/examples/jsm/renderers/webgl/WebGLBackend.js +607 -0
- package/examples/jsm/renderers/webgl/nodes/GLSLNodeBuilder.js +118 -17
- package/examples/jsm/renderers/webgl/utils/WebGLAttributeUtils.js +84 -0
- package/examples/jsm/renderers/webgl/utils/WebGLExtensions.js +26 -0
- package/examples/jsm/renderers/webgl/utils/WebGLState.js +529 -0
- package/examples/jsm/renderers/webgl/utils/WebGLTextureUtils.js +199 -0
- package/examples/jsm/renderers/webgl/utils/WebGLUtils.js +242 -0
- package/examples/jsm/renderers/webgl-legacy/nodes/GLSL1NodeBuilder.js +340 -0
- package/examples/jsm/renderers/{webgl → webgl-legacy}/nodes/WebGLNodeBuilder.js +1 -1
- package/examples/jsm/renderers/webgpu/WebGPUBackend.js +320 -84
- package/examples/jsm/renderers/webgpu/WebGPURenderer.js +18 -2
- package/examples/jsm/renderers/webgpu/nodes/WGSLNodeBuilder.js +120 -66
- package/examples/jsm/renderers/webgpu/nodes/WGSLNodeFunction.js +2 -2
- package/examples/jsm/renderers/webgpu/utils/WebGPUAttributeUtils.js +55 -36
- package/examples/jsm/renderers/webgpu/utils/WebGPUBindingUtils.js +96 -5
- package/examples/jsm/renderers/webgpu/utils/WebGPUConstants.js +24 -22
- package/examples/jsm/renderers/webgpu/utils/WebGPUPipelineUtils.js +117 -139
- package/examples/jsm/renderers/webgpu/utils/WebGPUTextureUtils.js +60 -142
- package/examples/jsm/renderers/webgpu/utils/WebGPUUtils.js +7 -6
- package/examples/jsm/shaders/FilmShader.js +11 -54
- package/examples/jsm/shaders/OutputShader.js +19 -2
- package/examples/jsm/shaders/SAOShader.js +0 -13
- package/examples/jsm/shaders/SSAOShader.js +33 -26
- package/examples/jsm/utils/BufferGeometryUtils.js +13 -4
- package/examples/jsm/webxr/OculusHandPointerModel.js +2 -2
- package/package.json +2 -2
- package/src/Three.js +3 -0
- package/src/animation/PropertyBinding.js +1 -1
- package/src/audio/Audio.js +6 -0
- package/src/cameras/CubeCamera.js +1 -4
- package/src/constants.js +4 -1
- package/src/core/BufferAttribute.js +20 -0
- package/src/core/Object3D.js +2 -15
- package/src/core/RenderTarget.js +122 -0
- package/src/core/UniformsGroup.js +2 -2
- package/src/geometries/CapsuleGeometry.js +1 -1
- package/src/loaders/DataTextureLoader.js +19 -2
- package/src/materials/Material.js +2 -2
- package/src/math/Vector2.js +2 -2
- package/src/math/Vector3.js +3 -3
- package/src/math/Vector4.js +4 -4
- package/src/objects/Line.js +1 -1
- package/src/objects/Mesh.js +1 -1
- package/src/objects/Points.js +1 -1
- package/src/renderers/WebGLMultipleRenderTargets.js +0 -2
- package/src/renderers/WebGLRenderTarget.js +3 -110
- package/src/renderers/WebGLRenderer.js +83 -57
- package/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.js +1 -2
- package/src/renderers/shaders/ShaderChunk/map_fragment.glsl.js +11 -1
- package/src/renderers/shaders/ShaderLib/background.glsl.js +8 -0
- package/src/renderers/webgl/WebGLBackground.js +5 -14
- package/src/renderers/webgl/WebGLGeometries.js +5 -1
- package/src/renderers/webgl/WebGLMaterials.js +1 -1
- package/src/renderers/webgl/WebGLProgram.js +2 -0
- package/src/renderers/webgl/WebGLPrograms.js +19 -3
- package/src/renderers/webgl/WebGLTextures.js +101 -16
- package/src/renderers/webgl/WebGLUtils.js +27 -20
- package/src/textures/CompressedCubeTexture.js +19 -0
- package/src/textures/Texture.js +2 -2
- package/src/utils.js +9 -1
- package/examples/jsm/nodes/functions/BSDF/BRDF_BlinnPhong.js +0 -30
- package/examples/jsm/renderers/common/RenderTarget.js +0 -15
- package/examples/jsm/renderers/common/nodes/NodeRender.js +0 -302
- /package/examples/jsm/renderers/{webgl → webgl-legacy}/nodes/SlotNode.js +0 -0
- /package/examples/jsm/renderers/{webgl → webgl-legacy}/nodes/WebGLNodes.js +0 -0
package/build/three.module.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2010-2023 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
|
-
const REVISION = '
|
|
6
|
+
const REVISION = '156';
|
|
7
7
|
|
|
8
8
|
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
|
|
9
9
|
const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
|
|
@@ -127,6 +127,8 @@ const RGBA_ASTC_10x10_Format = 37819;
|
|
|
127
127
|
const RGBA_ASTC_12x10_Format = 37820;
|
|
128
128
|
const RGBA_ASTC_12x12_Format = 37821;
|
|
129
129
|
const RGBA_BPTC_Format = 36492;
|
|
130
|
+
const RGB_BPTC_SIGNED_Format = 36494;
|
|
131
|
+
const RGB_BPTC_UNSIGNED_Format = 36495;
|
|
130
132
|
const RED_RGTC1_Format = 36283;
|
|
131
133
|
const SIGNED_RED_RGTC1_Format = 36284;
|
|
132
134
|
const RED_GREEN_RGTC2_Format = 36285;
|
|
@@ -159,6 +161,7 @@ const NoColorSpace = '';
|
|
|
159
161
|
const SRGBColorSpace = 'srgb';
|
|
160
162
|
const LinearSRGBColorSpace = 'srgb-linear';
|
|
161
163
|
const DisplayP3ColorSpace = 'display-p3';
|
|
164
|
+
const LinearDisplayP3ColorSpace = 'display-p3-linear';
|
|
162
165
|
|
|
163
166
|
const ZeroStencilOp = 0;
|
|
164
167
|
const KeepStencilOp = 7680;
|
|
@@ -919,8 +922,8 @@ class Vector2 {
|
|
|
919
922
|
|
|
920
923
|
roundToZero() {
|
|
921
924
|
|
|
922
|
-
this.x =
|
|
923
|
-
this.y =
|
|
925
|
+
this.x = Math.trunc( this.x );
|
|
926
|
+
this.y = Math.trunc( this.y );
|
|
924
927
|
|
|
925
928
|
return this;
|
|
926
929
|
|
|
@@ -1528,6 +1531,14 @@ function createElementNS( name ) {
|
|
|
1528
1531
|
|
|
1529
1532
|
}
|
|
1530
1533
|
|
|
1534
|
+
function createCanvasElement() {
|
|
1535
|
+
|
|
1536
|
+
const canvas = createElementNS( 'canvas' );
|
|
1537
|
+
canvas.style.display = 'block';
|
|
1538
|
+
return canvas;
|
|
1539
|
+
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1531
1542
|
const _cache = {};
|
|
1532
1543
|
|
|
1533
1544
|
function warnOnce( message ) {
|
|
@@ -1919,7 +1930,7 @@ function serializeImage( image ) {
|
|
|
1919
1930
|
|
|
1920
1931
|
}
|
|
1921
1932
|
|
|
1922
|
-
let
|
|
1933
|
+
let _textureId = 0;
|
|
1923
1934
|
|
|
1924
1935
|
class Texture extends EventDispatcher {
|
|
1925
1936
|
|
|
@@ -1929,7 +1940,7 @@ class Texture extends EventDispatcher {
|
|
|
1929
1940
|
|
|
1930
1941
|
this.isTexture = true;
|
|
1931
1942
|
|
|
1932
|
-
Object.defineProperty( this, 'id', { value:
|
|
1943
|
+
Object.defineProperty( this, 'id', { value: _textureId ++ } );
|
|
1933
1944
|
|
|
1934
1945
|
this.uuid = generateUUID();
|
|
1935
1946
|
|
|
@@ -2739,10 +2750,10 @@ class Vector4 {
|
|
|
2739
2750
|
|
|
2740
2751
|
roundToZero() {
|
|
2741
2752
|
|
|
2742
|
-
this.x =
|
|
2743
|
-
this.y =
|
|
2744
|
-
this.z =
|
|
2745
|
-
this.w =
|
|
2753
|
+
this.x = Math.trunc( this.x );
|
|
2754
|
+
this.y = Math.trunc( this.y );
|
|
2755
|
+
this.z = Math.trunc( this.z );
|
|
2756
|
+
this.w = Math.trunc( this.w );
|
|
2746
2757
|
|
|
2747
2758
|
return this;
|
|
2748
2759
|
|
|
@@ -2883,13 +2894,13 @@ class Vector4 {
|
|
|
2883
2894
|
* Texture parameters for an auto-generated target texture
|
|
2884
2895
|
* depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers
|
|
2885
2896
|
*/
|
|
2886
|
-
class
|
|
2897
|
+
class RenderTarget extends EventDispatcher {
|
|
2887
2898
|
|
|
2888
2899
|
constructor( width = 1, height = 1, options = {} ) {
|
|
2889
2900
|
|
|
2890
2901
|
super();
|
|
2891
2902
|
|
|
2892
|
-
this.
|
|
2903
|
+
this.isRenderTarget = true;
|
|
2893
2904
|
|
|
2894
2905
|
this.width = width;
|
|
2895
2906
|
this.height = height;
|
|
@@ -2992,6 +3003,18 @@ class WebGLRenderTarget extends EventDispatcher {
|
|
|
2992
3003
|
|
|
2993
3004
|
}
|
|
2994
3005
|
|
|
3006
|
+
class WebGLRenderTarget extends RenderTarget {
|
|
3007
|
+
|
|
3008
|
+
constructor( width = 1, height = 1, options = {} ) {
|
|
3009
|
+
|
|
3010
|
+
super( width, height, options );
|
|
3011
|
+
|
|
3012
|
+
this.isWebGLRenderTarget = true;
|
|
3013
|
+
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
}
|
|
3017
|
+
|
|
2995
3018
|
class DataArrayTexture extends Texture {
|
|
2996
3019
|
|
|
2997
3020
|
constructor( data = null, width = 1, height = 1, depth = 1 ) {
|
|
@@ -3126,8 +3149,6 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
|
|
|
3126
3149
|
this.viewport.set( 0, 0, width, height );
|
|
3127
3150
|
this.scissor.set( 0, 0, width, height );
|
|
3128
3151
|
|
|
3129
|
-
return this;
|
|
3130
|
-
|
|
3131
3152
|
}
|
|
3132
3153
|
|
|
3133
3154
|
copy( source ) {
|
|
@@ -4240,9 +4261,9 @@ class Vector3 {
|
|
|
4240
4261
|
|
|
4241
4262
|
roundToZero() {
|
|
4242
4263
|
|
|
4243
|
-
this.x =
|
|
4244
|
-
this.y =
|
|
4245
|
-
this.z =
|
|
4264
|
+
this.x = Math.trunc( this.x );
|
|
4265
|
+
this.y = Math.trunc( this.y );
|
|
4266
|
+
this.z = Math.trunc( this.z );
|
|
4246
4267
|
|
|
4247
4268
|
return this;
|
|
4248
4269
|
|
|
@@ -7472,20 +7493,7 @@ class Object3D extends EventDispatcher {
|
|
|
7472
7493
|
|
|
7473
7494
|
clear() {
|
|
7474
7495
|
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
const object = this.children[ i ];
|
|
7478
|
-
|
|
7479
|
-
object.parent = null;
|
|
7480
|
-
|
|
7481
|
-
object.dispatchEvent( _removedEvent );
|
|
7482
|
-
|
|
7483
|
-
}
|
|
7484
|
-
|
|
7485
|
-
this.children.length = 0;
|
|
7486
|
-
|
|
7487
|
-
return this;
|
|
7488
|
-
|
|
7496
|
+
return this.remove( ... this.children );
|
|
7489
7497
|
|
|
7490
7498
|
}
|
|
7491
7499
|
|
|
@@ -8025,7 +8033,7 @@ class Object3D extends EventDispatcher {
|
|
|
8025
8033
|
this.frustumCulled = source.frustumCulled;
|
|
8026
8034
|
this.renderOrder = source.renderOrder;
|
|
8027
8035
|
|
|
8028
|
-
this.animations = source.animations;
|
|
8036
|
+
this.animations = source.animations.slice();
|
|
8029
8037
|
|
|
8030
8038
|
this.userData = JSON.parse( JSON.stringify( source.userData ) );
|
|
8031
8039
|
|
|
@@ -8376,7 +8384,7 @@ class Triangle {
|
|
|
8376
8384
|
|
|
8377
8385
|
}
|
|
8378
8386
|
|
|
8379
|
-
let
|
|
8387
|
+
let _materialId = 0;
|
|
8380
8388
|
|
|
8381
8389
|
class Material extends EventDispatcher {
|
|
8382
8390
|
|
|
@@ -8386,7 +8394,7 @@ class Material extends EventDispatcher {
|
|
|
8386
8394
|
|
|
8387
8395
|
this.isMaterial = true;
|
|
8388
8396
|
|
|
8389
|
-
Object.defineProperty( this, 'id', { value:
|
|
8397
|
+
Object.defineProperty( this, 'id', { value: _materialId ++ } );
|
|
8390
8398
|
|
|
8391
8399
|
this.uuid = generateUUID();
|
|
8392
8400
|
|
|
@@ -9917,6 +9925,26 @@ class BufferAttribute {
|
|
|
9917
9925
|
|
|
9918
9926
|
}
|
|
9919
9927
|
|
|
9928
|
+
getComponent( index, component ) {
|
|
9929
|
+
|
|
9930
|
+
let value = this.array[ index * this.itemSize + component ];
|
|
9931
|
+
|
|
9932
|
+
if ( this.normalized ) value = denormalize( value, this.array );
|
|
9933
|
+
|
|
9934
|
+
return value;
|
|
9935
|
+
|
|
9936
|
+
}
|
|
9937
|
+
|
|
9938
|
+
setComponent( index, component, value ) {
|
|
9939
|
+
|
|
9940
|
+
if ( this.normalized ) value = normalize( value, this.array );
|
|
9941
|
+
|
|
9942
|
+
this.array[ index * this.itemSize + component ] = value;
|
|
9943
|
+
|
|
9944
|
+
return this;
|
|
9945
|
+
|
|
9946
|
+
}
|
|
9947
|
+
|
|
9920
9948
|
getX( index ) {
|
|
9921
9949
|
|
|
9922
9950
|
let x = this.array[ index * this.itemSize ];
|
|
@@ -10335,7 +10363,7 @@ class Float64BufferAttribute extends BufferAttribute {
|
|
|
10335
10363
|
|
|
10336
10364
|
}
|
|
10337
10365
|
|
|
10338
|
-
let _id$
|
|
10366
|
+
let _id$2 = 0;
|
|
10339
10367
|
|
|
10340
10368
|
const _m1 = /*@__PURE__*/ new Matrix4();
|
|
10341
10369
|
const _obj = /*@__PURE__*/ new Object3D();
|
|
@@ -10352,7 +10380,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
10352
10380
|
|
|
10353
10381
|
this.isBufferGeometry = true;
|
|
10354
10382
|
|
|
10355
|
-
Object.defineProperty( this, 'id', { value: _id$
|
|
10383
|
+
Object.defineProperty( this, 'id', { value: _id$2 ++ } );
|
|
10356
10384
|
|
|
10357
10385
|
this.uuid = generateUUID();
|
|
10358
10386
|
|
|
@@ -11457,7 +11485,7 @@ class Mesh extends Object3D {
|
|
|
11457
11485
|
|
|
11458
11486
|
}
|
|
11459
11487
|
|
|
11460
|
-
this.material = source.material;
|
|
11488
|
+
this.material = Array.isArray( source.material ) ? source.material.slice() : source.material;
|
|
11461
11489
|
this.geometry = source.geometry;
|
|
11462
11490
|
|
|
11463
11491
|
return this;
|
|
@@ -12699,10 +12727,8 @@ class CubeCamera extends Object3D {
|
|
|
12699
12727
|
|
|
12700
12728
|
const currentRenderTarget = renderer.getRenderTarget();
|
|
12701
12729
|
|
|
12702
|
-
const currentToneMapping = renderer.toneMapping;
|
|
12703
12730
|
const currentXrEnabled = renderer.xr.enabled;
|
|
12704
12731
|
|
|
12705
|
-
renderer.toneMapping = NoToneMapping;
|
|
12706
12732
|
renderer.xr.enabled = false;
|
|
12707
12733
|
|
|
12708
12734
|
const generateMipmaps = renderTarget.texture.generateMipmaps;
|
|
@@ -12731,7 +12757,6 @@ class CubeCamera extends Object3D {
|
|
|
12731
12757
|
|
|
12732
12758
|
renderer.setRenderTarget( currentRenderTarget );
|
|
12733
12759
|
|
|
12734
|
-
renderer.toneMapping = currentToneMapping;
|
|
12735
12760
|
renderer.xr.enabled = currentXrEnabled;
|
|
12736
12761
|
|
|
12737
12762
|
renderTarget.texture.needsPMREMUpdate = true;
|
|
@@ -13654,7 +13679,7 @@ var beginnormal_vertex = "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGEN
|
|
|
13654
13679
|
|
|
13655
13680
|
var bsdfs = "float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated";
|
|
13656
13681
|
|
|
13657
|
-
var iridescence_fragment = "#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\
|
|
13682
|
+
var iridescence_fragment = "#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif";
|
|
13658
13683
|
|
|
13659
13684
|
var bumpmap_pars_fragment = "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif";
|
|
13660
13685
|
|
|
@@ -13750,7 +13775,7 @@ var logdepthbuf_pars_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_
|
|
|
13750
13775
|
|
|
13751
13776
|
var logdepthbuf_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif";
|
|
13752
13777
|
|
|
13753
|
-
var map_fragment = "#ifdef USE_MAP\n\
|
|
13778
|
+
var map_fragment = "#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif";
|
|
13754
13779
|
|
|
13755
13780
|
var map_pars_fragment = "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif";
|
|
13756
13781
|
|
|
@@ -13844,7 +13869,7 @@ var worldpos_vertex = "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defin
|
|
|
13844
13869
|
|
|
13845
13870
|
const vertex$h = "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}";
|
|
13846
13871
|
|
|
13847
|
-
const fragment$h = "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";
|
|
13872
|
+
const fragment$h = "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}";
|
|
13848
13873
|
|
|
13849
13874
|
const vertex$g = "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}";
|
|
13850
13875
|
|
|
@@ -14664,24 +14689,15 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
|
|
|
14664
14689
|
|
|
14665
14690
|
}
|
|
14666
14691
|
|
|
14667
|
-
const
|
|
14668
|
-
const environmentBlendMode = xr.getEnvironmentBlendMode();
|
|
14692
|
+
const environmentBlendMode = renderer.xr.getEnvironmentBlendMode();
|
|
14669
14693
|
|
|
14670
|
-
|
|
14694
|
+
if ( environmentBlendMode === 'additive' ) {
|
|
14671
14695
|
|
|
14672
|
-
|
|
14673
|
-
forceClear = true;
|
|
14674
|
-
break;
|
|
14696
|
+
state.buffers.color.setClear( 0, 0, 0, 1, premultipliedAlpha );
|
|
14675
14697
|
|
|
14676
|
-
|
|
14677
|
-
state.buffers.color.setClear( 0, 0, 0, 1, premultipliedAlpha );
|
|
14678
|
-
forceClear = true;
|
|
14679
|
-
break;
|
|
14698
|
+
} else if ( environmentBlendMode === 'alpha-blend' ) {
|
|
14680
14699
|
|
|
14681
|
-
|
|
14682
|
-
state.buffers.color.setClear( 0, 0, 0, 0, premultipliedAlpha );
|
|
14683
|
-
forceClear = true;
|
|
14684
|
-
break;
|
|
14700
|
+
state.buffers.color.setClear( 0, 0, 0, 0, premultipliedAlpha );
|
|
14685
14701
|
|
|
14686
14702
|
}
|
|
14687
14703
|
|
|
@@ -17282,7 +17298,7 @@ function WebGLGeometries( gl, attributes, info, bindingStates ) {
|
|
|
17282
17298
|
|
|
17283
17299
|
}
|
|
17284
17300
|
|
|
17285
|
-
} else {
|
|
17301
|
+
} else if ( geometryPosition !== undefined ) {
|
|
17286
17302
|
|
|
17287
17303
|
const array = geometryPosition.array;
|
|
17288
17304
|
version = geometryPosition.version;
|
|
@@ -17297,6 +17313,10 @@ function WebGLGeometries( gl, attributes, info, bindingStates ) {
|
|
|
17297
17313
|
|
|
17298
17314
|
}
|
|
17299
17315
|
|
|
17316
|
+
} else {
|
|
17317
|
+
|
|
17318
|
+
return;
|
|
17319
|
+
|
|
17300
17320
|
}
|
|
17301
17321
|
|
|
17302
17322
|
const attribute = new ( arrayNeedsUint32( indices ) ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
|
|
@@ -19792,6 +19812,8 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
|
|
|
19792
19812
|
|
|
19793
19813
|
parameters.useLegacyLights ? '#define LEGACY_LIGHTS' : '',
|
|
19794
19814
|
|
|
19815
|
+
parameters.decodeVideoTexture ? '#define DECODE_VIDEO_TEXTURE' : '',
|
|
19816
|
+
|
|
19795
19817
|
parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',
|
|
19796
19818
|
( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '',
|
|
19797
19819
|
|
|
@@ -20026,7 +20048,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
|
|
|
20026
20048
|
|
|
20027
20049
|
}
|
|
20028
20050
|
|
|
20029
|
-
let _id = 0;
|
|
20051
|
+
let _id$1 = 0;
|
|
20030
20052
|
|
|
20031
20053
|
class WebGLShaderCache {
|
|
20032
20054
|
|
|
@@ -20140,7 +20162,7 @@ class WebGLShaderStage {
|
|
|
20140
20162
|
|
|
20141
20163
|
constructor( code ) {
|
|
20142
20164
|
|
|
20143
|
-
this.id = _id ++;
|
|
20165
|
+
this.id = _id$1 ++;
|
|
20144
20166
|
|
|
20145
20167
|
this.code = code;
|
|
20146
20168
|
this.usedTimes = 0;
|
|
@@ -20304,6 +20326,18 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
20304
20326
|
const HAS_ATTRIBUTE_UV2 = !! geometry.attributes.uv2;
|
|
20305
20327
|
const HAS_ATTRIBUTE_UV3 = !! geometry.attributes.uv3;
|
|
20306
20328
|
|
|
20329
|
+
let toneMapping = NoToneMapping;
|
|
20330
|
+
|
|
20331
|
+
if ( material.toneMapped ) {
|
|
20332
|
+
|
|
20333
|
+
if ( currentRenderTarget === null || currentRenderTarget.isXRRenderTarget === true ) {
|
|
20334
|
+
|
|
20335
|
+
toneMapping = renderer.toneMapping;
|
|
20336
|
+
|
|
20337
|
+
}
|
|
20338
|
+
|
|
20339
|
+
}
|
|
20340
|
+
|
|
20307
20341
|
const parameters = {
|
|
20308
20342
|
|
|
20309
20343
|
isWebGL2: IS_WEBGL2,
|
|
@@ -20464,8 +20498,10 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
20464
20498
|
shadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,
|
|
20465
20499
|
shadowMapType: renderer.shadowMap.type,
|
|
20466
20500
|
|
|
20467
|
-
toneMapping:
|
|
20468
|
-
useLegacyLights: renderer.
|
|
20501
|
+
toneMapping: toneMapping,
|
|
20502
|
+
useLegacyLights: renderer._useLegacyLights,
|
|
20503
|
+
|
|
20504
|
+
decodeVideoTexture: HAS_MAP && ( material.map.isVideoTexture === true ) && ( material.map.colorSpace === SRGBColorSpace ),
|
|
20469
20505
|
|
|
20470
20506
|
premultipliedAlpha: material.premultipliedAlpha,
|
|
20471
20507
|
|
|
@@ -20668,6 +20704,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
20668
20704
|
_programLayers.enable( 17 );
|
|
20669
20705
|
if ( parameters.pointsUvs )
|
|
20670
20706
|
_programLayers.enable( 18 );
|
|
20707
|
+
if ( parameters.decodeVideoTexture )
|
|
20708
|
+
_programLayers.enable( 19 );
|
|
20671
20709
|
|
|
20672
20710
|
array.push( _programLayers.mask );
|
|
20673
20711
|
|
|
@@ -23637,6 +23675,17 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
23637
23675
|
|
|
23638
23676
|
}
|
|
23639
23677
|
|
|
23678
|
+
if ( glFormat === _gl.RED_INTEGER ) {
|
|
23679
|
+
|
|
23680
|
+
if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8UI;
|
|
23681
|
+
if ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.R16UI;
|
|
23682
|
+
if ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.R32UI;
|
|
23683
|
+
if ( glType === _gl.BYTE ) internalFormat = _gl.R8I;
|
|
23684
|
+
if ( glType === _gl.SHORT ) internalFormat = _gl.R16I;
|
|
23685
|
+
if ( glType === _gl.INT ) internalFormat = _gl.R32I;
|
|
23686
|
+
|
|
23687
|
+
}
|
|
23688
|
+
|
|
23640
23689
|
if ( glFormat === _gl.RG ) {
|
|
23641
23690
|
|
|
23642
23691
|
if ( glType === _gl.FLOAT ) internalFormat = _gl.RG32F;
|
|
@@ -23813,14 +23862,32 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
23813
23862
|
|
|
23814
23863
|
for ( let i = 0; i < 6; i ++ ) {
|
|
23815
23864
|
|
|
23816
|
-
|
|
23865
|
+
if ( Array.isArray( renderTargetProperties.__webglFramebuffer[ i ] ) ) {
|
|
23866
|
+
|
|
23867
|
+
for ( let level = 0; level < renderTargetProperties.__webglFramebuffer[ i ].length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ][ level ] );
|
|
23868
|
+
|
|
23869
|
+
} else {
|
|
23870
|
+
|
|
23871
|
+
_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ] );
|
|
23872
|
+
|
|
23873
|
+
}
|
|
23874
|
+
|
|
23817
23875
|
if ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer[ i ] );
|
|
23818
23876
|
|
|
23819
23877
|
}
|
|
23820
23878
|
|
|
23821
23879
|
} else {
|
|
23822
23880
|
|
|
23823
|
-
|
|
23881
|
+
if ( Array.isArray( renderTargetProperties.__webglFramebuffer ) ) {
|
|
23882
|
+
|
|
23883
|
+
for ( let level = 0; level < renderTargetProperties.__webglFramebuffer.length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ level ] );
|
|
23884
|
+
|
|
23885
|
+
} else {
|
|
23886
|
+
|
|
23887
|
+
_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer );
|
|
23888
|
+
|
|
23889
|
+
}
|
|
23890
|
+
|
|
23824
23891
|
if ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer );
|
|
23825
23892
|
if ( renderTargetProperties.__webglMultisampledFramebuffer ) _gl.deleteFramebuffer( renderTargetProperties.__webglMultisampledFramebuffer );
|
|
23826
23893
|
|
|
@@ -24199,7 +24266,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
24199
24266
|
glFormat = utils.convert( texture.format, texture.colorSpace );
|
|
24200
24267
|
|
|
24201
24268
|
let glType = utils.convert( texture.type ),
|
|
24202
|
-
glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace );
|
|
24269
|
+
glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace, texture.isVideoTexture );
|
|
24203
24270
|
|
|
24204
24271
|
setTextureParameters( textureType, texture, supportsMips );
|
|
24205
24272
|
|
|
@@ -24795,7 +24862,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
24795
24862
|
// Render targets
|
|
24796
24863
|
|
|
24797
24864
|
// Setup storage for target texture and bind it to correct framebuffer
|
|
24798
|
-
function setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget ) {
|
|
24865
|
+
function setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget, level ) {
|
|
24799
24866
|
|
|
24800
24867
|
const glFormat = utils.convert( texture.format, texture.colorSpace );
|
|
24801
24868
|
const glType = utils.convert( texture.type );
|
|
@@ -24804,13 +24871,16 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
24804
24871
|
|
|
24805
24872
|
if ( ! renderTargetProperties.__hasExternalTextures ) {
|
|
24806
24873
|
|
|
24874
|
+
const width = Math.max( 1, renderTarget.width >> level );
|
|
24875
|
+
const height = Math.max( 1, renderTarget.height >> level );
|
|
24876
|
+
|
|
24807
24877
|
if ( textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY ) {
|
|
24808
24878
|
|
|
24809
|
-
state.texImage3D( textureTarget,
|
|
24879
|
+
state.texImage3D( textureTarget, level, glInternalFormat, width, height, renderTarget.depth, 0, glFormat, glType, null );
|
|
24810
24880
|
|
|
24811
24881
|
} else {
|
|
24812
24882
|
|
|
24813
|
-
state.texImage2D( textureTarget,
|
|
24883
|
+
state.texImage2D( textureTarget, level, glInternalFormat, width, height, 0, glFormat, glType, null );
|
|
24814
24884
|
|
|
24815
24885
|
}
|
|
24816
24886
|
|
|
@@ -24824,7 +24894,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
24824
24894
|
|
|
24825
24895
|
} else if ( textureTarget === _gl.TEXTURE_2D || ( textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z ) ) { // see #24753
|
|
24826
24896
|
|
|
24827
|
-
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture,
|
|
24897
|
+
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, level );
|
|
24828
24898
|
|
|
24829
24899
|
}
|
|
24830
24900
|
|
|
@@ -25045,7 +25115,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25045
25115
|
|
|
25046
25116
|
if ( colorTexture !== undefined ) {
|
|
25047
25117
|
|
|
25048
|
-
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );
|
|
25118
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, 0 );
|
|
25049
25119
|
|
|
25050
25120
|
}
|
|
25051
25121
|
|
|
@@ -25092,13 +25162,41 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25092
25162
|
|
|
25093
25163
|
for ( let i = 0; i < 6; i ++ ) {
|
|
25094
25164
|
|
|
25095
|
-
|
|
25165
|
+
if ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {
|
|
25166
|
+
|
|
25167
|
+
renderTargetProperties.__webglFramebuffer[ i ] = [];
|
|
25168
|
+
|
|
25169
|
+
for ( let level = 0; level < texture.mipmaps.length; level ++ ) {
|
|
25170
|
+
|
|
25171
|
+
renderTargetProperties.__webglFramebuffer[ i ][ level ] = _gl.createFramebuffer();
|
|
25172
|
+
|
|
25173
|
+
}
|
|
25174
|
+
|
|
25175
|
+
} else {
|
|
25176
|
+
|
|
25177
|
+
renderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();
|
|
25178
|
+
|
|
25179
|
+
}
|
|
25096
25180
|
|
|
25097
25181
|
}
|
|
25098
25182
|
|
|
25099
25183
|
} else {
|
|
25100
25184
|
|
|
25101
|
-
|
|
25185
|
+
if ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {
|
|
25186
|
+
|
|
25187
|
+
renderTargetProperties.__webglFramebuffer = [];
|
|
25188
|
+
|
|
25189
|
+
for ( let level = 0; level < texture.mipmaps.length; level ++ ) {
|
|
25190
|
+
|
|
25191
|
+
renderTargetProperties.__webglFramebuffer[ level ] = _gl.createFramebuffer();
|
|
25192
|
+
|
|
25193
|
+
}
|
|
25194
|
+
|
|
25195
|
+
} else {
|
|
25196
|
+
|
|
25197
|
+
renderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();
|
|
25198
|
+
|
|
25199
|
+
}
|
|
25102
25200
|
|
|
25103
25201
|
if ( isMultipleRenderTargets ) {
|
|
25104
25202
|
|
|
@@ -25178,7 +25276,19 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25178
25276
|
|
|
25179
25277
|
for ( let i = 0; i < 6; i ++ ) {
|
|
25180
25278
|
|
|
25181
|
-
|
|
25279
|
+
if ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {
|
|
25280
|
+
|
|
25281
|
+
for ( let level = 0; level < texture.mipmaps.length; level ++ ) {
|
|
25282
|
+
|
|
25283
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ][ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level );
|
|
25284
|
+
|
|
25285
|
+
}
|
|
25286
|
+
|
|
25287
|
+
} else {
|
|
25288
|
+
|
|
25289
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0 );
|
|
25290
|
+
|
|
25291
|
+
}
|
|
25182
25292
|
|
|
25183
25293
|
}
|
|
25184
25294
|
|
|
@@ -25201,7 +25311,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25201
25311
|
|
|
25202
25312
|
state.bindTexture( _gl.TEXTURE_2D, attachmentProperties.__webglTexture );
|
|
25203
25313
|
setTextureParameters( _gl.TEXTURE_2D, attachment, supportsMips );
|
|
25204
|
-
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D );
|
|
25314
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, 0 );
|
|
25205
25315
|
|
|
25206
25316
|
if ( textureNeedsGenerateMipmaps( attachment, supportsMips ) ) {
|
|
25207
25317
|
|
|
@@ -25233,7 +25343,20 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25233
25343
|
|
|
25234
25344
|
state.bindTexture( glTextureType, textureProperties.__webglTexture );
|
|
25235
25345
|
setTextureParameters( glTextureType, texture, supportsMips );
|
|
25236
|
-
|
|
25346
|
+
|
|
25347
|
+
if ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {
|
|
25348
|
+
|
|
25349
|
+
for ( let level = 0; level < texture.mipmaps.length; level ++ ) {
|
|
25350
|
+
|
|
25351
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, level );
|
|
25352
|
+
|
|
25353
|
+
}
|
|
25354
|
+
|
|
25355
|
+
} else {
|
|
25356
|
+
|
|
25357
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, 0 );
|
|
25358
|
+
|
|
25359
|
+
}
|
|
25237
25360
|
|
|
25238
25361
|
if ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {
|
|
25239
25362
|
|
|
@@ -25422,13 +25545,13 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25422
25545
|
const format = texture.format;
|
|
25423
25546
|
const type = texture.type;
|
|
25424
25547
|
|
|
25425
|
-
if ( texture.isCompressedTexture === true || texture.format === _SRGBAFormat ) return image;
|
|
25548
|
+
if ( texture.isCompressedTexture === true || texture.isVideoTexture === true || texture.format === _SRGBAFormat ) return image;
|
|
25426
25549
|
|
|
25427
25550
|
if ( colorSpace !== LinearSRGBColorSpace && colorSpace !== NoColorSpace ) {
|
|
25428
25551
|
|
|
25429
25552
|
// sRGB
|
|
25430
25553
|
|
|
25431
|
-
if ( colorSpace === SRGBColorSpace ) {
|
|
25554
|
+
if ( colorSpace === SRGBColorSpace || colorSpace === DisplayP3ColorSpace ) {
|
|
25432
25555
|
|
|
25433
25556
|
if ( isWebGL2 === false ) {
|
|
25434
25557
|
|
|
@@ -25494,6 +25617,9 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25494
25617
|
|
|
25495
25618
|
}
|
|
25496
25619
|
|
|
25620
|
+
const LinearTransferFunction = 0;
|
|
25621
|
+
const SRGBTransferFunction = 1;
|
|
25622
|
+
|
|
25497
25623
|
function WebGLUtils( gl, extensions, capabilities ) {
|
|
25498
25624
|
|
|
25499
25625
|
const isWebGL2 = capabilities.isWebGL2;
|
|
@@ -25502,6 +25628,8 @@ function WebGLUtils( gl, extensions, capabilities ) {
|
|
|
25502
25628
|
|
|
25503
25629
|
let extension;
|
|
25504
25630
|
|
|
25631
|
+
const transferFunction = ( colorSpace === SRGBColorSpace || colorSpace === DisplayP3ColorSpace ) ? SRGBTransferFunction : LinearTransferFunction;
|
|
25632
|
+
|
|
25505
25633
|
if ( p === UnsignedByteType ) return gl.UNSIGNED_BYTE;
|
|
25506
25634
|
if ( p === UnsignedShort4444Type ) return gl.UNSIGNED_SHORT_4_4_4_4;
|
|
25507
25635
|
if ( p === UnsignedShort5551Type ) return gl.UNSIGNED_SHORT_5_5_5_1;
|
|
@@ -25568,7 +25696,7 @@ function WebGLUtils( gl, extensions, capabilities ) {
|
|
|
25568
25696
|
|
|
25569
25697
|
if ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format || p === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {
|
|
25570
25698
|
|
|
25571
|
-
if (
|
|
25699
|
+
if ( transferFunction === SRGBTransferFunction ) {
|
|
25572
25700
|
|
|
25573
25701
|
extension = extensions.get( 'WEBGL_compressed_texture_s3tc_srgb' );
|
|
25574
25702
|
|
|
@@ -25653,8 +25781,8 @@ function WebGLUtils( gl, extensions, capabilities ) {
|
|
|
25653
25781
|
|
|
25654
25782
|
if ( extension !== null ) {
|
|
25655
25783
|
|
|
25656
|
-
if ( p === RGB_ETC2_Format ) return (
|
|
25657
|
-
if ( p === RGBA_ETC2_EAC_Format ) return (
|
|
25784
|
+
if ( p === RGB_ETC2_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ETC2 : extension.COMPRESSED_RGB8_ETC2;
|
|
25785
|
+
if ( p === RGBA_ETC2_EAC_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : extension.COMPRESSED_RGBA8_ETC2_EAC;
|
|
25658
25786
|
|
|
25659
25787
|
} else {
|
|
25660
25788
|
|
|
@@ -25676,20 +25804,20 @@ function WebGLUtils( gl, extensions, capabilities ) {
|
|
|
25676
25804
|
|
|
25677
25805
|
if ( extension !== null ) {
|
|
25678
25806
|
|
|
25679
|
-
if ( p === RGBA_ASTC_4x4_Format ) return (
|
|
25680
|
-
if ( p === RGBA_ASTC_5x4_Format ) return (
|
|
25681
|
-
if ( p === RGBA_ASTC_5x5_Format ) return (
|
|
25682
|
-
if ( p === RGBA_ASTC_6x5_Format ) return (
|
|
25683
|
-
if ( p === RGBA_ASTC_6x6_Format ) return (
|
|
25684
|
-
if ( p === RGBA_ASTC_8x5_Format ) return (
|
|
25685
|
-
if ( p === RGBA_ASTC_8x6_Format ) return (
|
|
25686
|
-
if ( p === RGBA_ASTC_8x8_Format ) return (
|
|
25687
|
-
if ( p === RGBA_ASTC_10x5_Format ) return (
|
|
25688
|
-
if ( p === RGBA_ASTC_10x6_Format ) return (
|
|
25689
|
-
if ( p === RGBA_ASTC_10x8_Format ) return (
|
|
25690
|
-
if ( p === RGBA_ASTC_10x10_Format ) return (
|
|
25691
|
-
if ( p === RGBA_ASTC_12x10_Format ) return (
|
|
25692
|
-
if ( p === RGBA_ASTC_12x12_Format ) return (
|
|
25807
|
+
if ( p === RGBA_ASTC_4x4_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : extension.COMPRESSED_RGBA_ASTC_4x4_KHR;
|
|
25808
|
+
if ( p === RGBA_ASTC_5x4_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : extension.COMPRESSED_RGBA_ASTC_5x4_KHR;
|
|
25809
|
+
if ( p === RGBA_ASTC_5x5_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : extension.COMPRESSED_RGBA_ASTC_5x5_KHR;
|
|
25810
|
+
if ( p === RGBA_ASTC_6x5_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : extension.COMPRESSED_RGBA_ASTC_6x5_KHR;
|
|
25811
|
+
if ( p === RGBA_ASTC_6x6_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : extension.COMPRESSED_RGBA_ASTC_6x6_KHR;
|
|
25812
|
+
if ( p === RGBA_ASTC_8x5_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : extension.COMPRESSED_RGBA_ASTC_8x5_KHR;
|
|
25813
|
+
if ( p === RGBA_ASTC_8x6_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : extension.COMPRESSED_RGBA_ASTC_8x6_KHR;
|
|
25814
|
+
if ( p === RGBA_ASTC_8x8_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : extension.COMPRESSED_RGBA_ASTC_8x8_KHR;
|
|
25815
|
+
if ( p === RGBA_ASTC_10x5_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : extension.COMPRESSED_RGBA_ASTC_10x5_KHR;
|
|
25816
|
+
if ( p === RGBA_ASTC_10x6_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : extension.COMPRESSED_RGBA_ASTC_10x6_KHR;
|
|
25817
|
+
if ( p === RGBA_ASTC_10x8_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : extension.COMPRESSED_RGBA_ASTC_10x8_KHR;
|
|
25818
|
+
if ( p === RGBA_ASTC_10x10_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : extension.COMPRESSED_RGBA_ASTC_10x10_KHR;
|
|
25819
|
+
if ( p === RGBA_ASTC_12x10_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : extension.COMPRESSED_RGBA_ASTC_12x10_KHR;
|
|
25820
|
+
if ( p === RGBA_ASTC_12x12_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : extension.COMPRESSED_RGBA_ASTC_12x12_KHR;
|
|
25693
25821
|
|
|
25694
25822
|
} else {
|
|
25695
25823
|
|
|
@@ -25701,13 +25829,15 @@ function WebGLUtils( gl, extensions, capabilities ) {
|
|
|
25701
25829
|
|
|
25702
25830
|
// BPTC
|
|
25703
25831
|
|
|
25704
|
-
if ( p === RGBA_BPTC_Format ) {
|
|
25832
|
+
if ( p === RGBA_BPTC_Format || p === RGB_BPTC_SIGNED_Format || p === RGB_BPTC_UNSIGNED_Format ) {
|
|
25705
25833
|
|
|
25706
25834
|
extension = extensions.get( 'EXT_texture_compression_bptc' );
|
|
25707
25835
|
|
|
25708
25836
|
if ( extension !== null ) {
|
|
25709
25837
|
|
|
25710
|
-
if ( p === RGBA_BPTC_Format ) return (
|
|
25838
|
+
if ( p === RGBA_BPTC_Format ) return ( transferFunction === SRGBTransferFunction ) ? extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : extension.COMPRESSED_RGBA_BPTC_UNORM_EXT;
|
|
25839
|
+
if ( p === RGB_BPTC_SIGNED_Format ) return extension.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;
|
|
25840
|
+
if ( p === RGB_BPTC_UNSIGNED_Format ) return extension.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT;
|
|
25711
25841
|
|
|
25712
25842
|
} else {
|
|
25713
25843
|
|
|
@@ -27748,7 +27878,7 @@ function WebGLMaterials( renderer, properties ) {
|
|
|
27748
27878
|
uniforms.lightMap.value = material.lightMap;
|
|
27749
27879
|
|
|
27750
27880
|
// artist-friendly light intensity scaling factor
|
|
27751
|
-
const scaleFactor = ( renderer.
|
|
27881
|
+
const scaleFactor = ( renderer._useLegacyLights === true ) ? Math.PI : 1;
|
|
27752
27882
|
|
|
27753
27883
|
uniforms.lightMapIntensity.value = material.lightMapIntensity * scaleFactor;
|
|
27754
27884
|
|
|
@@ -28495,14 +28625,6 @@ function WebGLUniformsGroups( gl, info, capabilities, state ) {
|
|
|
28495
28625
|
|
|
28496
28626
|
}
|
|
28497
28627
|
|
|
28498
|
-
function createCanvasElement() {
|
|
28499
|
-
|
|
28500
|
-
const canvas = createElementNS( 'canvas' );
|
|
28501
|
-
canvas.style.display = 'block';
|
|
28502
|
-
return canvas;
|
|
28503
|
-
|
|
28504
|
-
}
|
|
28505
|
-
|
|
28506
28628
|
class WebGLRenderer {
|
|
28507
28629
|
|
|
28508
28630
|
constructor( parameters = {} ) {
|
|
@@ -28587,7 +28709,7 @@ class WebGLRenderer {
|
|
|
28587
28709
|
|
|
28588
28710
|
// physical lights
|
|
28589
28711
|
|
|
28590
|
-
this.
|
|
28712
|
+
this._useLegacyLights = false;
|
|
28591
28713
|
|
|
28592
28714
|
// tone mapping
|
|
28593
28715
|
|
|
@@ -29230,6 +29352,9 @@ class WebGLRenderer {
|
|
|
29230
29352
|
if ( material.wireframe === true ) {
|
|
29231
29353
|
|
|
29232
29354
|
index = geometries.getWireframeAttribute( geometry );
|
|
29355
|
+
|
|
29356
|
+
if ( index === undefined ) return;
|
|
29357
|
+
|
|
29233
29358
|
rangeFactor = 2;
|
|
29234
29359
|
|
|
29235
29360
|
}
|
|
@@ -29394,7 +29519,7 @@ class WebGLRenderer {
|
|
|
29394
29519
|
|
|
29395
29520
|
} );
|
|
29396
29521
|
|
|
29397
|
-
currentRenderState.setupLights( _this.
|
|
29522
|
+
currentRenderState.setupLights( _this._useLegacyLights );
|
|
29398
29523
|
|
|
29399
29524
|
scene.traverse( function ( object ) {
|
|
29400
29525
|
|
|
@@ -29547,7 +29672,7 @@ class WebGLRenderer {
|
|
|
29547
29672
|
|
|
29548
29673
|
// render scene
|
|
29549
29674
|
|
|
29550
|
-
currentRenderState.setupLights( _this.
|
|
29675
|
+
currentRenderState.setupLights( _this._useLegacyLights );
|
|
29551
29676
|
|
|
29552
29677
|
if ( camera.isArrayCamera ) {
|
|
29553
29678
|
|
|
@@ -30041,6 +30166,7 @@ class WebGLRenderer {
|
|
|
30041
30166
|
|
|
30042
30167
|
materialProperties.outputColorSpace = parameters.outputColorSpace;
|
|
30043
30168
|
materialProperties.instancing = parameters.instancing;
|
|
30169
|
+
materialProperties.instancingColor = parameters.instancingColor;
|
|
30044
30170
|
materialProperties.skinning = parameters.skinning;
|
|
30045
30171
|
materialProperties.morphTargets = parameters.morphTargets;
|
|
30046
30172
|
materialProperties.morphNormals = parameters.morphNormals;
|
|
@@ -30069,7 +30195,18 @@ class WebGLRenderer {
|
|
|
30069
30195
|
const morphTargets = !! geometry.morphAttributes.position;
|
|
30070
30196
|
const morphNormals = !! geometry.morphAttributes.normal;
|
|
30071
30197
|
const morphColors = !! geometry.morphAttributes.color;
|
|
30072
|
-
|
|
30198
|
+
|
|
30199
|
+
let toneMapping = NoToneMapping;
|
|
30200
|
+
|
|
30201
|
+
if ( material.toneMapped ) {
|
|
30202
|
+
|
|
30203
|
+
if ( _currentRenderTarget === null || _currentRenderTarget.isXRRenderTarget === true ) {
|
|
30204
|
+
|
|
30205
|
+
toneMapping = _this.toneMapping;
|
|
30206
|
+
|
|
30207
|
+
}
|
|
30208
|
+
|
|
30209
|
+
}
|
|
30073
30210
|
|
|
30074
30211
|
const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;
|
|
30075
30212
|
const morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0;
|
|
@@ -30124,6 +30261,14 @@ class WebGLRenderer {
|
|
|
30124
30261
|
|
|
30125
30262
|
needsProgramChange = true;
|
|
30126
30263
|
|
|
30264
|
+
} else if ( object.isInstancedMesh && materialProperties.instancingColor === true && object.instanceColor === null ) {
|
|
30265
|
+
|
|
30266
|
+
needsProgramChange = true;
|
|
30267
|
+
|
|
30268
|
+
} else if ( object.isInstancedMesh && materialProperties.instancingColor === false && object.instanceColor !== null ) {
|
|
30269
|
+
|
|
30270
|
+
needsProgramChange = true;
|
|
30271
|
+
|
|
30127
30272
|
} else if ( materialProperties.envMap !== envMap ) {
|
|
30128
30273
|
|
|
30129
30274
|
needsProgramChange = true;
|
|
@@ -30210,48 +30355,28 @@ class WebGLRenderer {
|
|
|
30210
30355
|
|
|
30211
30356
|
if ( refreshProgram || _currentCamera !== camera ) {
|
|
30212
30357
|
|
|
30213
|
-
|
|
30214
|
-
|
|
30215
|
-
if ( capabilities.logarithmicDepthBuffer ) {
|
|
30216
|
-
|
|
30217
|
-
p_uniforms.setValue( _gl, 'logDepthBufFC',
|
|
30218
|
-
2.0 / ( Math.log( camera.far + 1.0 ) / Math.LN2 ) );
|
|
30219
|
-
|
|
30220
|
-
}
|
|
30358
|
+
// common camera uniforms
|
|
30221
30359
|
|
|
30222
|
-
|
|
30360
|
+
p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix );
|
|
30361
|
+
p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse );
|
|
30223
30362
|
|
|
30224
|
-
|
|
30363
|
+
const uCamPos = p_uniforms.map.cameraPosition;
|
|
30225
30364
|
|
|
30226
|
-
|
|
30227
|
-
// now, in case this material supports lights - or later, when
|
|
30228
|
-
// the next material that does gets activated:
|
|
30365
|
+
if ( uCamPos !== undefined ) {
|
|
30229
30366
|
|
|
30230
|
-
|
|
30231
|
-
refreshLights = true; // remains set until update done
|
|
30367
|
+
uCamPos.setValue( _gl, _vector3.setFromMatrixPosition( camera.matrixWorld ) );
|
|
30232
30368
|
|
|
30233
30369
|
}
|
|
30234
30370
|
|
|
30235
|
-
|
|
30236
|
-
// (shader material also gets them for the sake of genericity)
|
|
30237
|
-
|
|
30238
|
-
if ( material.isShaderMaterial ||
|
|
30239
|
-
material.isMeshPhongMaterial ||
|
|
30240
|
-
material.isMeshToonMaterial ||
|
|
30241
|
-
material.isMeshStandardMaterial ||
|
|
30242
|
-
material.envMap ) {
|
|
30243
|
-
|
|
30244
|
-
const uCamPos = p_uniforms.map.cameraPosition;
|
|
30245
|
-
|
|
30246
|
-
if ( uCamPos !== undefined ) {
|
|
30247
|
-
|
|
30248
|
-
uCamPos.setValue( _gl,
|
|
30249
|
-
_vector3.setFromMatrixPosition( camera.matrixWorld ) );
|
|
30371
|
+
if ( capabilities.logarithmicDepthBuffer ) {
|
|
30250
30372
|
|
|
30251
|
-
|
|
30373
|
+
p_uniforms.setValue( _gl, 'logDepthBufFC',
|
|
30374
|
+
2.0 / ( Math.log( camera.far + 1.0 ) / Math.LN2 ) );
|
|
30252
30375
|
|
|
30253
30376
|
}
|
|
30254
30377
|
|
|
30378
|
+
// consider moving isOrthographic to UniformLib and WebGLMaterials, see https://github.com/mrdoob/three.js/pull/26467#issuecomment-1645185067
|
|
30379
|
+
|
|
30255
30380
|
if ( material.isMeshPhongMaterial ||
|
|
30256
30381
|
material.isMeshToonMaterial ||
|
|
30257
30382
|
material.isMeshLambertMaterial ||
|
|
@@ -30263,16 +30388,16 @@ class WebGLRenderer {
|
|
|
30263
30388
|
|
|
30264
30389
|
}
|
|
30265
30390
|
|
|
30266
|
-
if (
|
|
30267
|
-
|
|
30268
|
-
|
|
30269
|
-
|
|
30270
|
-
|
|
30271
|
-
material
|
|
30272
|
-
material
|
|
30273
|
-
object.isSkinnedMesh ) {
|
|
30391
|
+
if ( _currentCamera !== camera ) {
|
|
30392
|
+
|
|
30393
|
+
_currentCamera = camera;
|
|
30394
|
+
|
|
30395
|
+
// lighting uniforms depend on the camera so enforce an update
|
|
30396
|
+
// now, in case this material supports lights - or later, when
|
|
30397
|
+
// the next material that does gets activated:
|
|
30274
30398
|
|
|
30275
|
-
|
|
30399
|
+
refreshMaterial = true; // set to true on material change
|
|
30400
|
+
refreshLights = true; // remains set until update done
|
|
30276
30401
|
|
|
30277
30402
|
}
|
|
30278
30403
|
|
|
@@ -30565,7 +30690,16 @@ class WebGLRenderer {
|
|
|
30565
30690
|
|
|
30566
30691
|
if ( renderTarget.isWebGLCubeRenderTarget ) {
|
|
30567
30692
|
|
|
30568
|
-
|
|
30693
|
+
if ( Array.isArray( __webglFramebuffer[ activeCubeFace ] ) ) {
|
|
30694
|
+
|
|
30695
|
+
framebuffer = __webglFramebuffer[ activeCubeFace ][ activeMipmapLevel ];
|
|
30696
|
+
|
|
30697
|
+
} else {
|
|
30698
|
+
|
|
30699
|
+
framebuffer = __webglFramebuffer[ activeCubeFace ];
|
|
30700
|
+
|
|
30701
|
+
}
|
|
30702
|
+
|
|
30569
30703
|
isCube = true;
|
|
30570
30704
|
|
|
30571
30705
|
} else if ( ( capabilities.isWebGL2 && renderTarget.samples > 0 ) && textures.useMultisampledRTT( renderTarget ) === false ) {
|
|
@@ -30574,7 +30708,15 @@ class WebGLRenderer {
|
|
|
30574
30708
|
|
|
30575
30709
|
} else {
|
|
30576
30710
|
|
|
30577
|
-
|
|
30711
|
+
if ( Array.isArray( __webglFramebuffer ) ) {
|
|
30712
|
+
|
|
30713
|
+
framebuffer = __webglFramebuffer[ activeMipmapLevel ];
|
|
30714
|
+
|
|
30715
|
+
} else {
|
|
30716
|
+
|
|
30717
|
+
framebuffer = __webglFramebuffer;
|
|
30718
|
+
|
|
30719
|
+
}
|
|
30578
30720
|
|
|
30579
30721
|
}
|
|
30580
30722
|
|
|
@@ -30873,14 +31015,14 @@ class WebGLRenderer {
|
|
|
30873
31015
|
|
|
30874
31016
|
get physicallyCorrectLights() { // @deprecated, r150
|
|
30875
31017
|
|
|
30876
|
-
console.warn( 'THREE.WebGLRenderer:
|
|
31018
|
+
console.warn( 'THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.' );
|
|
30877
31019
|
return ! this.useLegacyLights;
|
|
30878
31020
|
|
|
30879
31021
|
}
|
|
30880
31022
|
|
|
30881
31023
|
set physicallyCorrectLights( value ) { // @deprecated, r150
|
|
30882
31024
|
|
|
30883
|
-
console.warn( 'THREE.WebGLRenderer:
|
|
31025
|
+
console.warn( 'THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.' );
|
|
30884
31026
|
this.useLegacyLights = ! value;
|
|
30885
31027
|
|
|
30886
31028
|
}
|
|
@@ -30899,6 +31041,20 @@ class WebGLRenderer {
|
|
|
30899
31041
|
|
|
30900
31042
|
}
|
|
30901
31043
|
|
|
31044
|
+
get useLegacyLights() { // @deprecated, r155
|
|
31045
|
+
|
|
31046
|
+
console.warn( 'THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.' );
|
|
31047
|
+
return this._useLegacyLights;
|
|
31048
|
+
|
|
31049
|
+
}
|
|
31050
|
+
|
|
31051
|
+
set useLegacyLights( value ) { // @deprecated, r155
|
|
31052
|
+
|
|
31053
|
+
console.warn( 'THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.' );
|
|
31054
|
+
this._useLegacyLights = value;
|
|
31055
|
+
|
|
31056
|
+
}
|
|
31057
|
+
|
|
30902
31058
|
}
|
|
30903
31059
|
|
|
30904
31060
|
class WebGL1Renderer extends WebGLRenderer {}
|
|
@@ -32798,7 +32954,7 @@ class Line extends Object3D {
|
|
|
32798
32954
|
|
|
32799
32955
|
super.copy( source, recursive );
|
|
32800
32956
|
|
|
32801
|
-
this.material = source.material;
|
|
32957
|
+
this.material = Array.isArray( source.material ) ? source.material.slice() : source.material;
|
|
32802
32958
|
this.geometry = source.geometry;
|
|
32803
32959
|
|
|
32804
32960
|
return this;
|
|
@@ -33119,7 +33275,7 @@ class Points extends Object3D {
|
|
|
33119
33275
|
|
|
33120
33276
|
super.copy( source, recursive );
|
|
33121
33277
|
|
|
33122
|
-
this.material = source.material;
|
|
33278
|
+
this.material = Array.isArray( source.material ) ? source.material.slice() : source.material;
|
|
33123
33279
|
this.geometry = source.geometry;
|
|
33124
33280
|
|
|
33125
33281
|
return this;
|
|
@@ -33359,6 +33515,21 @@ class CompressedArrayTexture extends CompressedTexture {
|
|
|
33359
33515
|
|
|
33360
33516
|
}
|
|
33361
33517
|
|
|
33518
|
+
class CompressedCubeTexture extends CompressedTexture {
|
|
33519
|
+
|
|
33520
|
+
constructor( images, format, type ) {
|
|
33521
|
+
|
|
33522
|
+
super( undefined, images[ 0 ].width, images[ 0 ].height, format, type, CubeReflectionMapping );
|
|
33523
|
+
|
|
33524
|
+
this.isCompressedCubeTexture = true;
|
|
33525
|
+
this.isCubeTexture = true;
|
|
33526
|
+
|
|
33527
|
+
this.image = images;
|
|
33528
|
+
|
|
33529
|
+
}
|
|
33530
|
+
|
|
33531
|
+
}
|
|
33532
|
+
|
|
33362
33533
|
class CanvasTexture extends Texture {
|
|
33363
33534
|
|
|
33364
33535
|
constructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
|
|
@@ -35469,7 +35640,7 @@ class CapsuleGeometry extends LatheGeometry {
|
|
|
35469
35640
|
|
|
35470
35641
|
this.parameters = {
|
|
35471
35642
|
radius: radius,
|
|
35472
|
-
|
|
35643
|
+
length: length,
|
|
35473
35644
|
capSegments: capSegments,
|
|
35474
35645
|
radialSegments: radialSegments,
|
|
35475
35646
|
};
|
|
@@ -42919,9 +43090,26 @@ class DataTextureLoader extends Loader {
|
|
|
42919
43090
|
loader.setWithCredentials( scope.withCredentials );
|
|
42920
43091
|
loader.load( url, function ( buffer ) {
|
|
42921
43092
|
|
|
42922
|
-
|
|
43093
|
+
let texData;
|
|
43094
|
+
|
|
43095
|
+
try {
|
|
43096
|
+
|
|
43097
|
+
texData = scope.parse( buffer );
|
|
43098
|
+
|
|
43099
|
+
} catch ( error ) {
|
|
42923
43100
|
|
|
42924
|
-
|
|
43101
|
+
if ( onError !== undefined ) {
|
|
43102
|
+
|
|
43103
|
+
onError( error );
|
|
43104
|
+
|
|
43105
|
+
} else {
|
|
43106
|
+
|
|
43107
|
+
console.error( error );
|
|
43108
|
+
return;
|
|
43109
|
+
|
|
43110
|
+
}
|
|
43111
|
+
|
|
43112
|
+
}
|
|
42925
43113
|
|
|
42926
43114
|
if ( texData.image !== undefined ) {
|
|
42927
43115
|
|
|
@@ -46343,6 +46531,12 @@ class Audio extends Object3D {
|
|
|
46343
46531
|
|
|
46344
46532
|
disconnect() {
|
|
46345
46533
|
|
|
46534
|
+
if ( this._connected === false ) {
|
|
46535
|
+
|
|
46536
|
+
return;
|
|
46537
|
+
|
|
46538
|
+
}
|
|
46539
|
+
|
|
46346
46540
|
if ( this.filters.length > 0 ) {
|
|
46347
46541
|
|
|
46348
46542
|
this.source.disconnect( this.filters[ 0 ] );
|
|
@@ -47458,7 +47652,7 @@ class PropertyBinding {
|
|
|
47458
47652
|
// ensure there is a value node
|
|
47459
47653
|
if ( ! targetObject ) {
|
|
47460
47654
|
|
|
47461
|
-
console.
|
|
47655
|
+
console.warn( 'THREE.PropertyBinding: No target node found for track: ' + this.path + '.' );
|
|
47462
47656
|
return;
|
|
47463
47657
|
|
|
47464
47658
|
}
|
|
@@ -49591,7 +49785,7 @@ class Uniform {
|
|
|
49591
49785
|
|
|
49592
49786
|
}
|
|
49593
49787
|
|
|
49594
|
-
let
|
|
49788
|
+
let _id = 0;
|
|
49595
49789
|
|
|
49596
49790
|
class UniformsGroup extends EventDispatcher {
|
|
49597
49791
|
|
|
@@ -49601,7 +49795,7 @@ class UniformsGroup extends EventDispatcher {
|
|
|
49601
49795
|
|
|
49602
49796
|
this.isUniformsGroup = true;
|
|
49603
49797
|
|
|
49604
|
-
Object.defineProperty( this, 'id', { value:
|
|
49798
|
+
Object.defineProperty( this, 'id', { value: _id ++ } );
|
|
49605
49799
|
|
|
49606
49800
|
this.name = '';
|
|
49607
49801
|
|
|
@@ -51869,4 +52063,4 @@ if ( typeof window !== 'undefined' ) {
|
|
|
51869
52063
|
|
|
51870
52064
|
}
|
|
51871
52065
|
|
|
51872
|
-
export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AmbientLightProbe, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedArrayTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DisplayP3ColorSpace, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, Float64BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, HemisphereLightProbe, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearEncoding, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, MOUSE, Material, MaterialLoader, MathUtils, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, Scene, ShaderChunk, ShaderLib, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry, Texture, TextureLoader, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, TwoPassDoubleSide, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoTexture, WebGL1Renderer, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLRenderTarget, WebGLRenderer, WebGLUtils, WebGPUCoordinateSystem, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, _SRGBAFormat, sRGBEncoding };
|
|
52066
|
+
export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AmbientLightProbe, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DisplayP3ColorSpace, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, Float64BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, HemisphereLightProbe, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearDisplayP3ColorSpace, LinearEncoding, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, MOUSE, Material, MaterialLoader, MathUtils, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, Scene, ShaderChunk, ShaderLib, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry, Texture, TextureLoader, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, TwoPassDoubleSide, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoTexture, WebGL1Renderer, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLRenderTarget, WebGLRenderer, WebGLUtils, WebGPUCoordinateSystem, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, _SRGBAFormat, createCanvasElement, sRGBEncoding };
|