@plastic-software/three 0.179.0 → 0.180.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 +166 -106
- package/build/three.core.js +112 -20
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +55 -89
- package/build/three.module.min.js +1 -1
- package/build/three.tsl.js +30 -5
- package/build/three.tsl.min.js +1 -1
- package/build/three.webgpu.js +2896 -1048
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +2896 -1048
- package/build/three.webgpu.nodes.min.js +1 -1
- package/examples/jsm/Addons.js +1 -1
- package/examples/jsm/controls/ArcballControls.js +7 -7
- package/examples/jsm/controls/DragControls.js +6 -56
- package/examples/jsm/controls/FirstPersonControls.js +2 -2
- package/examples/jsm/controls/PointerLockControls.js +0 -8
- package/examples/jsm/exporters/GLTFExporter.js +30 -22
- package/examples/jsm/exporters/KTX2Exporter.js +4 -2
- package/examples/jsm/exporters/PLYExporter.js +1 -1
- package/examples/jsm/libs/ktx-parse.module.js +1 -1
- package/examples/jsm/lines/Line2.js +3 -3
- package/examples/jsm/lines/LineGeometry.js +1 -1
- package/examples/jsm/lines/LineSegments2.js +2 -2
- package/examples/jsm/lines/Wireframe.js +2 -2
- package/examples/jsm/lines/WireframeGeometry2.js +1 -1
- package/examples/jsm/lines/webgpu/LineSegments2.js +1 -1
- package/examples/jsm/lines/webgpu/Wireframe.js +1 -1
- package/examples/jsm/loaders/ColladaLoader.js +1 -1
- package/examples/jsm/loaders/EXRLoader.js +5 -5
- package/examples/jsm/loaders/GLTFLoader.js +9 -5
- package/examples/jsm/loaders/HDRCubeTextureLoader.js +5 -5
- package/examples/jsm/loaders/HDRLoader.js +486 -0
- package/examples/jsm/loaders/KTX2Loader.js +112 -32
- package/examples/jsm/loaders/RGBELoader.js +7 -473
- package/examples/jsm/loaders/TTFLoader.js +4 -4
- package/examples/jsm/loaders/UltraHDRLoader.js +1 -1
- package/examples/jsm/loaders/lwo/IFFParser.js +1 -1
- package/examples/jsm/materials/WoodNodeMaterial.js +533 -0
- package/examples/jsm/math/ColorSpaces.js +19 -1
- package/examples/jsm/math/ConvexHull.js +2 -2
- package/examples/jsm/math/Lut.js +2 -2
- package/examples/jsm/misc/MD2CharacterComplex.js +1 -1
- package/examples/jsm/misc/ProgressiveLightMap.js +1 -1
- package/examples/jsm/misc/Volume.js +1 -1
- package/examples/jsm/postprocessing/OutlinePass.js +1 -1
- package/examples/jsm/postprocessing/SSRPass.js +37 -8
- package/examples/jsm/shaders/UnpackDepthRGBAShader.js +1 -1
- package/examples/jsm/transpiler/GLSLDecoder.js +22 -19
- package/examples/jsm/transpiler/TSLEncoder.js +2 -10
- package/examples/jsm/transpiler/WGSLEncoder.js +24 -0
- package/examples/jsm/tsl/display/AnamorphicNode.js +27 -4
- package/examples/jsm/tsl/display/BloomNode.js +3 -3
- package/examples/jsm/tsl/display/ChromaticAberrationNode.js +2 -1
- package/examples/jsm/tsl/display/DepthOfFieldNode.js +439 -90
- package/examples/jsm/tsl/display/GTAONode.js +8 -0
- package/examples/jsm/tsl/display/GaussianBlurNode.js +47 -35
- package/examples/jsm/tsl/display/OutlineNode.js +2 -2
- package/examples/jsm/tsl/display/SSRNode.js +180 -65
- package/examples/jsm/tsl/display/TRAANode.js +1 -1
- package/examples/jsm/tsl/display/boxBlur.js +64 -0
- package/examples/jsm/tsl/display/hashBlur.js +15 -18
- package/examples/jsm/utils/BufferGeometryUtils.js +1 -1
- package/examples/jsm/utils/ShadowMapViewerGPU.js +12 -5
- package/examples/jsm/webxr/OculusHandModel.js +1 -1
- package/package.json +1 -1
- package/src/Three.Core.js +1 -0
- package/src/Three.TSL.js +29 -4
- package/src/animation/AnimationClip.js +17 -2
- package/src/constants.js +11 -3
- package/src/core/BufferGeometry.js +2 -2
- package/src/extras/TextureUtils.js +2 -1
- package/src/extras/lib/earcut.js +1 -1
- package/src/lights/webgpu/ProjectorLight.js +1 -1
- package/src/materials/Material.js +12 -0
- package/src/materials/MeshDistanceMaterial.js +1 -1
- package/src/materials/nodes/PointsNodeMaterial.js +81 -28
- package/src/materials/nodes/SpriteNodeMaterial.js +3 -15
- package/src/materials/nodes/manager/NodeMaterialObserver.js +1 -1
- package/src/math/ColorManagement.js +7 -1
- package/src/nodes/Nodes.js +3 -0
- package/src/nodes/TSL.js +3 -0
- package/src/nodes/accessors/BufferNode.js +1 -1
- package/src/nodes/accessors/Camera.js +133 -7
- package/src/nodes/accessors/ClippingNode.js +6 -5
- package/src/nodes/accessors/CubeTextureNode.js +2 -2
- package/src/nodes/accessors/InstanceNode.js +3 -1
- package/src/nodes/accessors/Object3DNode.js +1 -1
- package/src/nodes/accessors/ReferenceBaseNode.js +1 -1
- package/src/nodes/accessors/ReferenceNode.js +1 -1
- package/src/nodes/accessors/Texture3DNode.js +13 -0
- package/src/nodes/accessors/TextureNode.js +71 -19
- package/src/nodes/code/FunctionCallNode.js +19 -0
- package/src/nodes/code/FunctionNode.js +23 -0
- package/src/nodes/core/AssignNode.js +4 -3
- package/src/nodes/core/ContextNode.js +24 -0
- package/src/nodes/core/Node.js +16 -20
- package/src/nodes/core/NodeBuilder.js +48 -14
- package/src/nodes/core/NodeFrame.js +1 -1
- package/src/nodes/core/NodeUniform.js +1 -1
- package/src/nodes/core/NodeUtils.js +1 -2
- package/src/nodes/core/StackNode.js +29 -4
- package/src/nodes/core/StructNode.js +5 -5
- package/src/nodes/core/StructTypeNode.js +1 -0
- package/src/nodes/core/SubBuildNode.js +2 -2
- package/src/nodes/core/UniformNode.js +16 -9
- package/src/nodes/core/VarNode.js +0 -21
- package/src/nodes/display/FrontFacingNode.js +4 -8
- package/src/nodes/display/PassNode.js +1 -1
- package/src/nodes/display/ScreenNode.js +42 -13
- package/src/nodes/display/ViewportDepthTextureNode.js +16 -4
- package/src/nodes/display/ViewportSharedTextureNode.js +12 -0
- package/src/nodes/display/ViewportTextureNode.js +42 -12
- package/src/nodes/gpgpu/SubgroupFunctionNode.js +430 -0
- package/src/nodes/lighting/LightsNode.js +1 -1
- package/src/nodes/math/BitcastNode.js +156 -0
- package/src/nodes/math/ConditionalNode.js +18 -2
- package/src/nodes/math/MathNode.js +3 -15
- package/src/nodes/math/OperatorNode.js +4 -3
- package/src/nodes/tsl/TSLCore.js +432 -152
- package/src/nodes/utils/JoinNode.js +3 -1
- package/src/nodes/utils/MemberNode.js +58 -7
- package/src/nodes/utils/RTTNode.js +1 -1
- package/src/nodes/utils/ReflectorNode.js +51 -7
- package/src/nodes/utils/SampleNode.js +12 -2
- package/src/nodes/utils/SplitNode.js +11 -0
- package/src/nodes/utils/Timer.js +0 -47
- package/src/objects/BatchedMesh.js +2 -2
- package/src/objects/LOD.js +1 -1
- package/src/objects/Sprite.js +2 -2
- package/src/renderers/WebGLRenderer.js +0 -9
- package/src/renderers/common/Attributes.js +1 -1
- package/src/renderers/common/Backend.js +19 -1
- package/src/renderers/common/Bindings.js +2 -0
- package/src/renderers/common/ChainMap.js +1 -1
- package/src/renderers/common/DataMap.js +1 -1
- package/src/renderers/common/Pipelines.js +1 -1
- package/src/renderers/common/RenderContext.js +2 -2
- package/src/renderers/common/RenderObject.js +14 -2
- package/src/renderers/common/Renderer.js +39 -19
- package/src/renderers/common/SampledTexture.js +1 -1
- package/src/renderers/common/Sampler.js +25 -13
- package/src/renderers/common/Textures.js +34 -12
- package/src/renderers/common/TimestampQueryPool.js +3 -3
- package/src/renderers/common/XRManager.js +35 -19
- package/src/renderers/common/nodes/NodeBuilderState.js +1 -1
- package/src/renderers/common/nodes/NodeLibrary.js +5 -5
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +7 -15
- package/src/renderers/shaders/ShaderLib/depth.glsl.js +1 -1
- package/src/renderers/webgl/WebGLProgram.js +4 -4
- package/src/renderers/webgl/WebGLShadowMap.js +1 -1
- package/src/renderers/webgl/WebGLTextures.js +1 -0
- package/src/renderers/webgl/WebGLUtils.js +3 -2
- package/src/renderers/webgl-fallback/WebGLBackend.js +186 -135
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +110 -17
- package/src/renderers/webgl-fallback/utils/WebGLState.js +1 -1
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +52 -3
- package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +9 -10
- package/src/renderers/webgl-fallback/utils/WebGLUtils.js +3 -2
- package/src/renderers/webgpu/WebGPUBackend.js +35 -31
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +124 -34
- package/src/renderers/webgpu/utils/WebGPUConstants.js +2 -2
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +9 -18
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +114 -25
- package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +3 -3
- package/src/renderers/webxr/WebXRManager.js +39 -24
- package/src/textures/ExternalTexture.js +15 -4
- package/src/textures/Source.js +1 -1
- package/src/textures/VideoTexture.js +0 -3
- package/examples/jsm/loaders/RGBMLoader.js +0 -1148
package/build/three.core.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2010-2025 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
5
|
*/
|
|
6
|
-
const REVISION = '
|
|
6
|
+
const REVISION = '180';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Represents mouse buttons and interaction types in context of controls.
|
|
@@ -729,6 +729,14 @@ const UnsignedInt248Type = 1020;
|
|
|
729
729
|
*/
|
|
730
730
|
const UnsignedInt5999Type = 35902;
|
|
731
731
|
|
|
732
|
+
/**
|
|
733
|
+
* An unsigned int 10_11_11 (packed) data type for textures.
|
|
734
|
+
*
|
|
735
|
+
* @type {number}
|
|
736
|
+
* @constant
|
|
737
|
+
*/
|
|
738
|
+
const UnsignedInt101111Type = 35899;
|
|
739
|
+
|
|
732
740
|
/**
|
|
733
741
|
* Discards the red, green and blue components and reads just the alpha component.
|
|
734
742
|
*
|
|
@@ -1670,8 +1678,8 @@ const InterpolationSamplingMode = {
|
|
|
1670
1678
|
* @property {string} NORMAL - Normal sampling mode.
|
|
1671
1679
|
* @property {string} CENTROID - Centroid sampling mode.
|
|
1672
1680
|
* @property {string} SAMPLE - Sample-specific sampling mode.
|
|
1673
|
-
* @property {string}
|
|
1674
|
-
* @property {string}
|
|
1681
|
+
* @property {string} FIRST - Flat interpolation using the first vertex.
|
|
1682
|
+
* @property {string} EITHER - Flat interpolation using either vertex.
|
|
1675
1683
|
*/
|
|
1676
1684
|
|
|
1677
1685
|
/**
|
|
@@ -6315,7 +6323,7 @@ function createColorManagement() {
|
|
|
6315
6323
|
* - luminanceCoefficients: RGB luminance coefficients
|
|
6316
6324
|
*
|
|
6317
6325
|
* Optional:
|
|
6318
|
-
* - outputColorSpaceConfig: { drawingBufferColorSpace: ColorSpace }
|
|
6326
|
+
* - outputColorSpaceConfig: { drawingBufferColorSpace: ColorSpace, toneMappingMode: 'extended' | 'standard' }
|
|
6319
6327
|
* - workingColorSpaceConfig: { unpackColorSpace: ColorSpace }
|
|
6320
6328
|
*
|
|
6321
6329
|
* Reference:
|
|
@@ -6384,6 +6392,12 @@ function createColorManagement() {
|
|
|
6384
6392
|
|
|
6385
6393
|
},
|
|
6386
6394
|
|
|
6395
|
+
getToneMappingMode: function ( colorSpace ) {
|
|
6396
|
+
|
|
6397
|
+
return this.spaces[ colorSpace ].outputColorSpaceConfig.toneMappingMode || 'standard';
|
|
6398
|
+
|
|
6399
|
+
},
|
|
6400
|
+
|
|
6387
6401
|
getLuminanceCoefficients: function ( target, colorSpace = this.workingColorSpace ) {
|
|
6388
6402
|
|
|
6389
6403
|
return target.fromArray( this.spaces[ colorSpace ].luminanceCoefficients );
|
|
@@ -6704,7 +6718,7 @@ class Source {
|
|
|
6704
6718
|
|
|
6705
6719
|
const data = this.data;
|
|
6706
6720
|
|
|
6707
|
-
if ( data instanceof HTMLVideoElement ) {
|
|
6721
|
+
if ( ( typeof HTMLVideoElement !== 'undefined' ) && ( data instanceof HTMLVideoElement ) ) {
|
|
6708
6722
|
|
|
6709
6723
|
target.set( data.videoWidth, data.videoHeight, 0 );
|
|
6710
6724
|
|
|
@@ -16915,6 +16929,18 @@ class Material extends EventDispatcher {
|
|
|
16915
16929
|
|
|
16916
16930
|
}
|
|
16917
16931
|
|
|
16932
|
+
if ( this.sheenColorMap && this.sheenColorMap.isTexture ) {
|
|
16933
|
+
|
|
16934
|
+
data.sheenColorMap = this.sheenColorMap.toJSON( meta ).uuid;
|
|
16935
|
+
|
|
16936
|
+
}
|
|
16937
|
+
|
|
16938
|
+
if ( this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture ) {
|
|
16939
|
+
|
|
16940
|
+
data.sheenRoughnessMap = this.sheenRoughnessMap.toJSON( meta ).uuid;
|
|
16941
|
+
|
|
16942
|
+
}
|
|
16943
|
+
|
|
16918
16944
|
if ( this.dispersion !== undefined ) data.dispersion = this.dispersion;
|
|
16919
16945
|
|
|
16920
16946
|
if ( this.iridescence !== undefined ) data.iridescence = this.iridescence;
|
|
@@ -18872,7 +18898,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
18872
18898
|
/**
|
|
18873
18899
|
* Bounding box for the geometry which can be calculated with `computeBoundingBox()`.
|
|
18874
18900
|
*
|
|
18875
|
-
* @type {Box3}
|
|
18901
|
+
* @type {?Box3}
|
|
18876
18902
|
* @default null
|
|
18877
18903
|
*/
|
|
18878
18904
|
this.boundingBox = null;
|
|
@@ -18880,7 +18906,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
18880
18906
|
/**
|
|
18881
18907
|
* Bounding sphere for the geometry which can be calculated with `computeBoundingSphere()`.
|
|
18882
18908
|
*
|
|
18883
|
-
* @type {Sphere}
|
|
18909
|
+
* @type {?Sphere}
|
|
18884
18910
|
* @default null
|
|
18885
18911
|
*/
|
|
18886
18912
|
this.boundingSphere = null;
|
|
@@ -24154,7 +24180,7 @@ class Sprite extends Object3D {
|
|
|
24154
24180
|
/**
|
|
24155
24181
|
* Constructs a new sprite.
|
|
24156
24182
|
*
|
|
24157
|
-
* @param {SpriteMaterial} [material] - The sprite material.
|
|
24183
|
+
* @param {(SpriteMaterial|SpriteNodeMaterial)} [material] - The sprite material.
|
|
24158
24184
|
*/
|
|
24159
24185
|
constructor( material = new SpriteMaterial() ) {
|
|
24160
24186
|
|
|
@@ -24200,7 +24226,7 @@ class Sprite extends Object3D {
|
|
|
24200
24226
|
/**
|
|
24201
24227
|
* The sprite material.
|
|
24202
24228
|
*
|
|
24203
|
-
* @type {SpriteMaterial}
|
|
24229
|
+
* @type {(SpriteMaterial|SpriteNodeMaterial)}
|
|
24204
24230
|
*/
|
|
24205
24231
|
this.material = material;
|
|
24206
24232
|
|
|
@@ -24529,7 +24555,7 @@ class LOD extends Object3D {
|
|
|
24529
24555
|
* the given distance.
|
|
24530
24556
|
*
|
|
24531
24557
|
* @param {number} distance - The LOD distance.
|
|
24532
|
-
* @return {Object3D
|
|
24558
|
+
* @return {?Object3D} The found 3D object. `null` if no 3D object has been found.
|
|
24533
24559
|
*/
|
|
24534
24560
|
getObjectForDistance( distance ) {
|
|
24535
24561
|
|
|
@@ -27808,7 +27834,7 @@ class BatchedMesh extends Mesh {
|
|
|
27808
27834
|
*
|
|
27809
27835
|
* @param {number} geometryId - The ID of the geometry to return the bounding box for.
|
|
27810
27836
|
* @param {Box3} target - The target object that is used to store the method's result.
|
|
27811
|
-
* @return {Box3
|
|
27837
|
+
* @return {?Box3} The geometry's bounding box. Returns `null` if no geometry has been found for the given ID.
|
|
27812
27838
|
*/
|
|
27813
27839
|
getBoundingBoxAt( geometryId, target ) {
|
|
27814
27840
|
|
|
@@ -27853,7 +27879,7 @@ class BatchedMesh extends Mesh {
|
|
|
27853
27879
|
*
|
|
27854
27880
|
* @param {number} geometryId - The ID of the geometry to return the bounding sphere for.
|
|
27855
27881
|
* @param {Sphere} target - The target object that is used to store the method's result.
|
|
27856
|
-
* @return {Sphere
|
|
27882
|
+
* @return {?Sphere} The geometry's bounding sphere. Returns `null` if no geometry has been found for the given ID.
|
|
27857
27883
|
*/
|
|
27858
27884
|
getBoundingSphereAt( geometryId, target ) {
|
|
27859
27885
|
|
|
@@ -29487,9 +29513,6 @@ class VideoTexture extends Texture {
|
|
|
29487
29513
|
|
|
29488
29514
|
}
|
|
29489
29515
|
|
|
29490
|
-
/**
|
|
29491
|
-
* @override
|
|
29492
|
-
*/
|
|
29493
29516
|
dispose() {
|
|
29494
29517
|
|
|
29495
29518
|
if ( this._requestVideoFrameCallbackId !== 0 ) {
|
|
@@ -30007,6 +30030,59 @@ class DepthTexture extends Texture {
|
|
|
30007
30030
|
|
|
30008
30031
|
}
|
|
30009
30032
|
|
|
30033
|
+
/**
|
|
30034
|
+
* Represents a texture created externally with the same renderer context.
|
|
30035
|
+
*
|
|
30036
|
+
* This may be a texture from a protected media stream, device camera feed,
|
|
30037
|
+
* or other data feeds like a depth sensor.
|
|
30038
|
+
*
|
|
30039
|
+
* Note that this class is only supported in {@link WebGLRenderer}, and in
|
|
30040
|
+
* the {@link WebGPURenderer} WebGPU backend.
|
|
30041
|
+
*
|
|
30042
|
+
* @augments Texture
|
|
30043
|
+
*/
|
|
30044
|
+
class ExternalTexture extends Texture {
|
|
30045
|
+
|
|
30046
|
+
/**
|
|
30047
|
+
* Creates a new raw texture.
|
|
30048
|
+
*
|
|
30049
|
+
* @param {?(WebGLTexture|GPUTexture)} [sourceTexture=null] - The external texture.
|
|
30050
|
+
*/
|
|
30051
|
+
constructor( sourceTexture = null ) {
|
|
30052
|
+
|
|
30053
|
+
super();
|
|
30054
|
+
|
|
30055
|
+
/**
|
|
30056
|
+
* The external source texture.
|
|
30057
|
+
*
|
|
30058
|
+
* @type {?(WebGLTexture|GPUTexture)}
|
|
30059
|
+
* @default null
|
|
30060
|
+
*/
|
|
30061
|
+
this.sourceTexture = sourceTexture;
|
|
30062
|
+
|
|
30063
|
+
/**
|
|
30064
|
+
* This flag can be used for type testing.
|
|
30065
|
+
*
|
|
30066
|
+
* @type {boolean}
|
|
30067
|
+
* @readonly
|
|
30068
|
+
* @default true
|
|
30069
|
+
*/
|
|
30070
|
+
this.isExternalTexture = true;
|
|
30071
|
+
|
|
30072
|
+
}
|
|
30073
|
+
|
|
30074
|
+
copy( source ) {
|
|
30075
|
+
|
|
30076
|
+
super.copy( source );
|
|
30077
|
+
|
|
30078
|
+
this.sourceTexture = source.sourceTexture;
|
|
30079
|
+
|
|
30080
|
+
return this;
|
|
30081
|
+
|
|
30082
|
+
}
|
|
30083
|
+
|
|
30084
|
+
}
|
|
30085
|
+
|
|
30010
30086
|
/**
|
|
30011
30087
|
* A geometry class for representing a capsule.
|
|
30012
30088
|
*
|
|
@@ -34744,7 +34820,7 @@ function pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, px, py) {
|
|
|
34744
34820
|
|
|
34745
34821
|
// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
|
|
34746
34822
|
function isValidDiagonal(a, b) {
|
|
34747
|
-
return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && //
|
|
34823
|
+
return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // doesn't intersect other edges
|
|
34748
34824
|
(locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible
|
|
34749
34825
|
(area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
|
|
34750
34826
|
equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case
|
|
@@ -40289,7 +40365,7 @@ class MeshDepthMaterial extends Material {
|
|
|
40289
40365
|
* Can also be used to customize the shadow casting of an object by assigning
|
|
40290
40366
|
* an instance of `MeshDistanceMaterial` to {@link Object3D#customDistanceMaterial}.
|
|
40291
40367
|
* The following examples demonstrates this approach in order to ensure
|
|
40292
|
-
* transparent parts of objects do
|
|
40368
|
+
* transparent parts of objects do not cast shadows.
|
|
40293
40369
|
*
|
|
40294
40370
|
* @augments Material
|
|
40295
40371
|
*/
|
|
@@ -42670,6 +42746,14 @@ class AnimationClip {
|
|
|
42670
42746
|
*/
|
|
42671
42747
|
this.uuid = generateUUID();
|
|
42672
42748
|
|
|
42749
|
+
/**
|
|
42750
|
+
* An object that can be used to store custom data about the animation clip.
|
|
42751
|
+
* It should not hold references to functions as these will not be cloned.
|
|
42752
|
+
*
|
|
42753
|
+
* @type {Object}
|
|
42754
|
+
*/
|
|
42755
|
+
this.userData = {};
|
|
42756
|
+
|
|
42673
42757
|
// this means it should figure out its duration by scanning the tracks
|
|
42674
42758
|
if ( this.duration < 0 ) {
|
|
42675
42759
|
|
|
@@ -42701,6 +42785,8 @@ class AnimationClip {
|
|
|
42701
42785
|
const clip = new this( json.name, json.duration, tracks, json.blendMode );
|
|
42702
42786
|
clip.uuid = json.uuid;
|
|
42703
42787
|
|
|
42788
|
+
clip.userData = JSON.parse( json.userData || '{}' );
|
|
42789
|
+
|
|
42704
42790
|
return clip;
|
|
42705
42791
|
|
|
42706
42792
|
}
|
|
@@ -42723,7 +42809,8 @@ class AnimationClip {
|
|
|
42723
42809
|
'duration': clip.duration,
|
|
42724
42810
|
'tracks': tracks,
|
|
42725
42811
|
'uuid': clip.uuid,
|
|
42726
|
-
'blendMode': clip.blendMode
|
|
42812
|
+
'blendMode': clip.blendMode,
|
|
42813
|
+
'userData': JSON.stringify( clip.userData ),
|
|
42727
42814
|
|
|
42728
42815
|
};
|
|
42729
42816
|
|
|
@@ -43118,7 +43205,11 @@ class AnimationClip {
|
|
|
43118
43205
|
|
|
43119
43206
|
}
|
|
43120
43207
|
|
|
43121
|
-
|
|
43208
|
+
const clip = new this.constructor( this.name, this.duration, tracks, this.blendMode );
|
|
43209
|
+
|
|
43210
|
+
clip.userData = JSON.parse( JSON.stringify( this.userData ) );
|
|
43211
|
+
|
|
43212
|
+
return clip;
|
|
43122
43213
|
|
|
43123
43214
|
}
|
|
43124
43215
|
|
|
@@ -58587,6 +58678,7 @@ function getTextureTypeByteLength( type ) {
|
|
|
58587
58678
|
case FloatType:
|
|
58588
58679
|
return { byteLength: 4, components: 1 };
|
|
58589
58680
|
case UnsignedInt5999Type:
|
|
58681
|
+
case UnsignedInt101111Type:
|
|
58590
58682
|
return { byteLength: 4, components: 3 };
|
|
58591
58683
|
|
|
58592
58684
|
}
|
|
@@ -58683,4 +58775,4 @@ if ( typeof window !== 'undefined' ) {
|
|
|
58683
58775
|
|
|
58684
58776
|
}
|
|
58685
58777
|
|
|
58686
|
-
export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, BatchedMesh, 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, ConstantAlphaFactor, ConstantColorFactor, Controls, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, CylindricalMapping, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, FrustumArray, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolationSamplingMode, InterpolationSamplingType, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, Material, MaterialLoader, MathUtils, Matrix2, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RAD2DEG, 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, RGBDepthPacking, RGBFormat, RGBIntegerFormat, 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, RGDepthPacking, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RenderTarget3D, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, Scene, 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, TextureUtils, Timer, TimestampQuery, TorusGeometry, TorusKnotGeometry, TriPlanarMapping, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLRenderTarget, WebGPUCoordinateSystem, WebXRController, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, arrayNeedsUint32, cloneUniforms, createCanvasElement, createElementNS, getByteLength, getUnlitUniformColorSpace, mergeUniforms, probeAsync, warnOnce };
|
|
58778
|
+
export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, BatchedMesh, 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, ConstantAlphaFactor, ConstantColorFactor, Controls, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, CylindricalMapping, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExternalTexture, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, FrustumArray, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolationSamplingMode, InterpolationSamplingType, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, Material, MaterialLoader, MathUtils, Matrix2, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RAD2DEG, 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, RGBDepthPacking, RGBFormat, RGBIntegerFormat, 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, RGDepthPacking, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RenderTarget3D, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, Scene, 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, TextureUtils, Timer, TimestampQuery, TorusGeometry, TorusKnotGeometry, TriPlanarMapping, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsUtils, UnsignedByteType, UnsignedInt101111Type, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLRenderTarget, WebGPUCoordinateSystem, WebXRController, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, arrayNeedsUint32, cloneUniforms, createCanvasElement, createElementNS, getByteLength, getUnlitUniformColorSpace, mergeUniforms, probeAsync, warnOnce };
|