@plastic-software/three 0.178.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/README.md +1 -1
- package/build/three.cjs +950 -230
- package/build/three.core.js +754 -138
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +197 -96
- package/build/three.module.min.js +1 -1
- package/build/three.tsl.js +99 -25
- package/build/three.tsl.min.js +1 -1
- package/build/three.webgpu.js +4586 -1499
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +4544 -1499
- package/build/three.webgpu.nodes.min.js +1 -1
- package/examples/jsm/Addons.js +2 -3
- package/examples/jsm/capabilities/WebGPU.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/csm/CSMShadowNode.js +4 -4
- package/examples/jsm/environments/RoomEnvironment.js +8 -3
- 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/exporters/USDZExporter.js +676 -299
- package/examples/jsm/geometries/RoundedBoxGeometry.js +47 -8
- package/examples/jsm/interactive/HTMLMesh.js +5 -3
- package/examples/jsm/libs/ktx-parse.module.js +1 -1
- package/examples/jsm/libs/meshopt_decoder.module.js +75 -58
- package/examples/jsm/lights/LightProbeGenerator.js +14 -3
- 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 +210 -22
- package/examples/jsm/loaders/FBXLoader.js +1 -1
- 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/MaterialXLoader.js +212 -30
- package/examples/jsm/loaders/RGBELoader.js +7 -473
- package/examples/jsm/loaders/TTFLoader.js +13 -1
- package/examples/jsm/loaders/USDLoader.js +219 -0
- package/examples/jsm/loaders/USDZLoader.js +4 -892
- package/examples/jsm/loaders/UltraHDRLoader.js +1 -1
- package/examples/jsm/loaders/lwo/IFFParser.js +1 -1
- package/examples/jsm/loaders/usd/USDAParser.js +741 -0
- package/examples/jsm/loaders/usd/USDCParser.js +17 -0
- 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/objects/LensflareMesh.js +3 -3
- package/examples/jsm/objects/SkyMesh.js +2 -2
- package/examples/jsm/physics/RapierPhysics.js +14 -5
- package/examples/jsm/postprocessing/GTAOPass.js +10 -9
- package/examples/jsm/postprocessing/OutlinePass.js +17 -17
- package/examples/jsm/postprocessing/SSAOPass.js +10 -9
- package/examples/jsm/postprocessing/SSRPass.js +37 -8
- package/examples/jsm/shaders/UnpackDepthRGBAShader.js +11 -2
- package/examples/jsm/transpiler/GLSLDecoder.js +23 -20
- 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 +7 -6
- 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 +51 -41
- package/examples/jsm/tsl/display/OutlineNode.js +2 -2
- package/examples/jsm/tsl/display/SSRNode.js +180 -65
- package/examples/jsm/tsl/display/{TRAAPassNode.js → TRAANode.js} +181 -172
- package/examples/jsm/tsl/display/boxBlur.js +64 -0
- package/examples/jsm/tsl/display/hashBlur.js +15 -18
- package/examples/jsm/tsl/lighting/TiledLightsNode.js +1 -1
- 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 +2 -0
- package/src/Three.TSL.js +98 -24
- package/src/animation/AnimationClip.js +17 -2
- package/src/animation/KeyframeTrack.js +1 -1
- package/src/animation/tracks/BooleanKeyframeTrack.js +1 -1
- package/src/animation/tracks/StringKeyframeTrack.js +1 -1
- package/src/cameras/Camera.js +14 -0
- package/src/cameras/OrthographicCamera.js +1 -1
- package/src/cameras/PerspectiveCamera.js +1 -1
- package/src/constants.js +11 -3
- package/src/core/BufferGeometry.js +2 -2
- package/{examples/jsm/misc → src/core}/Timer.js +4 -42
- package/src/extras/PMREMGenerator.js +11 -0
- package/src/extras/TextureUtils.js +2 -1
- package/src/extras/lib/earcut.js +1 -1
- package/src/helpers/CameraHelper.js +41 -11
- package/src/helpers/SkeletonHelper.js +35 -6
- package/src/lights/LightShadow.js +21 -8
- package/src/lights/PointLightShadow.js +1 -1
- package/src/lights/webgpu/ProjectorLight.js +1 -1
- package/src/loaders/FileLoader.js +25 -2
- package/src/loaders/ImageBitmapLoader.js +23 -0
- package/src/loaders/Loader.js +14 -0
- package/src/loaders/LoadingManager.js +23 -0
- package/src/materials/Material.js +12 -0
- package/src/materials/MeshBasicMaterial.js +1 -1
- package/src/materials/MeshDistanceMaterial.js +1 -1
- package/src/materials/nodes/Line2NodeMaterial.js +0 -8
- package/src/materials/nodes/NodeMaterial.js +1 -1
- package/src/materials/nodes/PointsNodeMaterial.js +86 -28
- package/src/materials/nodes/SpriteNodeMaterial.js +3 -15
- package/src/materials/nodes/manager/NodeMaterialObserver.js +87 -2
- package/src/math/ColorManagement.js +7 -1
- package/src/math/Frustum.js +19 -8
- package/src/math/FrustumArray.js +10 -5
- package/src/math/Line3.js +129 -2
- package/src/math/Matrix4.js +48 -27
- package/src/math/Spherical.js +2 -2
- package/src/nodes/Nodes.js +4 -0
- package/src/nodes/TSL.js +4 -0
- package/src/nodes/accessors/BufferNode.js +1 -1
- package/src/nodes/accessors/Camera.js +142 -16
- 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/Normal.js +11 -11
- package/src/nodes/accessors/Object3DNode.js +1 -1
- package/src/nodes/accessors/ReferenceBaseNode.js +1 -1
- package/src/nodes/accessors/ReferenceNode.js +19 -4
- package/src/nodes/accessors/SceneNode.js +1 -1
- package/src/nodes/accessors/StorageTextureNode.js +1 -1
- package/src/nodes/accessors/Texture3DNode.js +13 -0
- package/src/nodes/accessors/TextureNode.js +83 -19
- package/src/nodes/code/FunctionCallNode.js +19 -0
- package/src/nodes/code/FunctionNode.js +23 -0
- package/src/nodes/core/ArrayNode.js +12 -0
- package/src/nodes/core/AssignNode.js +6 -2
- package/src/nodes/core/ContextNode.js +44 -1
- package/src/nodes/core/Node.js +30 -22
- package/src/nodes/core/NodeBuilder.js +71 -32
- package/src/nodes/core/NodeFrame.js +1 -1
- package/src/nodes/core/NodeUniform.js +1 -1
- package/src/nodes/core/NodeUtils.js +5 -3
- package/src/nodes/core/StackNode.js +71 -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 +79 -14
- package/src/nodes/core/VarNode.js +83 -15
- package/src/nodes/display/FrontFacingNode.js +4 -8
- package/src/nodes/display/PassNode.js +148 -2
- 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 +94 -4
- package/src/nodes/functions/PhysicalLightingModel.js +2 -2
- package/src/nodes/gpgpu/AtomicFunctionNode.js +1 -1
- package/src/nodes/gpgpu/ComputeNode.js +67 -23
- package/src/nodes/gpgpu/SubgroupFunctionNode.js +430 -0
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +28 -3
- package/src/nodes/lighting/LightsNode.js +1 -1
- package/src/nodes/lighting/ProjectorLightNode.js +19 -6
- package/src/nodes/lighting/ShadowFilterNode.js +1 -1
- package/src/nodes/materialx/MaterialXNodes.js +131 -2
- package/src/nodes/materialx/lib/mx_noise.js +165 -1
- package/src/nodes/math/BitcastNode.js +156 -0
- package/src/nodes/math/ConditionalNode.js +19 -3
- package/src/nodes/math/MathNode.js +72 -60
- package/src/nodes/math/OperatorNode.js +26 -25
- package/src/nodes/tsl/TSLCore.js +477 -142
- package/src/nodes/utils/DebugNode.js +1 -1
- package/src/nodes/utils/EventNode.js +83 -0
- package/src/nodes/utils/JoinNode.js +3 -1
- package/src/nodes/utils/MemberNode.js +58 -7
- package/src/nodes/utils/RTTNode.js +10 -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 +6 -4
- package/src/objects/LOD.js +1 -1
- package/src/objects/Sprite.js +2 -2
- package/src/renderers/WebGLRenderer.js +21 -31
- package/src/renderers/common/Attributes.js +1 -1
- package/src/renderers/common/Backend.js +19 -1
- package/src/renderers/common/Bindings.js +21 -18
- package/src/renderers/common/ChainMap.js +1 -1
- package/src/renderers/common/Color4.js +2 -2
- package/src/renderers/common/DataMap.js +1 -1
- package/src/renderers/common/Pipelines.js +1 -1
- package/src/renderers/common/PostProcessing.js +60 -5
- package/src/renderers/common/RenderContext.js +2 -2
- package/src/renderers/common/RenderObject.js +14 -2
- package/src/renderers/common/Renderer.js +55 -32
- package/src/renderers/common/SampledTexture.js +4 -72
- package/src/renderers/common/Sampler.js +91 -0
- package/src/renderers/common/Storage3DTexture.js +21 -0
- package/src/renderers/common/StorageArrayTexture.js +21 -0
- package/src/renderers/common/StorageTexture.js +19 -0
- package/src/renderers/common/Textures.js +52 -14
- package/src/renderers/common/TimestampQueryPool.js +3 -3
- package/src/renderers/common/XRManager.js +51 -17
- package/src/renderers/common/nodes/NodeBuilderState.js +1 -1
- package/src/renderers/common/nodes/NodeLibrary.js +5 -5
- package/src/renderers/common/nodes/NodeSampledTexture.js +0 -12
- 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 +21 -11
- package/src/renderers/shaders/ShaderLib/depth.glsl.js +11 -2
- package/src/renderers/webgl/WebGLCapabilities.js +2 -2
- package/src/renderers/webgl/WebGLMaterials.js +6 -6
- package/src/renderers/webgl/WebGLProgram.js +24 -18
- package/src/renderers/webgl/WebGLPrograms.js +4 -4
- package/src/renderers/webgl/WebGLShadowMap.js +11 -1
- package/src/renderers/webgl/WebGLTextures.js +20 -7
- package/src/renderers/webgl/WebGLUtils.js +3 -2
- package/src/renderers/webgl-fallback/WebGLBackend.js +207 -146
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +112 -19
- 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 +87 -44
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +169 -99
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +35 -31
- package/src/renderers/webgpu/utils/WebGPUConstants.js +2 -2
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +10 -19
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +120 -84
- package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +3 -3
- package/src/renderers/webgpu/utils/WebGPUUtils.js +2 -17
- package/src/renderers/webxr/WebXRDepthSensing.js +6 -10
- package/src/renderers/webxr/WebXRManager.js +86 -11
- package/src/textures/ExternalTexture.js +56 -0
- package/src/textures/FramebufferTexture.js +2 -2
- package/src/textures/Source.js +12 -2
- package/src/textures/VideoTexture.js +27 -2
- 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
|
/**
|
|
@@ -6283,38 +6291,6 @@ function probeAsync( gl, sync, interval ) {
|
|
|
6283
6291
|
|
|
6284
6292
|
}
|
|
6285
6293
|
|
|
6286
|
-
function toNormalizedProjectionMatrix( projectionMatrix ) {
|
|
6287
|
-
|
|
6288
|
-
const m = projectionMatrix.elements;
|
|
6289
|
-
|
|
6290
|
-
// Convert [-1, 1] to [0, 1] projection matrix
|
|
6291
|
-
m[ 2 ] = 0.5 * m[ 2 ] + 0.5 * m[ 3 ];
|
|
6292
|
-
m[ 6 ] = 0.5 * m[ 6 ] + 0.5 * m[ 7 ];
|
|
6293
|
-
m[ 10 ] = 0.5 * m[ 10 ] + 0.5 * m[ 11 ];
|
|
6294
|
-
m[ 14 ] = 0.5 * m[ 14 ] + 0.5 * m[ 15 ];
|
|
6295
|
-
|
|
6296
|
-
}
|
|
6297
|
-
|
|
6298
|
-
function toReversedProjectionMatrix( projectionMatrix ) {
|
|
6299
|
-
|
|
6300
|
-
const m = projectionMatrix.elements;
|
|
6301
|
-
const isPerspectiveMatrix = m[ 11 ] === -1;
|
|
6302
|
-
|
|
6303
|
-
// Reverse [0, 1] projection matrix
|
|
6304
|
-
if ( isPerspectiveMatrix ) {
|
|
6305
|
-
|
|
6306
|
-
m[ 10 ] = - m[ 10 ] - 1;
|
|
6307
|
-
m[ 14 ] = - m[ 14 ];
|
|
6308
|
-
|
|
6309
|
-
} else {
|
|
6310
|
-
|
|
6311
|
-
m[ 10 ] = - m[ 10 ];
|
|
6312
|
-
m[ 14 ] = - m[ 14 ] + 1;
|
|
6313
|
-
|
|
6314
|
-
}
|
|
6315
|
-
|
|
6316
|
-
}
|
|
6317
|
-
|
|
6318
6294
|
const LINEAR_REC709_TO_XYZ = /*@__PURE__*/ new Matrix3().set(
|
|
6319
6295
|
0.4123908, 0.3575843, 0.1804808,
|
|
6320
6296
|
0.2126390, 0.7151687, 0.0721923,
|
|
@@ -6347,7 +6323,7 @@ function createColorManagement() {
|
|
|
6347
6323
|
* - luminanceCoefficients: RGB luminance coefficients
|
|
6348
6324
|
*
|
|
6349
6325
|
* Optional:
|
|
6350
|
-
* - outputColorSpaceConfig: { drawingBufferColorSpace: ColorSpace }
|
|
6326
|
+
* - outputColorSpaceConfig: { drawingBufferColorSpace: ColorSpace, toneMappingMode: 'extended' | 'standard' }
|
|
6351
6327
|
* - workingColorSpaceConfig: { unpackColorSpace: ColorSpace }
|
|
6352
6328
|
*
|
|
6353
6329
|
* Reference:
|
|
@@ -6416,6 +6392,12 @@ function createColorManagement() {
|
|
|
6416
6392
|
|
|
6417
6393
|
},
|
|
6418
6394
|
|
|
6395
|
+
getToneMappingMode: function ( colorSpace ) {
|
|
6396
|
+
|
|
6397
|
+
return this.spaces[ colorSpace ].outputColorSpaceConfig.toneMappingMode || 'standard';
|
|
6398
|
+
|
|
6399
|
+
},
|
|
6400
|
+
|
|
6419
6401
|
getLuminanceCoefficients: function ( target, colorSpace = this.workingColorSpace ) {
|
|
6420
6402
|
|
|
6421
6403
|
return target.fromArray( this.spaces[ colorSpace ].luminanceCoefficients );
|
|
@@ -6726,13 +6708,23 @@ class Source {
|
|
|
6726
6708
|
|
|
6727
6709
|
}
|
|
6728
6710
|
|
|
6711
|
+
/**
|
|
6712
|
+
* Returns the dimensions of the source into the given target vector.
|
|
6713
|
+
*
|
|
6714
|
+
* @param {(Vector2|Vector3)} target - The target object the result is written into.
|
|
6715
|
+
* @return {(Vector2|Vector3)} The dimensions of the source.
|
|
6716
|
+
*/
|
|
6729
6717
|
getSize( target ) {
|
|
6730
6718
|
|
|
6731
6719
|
const data = this.data;
|
|
6732
6720
|
|
|
6733
|
-
if ( data instanceof HTMLVideoElement ) {
|
|
6721
|
+
if ( ( typeof HTMLVideoElement !== 'undefined' ) && ( data instanceof HTMLVideoElement ) ) {
|
|
6722
|
+
|
|
6723
|
+
target.set( data.videoWidth, data.videoHeight, 0 );
|
|
6734
6724
|
|
|
6735
|
-
|
|
6725
|
+
} else if ( data instanceof VideoFrame ) {
|
|
6726
|
+
|
|
6727
|
+
target.set( data.displayHeight, data.displayWidth, 0 );
|
|
6736
6728
|
|
|
6737
6729
|
} else if ( data !== null ) {
|
|
6738
6730
|
|
|
@@ -12415,11 +12407,13 @@ class Matrix4 {
|
|
|
12415
12407
|
* @param {number} near - The distance from the camera to the near plane.
|
|
12416
12408
|
* @param {number} far - The distance from the camera to the far plane.
|
|
12417
12409
|
* @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} [coordinateSystem=WebGLCoordinateSystem] - The coordinate system.
|
|
12410
|
+
* @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
|
|
12418
12411
|
* @return {Matrix4} A reference to this matrix.
|
|
12419
12412
|
*/
|
|
12420
|
-
makePerspective( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) {
|
|
12413
|
+
makePerspective( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem, reversedDepth = false ) {
|
|
12421
12414
|
|
|
12422
12415
|
const te = this.elements;
|
|
12416
|
+
|
|
12423
12417
|
const x = 2 * near / ( right - left );
|
|
12424
12418
|
const y = 2 * near / ( top - bottom );
|
|
12425
12419
|
|
|
@@ -12428,19 +12422,28 @@ class Matrix4 {
|
|
|
12428
12422
|
|
|
12429
12423
|
let c, d;
|
|
12430
12424
|
|
|
12431
|
-
if (
|
|
12425
|
+
if ( reversedDepth ) {
|
|
12432
12426
|
|
|
12433
|
-
c =
|
|
12434
|
-
d = (
|
|
12427
|
+
c = near / ( far - near );
|
|
12428
|
+
d = ( far * near ) / ( far - near );
|
|
12435
12429
|
|
|
12436
|
-
} else
|
|
12430
|
+
} else {
|
|
12437
12431
|
|
|
12438
|
-
|
|
12439
|
-
d = ( - far * near ) / ( far - near );
|
|
12432
|
+
if ( coordinateSystem === WebGLCoordinateSystem ) {
|
|
12440
12433
|
|
|
12441
|
-
|
|
12434
|
+
c = - ( far + near ) / ( far - near );
|
|
12435
|
+
d = ( -2 * far * near ) / ( far - near );
|
|
12436
|
+
|
|
12437
|
+
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
12442
12438
|
|
|
12443
|
-
|
|
12439
|
+
c = - far / ( far - near );
|
|
12440
|
+
d = ( - far * near ) / ( far - near );
|
|
12441
|
+
|
|
12442
|
+
} else {
|
|
12443
|
+
|
|
12444
|
+
throw new Error( 'THREE.Matrix4.makePerspective(): Invalid coordinate system: ' + coordinateSystem );
|
|
12445
|
+
|
|
12446
|
+
}
|
|
12444
12447
|
|
|
12445
12448
|
}
|
|
12446
12449
|
|
|
@@ -12464,39 +12467,49 @@ class Matrix4 {
|
|
|
12464
12467
|
* @param {number} near - The distance from the camera to the near plane.
|
|
12465
12468
|
* @param {number} far - The distance from the camera to the far plane.
|
|
12466
12469
|
* @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} [coordinateSystem=WebGLCoordinateSystem] - The coordinate system.
|
|
12470
|
+
* @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
|
|
12467
12471
|
* @return {Matrix4} A reference to this matrix.
|
|
12468
12472
|
*/
|
|
12469
|
-
makeOrthographic( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) {
|
|
12473
|
+
makeOrthographic( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem, reversedDepth = false ) {
|
|
12470
12474
|
|
|
12471
12475
|
const te = this.elements;
|
|
12472
|
-
const w = 1.0 / ( right - left );
|
|
12473
|
-
const h = 1.0 / ( top - bottom );
|
|
12474
|
-
const p = 1.0 / ( far - near );
|
|
12475
12476
|
|
|
12476
|
-
const x = ( right
|
|
12477
|
-
const y = ( top
|
|
12477
|
+
const x = 2 / ( right - left );
|
|
12478
|
+
const y = 2 / ( top - bottom );
|
|
12478
12479
|
|
|
12479
|
-
|
|
12480
|
+
const a = - ( right + left ) / ( right - left );
|
|
12481
|
+
const b = - ( top + bottom ) / ( top - bottom );
|
|
12480
12482
|
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
z = ( far + near ) * p;
|
|
12484
|
-
zInv = -2 * p;
|
|
12483
|
+
let c, d;
|
|
12485
12484
|
|
|
12486
|
-
|
|
12485
|
+
if ( reversedDepth ) {
|
|
12487
12486
|
|
|
12488
|
-
|
|
12489
|
-
|
|
12487
|
+
c = 1 / ( far - near );
|
|
12488
|
+
d = far / ( far - near );
|
|
12490
12489
|
|
|
12491
12490
|
} else {
|
|
12492
12491
|
|
|
12493
|
-
|
|
12492
|
+
if ( coordinateSystem === WebGLCoordinateSystem ) {
|
|
12493
|
+
|
|
12494
|
+
c = -2 / ( far - near );
|
|
12495
|
+
d = - ( far + near ) / ( far - near );
|
|
12496
|
+
|
|
12497
|
+
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
12498
|
+
|
|
12499
|
+
c = -1 / ( far - near );
|
|
12500
|
+
d = - near / ( far - near );
|
|
12501
|
+
|
|
12502
|
+
} else {
|
|
12503
|
+
|
|
12504
|
+
throw new Error( 'THREE.Matrix4.makeOrthographic(): Invalid coordinate system: ' + coordinateSystem );
|
|
12505
|
+
|
|
12506
|
+
}
|
|
12494
12507
|
|
|
12495
12508
|
}
|
|
12496
12509
|
|
|
12497
|
-
te[ 0 ] =
|
|
12498
|
-
te[ 1 ] = 0; te[ 5 ] =
|
|
12499
|
-
te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] =
|
|
12510
|
+
te[ 0 ] = x; te[ 4 ] = 0; te[ 8 ] = 0; te[ 12 ] = a;
|
|
12511
|
+
te[ 1 ] = 0; te[ 5 ] = y; te[ 9 ] = 0; te[ 13 ] = b;
|
|
12512
|
+
te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = c; te[ 14 ] = d;
|
|
12500
12513
|
te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = 0; te[ 15 ] = 1;
|
|
12501
12514
|
|
|
12502
12515
|
return this;
|
|
@@ -16916,6 +16929,18 @@ class Material extends EventDispatcher {
|
|
|
16916
16929
|
|
|
16917
16930
|
}
|
|
16918
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
|
+
|
|
16919
16944
|
if ( this.dispersion !== undefined ) data.dispersion = this.dispersion;
|
|
16920
16945
|
|
|
16921
16946
|
if ( this.iridescence !== undefined ) data.iridescence = this.iridescence;
|
|
@@ -17290,7 +17315,7 @@ class MeshBasicMaterial extends Material {
|
|
|
17290
17315
|
* @type {Color}
|
|
17291
17316
|
* @default (1,1,1)
|
|
17292
17317
|
*/
|
|
17293
|
-
this.color = new Color( 0xffffff ); //
|
|
17318
|
+
this.color = new Color( 0xffffff ); // diffuse
|
|
17294
17319
|
|
|
17295
17320
|
/**
|
|
17296
17321
|
* The color map. May optionally include an alpha channel, typically combined
|
|
@@ -18873,7 +18898,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
18873
18898
|
/**
|
|
18874
18899
|
* Bounding box for the geometry which can be calculated with `computeBoundingBox()`.
|
|
18875
18900
|
*
|
|
18876
|
-
* @type {Box3}
|
|
18901
|
+
* @type {?Box3}
|
|
18877
18902
|
* @default null
|
|
18878
18903
|
*/
|
|
18879
18904
|
this.boundingBox = null;
|
|
@@ -18881,7 +18906,7 @@ class BufferGeometry extends EventDispatcher {
|
|
|
18881
18906
|
/**
|
|
18882
18907
|
* Bounding sphere for the geometry which can be calculated with `computeBoundingSphere()`.
|
|
18883
18908
|
*
|
|
18884
|
-
* @type {Sphere}
|
|
18909
|
+
* @type {?Sphere}
|
|
18885
18910
|
* @default null
|
|
18886
18911
|
*/
|
|
18887
18912
|
this.boundingSphere = null;
|
|
@@ -21400,6 +21425,20 @@ class Camera extends Object3D {
|
|
|
21400
21425
|
*/
|
|
21401
21426
|
this.coordinateSystem = WebGLCoordinateSystem;
|
|
21402
21427
|
|
|
21428
|
+
this._reversedDepth = false;
|
|
21429
|
+
|
|
21430
|
+
}
|
|
21431
|
+
|
|
21432
|
+
/**
|
|
21433
|
+
* The flag that indicates whether the camera uses a reversed depth buffer.
|
|
21434
|
+
*
|
|
21435
|
+
* @type {boolean}
|
|
21436
|
+
* @default false
|
|
21437
|
+
*/
|
|
21438
|
+
get reversedDepth() {
|
|
21439
|
+
|
|
21440
|
+
return this._reversedDepth;
|
|
21441
|
+
|
|
21403
21442
|
}
|
|
21404
21443
|
|
|
21405
21444
|
copy( source, recursive ) {
|
|
@@ -21827,7 +21866,7 @@ class PerspectiveCamera extends Camera {
|
|
|
21827
21866
|
const skew = this.filmOffset;
|
|
21828
21867
|
if ( skew !== 0 ) left += near * skew / this.getFilmWidth();
|
|
21829
21868
|
|
|
21830
|
-
this.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far, this.coordinateSystem );
|
|
21869
|
+
this.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far, this.coordinateSystem, this.reversedDepth );
|
|
21831
21870
|
|
|
21832
21871
|
this.projectionMatrixInverse.copy( this.projectionMatrix ).invert();
|
|
21833
21872
|
|
|
@@ -24141,7 +24180,7 @@ class Sprite extends Object3D {
|
|
|
24141
24180
|
/**
|
|
24142
24181
|
* Constructs a new sprite.
|
|
24143
24182
|
*
|
|
24144
|
-
* @param {SpriteMaterial} [material] - The sprite material.
|
|
24183
|
+
* @param {(SpriteMaterial|SpriteNodeMaterial)} [material] - The sprite material.
|
|
24145
24184
|
*/
|
|
24146
24185
|
constructor( material = new SpriteMaterial() ) {
|
|
24147
24186
|
|
|
@@ -24187,7 +24226,7 @@ class Sprite extends Object3D {
|
|
|
24187
24226
|
/**
|
|
24188
24227
|
* The sprite material.
|
|
24189
24228
|
*
|
|
24190
|
-
* @type {SpriteMaterial}
|
|
24229
|
+
* @type {(SpriteMaterial|SpriteNodeMaterial)}
|
|
24191
24230
|
*/
|
|
24192
24231
|
this.material = material;
|
|
24193
24232
|
|
|
@@ -24516,7 +24555,7 @@ class LOD extends Object3D {
|
|
|
24516
24555
|
* the given distance.
|
|
24517
24556
|
*
|
|
24518
24557
|
* @param {number} distance - The LOD distance.
|
|
24519
|
-
* @return {Object3D
|
|
24558
|
+
* @return {?Object3D} The found 3D object. `null` if no 3D object has been found.
|
|
24520
24559
|
*/
|
|
24521
24560
|
getObjectForDistance( distance ) {
|
|
24522
24561
|
|
|
@@ -26391,9 +26430,10 @@ class Frustum {
|
|
|
26391
26430
|
*
|
|
26392
26431
|
* @param {Matrix4} m - The projection matrix.
|
|
26393
26432
|
* @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} coordinateSystem - The coordinate system.
|
|
26433
|
+
* @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
|
|
26394
26434
|
* @return {Frustum} A reference to this frustum.
|
|
26395
26435
|
*/
|
|
26396
|
-
setFromProjectionMatrix( m, coordinateSystem = WebGLCoordinateSystem ) {
|
|
26436
|
+
setFromProjectionMatrix( m, coordinateSystem = WebGLCoordinateSystem, reversedDepth = false ) {
|
|
26397
26437
|
|
|
26398
26438
|
const planes = this.planes;
|
|
26399
26439
|
const me = m.elements;
|
|
@@ -26406,19 +26446,29 @@ class Frustum {
|
|
|
26406
26446
|
planes[ 1 ].setComponents( me3 + me0, me7 + me4, me11 + me8, me15 + me12 ).normalize();
|
|
26407
26447
|
planes[ 2 ].setComponents( me3 + me1, me7 + me5, me11 + me9, me15 + me13 ).normalize();
|
|
26408
26448
|
planes[ 3 ].setComponents( me3 - me1, me7 - me5, me11 - me9, me15 - me13 ).normalize();
|
|
26409
|
-
planes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize();
|
|
26410
26449
|
|
|
26411
|
-
if (
|
|
26450
|
+
if ( reversedDepth ) {
|
|
26412
26451
|
|
|
26413
|
-
planes[
|
|
26452
|
+
planes[ 4 ].setComponents( me2, me6, me10, me14 ).normalize(); // far
|
|
26453
|
+
planes[ 5 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize(); // near
|
|
26414
26454
|
|
|
26415
|
-
} else
|
|
26455
|
+
} else {
|
|
26416
26456
|
|
|
26417
|
-
planes[
|
|
26457
|
+
planes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize(); // far
|
|
26418
26458
|
|
|
26419
|
-
|
|
26459
|
+
if ( coordinateSystem === WebGLCoordinateSystem ) {
|
|
26460
|
+
|
|
26461
|
+
planes[ 5 ].setComponents( me3 + me2, me7 + me6, me11 + me10, me15 + me14 ).normalize(); // near
|
|
26420
26462
|
|
|
26421
|
-
|
|
26463
|
+
} else if ( coordinateSystem === WebGPUCoordinateSystem ) {
|
|
26464
|
+
|
|
26465
|
+
planes[ 5 ].setComponents( me2, me6, me10, me14 ).normalize(); // near
|
|
26466
|
+
|
|
26467
|
+
} else {
|
|
26468
|
+
|
|
26469
|
+
throw new Error( 'THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: ' + coordinateSystem );
|
|
26470
|
+
|
|
26471
|
+
}
|
|
26422
26472
|
|
|
26423
26473
|
}
|
|
26424
26474
|
|
|
@@ -26624,7 +26674,8 @@ class FrustumArray {
|
|
|
26624
26674
|
|
|
26625
26675
|
_frustum$1.setFromProjectionMatrix(
|
|
26626
26676
|
_projScreenMatrix$2,
|
|
26627
|
-
|
|
26677
|
+
camera.coordinateSystem,
|
|
26678
|
+
camera.reversedDepth
|
|
26628
26679
|
);
|
|
26629
26680
|
|
|
26630
26681
|
if ( _frustum$1.intersectsObject( object ) ) {
|
|
@@ -26666,7 +26717,8 @@ class FrustumArray {
|
|
|
26666
26717
|
|
|
26667
26718
|
_frustum$1.setFromProjectionMatrix(
|
|
26668
26719
|
_projScreenMatrix$2,
|
|
26669
|
-
|
|
26720
|
+
camera.coordinateSystem,
|
|
26721
|
+
camera.reversedDepth
|
|
26670
26722
|
);
|
|
26671
26723
|
|
|
26672
26724
|
if ( _frustum$1.intersectsSprite( sprite ) ) {
|
|
@@ -26708,7 +26760,8 @@ class FrustumArray {
|
|
|
26708
26760
|
|
|
26709
26761
|
_frustum$1.setFromProjectionMatrix(
|
|
26710
26762
|
_projScreenMatrix$2,
|
|
26711
|
-
|
|
26763
|
+
camera.coordinateSystem,
|
|
26764
|
+
camera.reversedDepth
|
|
26712
26765
|
);
|
|
26713
26766
|
|
|
26714
26767
|
if ( _frustum$1.intersectsSphere( sphere ) ) {
|
|
@@ -26750,7 +26803,8 @@ class FrustumArray {
|
|
|
26750
26803
|
|
|
26751
26804
|
_frustum$1.setFromProjectionMatrix(
|
|
26752
26805
|
_projScreenMatrix$2,
|
|
26753
|
-
|
|
26806
|
+
camera.coordinateSystem,
|
|
26807
|
+
camera.reversedDepth
|
|
26754
26808
|
);
|
|
26755
26809
|
|
|
26756
26810
|
if ( _frustum$1.intersectsBox( box ) ) {
|
|
@@ -26792,7 +26846,8 @@ class FrustumArray {
|
|
|
26792
26846
|
|
|
26793
26847
|
_frustum$1.setFromProjectionMatrix(
|
|
26794
26848
|
_projScreenMatrix$2,
|
|
26795
|
-
|
|
26849
|
+
camera.coordinateSystem,
|
|
26850
|
+
camera.reversedDepth
|
|
26796
26851
|
);
|
|
26797
26852
|
|
|
26798
26853
|
if ( _frustum$1.containsPoint( point ) ) {
|
|
@@ -27779,7 +27834,7 @@ class BatchedMesh extends Mesh {
|
|
|
27779
27834
|
*
|
|
27780
27835
|
* @param {number} geometryId - The ID of the geometry to return the bounding box for.
|
|
27781
27836
|
* @param {Box3} target - The target object that is used to store the method's result.
|
|
27782
|
-
* @return {Box3
|
|
27837
|
+
* @return {?Box3} The geometry's bounding box. Returns `null` if no geometry has been found for the given ID.
|
|
27783
27838
|
*/
|
|
27784
27839
|
getBoundingBoxAt( geometryId, target ) {
|
|
27785
27840
|
|
|
@@ -27824,7 +27879,7 @@ class BatchedMesh extends Mesh {
|
|
|
27824
27879
|
*
|
|
27825
27880
|
* @param {number} geometryId - The ID of the geometry to return the bounding sphere for.
|
|
27826
27881
|
* @param {Sphere} target - The target object that is used to store the method's result.
|
|
27827
|
-
* @return {Sphere
|
|
27882
|
+
* @return {?Sphere} The geometry's bounding sphere. Returns `null` if no geometry has been found for the given ID.
|
|
27828
27883
|
*/
|
|
27829
27884
|
getBoundingSphereAt( geometryId, target ) {
|
|
27830
27885
|
|
|
@@ -28059,7 +28114,7 @@ class BatchedMesh extends Mesh {
|
|
|
28059
28114
|
const availableInstanceIds = this._availableInstanceIds;
|
|
28060
28115
|
const instanceInfo = this._instanceInfo;
|
|
28061
28116
|
availableInstanceIds.sort( ascIdSort );
|
|
28062
|
-
while ( availableInstanceIds[ availableInstanceIds.length - 1 ] === instanceInfo.length ) {
|
|
28117
|
+
while ( availableInstanceIds[ availableInstanceIds.length - 1 ] === instanceInfo.length - 1 ) {
|
|
28063
28118
|
|
|
28064
28119
|
instanceInfo.pop();
|
|
28065
28120
|
availableInstanceIds.pop();
|
|
@@ -28337,9 +28392,11 @@ class BatchedMesh extends Mesh {
|
|
|
28337
28392
|
_matrix$1
|
|
28338
28393
|
.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse )
|
|
28339
28394
|
.multiply( this.matrixWorld );
|
|
28395
|
+
|
|
28340
28396
|
_frustum.setFromProjectionMatrix(
|
|
28341
28397
|
_matrix$1,
|
|
28342
|
-
|
|
28398
|
+
camera.coordinateSystem,
|
|
28399
|
+
camera.reversedDepth
|
|
28343
28400
|
);
|
|
28344
28401
|
|
|
28345
28402
|
}
|
|
@@ -29358,6 +29415,9 @@ function testPoint( point, index, localThresholdSq, matrixWorld, raycaster, inte
|
|
|
29358
29415
|
* const texture = new THREE.VideoTexture( video );
|
|
29359
29416
|
* ```
|
|
29360
29417
|
*
|
|
29418
|
+
* Note: When using video textures with {@link WebGPURenderer}, {@link Texture#colorSpace} must be
|
|
29419
|
+
* set to THREE.SRGBColorSpace.
|
|
29420
|
+
*
|
|
29361
29421
|
* Note: After the initial use of a texture, its dimensions, format, and type
|
|
29362
29422
|
* cannot be changed. Instead, call {@link Texture#dispose} on the texture and instantiate a new one.
|
|
29363
29423
|
*
|
|
@@ -29401,18 +29461,28 @@ class VideoTexture extends Texture {
|
|
|
29401
29461
|
*/
|
|
29402
29462
|
this.generateMipmaps = false;
|
|
29403
29463
|
|
|
29464
|
+
/**
|
|
29465
|
+
* The video frame request callback identifier, which is a positive integer.
|
|
29466
|
+
*
|
|
29467
|
+
* Value of 0 represents no scheduled rVFC.
|
|
29468
|
+
*
|
|
29469
|
+
* @private
|
|
29470
|
+
* @type {number}
|
|
29471
|
+
*/
|
|
29472
|
+
this._requestVideoFrameCallbackId = 0;
|
|
29473
|
+
|
|
29404
29474
|
const scope = this;
|
|
29405
29475
|
|
|
29406
29476
|
function updateVideo() {
|
|
29407
29477
|
|
|
29408
29478
|
scope.needsUpdate = true;
|
|
29409
|
-
video.requestVideoFrameCallback( updateVideo );
|
|
29479
|
+
scope._requestVideoFrameCallbackId = video.requestVideoFrameCallback( updateVideo );
|
|
29410
29480
|
|
|
29411
29481
|
}
|
|
29412
29482
|
|
|
29413
29483
|
if ( 'requestVideoFrameCallback' in video ) {
|
|
29414
29484
|
|
|
29415
|
-
video.requestVideoFrameCallback( updateVideo );
|
|
29485
|
+
this._requestVideoFrameCallbackId = video.requestVideoFrameCallback( updateVideo );
|
|
29416
29486
|
|
|
29417
29487
|
}
|
|
29418
29488
|
|
|
@@ -29443,6 +29513,18 @@ class VideoTexture extends Texture {
|
|
|
29443
29513
|
|
|
29444
29514
|
}
|
|
29445
29515
|
|
|
29516
|
+
dispose() {
|
|
29517
|
+
|
|
29518
|
+
if ( this._requestVideoFrameCallbackId !== 0 ) {
|
|
29519
|
+
|
|
29520
|
+
this.source.data.cancelVideoFrameCallback( this._requestVideoFrameCallbackId );
|
|
29521
|
+
|
|
29522
|
+
}
|
|
29523
|
+
|
|
29524
|
+
super.dispose();
|
|
29525
|
+
|
|
29526
|
+
}
|
|
29527
|
+
|
|
29446
29528
|
}
|
|
29447
29529
|
|
|
29448
29530
|
/**
|
|
@@ -29543,8 +29625,8 @@ class FramebufferTexture extends Texture {
|
|
|
29543
29625
|
/**
|
|
29544
29626
|
* Constructs a new framebuffer texture.
|
|
29545
29627
|
*
|
|
29546
|
-
* @param {number} width - The width of the texture.
|
|
29547
|
-
* @param {number} height - The height of the texture.
|
|
29628
|
+
* @param {number} [width] - The width of the texture.
|
|
29629
|
+
* @param {number} [height] - The height of the texture.
|
|
29548
29630
|
*/
|
|
29549
29631
|
constructor( width, height ) {
|
|
29550
29632
|
|
|
@@ -29948,6 +30030,59 @@ class DepthTexture extends Texture {
|
|
|
29948
30030
|
|
|
29949
30031
|
}
|
|
29950
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
|
+
|
|
29951
30086
|
/**
|
|
29952
30087
|
* A geometry class for representing a capsule.
|
|
29953
30088
|
*
|
|
@@ -34685,7 +34820,7 @@ function pointInTriangleExceptFirst(ax, ay, bx, by, cx, cy, px, py) {
|
|
|
34685
34820
|
|
|
34686
34821
|
// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
|
|
34687
34822
|
function isValidDiagonal(a, b) {
|
|
34688
|
-
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
|
|
34689
34824
|
(locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible
|
|
34690
34825
|
(area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
|
|
34691
34826
|
equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case
|
|
@@ -40230,7 +40365,7 @@ class MeshDepthMaterial extends Material {
|
|
|
40230
40365
|
* Can also be used to customize the shadow casting of an object by assigning
|
|
40231
40366
|
* an instance of `MeshDistanceMaterial` to {@link Object3D#customDistanceMaterial}.
|
|
40232
40367
|
* The following examples demonstrates this approach in order to ensure
|
|
40233
|
-
* transparent parts of objects do
|
|
40368
|
+
* transparent parts of objects do not cast shadows.
|
|
40234
40369
|
*
|
|
40235
40370
|
* @augments Material
|
|
40236
40371
|
*/
|
|
@@ -41695,7 +41830,7 @@ class KeyframeTrack {
|
|
|
41695
41830
|
*
|
|
41696
41831
|
* @param {string} name - The keyframe track's name.
|
|
41697
41832
|
* @param {Array<number>} times - A list of keyframe times.
|
|
41698
|
-
* @param {Array<number>} values - A list of keyframe values.
|
|
41833
|
+
* @param {Array<number|string|boolean>} values - A list of keyframe values.
|
|
41699
41834
|
* @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type.
|
|
41700
41835
|
*/
|
|
41701
41836
|
constructor( name, times, values, interpolation ) {
|
|
@@ -42283,7 +42418,7 @@ class BooleanKeyframeTrack extends KeyframeTrack {
|
|
|
42283
42418
|
*
|
|
42284
42419
|
* @param {string} name - The keyframe track's name.
|
|
42285
42420
|
* @param {Array<number>} times - A list of keyframe times.
|
|
42286
|
-
* @param {Array<
|
|
42421
|
+
* @param {Array<boolean>} values - A list of keyframe values.
|
|
42287
42422
|
*/
|
|
42288
42423
|
constructor( name, times, values ) {
|
|
42289
42424
|
|
|
@@ -42486,7 +42621,7 @@ class StringKeyframeTrack extends KeyframeTrack {
|
|
|
42486
42621
|
*
|
|
42487
42622
|
* @param {string} name - The keyframe track's name.
|
|
42488
42623
|
* @param {Array<number>} times - A list of keyframe times.
|
|
42489
|
-
* @param {Array<
|
|
42624
|
+
* @param {Array<string>} values - A list of keyframe values.
|
|
42490
42625
|
*/
|
|
42491
42626
|
constructor( name, times, values ) {
|
|
42492
42627
|
|
|
@@ -42611,6 +42746,14 @@ class AnimationClip {
|
|
|
42611
42746
|
*/
|
|
42612
42747
|
this.uuid = generateUUID();
|
|
42613
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
|
+
|
|
42614
42757
|
// this means it should figure out its duration by scanning the tracks
|
|
42615
42758
|
if ( this.duration < 0 ) {
|
|
42616
42759
|
|
|
@@ -42642,6 +42785,8 @@ class AnimationClip {
|
|
|
42642
42785
|
const clip = new this( json.name, json.duration, tracks, json.blendMode );
|
|
42643
42786
|
clip.uuid = json.uuid;
|
|
42644
42787
|
|
|
42788
|
+
clip.userData = JSON.parse( json.userData || '{}' );
|
|
42789
|
+
|
|
42645
42790
|
return clip;
|
|
42646
42791
|
|
|
42647
42792
|
}
|
|
@@ -42664,7 +42809,8 @@ class AnimationClip {
|
|
|
42664
42809
|
'duration': clip.duration,
|
|
42665
42810
|
'tracks': tracks,
|
|
42666
42811
|
'uuid': clip.uuid,
|
|
42667
|
-
'blendMode': clip.blendMode
|
|
42812
|
+
'blendMode': clip.blendMode,
|
|
42813
|
+
'userData': JSON.stringify( clip.userData ),
|
|
42668
42814
|
|
|
42669
42815
|
};
|
|
42670
42816
|
|
|
@@ -43059,7 +43205,11 @@ class AnimationClip {
|
|
|
43059
43205
|
|
|
43060
43206
|
}
|
|
43061
43207
|
|
|
43062
|
-
|
|
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;
|
|
43063
43213
|
|
|
43064
43214
|
}
|
|
43065
43215
|
|
|
@@ -43309,6 +43459,13 @@ class LoadingManager {
|
|
|
43309
43459
|
*/
|
|
43310
43460
|
this.onError = onError;
|
|
43311
43461
|
|
|
43462
|
+
/**
|
|
43463
|
+
* Used for aborting ongoing requests in loaders using this manager.
|
|
43464
|
+
*
|
|
43465
|
+
* @type {AbortController}
|
|
43466
|
+
*/
|
|
43467
|
+
this.abortController = new AbortController();
|
|
43468
|
+
|
|
43312
43469
|
/**
|
|
43313
43470
|
* This should be called by any loader using the manager when the loader
|
|
43314
43471
|
* starts loading an item.
|
|
@@ -43509,6 +43666,22 @@ class LoadingManager {
|
|
|
43509
43666
|
|
|
43510
43667
|
};
|
|
43511
43668
|
|
|
43669
|
+
/**
|
|
43670
|
+
* Can be used to abort ongoing loading requests in loaders using this manager.
|
|
43671
|
+
* The abort only works if the loaders implement {@link Loader#abort} and `AbortSignal.any()`
|
|
43672
|
+
* is supported in the browser.
|
|
43673
|
+
*
|
|
43674
|
+
* @return {LoadingManager} A reference to this loading manager.
|
|
43675
|
+
*/
|
|
43676
|
+
this.abort = function () {
|
|
43677
|
+
|
|
43678
|
+
this.abortController.abort();
|
|
43679
|
+
this.abortController = new AbortController();
|
|
43680
|
+
|
|
43681
|
+
return this;
|
|
43682
|
+
|
|
43683
|
+
};
|
|
43684
|
+
|
|
43512
43685
|
}
|
|
43513
43686
|
|
|
43514
43687
|
}
|
|
@@ -43588,6 +43761,7 @@ class Loader {
|
|
|
43588
43761
|
* This method needs to be implemented by all concrete loaders. It holds the
|
|
43589
43762
|
* logic for loading assets from the backend.
|
|
43590
43763
|
*
|
|
43764
|
+
* @abstract
|
|
43591
43765
|
* @param {string} url - The path/URL of the file to be loaded.
|
|
43592
43766
|
* @param {Function} onLoad - Executed when the loading process has been finished.
|
|
43593
43767
|
* @param {onProgressCallback} [onProgress] - Executed while the loading is in progress.
|
|
@@ -43618,6 +43792,7 @@ class Loader {
|
|
|
43618
43792
|
* This method needs to be implemented by all concrete loaders. It holds the
|
|
43619
43793
|
* logic for parsing the asset into three.js entities.
|
|
43620
43794
|
*
|
|
43795
|
+
* @abstract
|
|
43621
43796
|
* @param {any} data - The data to parse.
|
|
43622
43797
|
*/
|
|
43623
43798
|
parse( /* data */ ) {}
|
|
@@ -43692,6 +43867,18 @@ class Loader {
|
|
|
43692
43867
|
|
|
43693
43868
|
}
|
|
43694
43869
|
|
|
43870
|
+
/**
|
|
43871
|
+
* This method can be implemented in loaders for aborting ongoing requests.
|
|
43872
|
+
*
|
|
43873
|
+
* @abstract
|
|
43874
|
+
* @return {Loader} A reference to this instance.
|
|
43875
|
+
*/
|
|
43876
|
+
abort() {
|
|
43877
|
+
|
|
43878
|
+
return this;
|
|
43879
|
+
|
|
43880
|
+
}
|
|
43881
|
+
|
|
43695
43882
|
}
|
|
43696
43883
|
|
|
43697
43884
|
/**
|
|
@@ -43760,7 +43947,8 @@ class FileLoader extends Loader {
|
|
|
43760
43947
|
super( manager );
|
|
43761
43948
|
|
|
43762
43949
|
/**
|
|
43763
|
-
* The expected mime type.
|
|
43950
|
+
* The expected mime type. Valid values can be found
|
|
43951
|
+
* [here]{@link hhttps://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#mimetype}
|
|
43764
43952
|
*
|
|
43765
43953
|
* @type {string}
|
|
43766
43954
|
*/
|
|
@@ -43774,6 +43962,14 @@ class FileLoader extends Loader {
|
|
|
43774
43962
|
*/
|
|
43775
43963
|
this.responseType = '';
|
|
43776
43964
|
|
|
43965
|
+
/**
|
|
43966
|
+
* Used for aborting requests.
|
|
43967
|
+
*
|
|
43968
|
+
* @private
|
|
43969
|
+
* @type {AbortController}
|
|
43970
|
+
*/
|
|
43971
|
+
this._abortController = new AbortController();
|
|
43972
|
+
|
|
43777
43973
|
}
|
|
43778
43974
|
|
|
43779
43975
|
/**
|
|
@@ -43840,7 +44036,7 @@ class FileLoader extends Loader {
|
|
|
43840
44036
|
const req = new Request( url, {
|
|
43841
44037
|
headers: new Headers( this.requestHeader ),
|
|
43842
44038
|
credentials: this.withCredentials ? 'include' : 'same-origin',
|
|
43843
|
-
|
|
44039
|
+
signal: ( typeof AbortSignal.any === 'function' ) ? AbortSignal.any( [ this._abortController.signal, this.manager.abortController.signal ] ) : this._abortController.signal
|
|
43844
44040
|
} );
|
|
43845
44041
|
|
|
43846
44042
|
// record states ( avoid data race )
|
|
@@ -44057,6 +44253,20 @@ class FileLoader extends Loader {
|
|
|
44057
44253
|
|
|
44058
44254
|
}
|
|
44059
44255
|
|
|
44256
|
+
/**
|
|
44257
|
+
* Aborts ongoing fetch requests.
|
|
44258
|
+
*
|
|
44259
|
+
* @return {FileLoader} A reference to this instance.
|
|
44260
|
+
*/
|
|
44261
|
+
abort() {
|
|
44262
|
+
|
|
44263
|
+
this._abortController.abort();
|
|
44264
|
+
this._abortController = new AbortController();
|
|
44265
|
+
|
|
44266
|
+
return this;
|
|
44267
|
+
|
|
44268
|
+
}
|
|
44269
|
+
|
|
44060
44270
|
}
|
|
44061
44271
|
|
|
44062
44272
|
/**
|
|
@@ -45120,14 +45330,27 @@ class LightShadow {
|
|
|
45120
45330
|
shadowCamera.updateMatrixWorld();
|
|
45121
45331
|
|
|
45122
45332
|
_projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse );
|
|
45123
|
-
this._frustum.setFromProjectionMatrix( _projScreenMatrix$1 );
|
|
45333
|
+
this._frustum.setFromProjectionMatrix( _projScreenMatrix$1, shadowCamera.coordinateSystem, shadowCamera.reversedDepth );
|
|
45124
45334
|
|
|
45125
|
-
|
|
45126
|
-
|
|
45127
|
-
|
|
45128
|
-
|
|
45129
|
-
|
|
45130
|
-
|
|
45335
|
+
if ( shadowCamera.reversedDepth ) {
|
|
45336
|
+
|
|
45337
|
+
shadowMatrix.set(
|
|
45338
|
+
0.5, 0.0, 0.0, 0.5,
|
|
45339
|
+
0.0, 0.5, 0.0, 0.5,
|
|
45340
|
+
0.0, 0.0, 1.0, 0.0,
|
|
45341
|
+
0.0, 0.0, 0.0, 1.0
|
|
45342
|
+
);
|
|
45343
|
+
|
|
45344
|
+
} else {
|
|
45345
|
+
|
|
45346
|
+
shadowMatrix.set(
|
|
45347
|
+
0.5, 0.0, 0.0, 0.5,
|
|
45348
|
+
0.0, 0.5, 0.0, 0.5,
|
|
45349
|
+
0.0, 0.0, 0.5, 0.5,
|
|
45350
|
+
0.0, 0.0, 0.0, 1.0
|
|
45351
|
+
);
|
|
45352
|
+
|
|
45353
|
+
}
|
|
45131
45354
|
|
|
45132
45355
|
shadowMatrix.multiply( _projScreenMatrix$1 );
|
|
45133
45356
|
|
|
@@ -45584,7 +45807,7 @@ class PointLightShadow extends LightShadow {
|
|
|
45584
45807
|
shadowMatrix.makeTranslation( - _lightPositionWorld.x, - _lightPositionWorld.y, - _lightPositionWorld.z );
|
|
45585
45808
|
|
|
45586
45809
|
_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );
|
|
45587
|
-
this._frustum.setFromProjectionMatrix( _projScreenMatrix );
|
|
45810
|
+
this._frustum.setFromProjectionMatrix( _projScreenMatrix, camera.coordinateSystem, camera.reversedDepth );
|
|
45588
45811
|
|
|
45589
45812
|
}
|
|
45590
45813
|
|
|
@@ -45918,7 +46141,7 @@ class OrthographicCamera extends Camera {
|
|
|
45918
46141
|
|
|
45919
46142
|
}
|
|
45920
46143
|
|
|
45921
|
-
this.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far, this.coordinateSystem );
|
|
46144
|
+
this.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far, this.coordinateSystem, this.reversedDepth );
|
|
45922
46145
|
|
|
45923
46146
|
this.projectionMatrixInverse.copy( this.projectionMatrix ).invert();
|
|
45924
46147
|
|
|
@@ -48658,6 +48881,14 @@ class ImageBitmapLoader extends Loader {
|
|
|
48658
48881
|
*/
|
|
48659
48882
|
this.options = { premultiplyAlpha: 'none' };
|
|
48660
48883
|
|
|
48884
|
+
/**
|
|
48885
|
+
* Used for aborting requests.
|
|
48886
|
+
*
|
|
48887
|
+
* @private
|
|
48888
|
+
* @type {AbortController}
|
|
48889
|
+
*/
|
|
48890
|
+
this._abortController = new AbortController();
|
|
48891
|
+
|
|
48661
48892
|
}
|
|
48662
48893
|
|
|
48663
48894
|
/**
|
|
@@ -48746,6 +48977,7 @@ class ImageBitmapLoader extends Loader {
|
|
|
48746
48977
|
const fetchOptions = {};
|
|
48747
48978
|
fetchOptions.credentials = ( this.crossOrigin === 'anonymous' ) ? 'same-origin' : 'include';
|
|
48748
48979
|
fetchOptions.headers = this.requestHeader;
|
|
48980
|
+
fetchOptions.signal = ( typeof AbortSignal.any === 'function' ) ? AbortSignal.any( [ this._abortController.signal, this.manager.abortController.signal ] ) : this._abortController.signal;
|
|
48749
48981
|
|
|
48750
48982
|
const promise = fetch( url, fetchOptions ).then( function ( res ) {
|
|
48751
48983
|
|
|
@@ -48783,6 +49015,20 @@ class ImageBitmapLoader extends Loader {
|
|
|
48783
49015
|
|
|
48784
49016
|
}
|
|
48785
49017
|
|
|
49018
|
+
/**
|
|
49019
|
+
* Aborts ongoing fetch requests.
|
|
49020
|
+
*
|
|
49021
|
+
* @return {ImageBitmapLoader} A reference to this instance.
|
|
49022
|
+
*/
|
|
49023
|
+
abort() {
|
|
49024
|
+
|
|
49025
|
+
this._abortController.abort();
|
|
49026
|
+
this._abortController = new AbortController();
|
|
49027
|
+
|
|
49028
|
+
return this;
|
|
49029
|
+
|
|
49030
|
+
}
|
|
49031
|
+
|
|
48786
49032
|
}
|
|
48787
49033
|
|
|
48788
49034
|
let _context;
|
|
@@ -54674,6 +54920,189 @@ function intersect( object, raycaster, intersects, recursive ) {
|
|
|
54674
54920
|
|
|
54675
54921
|
}
|
|
54676
54922
|
|
|
54923
|
+
/**
|
|
54924
|
+
* This class is an alternative to {@link Clock} with a different API design and behavior.
|
|
54925
|
+
* The goal is to avoid the conceptual flaws that became apparent in `Clock` over time.
|
|
54926
|
+
*
|
|
54927
|
+
* - `Timer` has an `update()` method that updates its internal state. That makes it possible to
|
|
54928
|
+
* call `getDelta()` and `getElapsed()` multiple times per simulation step without getting different values.
|
|
54929
|
+
* - The class can make use of the Page Visibility API to avoid large time delta values when the app
|
|
54930
|
+
* is inactive (e.g. tab switched or browser hidden).
|
|
54931
|
+
*
|
|
54932
|
+
* ```js
|
|
54933
|
+
* const timer = new Timer();
|
|
54934
|
+
* timer.connect( document ); // use Page Visibility API
|
|
54935
|
+
* ```
|
|
54936
|
+
*/
|
|
54937
|
+
class Timer {
|
|
54938
|
+
|
|
54939
|
+
/**
|
|
54940
|
+
* Constructs a new timer.
|
|
54941
|
+
*/
|
|
54942
|
+
constructor() {
|
|
54943
|
+
|
|
54944
|
+
this._previousTime = 0;
|
|
54945
|
+
this._currentTime = 0;
|
|
54946
|
+
this._startTime = performance.now();
|
|
54947
|
+
|
|
54948
|
+
this._delta = 0;
|
|
54949
|
+
this._elapsed = 0;
|
|
54950
|
+
|
|
54951
|
+
this._timescale = 1;
|
|
54952
|
+
|
|
54953
|
+
this._document = null;
|
|
54954
|
+
this._pageVisibilityHandler = null;
|
|
54955
|
+
|
|
54956
|
+
}
|
|
54957
|
+
|
|
54958
|
+
/**
|
|
54959
|
+
* Connect the timer to the given document.Calling this method is not mandatory to
|
|
54960
|
+
* use the timer but enables the usage of the Page Visibility API to avoid large time
|
|
54961
|
+
* delta values.
|
|
54962
|
+
*
|
|
54963
|
+
* @param {Document} document - The document.
|
|
54964
|
+
*/
|
|
54965
|
+
connect( document ) {
|
|
54966
|
+
|
|
54967
|
+
this._document = document;
|
|
54968
|
+
|
|
54969
|
+
// use Page Visibility API to avoid large time delta values
|
|
54970
|
+
|
|
54971
|
+
if ( document.hidden !== undefined ) {
|
|
54972
|
+
|
|
54973
|
+
this._pageVisibilityHandler = handleVisibilityChange.bind( this );
|
|
54974
|
+
|
|
54975
|
+
document.addEventListener( 'visibilitychange', this._pageVisibilityHandler, false );
|
|
54976
|
+
|
|
54977
|
+
}
|
|
54978
|
+
|
|
54979
|
+
}
|
|
54980
|
+
|
|
54981
|
+
/**
|
|
54982
|
+
* Disconnects the timer from the DOM and also disables the usage of the Page Visibility API.
|
|
54983
|
+
*/
|
|
54984
|
+
disconnect() {
|
|
54985
|
+
|
|
54986
|
+
if ( this._pageVisibilityHandler !== null ) {
|
|
54987
|
+
|
|
54988
|
+
this._document.removeEventListener( 'visibilitychange', this._pageVisibilityHandler );
|
|
54989
|
+
this._pageVisibilityHandler = null;
|
|
54990
|
+
|
|
54991
|
+
}
|
|
54992
|
+
|
|
54993
|
+
this._document = null;
|
|
54994
|
+
|
|
54995
|
+
}
|
|
54996
|
+
|
|
54997
|
+
/**
|
|
54998
|
+
* Returns the time delta in seconds.
|
|
54999
|
+
*
|
|
55000
|
+
* @return {number} The time delta in second.
|
|
55001
|
+
*/
|
|
55002
|
+
getDelta() {
|
|
55003
|
+
|
|
55004
|
+
return this._delta / 1000;
|
|
55005
|
+
|
|
55006
|
+
}
|
|
55007
|
+
|
|
55008
|
+
/**
|
|
55009
|
+
* Returns the elapsed time in seconds.
|
|
55010
|
+
*
|
|
55011
|
+
* @return {number} The elapsed time in second.
|
|
55012
|
+
*/
|
|
55013
|
+
getElapsed() {
|
|
55014
|
+
|
|
55015
|
+
return this._elapsed / 1000;
|
|
55016
|
+
|
|
55017
|
+
}
|
|
55018
|
+
|
|
55019
|
+
/**
|
|
55020
|
+
* Returns the timescale.
|
|
55021
|
+
*
|
|
55022
|
+
* @return {number} The timescale.
|
|
55023
|
+
*/
|
|
55024
|
+
getTimescale() {
|
|
55025
|
+
|
|
55026
|
+
return this._timescale;
|
|
55027
|
+
|
|
55028
|
+
}
|
|
55029
|
+
|
|
55030
|
+
/**
|
|
55031
|
+
* Sets the given timescale which scale the time delta computation
|
|
55032
|
+
* in `update()`.
|
|
55033
|
+
*
|
|
55034
|
+
* @param {number} timescale - The timescale to set.
|
|
55035
|
+
* @return {Timer} A reference to this timer.
|
|
55036
|
+
*/
|
|
55037
|
+
setTimescale( timescale ) {
|
|
55038
|
+
|
|
55039
|
+
this._timescale = timescale;
|
|
55040
|
+
|
|
55041
|
+
return this;
|
|
55042
|
+
|
|
55043
|
+
}
|
|
55044
|
+
|
|
55045
|
+
/**
|
|
55046
|
+
* Resets the time computation for the current simulation step.
|
|
55047
|
+
*
|
|
55048
|
+
* @return {Timer} A reference to this timer.
|
|
55049
|
+
*/
|
|
55050
|
+
reset() {
|
|
55051
|
+
|
|
55052
|
+
this._currentTime = performance.now() - this._startTime;
|
|
55053
|
+
|
|
55054
|
+
return this;
|
|
55055
|
+
|
|
55056
|
+
}
|
|
55057
|
+
|
|
55058
|
+
/**
|
|
55059
|
+
* Can be used to free all internal resources. Usually called when
|
|
55060
|
+
* the timer instance isn't required anymore.
|
|
55061
|
+
*/
|
|
55062
|
+
dispose() {
|
|
55063
|
+
|
|
55064
|
+
this.disconnect();
|
|
55065
|
+
|
|
55066
|
+
}
|
|
55067
|
+
|
|
55068
|
+
/**
|
|
55069
|
+
* Updates the internal state of the timer. This method should be called
|
|
55070
|
+
* once per simulation step and before you perform queries against the timer
|
|
55071
|
+
* (e.g. via `getDelta()`).
|
|
55072
|
+
*
|
|
55073
|
+
* @param {number} timestamp - The current time in milliseconds. Can be obtained
|
|
55074
|
+
* from the `requestAnimationFrame` callback argument. If not provided, the current
|
|
55075
|
+
* time will be determined with `performance.now`.
|
|
55076
|
+
* @return {Timer} A reference to this timer.
|
|
55077
|
+
*/
|
|
55078
|
+
update( timestamp ) {
|
|
55079
|
+
|
|
55080
|
+
if ( this._pageVisibilityHandler !== null && this._document.hidden === true ) {
|
|
55081
|
+
|
|
55082
|
+
this._delta = 0;
|
|
55083
|
+
|
|
55084
|
+
} else {
|
|
55085
|
+
|
|
55086
|
+
this._previousTime = this._currentTime;
|
|
55087
|
+
this._currentTime = ( timestamp !== undefined ? timestamp : performance.now() ) - this._startTime;
|
|
55088
|
+
|
|
55089
|
+
this._delta = ( this._currentTime - this._previousTime ) * this._timescale;
|
|
55090
|
+
this._elapsed += this._delta; // _elapsed is the accumulation of all previous deltas
|
|
55091
|
+
|
|
55092
|
+
}
|
|
55093
|
+
|
|
55094
|
+
return this;
|
|
55095
|
+
|
|
55096
|
+
}
|
|
55097
|
+
|
|
55098
|
+
}
|
|
55099
|
+
|
|
55100
|
+
function handleVisibilityChange() {
|
|
55101
|
+
|
|
55102
|
+
if ( this._document.hidden === false ) this.reset();
|
|
55103
|
+
|
|
55104
|
+
}
|
|
55105
|
+
|
|
54677
55106
|
/**
|
|
54678
55107
|
* This class can be used to represent points in 3D space as
|
|
54679
55108
|
* [Spherical coordinates]{@link https://en.wikipedia.org/wiki/Spherical_coordinate_system}.
|
|
@@ -54781,8 +55210,8 @@ class Spherical {
|
|
|
54781
55210
|
* Sets the spherical components from the given Cartesian coordinates.
|
|
54782
55211
|
*
|
|
54783
55212
|
* @param {number} x - The x value.
|
|
54784
|
-
* @param {number} y - The
|
|
54785
|
-
* @param {number} z - The
|
|
55213
|
+
* @param {number} y - The y value.
|
|
55214
|
+
* @param {number} z - The z value.
|
|
54786
55215
|
* @return {Spherical} A reference to this spherical.
|
|
54787
55216
|
*/
|
|
54788
55217
|
setFromCartesianCoords( x, y, z ) {
|
|
@@ -55443,6 +55872,12 @@ class Box2 {
|
|
|
55443
55872
|
const _startP = /*@__PURE__*/ new Vector3();
|
|
55444
55873
|
const _startEnd = /*@__PURE__*/ new Vector3();
|
|
55445
55874
|
|
|
55875
|
+
const _d1 = /*@__PURE__*/ new Vector3();
|
|
55876
|
+
const _d2 = /*@__PURE__*/ new Vector3();
|
|
55877
|
+
const _r = /*@__PURE__*/ new Vector3();
|
|
55878
|
+
const _c1 = /*@__PURE__*/ new Vector3();
|
|
55879
|
+
const _c2 = /*@__PURE__*/ new Vector3();
|
|
55880
|
+
|
|
55446
55881
|
/**
|
|
55447
55882
|
* An analytical line segment in 3D space represented by a start and end point.
|
|
55448
55883
|
*/
|
|
@@ -55590,11 +56025,11 @@ class Line3 {
|
|
|
55590
56025
|
}
|
|
55591
56026
|
|
|
55592
56027
|
/**
|
|
55593
|
-
* Returns the
|
|
56028
|
+
* Returns the closest point on the line for a given point.
|
|
55594
56029
|
*
|
|
55595
56030
|
* @param {Vector3} point - The point to compute the closest point on the line for.
|
|
55596
56031
|
* @param {boolean} clampToLine - Whether to clamp the result to the range `[0,1]` or not.
|
|
55597
|
-
* @param {Vector3} target -
|
|
56032
|
+
* @param {Vector3} target - The target vector that is used to store the method's result.
|
|
55598
56033
|
* @return {Vector3} The closest point on the line.
|
|
55599
56034
|
*/
|
|
55600
56035
|
closestPointToPoint( point, clampToLine, target ) {
|
|
@@ -55605,6 +56040,127 @@ class Line3 {
|
|
|
55605
56040
|
|
|
55606
56041
|
}
|
|
55607
56042
|
|
|
56043
|
+
/**
|
|
56044
|
+
* Returns the closest squared distance between this line segment and the given one.
|
|
56045
|
+
*
|
|
56046
|
+
* @param {Line3} line - The line segment to compute the closest squared distance to.
|
|
56047
|
+
* @param {Vector3} [c1] - The closest point on this line segment.
|
|
56048
|
+
* @param {Vector3} [c2] - The closest point on the given line segment.
|
|
56049
|
+
* @return {number} The squared distance between this line segment and the given one.
|
|
56050
|
+
*/
|
|
56051
|
+
distanceSqToLine3( line, c1 = _c1, c2 = _c2 ) {
|
|
56052
|
+
|
|
56053
|
+
// from Real-Time Collision Detection by Christer Ericson, chapter 5.1.9
|
|
56054
|
+
|
|
56055
|
+
// Computes closest points C1 and C2 of S1(s)=P1+s*(Q1-P1) and
|
|
56056
|
+
// S2(t)=P2+t*(Q2-P2), returning s and t. Function result is squared
|
|
56057
|
+
// distance between between S1(s) and S2(t)
|
|
56058
|
+
|
|
56059
|
+
const EPSILON = 1e-8 * 1e-8; // must be squared since we compare squared length
|
|
56060
|
+
let s, t;
|
|
56061
|
+
|
|
56062
|
+
const p1 = this.start;
|
|
56063
|
+
const p2 = line.start;
|
|
56064
|
+
const q1 = this.end;
|
|
56065
|
+
const q2 = line.end;
|
|
56066
|
+
|
|
56067
|
+
_d1.subVectors( q1, p1 ); // Direction vector of segment S1
|
|
56068
|
+
_d2.subVectors( q2, p2 ); // Direction vector of segment S2
|
|
56069
|
+
_r.subVectors( p1, p2 );
|
|
56070
|
+
|
|
56071
|
+
const a = _d1.dot( _d1 ); // Squared length of segment S1, always nonnegative
|
|
56072
|
+
const e = _d2.dot( _d2 ); // Squared length of segment S2, always nonnegative
|
|
56073
|
+
const f = _d2.dot( _r );
|
|
56074
|
+
|
|
56075
|
+
// Check if either or both segments degenerate into points
|
|
56076
|
+
|
|
56077
|
+
if ( a <= EPSILON && e <= EPSILON ) {
|
|
56078
|
+
|
|
56079
|
+
// Both segments degenerate into points
|
|
56080
|
+
|
|
56081
|
+
c1.copy( p1 );
|
|
56082
|
+
c2.copy( p2 );
|
|
56083
|
+
|
|
56084
|
+
c1.sub( c2 );
|
|
56085
|
+
|
|
56086
|
+
return c1.dot( c1 );
|
|
56087
|
+
|
|
56088
|
+
}
|
|
56089
|
+
|
|
56090
|
+
if ( a <= EPSILON ) {
|
|
56091
|
+
|
|
56092
|
+
// First segment degenerates into a point
|
|
56093
|
+
|
|
56094
|
+
s = 0;
|
|
56095
|
+
t = f / e; // s = 0 => t = (b*s + f) / e = f / e
|
|
56096
|
+
t = clamp( t, 0, 1 );
|
|
56097
|
+
|
|
56098
|
+
|
|
56099
|
+
} else {
|
|
56100
|
+
|
|
56101
|
+
const c = _d1.dot( _r );
|
|
56102
|
+
|
|
56103
|
+
if ( e <= EPSILON ) {
|
|
56104
|
+
|
|
56105
|
+
// Second segment degenerates into a point
|
|
56106
|
+
|
|
56107
|
+
t = 0;
|
|
56108
|
+
s = clamp( - c / a, 0, 1 ); // t = 0 => s = (b*t - c) / a = -c / a
|
|
56109
|
+
|
|
56110
|
+
} else {
|
|
56111
|
+
|
|
56112
|
+
// The general nondegenerate case starts here
|
|
56113
|
+
|
|
56114
|
+
const b = _d1.dot( _d2 );
|
|
56115
|
+
const denom = a * e - b * b; // Always nonnegative
|
|
56116
|
+
|
|
56117
|
+
// If segments not parallel, compute closest point on L1 to L2 and
|
|
56118
|
+
// clamp to segment S1. Else pick arbitrary s (here 0)
|
|
56119
|
+
|
|
56120
|
+
if ( denom !== 0 ) {
|
|
56121
|
+
|
|
56122
|
+
s = clamp( ( b * f - c * e ) / denom, 0, 1 );
|
|
56123
|
+
|
|
56124
|
+
} else {
|
|
56125
|
+
|
|
56126
|
+
s = 0;
|
|
56127
|
+
|
|
56128
|
+
}
|
|
56129
|
+
|
|
56130
|
+
// Compute point on L2 closest to S1(s) using
|
|
56131
|
+
// t = Dot((P1 + D1*s) - P2,D2) / Dot(D2,D2) = (b*s + f) / e
|
|
56132
|
+
|
|
56133
|
+
t = ( b * s + f ) / e;
|
|
56134
|
+
|
|
56135
|
+
// If t in [0,1] done. Else clamp t, recompute s for the new value
|
|
56136
|
+
// of t using s = Dot((P2 + D2*t) - P1,D1) / Dot(D1,D1)= (t*b - c) / a
|
|
56137
|
+
// and clamp s to [0, 1]
|
|
56138
|
+
|
|
56139
|
+
if ( t < 0 ) {
|
|
56140
|
+
|
|
56141
|
+
t = 0.;
|
|
56142
|
+
s = clamp( - c / a, 0, 1 );
|
|
56143
|
+
|
|
56144
|
+
} else if ( t > 1 ) {
|
|
56145
|
+
|
|
56146
|
+
t = 1;
|
|
56147
|
+
s = clamp( ( b - c ) / a, 0, 1 );
|
|
56148
|
+
|
|
56149
|
+
}
|
|
56150
|
+
|
|
56151
|
+
}
|
|
56152
|
+
|
|
56153
|
+
}
|
|
56154
|
+
|
|
56155
|
+
c1.copy( p1 ).add( _d1.multiplyScalar( s ) );
|
|
56156
|
+
c2.copy( p2 ).add( _d2.multiplyScalar( t ) );
|
|
56157
|
+
|
|
56158
|
+
c1.sub( c2 );
|
|
56159
|
+
|
|
56160
|
+
return c1.dot( c1 );
|
|
56161
|
+
|
|
56162
|
+
}
|
|
56163
|
+
|
|
55608
56164
|
/**
|
|
55609
56165
|
* Applies a 4x4 transformation matrix to this line segment.
|
|
55610
56166
|
*
|
|
@@ -55804,7 +56360,7 @@ const _matrixWorldInv = /*@__PURE__*/ new Matrix4();
|
|
|
55804
56360
|
class SkeletonHelper extends LineSegments {
|
|
55805
56361
|
|
|
55806
56362
|
/**
|
|
55807
|
-
* Constructs a new
|
|
56363
|
+
* Constructs a new skeleton helper.
|
|
55808
56364
|
*
|
|
55809
56365
|
* @param {Object3D} object - Usually an instance of {@link SkinnedMesh}. However, any 3D object
|
|
55810
56366
|
* can be used if it represents a hierarchy of bones (see {@link Bone}).
|
|
@@ -55818,9 +56374,6 @@ class SkeletonHelper extends LineSegments {
|
|
|
55818
56374
|
const vertices = [];
|
|
55819
56375
|
const colors = [];
|
|
55820
56376
|
|
|
55821
|
-
const color1 = new Color( 0, 0, 1 );
|
|
55822
|
-
const color2 = new Color( 0, 1, 0 );
|
|
55823
|
-
|
|
55824
56377
|
for ( let i = 0; i < bones.length; i ++ ) {
|
|
55825
56378
|
|
|
55826
56379
|
const bone = bones[ i ];
|
|
@@ -55829,8 +56382,8 @@ class SkeletonHelper extends LineSegments {
|
|
|
55829
56382
|
|
|
55830
56383
|
vertices.push( 0, 0, 0 );
|
|
55831
56384
|
vertices.push( 0, 0, 0 );
|
|
55832
|
-
colors.push(
|
|
55833
|
-
colors.push(
|
|
56385
|
+
colors.push( 0, 0, 0 );
|
|
56386
|
+
colors.push( 0, 0, 0 );
|
|
55834
56387
|
|
|
55835
56388
|
}
|
|
55836
56389
|
|
|
@@ -55871,6 +56424,13 @@ class SkeletonHelper extends LineSegments {
|
|
|
55871
56424
|
this.matrix = object.matrixWorld;
|
|
55872
56425
|
this.matrixAutoUpdate = false;
|
|
55873
56426
|
|
|
56427
|
+
// colors
|
|
56428
|
+
|
|
56429
|
+
const color1 = new Color( 0x0000ff );
|
|
56430
|
+
const color2 = new Color( 0x00ff00 );
|
|
56431
|
+
|
|
56432
|
+
this.setColors( color1, color2 );
|
|
56433
|
+
|
|
55874
56434
|
}
|
|
55875
56435
|
|
|
55876
56436
|
updateMatrixWorld( force ) {
|
|
@@ -55908,6 +56468,31 @@ class SkeletonHelper extends LineSegments {
|
|
|
55908
56468
|
|
|
55909
56469
|
}
|
|
55910
56470
|
|
|
56471
|
+
/**
|
|
56472
|
+
* Defines the colors of the helper.
|
|
56473
|
+
*
|
|
56474
|
+
* @param {Color} color1 - The first line color for each bone.
|
|
56475
|
+
* @param {Color} color2 - The second line color for each bone.
|
|
56476
|
+
* @return {SkeletonHelper} A reference to this helper.
|
|
56477
|
+
*/
|
|
56478
|
+
setColors( color1, color2 ) {
|
|
56479
|
+
|
|
56480
|
+
const geometry = this.geometry;
|
|
56481
|
+
const colorAttribute = geometry.getAttribute( 'color' );
|
|
56482
|
+
|
|
56483
|
+
for ( let i = 0; i < colorAttribute.count; i += 2 ) {
|
|
56484
|
+
|
|
56485
|
+
colorAttribute.setXYZ( i, color1.r, color1.g, color1.b );
|
|
56486
|
+
colorAttribute.setXYZ( i + 1, color2.r, color2.g, color2.b );
|
|
56487
|
+
|
|
56488
|
+
}
|
|
56489
|
+
|
|
56490
|
+
colorAttribute.needsUpdate = true;
|
|
56491
|
+
|
|
56492
|
+
return this;
|
|
56493
|
+
|
|
56494
|
+
}
|
|
56495
|
+
|
|
55911
56496
|
/**
|
|
55912
56497
|
* Frees the GPU-related resources allocated by this instance. Call this
|
|
55913
56498
|
* method whenever this instance is no longer used in your app.
|
|
@@ -56668,6 +57253,7 @@ class CameraHelper extends LineSegments {
|
|
|
56668
57253
|
* @param {Color} up - The up line color.
|
|
56669
57254
|
* @param {Color} target - The target line color.
|
|
56670
57255
|
* @param {Color} cross - The cross line color.
|
|
57256
|
+
* @return {CameraHelper} A reference to this helper.
|
|
56671
57257
|
*/
|
|
56672
57258
|
setColors( frustum, cone, up, target, cross ) {
|
|
56673
57259
|
|
|
@@ -56724,6 +57310,8 @@ class CameraHelper extends LineSegments {
|
|
|
56724
57310
|
|
|
56725
57311
|
colorAttribute.needsUpdate = true;
|
|
56726
57312
|
|
|
57313
|
+
return this;
|
|
57314
|
+
|
|
56727
57315
|
}
|
|
56728
57316
|
|
|
56729
57317
|
/**
|
|
@@ -56736,48 +57324,75 @@ class CameraHelper extends LineSegments {
|
|
|
56736
57324
|
|
|
56737
57325
|
const w = 1, h = 1;
|
|
56738
57326
|
|
|
57327
|
+
let nearZ, farZ;
|
|
57328
|
+
|
|
56739
57329
|
// we need just camera projection matrix inverse
|
|
56740
57330
|
// world matrix must be identity
|
|
56741
57331
|
|
|
56742
57332
|
_camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse );
|
|
56743
57333
|
|
|
56744
57334
|
// Adjust z values based on coordinate system
|
|
56745
|
-
|
|
57335
|
+
|
|
57336
|
+
if ( this.camera.reversedDepth === true ) {
|
|
57337
|
+
|
|
57338
|
+
nearZ = 1;
|
|
57339
|
+
farZ = 0;
|
|
57340
|
+
|
|
57341
|
+
} else {
|
|
57342
|
+
|
|
57343
|
+
if ( this.camera.coordinateSystem === WebGLCoordinateSystem ) {
|
|
57344
|
+
|
|
57345
|
+
nearZ = -1;
|
|
57346
|
+
farZ = 1;
|
|
57347
|
+
|
|
57348
|
+
} else if ( this.camera.coordinateSystem === WebGPUCoordinateSystem ) {
|
|
57349
|
+
|
|
57350
|
+
nearZ = 0;
|
|
57351
|
+
farZ = 1;
|
|
57352
|
+
|
|
57353
|
+
} else {
|
|
57354
|
+
|
|
57355
|
+
throw new Error( 'THREE.CameraHelper.update(): Invalid coordinate system: ' + this.camera.coordinateSystem );
|
|
57356
|
+
|
|
57357
|
+
}
|
|
57358
|
+
|
|
57359
|
+
}
|
|
57360
|
+
|
|
56746
57361
|
|
|
56747
57362
|
// center / target
|
|
56748
57363
|
setPoint( 'c', pointMap, geometry, _camera, 0, 0, nearZ );
|
|
56749
|
-
setPoint( 't', pointMap, geometry, _camera, 0, 0,
|
|
57364
|
+
setPoint( 't', pointMap, geometry, _camera, 0, 0, farZ );
|
|
56750
57365
|
|
|
56751
57366
|
// near
|
|
56752
57367
|
|
|
56753
|
-
setPoint( 'n1', pointMap, geometry, _camera, -
|
|
56754
|
-
setPoint( 'n2', pointMap, geometry, _camera, w, -
|
|
56755
|
-
setPoint( 'n3', pointMap, geometry, _camera, -
|
|
57368
|
+
setPoint( 'n1', pointMap, geometry, _camera, - w, - h, nearZ );
|
|
57369
|
+
setPoint( 'n2', pointMap, geometry, _camera, w, - h, nearZ );
|
|
57370
|
+
setPoint( 'n3', pointMap, geometry, _camera, - w, h, nearZ );
|
|
56756
57371
|
setPoint( 'n4', pointMap, geometry, _camera, w, h, nearZ );
|
|
56757
57372
|
|
|
56758
57373
|
// far
|
|
56759
57374
|
|
|
56760
|
-
setPoint( 'f1', pointMap, geometry, _camera, -
|
|
56761
|
-
setPoint( 'f2', pointMap, geometry, _camera, w, -
|
|
56762
|
-
setPoint( 'f3', pointMap, geometry, _camera, -
|
|
56763
|
-
setPoint( 'f4', pointMap, geometry, _camera, w, h,
|
|
57375
|
+
setPoint( 'f1', pointMap, geometry, _camera, - w, - h, farZ );
|
|
57376
|
+
setPoint( 'f2', pointMap, geometry, _camera, w, - h, farZ );
|
|
57377
|
+
setPoint( 'f3', pointMap, geometry, _camera, - w, h, farZ );
|
|
57378
|
+
setPoint( 'f4', pointMap, geometry, _camera, w, h, farZ );
|
|
56764
57379
|
|
|
56765
57380
|
// up
|
|
56766
57381
|
|
|
56767
57382
|
setPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, nearZ );
|
|
56768
|
-
setPoint( 'u2', pointMap, geometry, _camera, -
|
|
57383
|
+
setPoint( 'u2', pointMap, geometry, _camera, - w * 0.7, h * 1.1, nearZ );
|
|
56769
57384
|
setPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, nearZ );
|
|
56770
57385
|
|
|
56771
57386
|
// cross
|
|
56772
57387
|
|
|
56773
|
-
setPoint( 'cf1', pointMap, geometry, _camera, -
|
|
56774
|
-
setPoint( 'cf2', pointMap, geometry, _camera, w, 0,
|
|
56775
|
-
setPoint( 'cf3', pointMap, geometry, _camera, 0, -
|
|
56776
|
-
setPoint( 'cf4', pointMap, geometry, _camera, 0, h,
|
|
57388
|
+
setPoint( 'cf1', pointMap, geometry, _camera, - w, 0, farZ );
|
|
57389
|
+
setPoint( 'cf2', pointMap, geometry, _camera, w, 0, farZ );
|
|
57390
|
+
setPoint( 'cf3', pointMap, geometry, _camera, 0, - h, farZ );
|
|
57391
|
+
setPoint( 'cf4', pointMap, geometry, _camera, 0, h, farZ );
|
|
56777
57392
|
|
|
56778
|
-
setPoint( 'cn1', pointMap, geometry, _camera, -
|
|
57393
|
+
setPoint( 'cn1', pointMap, geometry, _camera, - w, 0, nearZ );
|
|
56779
57394
|
setPoint( 'cn2', pointMap, geometry, _camera, w, 0, nearZ );
|
|
56780
|
-
setPoint( 'cn3', pointMap, geometry, _camera, 0, -
|
|
57395
|
+
setPoint( 'cn3', pointMap, geometry, _camera, 0, - h, nearZ );
|
|
56781
57396
|
setPoint( 'cn4', pointMap, geometry, _camera, 0, h, nearZ );
|
|
56782
57397
|
|
|
56783
57398
|
geometry.getAttribute( 'position' ).needsUpdate = true;
|
|
@@ -58063,6 +58678,7 @@ function getTextureTypeByteLength( type ) {
|
|
|
58063
58678
|
case FloatType:
|
|
58064
58679
|
return { byteLength: 4, components: 1 };
|
|
58065
58680
|
case UnsignedInt5999Type:
|
|
58681
|
+
case UnsignedInt101111Type:
|
|
58066
58682
|
return { byteLength: 4, components: 3 };
|
|
58067
58683
|
|
|
58068
58684
|
}
|
|
@@ -58159,4 +58775,4 @@ if ( typeof window !== 'undefined' ) {
|
|
|
58159
58775
|
|
|
58160
58776
|
}
|
|
58161
58777
|
|
|
58162
|
-
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, 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,
|
|
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 };
|