super-three 0.154.1 → 0.155.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 +256 -38
- package/build/three.js +256 -38
- package/build/three.min.js +1 -1
- package/build/three.module.js +255 -39
- package/build/three.module.min.js +1 -1
- package/examples/jsm/controls/OrbitControls.js +143 -21
- 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/loaders/FBXLoader.js +1 -1
- package/examples/jsm/loaders/GLTFLoader.js +8 -3
- package/examples/jsm/loaders/KTX2Loader.js +4 -4
- package/examples/jsm/loaders/LDrawLoader.js +1 -1
- package/examples/jsm/loaders/NRRDLoader.js +3 -3
- package/examples/jsm/loaders/PLYLoader.js +1 -1
- 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 +5 -6
- package/examples/jsm/nodes/accessors/BufferAttributeNode.js +1 -1
- package/examples/jsm/nodes/accessors/CubeTextureNode.js +2 -0
- package/examples/jsm/nodes/accessors/ExtendedMaterialNode.js +14 -1
- package/examples/jsm/nodes/accessors/InstanceNode.js +8 -8
- package/examples/jsm/nodes/accessors/MaterialNode.js +34 -44
- package/examples/jsm/nodes/accessors/SceneNode.js +6 -0
- package/examples/jsm/nodes/accessors/TextureNode.js +48 -7
- package/examples/jsm/nodes/core/LightingModel.js +7 -9
- package/examples/jsm/nodes/core/Node.js +11 -2
- package/examples/jsm/nodes/core/PropertyNode.js +4 -0
- package/examples/jsm/nodes/display/BumpMapNode.js +77 -0
- package/examples/jsm/nodes/display/NormalMapNode.js +2 -2
- 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/Materials.js +1 -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 +50 -24
- package/examples/jsm/nodes/materials/SpriteNodeMaterial.js +2 -2
- package/examples/jsm/nodes/shadernode/ShaderNode.js +2 -2
- 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/MaskPass.js +4 -1
- package/examples/jsm/postprocessing/OutputPass.js +33 -14
- package/examples/jsm/postprocessing/UnrealBloomPass.js +21 -17
- package/examples/jsm/renderers/common/Background.js +22 -20
- package/examples/jsm/renderers/common/Binding.js +8 -0
- package/examples/jsm/renderers/common/Bindings.js +2 -6
- package/examples/jsm/renderers/common/Geometries.js +1 -1
- package/examples/jsm/renderers/common/Pipelines.js +94 -45
- package/examples/jsm/renderers/common/RenderContext.js +1 -0
- package/examples/jsm/renderers/common/RenderContexts.js +16 -5
- package/examples/jsm/renderers/common/RenderObject.js +20 -4
- package/examples/jsm/renderers/common/RenderObjects.js +10 -7
- package/examples/jsm/renderers/common/Renderer.js +70 -39
- package/examples/jsm/renderers/common/Textures.js +20 -8
- package/examples/jsm/renderers/common/nodes/Nodes.js +15 -4
- package/examples/jsm/renderers/webgpu/WebGPUBackend.js +51 -54
- package/examples/jsm/renderers/webgpu/nodes/WGSLNodeBuilder.js +33 -9
- package/examples/jsm/renderers/webgpu/utils/WebGPUAttributeUtils.js +55 -36
- package/examples/jsm/renderers/webgpu/utils/WebGPUBindingUtils.js +83 -5
- package/examples/jsm/renderers/webgpu/utils/WebGPUConstants.js +24 -22
- package/examples/jsm/renderers/webgpu/utils/WebGPUPipelineUtils.js +83 -130
- package/examples/jsm/renderers/webgpu/utils/WebGPUTextureUtils.js +35 -8
- package/examples/jsm/renderers/webgpu/utils/WebGPUUtils.js +1 -1
- package/examples/jsm/shaders/OutputShader.js +19 -2
- 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 +2 -0
- package/src/animation/PropertyBinding.js +1 -1
- package/src/cameras/CubeCamera.js +1 -4
- package/src/constants.js +1 -1
- package/src/core/BufferAttribute.js +20 -0
- package/src/core/Object3D.js +1 -1
- package/src/core/RenderTarget.js +122 -0
- package/src/geometries/CapsuleGeometry.js +1 -1
- package/src/loaders/DataTextureLoader.js +21 -2
- package/src/renderers/WebGLMultipleRenderTargets.js +0 -2
- package/src/renderers/WebGLRenderTarget.js +3 -110
- package/src/renderers/WebGLRenderer.js +62 -8
- package/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.js +1 -2
- package/src/renderers/webgl/WebGLGeometries.js +5 -1
- package/src/renderers/webgl/WebGLMaterials.js +1 -1
- package/src/renderers/webgl/WebGLPrograms.js +14 -2
- package/src/renderers/webgl/WebGLTextures.js +97 -12
- package/src/textures/CompressedCubeTexture.js +19 -0
- 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/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 = '155';
|
|
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 };
|
|
@@ -2883,13 +2883,13 @@ class Vector4 {
|
|
|
2883
2883
|
* Texture parameters for an auto-generated target texture
|
|
2884
2884
|
* depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers
|
|
2885
2885
|
*/
|
|
2886
|
-
class
|
|
2886
|
+
class RenderTarget extends EventDispatcher {
|
|
2887
2887
|
|
|
2888
2888
|
constructor( width = 1, height = 1, options = {} ) {
|
|
2889
2889
|
|
|
2890
2890
|
super();
|
|
2891
2891
|
|
|
2892
|
-
this.
|
|
2892
|
+
this.isRenderTarget = true;
|
|
2893
2893
|
|
|
2894
2894
|
this.width = width;
|
|
2895
2895
|
this.height = height;
|
|
@@ -2992,6 +2992,18 @@ class WebGLRenderTarget extends EventDispatcher {
|
|
|
2992
2992
|
|
|
2993
2993
|
}
|
|
2994
2994
|
|
|
2995
|
+
class WebGLRenderTarget extends RenderTarget {
|
|
2996
|
+
|
|
2997
|
+
constructor( width = 1, height = 1, options = {} ) {
|
|
2998
|
+
|
|
2999
|
+
super( width, height, options );
|
|
3000
|
+
|
|
3001
|
+
this.isWebGLRenderTarget = true;
|
|
3002
|
+
|
|
3003
|
+
}
|
|
3004
|
+
|
|
3005
|
+
}
|
|
3006
|
+
|
|
2995
3007
|
class DataArrayTexture extends Texture {
|
|
2996
3008
|
|
|
2997
3009
|
constructor( data = null, width = 1, height = 1, depth = 1 ) {
|
|
@@ -3126,8 +3138,6 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
|
|
|
3126
3138
|
this.viewport.set( 0, 0, width, height );
|
|
3127
3139
|
this.scissor.set( 0, 0, width, height );
|
|
3128
3140
|
|
|
3129
|
-
return this;
|
|
3130
|
-
|
|
3131
3141
|
}
|
|
3132
3142
|
|
|
3133
3143
|
copy( source ) {
|
|
@@ -8025,7 +8035,7 @@ class Object3D extends EventDispatcher {
|
|
|
8025
8035
|
this.frustumCulled = source.frustumCulled;
|
|
8026
8036
|
this.renderOrder = source.renderOrder;
|
|
8027
8037
|
|
|
8028
|
-
this.animations = source.animations;
|
|
8038
|
+
this.animations = source.animations.slice();
|
|
8029
8039
|
|
|
8030
8040
|
this.userData = JSON.parse( JSON.stringify( source.userData ) );
|
|
8031
8041
|
|
|
@@ -9917,6 +9927,26 @@ class BufferAttribute {
|
|
|
9917
9927
|
|
|
9918
9928
|
}
|
|
9919
9929
|
|
|
9930
|
+
getComponent( index, component ) {
|
|
9931
|
+
|
|
9932
|
+
let value = this.array[ index * this.itemSize + component ];
|
|
9933
|
+
|
|
9934
|
+
if ( this.normalized ) value = denormalize( value, this.array );
|
|
9935
|
+
|
|
9936
|
+
return value;
|
|
9937
|
+
|
|
9938
|
+
}
|
|
9939
|
+
|
|
9940
|
+
setComponent( index, component, value ) {
|
|
9941
|
+
|
|
9942
|
+
if ( this.normalized ) value = normalize( value, this.array );
|
|
9943
|
+
|
|
9944
|
+
this.array[ index * this.itemSize + component ] = value;
|
|
9945
|
+
|
|
9946
|
+
return this;
|
|
9947
|
+
|
|
9948
|
+
}
|
|
9949
|
+
|
|
9920
9950
|
getX( index ) {
|
|
9921
9951
|
|
|
9922
9952
|
let x = this.array[ index * this.itemSize ];
|
|
@@ -12699,10 +12729,8 @@ class CubeCamera extends Object3D {
|
|
|
12699
12729
|
|
|
12700
12730
|
const currentRenderTarget = renderer.getRenderTarget();
|
|
12701
12731
|
|
|
12702
|
-
const currentToneMapping = renderer.toneMapping;
|
|
12703
12732
|
const currentXrEnabled = renderer.xr.enabled;
|
|
12704
12733
|
|
|
12705
|
-
renderer.toneMapping = NoToneMapping;
|
|
12706
12734
|
renderer.xr.enabled = false;
|
|
12707
12735
|
|
|
12708
12736
|
const generateMipmaps = renderTarget.texture.generateMipmaps;
|
|
@@ -12731,7 +12759,6 @@ class CubeCamera extends Object3D {
|
|
|
12731
12759
|
|
|
12732
12760
|
renderer.setRenderTarget( currentRenderTarget );
|
|
12733
12761
|
|
|
12734
|
-
renderer.toneMapping = currentToneMapping;
|
|
12735
12762
|
renderer.xr.enabled = currentXrEnabled;
|
|
12736
12763
|
|
|
12737
12764
|
renderTarget.texture.needsPMREMUpdate = true;
|
|
@@ -13654,7 +13681,7 @@ var beginnormal_vertex = "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGEN
|
|
|
13654
13681
|
|
|
13655
13682
|
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
13683
|
|
|
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\
|
|
13684
|
+
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
13685
|
|
|
13659
13686
|
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
13687
|
|
|
@@ -17282,7 +17309,7 @@ function WebGLGeometries( gl, attributes, info, bindingStates ) {
|
|
|
17282
17309
|
|
|
17283
17310
|
}
|
|
17284
17311
|
|
|
17285
|
-
} else {
|
|
17312
|
+
} else if ( geometryPosition !== undefined ) {
|
|
17286
17313
|
|
|
17287
17314
|
const array = geometryPosition.array;
|
|
17288
17315
|
version = geometryPosition.version;
|
|
@@ -17297,6 +17324,10 @@ function WebGLGeometries( gl, attributes, info, bindingStates ) {
|
|
|
17297
17324
|
|
|
17298
17325
|
}
|
|
17299
17326
|
|
|
17327
|
+
} else {
|
|
17328
|
+
|
|
17329
|
+
return;
|
|
17330
|
+
|
|
17300
17331
|
}
|
|
17301
17332
|
|
|
17302
17333
|
const attribute = new ( arrayNeedsUint32( indices ) ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
|
|
@@ -20304,6 +20335,18 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
20304
20335
|
const HAS_ATTRIBUTE_UV2 = !! geometry.attributes.uv2;
|
|
20305
20336
|
const HAS_ATTRIBUTE_UV3 = !! geometry.attributes.uv3;
|
|
20306
20337
|
|
|
20338
|
+
let toneMapping = NoToneMapping;
|
|
20339
|
+
|
|
20340
|
+
if ( material.toneMapped ) {
|
|
20341
|
+
|
|
20342
|
+
if ( currentRenderTarget === null || currentRenderTarget.isXRRenderTarget === true ) {
|
|
20343
|
+
|
|
20344
|
+
toneMapping = renderer.toneMapping;
|
|
20345
|
+
|
|
20346
|
+
}
|
|
20347
|
+
|
|
20348
|
+
}
|
|
20349
|
+
|
|
20307
20350
|
const parameters = {
|
|
20308
20351
|
|
|
20309
20352
|
isWebGL2: IS_WEBGL2,
|
|
@@ -20464,8 +20507,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
20464
20507
|
shadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,
|
|
20465
20508
|
shadowMapType: renderer.shadowMap.type,
|
|
20466
20509
|
|
|
20467
|
-
toneMapping:
|
|
20468
|
-
useLegacyLights: renderer.
|
|
20510
|
+
toneMapping: toneMapping,
|
|
20511
|
+
useLegacyLights: renderer._useLegacyLights,
|
|
20469
20512
|
|
|
20470
20513
|
premultipliedAlpha: material.premultipliedAlpha,
|
|
20471
20514
|
|
|
@@ -23637,6 +23680,17 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
23637
23680
|
|
|
23638
23681
|
}
|
|
23639
23682
|
|
|
23683
|
+
if ( glFormat === _gl.RED_INTEGER ) {
|
|
23684
|
+
|
|
23685
|
+
if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8UI;
|
|
23686
|
+
if ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.R16UI;
|
|
23687
|
+
if ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.R32UI;
|
|
23688
|
+
if ( glType === _gl.BYTE ) internalFormat = _gl.R8I;
|
|
23689
|
+
if ( glType === _gl.SHORT ) internalFormat = _gl.R16I;
|
|
23690
|
+
if ( glType === _gl.INT ) internalFormat = _gl.R32I;
|
|
23691
|
+
|
|
23692
|
+
}
|
|
23693
|
+
|
|
23640
23694
|
if ( glFormat === _gl.RG ) {
|
|
23641
23695
|
|
|
23642
23696
|
if ( glType === _gl.FLOAT ) internalFormat = _gl.RG32F;
|
|
@@ -23813,14 +23867,32 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
23813
23867
|
|
|
23814
23868
|
for ( let i = 0; i < 6; i ++ ) {
|
|
23815
23869
|
|
|
23816
|
-
|
|
23870
|
+
if ( Array.isArray( renderTargetProperties.__webglFramebuffer[ i ] ) ) {
|
|
23871
|
+
|
|
23872
|
+
for ( let level = 0; level < renderTargetProperties.__webglFramebuffer[ i ].length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ][ level ] );
|
|
23873
|
+
|
|
23874
|
+
} else {
|
|
23875
|
+
|
|
23876
|
+
_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ] );
|
|
23877
|
+
|
|
23878
|
+
}
|
|
23879
|
+
|
|
23817
23880
|
if ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer[ i ] );
|
|
23818
23881
|
|
|
23819
23882
|
}
|
|
23820
23883
|
|
|
23821
23884
|
} else {
|
|
23822
23885
|
|
|
23823
|
-
|
|
23886
|
+
if ( Array.isArray( renderTargetProperties.__webglFramebuffer ) ) {
|
|
23887
|
+
|
|
23888
|
+
for ( let level = 0; level < renderTargetProperties.__webglFramebuffer.length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ level ] );
|
|
23889
|
+
|
|
23890
|
+
} else {
|
|
23891
|
+
|
|
23892
|
+
_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer );
|
|
23893
|
+
|
|
23894
|
+
}
|
|
23895
|
+
|
|
23824
23896
|
if ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer );
|
|
23825
23897
|
if ( renderTargetProperties.__webglMultisampledFramebuffer ) _gl.deleteFramebuffer( renderTargetProperties.__webglMultisampledFramebuffer );
|
|
23826
23898
|
|
|
@@ -24795,7 +24867,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
24795
24867
|
// Render targets
|
|
24796
24868
|
|
|
24797
24869
|
// Setup storage for target texture and bind it to correct framebuffer
|
|
24798
|
-
function setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget ) {
|
|
24870
|
+
function setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget, level ) {
|
|
24799
24871
|
|
|
24800
24872
|
const glFormat = utils.convert( texture.format, texture.colorSpace );
|
|
24801
24873
|
const glType = utils.convert( texture.type );
|
|
@@ -24804,13 +24876,16 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
24804
24876
|
|
|
24805
24877
|
if ( ! renderTargetProperties.__hasExternalTextures ) {
|
|
24806
24878
|
|
|
24879
|
+
const width = Math.max( 1, renderTarget.width >> level );
|
|
24880
|
+
const height = Math.max( 1, renderTarget.height >> level );
|
|
24881
|
+
|
|
24807
24882
|
if ( textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY ) {
|
|
24808
24883
|
|
|
24809
|
-
state.texImage3D( textureTarget,
|
|
24884
|
+
state.texImage3D( textureTarget, level, glInternalFormat, width, height, renderTarget.depth, 0, glFormat, glType, null );
|
|
24810
24885
|
|
|
24811
24886
|
} else {
|
|
24812
24887
|
|
|
24813
|
-
state.texImage2D( textureTarget,
|
|
24888
|
+
state.texImage2D( textureTarget, level, glInternalFormat, width, height, 0, glFormat, glType, null );
|
|
24814
24889
|
|
|
24815
24890
|
}
|
|
24816
24891
|
|
|
@@ -24824,7 +24899,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
24824
24899
|
|
|
24825
24900
|
} else if ( textureTarget === _gl.TEXTURE_2D || ( textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z ) ) { // see #24753
|
|
24826
24901
|
|
|
24827
|
-
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture,
|
|
24902
|
+
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, level );
|
|
24828
24903
|
|
|
24829
24904
|
}
|
|
24830
24905
|
|
|
@@ -25045,7 +25120,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25045
25120
|
|
|
25046
25121
|
if ( colorTexture !== undefined ) {
|
|
25047
25122
|
|
|
25048
|
-
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D );
|
|
25123
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, 0 );
|
|
25049
25124
|
|
|
25050
25125
|
}
|
|
25051
25126
|
|
|
@@ -25092,13 +25167,41 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25092
25167
|
|
|
25093
25168
|
for ( let i = 0; i < 6; i ++ ) {
|
|
25094
25169
|
|
|
25095
|
-
|
|
25170
|
+
if ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {
|
|
25171
|
+
|
|
25172
|
+
renderTargetProperties.__webglFramebuffer[ i ] = [];
|
|
25173
|
+
|
|
25174
|
+
for ( let level = 0; level < texture.mipmaps.length; level ++ ) {
|
|
25175
|
+
|
|
25176
|
+
renderTargetProperties.__webglFramebuffer[ i ][ level ] = _gl.createFramebuffer();
|
|
25177
|
+
|
|
25178
|
+
}
|
|
25179
|
+
|
|
25180
|
+
} else {
|
|
25181
|
+
|
|
25182
|
+
renderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();
|
|
25183
|
+
|
|
25184
|
+
}
|
|
25096
25185
|
|
|
25097
25186
|
}
|
|
25098
25187
|
|
|
25099
25188
|
} else {
|
|
25100
25189
|
|
|
25101
|
-
|
|
25190
|
+
if ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {
|
|
25191
|
+
|
|
25192
|
+
renderTargetProperties.__webglFramebuffer = [];
|
|
25193
|
+
|
|
25194
|
+
for ( let level = 0; level < texture.mipmaps.length; level ++ ) {
|
|
25195
|
+
|
|
25196
|
+
renderTargetProperties.__webglFramebuffer[ level ] = _gl.createFramebuffer();
|
|
25197
|
+
|
|
25198
|
+
}
|
|
25199
|
+
|
|
25200
|
+
} else {
|
|
25201
|
+
|
|
25202
|
+
renderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();
|
|
25203
|
+
|
|
25204
|
+
}
|
|
25102
25205
|
|
|
25103
25206
|
if ( isMultipleRenderTargets ) {
|
|
25104
25207
|
|
|
@@ -25178,7 +25281,19 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25178
25281
|
|
|
25179
25282
|
for ( let i = 0; i < 6; i ++ ) {
|
|
25180
25283
|
|
|
25181
|
-
|
|
25284
|
+
if ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {
|
|
25285
|
+
|
|
25286
|
+
for ( let level = 0; level < texture.mipmaps.length; level ++ ) {
|
|
25287
|
+
|
|
25288
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ][ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level );
|
|
25289
|
+
|
|
25290
|
+
}
|
|
25291
|
+
|
|
25292
|
+
} else {
|
|
25293
|
+
|
|
25294
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0 );
|
|
25295
|
+
|
|
25296
|
+
}
|
|
25182
25297
|
|
|
25183
25298
|
}
|
|
25184
25299
|
|
|
@@ -25201,7 +25316,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25201
25316
|
|
|
25202
25317
|
state.bindTexture( _gl.TEXTURE_2D, attachmentProperties.__webglTexture );
|
|
25203
25318
|
setTextureParameters( _gl.TEXTURE_2D, attachment, supportsMips );
|
|
25204
|
-
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D );
|
|
25319
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, 0 );
|
|
25205
25320
|
|
|
25206
25321
|
if ( textureNeedsGenerateMipmaps( attachment, supportsMips ) ) {
|
|
25207
25322
|
|
|
@@ -25233,7 +25348,20 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
25233
25348
|
|
|
25234
25349
|
state.bindTexture( glTextureType, textureProperties.__webglTexture );
|
|
25235
25350
|
setTextureParameters( glTextureType, texture, supportsMips );
|
|
25236
|
-
|
|
25351
|
+
|
|
25352
|
+
if ( isWebGL2 && texture.mipmaps && texture.mipmaps.length > 0 ) {
|
|
25353
|
+
|
|
25354
|
+
for ( let level = 0; level < texture.mipmaps.length; level ++ ) {
|
|
25355
|
+
|
|
25356
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, level );
|
|
25357
|
+
|
|
25358
|
+
}
|
|
25359
|
+
|
|
25360
|
+
} else {
|
|
25361
|
+
|
|
25362
|
+
setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, 0 );
|
|
25363
|
+
|
|
25364
|
+
}
|
|
25237
25365
|
|
|
25238
25366
|
if ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {
|
|
25239
25367
|
|
|
@@ -27748,7 +27876,7 @@ function WebGLMaterials( renderer, properties ) {
|
|
|
27748
27876
|
uniforms.lightMap.value = material.lightMap;
|
|
27749
27877
|
|
|
27750
27878
|
// artist-friendly light intensity scaling factor
|
|
27751
|
-
const scaleFactor = ( renderer.
|
|
27879
|
+
const scaleFactor = ( renderer._useLegacyLights === true ) ? Math.PI : 1;
|
|
27752
27880
|
|
|
27753
27881
|
uniforms.lightMapIntensity.value = material.lightMapIntensity * scaleFactor;
|
|
27754
27882
|
|
|
@@ -28587,7 +28715,7 @@ class WebGLRenderer {
|
|
|
28587
28715
|
|
|
28588
28716
|
// physical lights
|
|
28589
28717
|
|
|
28590
|
-
this.
|
|
28718
|
+
this._useLegacyLights = false;
|
|
28591
28719
|
|
|
28592
28720
|
// tone mapping
|
|
28593
28721
|
|
|
@@ -29230,6 +29358,9 @@ class WebGLRenderer {
|
|
|
29230
29358
|
if ( material.wireframe === true ) {
|
|
29231
29359
|
|
|
29232
29360
|
index = geometries.getWireframeAttribute( geometry );
|
|
29361
|
+
|
|
29362
|
+
if ( index === undefined ) return;
|
|
29363
|
+
|
|
29233
29364
|
rangeFactor = 2;
|
|
29234
29365
|
|
|
29235
29366
|
}
|
|
@@ -29394,7 +29525,7 @@ class WebGLRenderer {
|
|
|
29394
29525
|
|
|
29395
29526
|
} );
|
|
29396
29527
|
|
|
29397
|
-
currentRenderState.setupLights( _this.
|
|
29528
|
+
currentRenderState.setupLights( _this._useLegacyLights );
|
|
29398
29529
|
|
|
29399
29530
|
scene.traverse( function ( object ) {
|
|
29400
29531
|
|
|
@@ -29547,7 +29678,7 @@ class WebGLRenderer {
|
|
|
29547
29678
|
|
|
29548
29679
|
// render scene
|
|
29549
29680
|
|
|
29550
|
-
currentRenderState.setupLights( _this.
|
|
29681
|
+
currentRenderState.setupLights( _this._useLegacyLights );
|
|
29551
29682
|
|
|
29552
29683
|
if ( camera.isArrayCamera ) {
|
|
29553
29684
|
|
|
@@ -30041,6 +30172,7 @@ class WebGLRenderer {
|
|
|
30041
30172
|
|
|
30042
30173
|
materialProperties.outputColorSpace = parameters.outputColorSpace;
|
|
30043
30174
|
materialProperties.instancing = parameters.instancing;
|
|
30175
|
+
materialProperties.instancingColor = parameters.instancingColor;
|
|
30044
30176
|
materialProperties.skinning = parameters.skinning;
|
|
30045
30177
|
materialProperties.morphTargets = parameters.morphTargets;
|
|
30046
30178
|
materialProperties.morphNormals = parameters.morphNormals;
|
|
@@ -30069,7 +30201,18 @@ class WebGLRenderer {
|
|
|
30069
30201
|
const morphTargets = !! geometry.morphAttributes.position;
|
|
30070
30202
|
const morphNormals = !! geometry.morphAttributes.normal;
|
|
30071
30203
|
const morphColors = !! geometry.morphAttributes.color;
|
|
30072
|
-
|
|
30204
|
+
|
|
30205
|
+
let toneMapping = NoToneMapping;
|
|
30206
|
+
|
|
30207
|
+
if ( material.toneMapped ) {
|
|
30208
|
+
|
|
30209
|
+
if ( _currentRenderTarget === null || _currentRenderTarget.isXRRenderTarget === true ) {
|
|
30210
|
+
|
|
30211
|
+
toneMapping = _this.toneMapping;
|
|
30212
|
+
|
|
30213
|
+
}
|
|
30214
|
+
|
|
30215
|
+
}
|
|
30073
30216
|
|
|
30074
30217
|
const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color;
|
|
30075
30218
|
const morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0;
|
|
@@ -30124,6 +30267,14 @@ class WebGLRenderer {
|
|
|
30124
30267
|
|
|
30125
30268
|
needsProgramChange = true;
|
|
30126
30269
|
|
|
30270
|
+
} else if ( object.isInstancedMesh && materialProperties.instancingColor === true && object.instanceColor === null ) {
|
|
30271
|
+
|
|
30272
|
+
needsProgramChange = true;
|
|
30273
|
+
|
|
30274
|
+
} else if ( object.isInstancedMesh && materialProperties.instancingColor === false && object.instanceColor !== null ) {
|
|
30275
|
+
|
|
30276
|
+
needsProgramChange = true;
|
|
30277
|
+
|
|
30127
30278
|
} else if ( materialProperties.envMap !== envMap ) {
|
|
30128
30279
|
|
|
30129
30280
|
needsProgramChange = true;
|
|
@@ -30565,7 +30716,16 @@ class WebGLRenderer {
|
|
|
30565
30716
|
|
|
30566
30717
|
if ( renderTarget.isWebGLCubeRenderTarget ) {
|
|
30567
30718
|
|
|
30568
|
-
|
|
30719
|
+
if ( Array.isArray( __webglFramebuffer[ activeCubeFace ] ) ) {
|
|
30720
|
+
|
|
30721
|
+
framebuffer = __webglFramebuffer[ activeCubeFace ][ activeMipmapLevel ];
|
|
30722
|
+
|
|
30723
|
+
} else {
|
|
30724
|
+
|
|
30725
|
+
framebuffer = __webglFramebuffer[ activeCubeFace ];
|
|
30726
|
+
|
|
30727
|
+
}
|
|
30728
|
+
|
|
30569
30729
|
isCube = true;
|
|
30570
30730
|
|
|
30571
30731
|
} else if ( ( capabilities.isWebGL2 && renderTarget.samples > 0 ) && textures.useMultisampledRTT( renderTarget ) === false ) {
|
|
@@ -30574,7 +30734,15 @@ class WebGLRenderer {
|
|
|
30574
30734
|
|
|
30575
30735
|
} else {
|
|
30576
30736
|
|
|
30577
|
-
|
|
30737
|
+
if ( Array.isArray( __webglFramebuffer ) ) {
|
|
30738
|
+
|
|
30739
|
+
framebuffer = __webglFramebuffer[ activeMipmapLevel ];
|
|
30740
|
+
|
|
30741
|
+
} else {
|
|
30742
|
+
|
|
30743
|
+
framebuffer = __webglFramebuffer;
|
|
30744
|
+
|
|
30745
|
+
}
|
|
30578
30746
|
|
|
30579
30747
|
}
|
|
30580
30748
|
|
|
@@ -30873,14 +31041,14 @@ class WebGLRenderer {
|
|
|
30873
31041
|
|
|
30874
31042
|
get physicallyCorrectLights() { // @deprecated, r150
|
|
30875
31043
|
|
|
30876
|
-
console.warn( 'THREE.WebGLRenderer:
|
|
31044
|
+
console.warn( 'THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.' );
|
|
30877
31045
|
return ! this.useLegacyLights;
|
|
30878
31046
|
|
|
30879
31047
|
}
|
|
30880
31048
|
|
|
30881
31049
|
set physicallyCorrectLights( value ) { // @deprecated, r150
|
|
30882
31050
|
|
|
30883
|
-
console.warn( 'THREE.WebGLRenderer:
|
|
31051
|
+
console.warn( 'THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead.' );
|
|
30884
31052
|
this.useLegacyLights = ! value;
|
|
30885
31053
|
|
|
30886
31054
|
}
|
|
@@ -30899,6 +31067,20 @@ class WebGLRenderer {
|
|
|
30899
31067
|
|
|
30900
31068
|
}
|
|
30901
31069
|
|
|
31070
|
+
get useLegacyLights() { // @deprecated, r155
|
|
31071
|
+
|
|
31072
|
+
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.' );
|
|
31073
|
+
return this._useLegacyLights;
|
|
31074
|
+
|
|
31075
|
+
}
|
|
31076
|
+
|
|
31077
|
+
set useLegacyLights( value ) { // @deprecated, r155
|
|
31078
|
+
|
|
31079
|
+
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.' );
|
|
31080
|
+
this._useLegacyLights = value;
|
|
31081
|
+
|
|
31082
|
+
}
|
|
31083
|
+
|
|
30902
31084
|
}
|
|
30903
31085
|
|
|
30904
31086
|
class WebGL1Renderer extends WebGLRenderer {}
|
|
@@ -33359,6 +33541,21 @@ class CompressedArrayTexture extends CompressedTexture {
|
|
|
33359
33541
|
|
|
33360
33542
|
}
|
|
33361
33543
|
|
|
33544
|
+
class CompressedCubeTexture extends CompressedTexture {
|
|
33545
|
+
|
|
33546
|
+
constructor( images, format, type ) {
|
|
33547
|
+
|
|
33548
|
+
super( undefined, images[ 0 ].width, images[ 0 ].height, format, type, CubeReflectionMapping );
|
|
33549
|
+
|
|
33550
|
+
this.isCompressedCubeTexture = true;
|
|
33551
|
+
this.isCubeTexture = true;
|
|
33552
|
+
|
|
33553
|
+
this.image = images;
|
|
33554
|
+
|
|
33555
|
+
}
|
|
33556
|
+
|
|
33557
|
+
}
|
|
33558
|
+
|
|
33362
33559
|
class CanvasTexture extends Texture {
|
|
33363
33560
|
|
|
33364
33561
|
constructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
|
|
@@ -35469,7 +35666,7 @@ class CapsuleGeometry extends LatheGeometry {
|
|
|
35469
35666
|
|
|
35470
35667
|
this.parameters = {
|
|
35471
35668
|
radius: radius,
|
|
35472
|
-
|
|
35669
|
+
length: length,
|
|
35473
35670
|
capSegments: capSegments,
|
|
35474
35671
|
radialSegments: radialSegments,
|
|
35475
35672
|
};
|
|
@@ -42919,9 +43116,28 @@ class DataTextureLoader extends Loader {
|
|
|
42919
43116
|
loader.setWithCredentials( scope.withCredentials );
|
|
42920
43117
|
loader.load( url, function ( buffer ) {
|
|
42921
43118
|
|
|
42922
|
-
|
|
43119
|
+
let texData;
|
|
43120
|
+
|
|
43121
|
+
try {
|
|
43122
|
+
|
|
43123
|
+
texData = scope.parse( buffer );
|
|
43124
|
+
|
|
43125
|
+
} catch ( error ) {
|
|
43126
|
+
|
|
43127
|
+
if ( onError !== undefined ) {
|
|
43128
|
+
|
|
43129
|
+
onError( error );
|
|
43130
|
+
|
|
43131
|
+
} else {
|
|
43132
|
+
|
|
43133
|
+
console.error( error );
|
|
43134
|
+
return;
|
|
43135
|
+
|
|
43136
|
+
}
|
|
43137
|
+
|
|
43138
|
+
}
|
|
42923
43139
|
|
|
42924
|
-
if ( ! texData ) return;
|
|
43140
|
+
if ( ! texData ) return onError(); // TODO: Remove this when all loaders properly throw errors
|
|
42925
43141
|
|
|
42926
43142
|
if ( texData.image !== undefined ) {
|
|
42927
43143
|
|
|
@@ -47458,7 +47674,7 @@ class PropertyBinding {
|
|
|
47458
47674
|
// ensure there is a value node
|
|
47459
47675
|
if ( ! targetObject ) {
|
|
47460
47676
|
|
|
47461
|
-
console.
|
|
47677
|
+
console.warn( 'THREE.PropertyBinding: No target node found for track: ' + this.path + '.' );
|
|
47462
47678
|
return;
|
|
47463
47679
|
|
|
47464
47680
|
}
|
|
@@ -51869,4 +52085,4 @@ if ( typeof window !== 'undefined' ) {
|
|
|
51869
52085
|
|
|
51870
52086
|
}
|
|
51871
52087
|
|
|
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 };
|
|
52088
|
+
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, 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, 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, sRGBEncoding };
|