@types/three 0.180.0 → 0.182.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.
- three/README.md +1 -1
- three/examples/jsm/controls/ArcballControls.d.ts +1 -1
- three/examples/jsm/controls/DragControls.d.ts +1 -1
- three/examples/jsm/controls/FirstPersonControls.d.ts +1 -1
- three/examples/jsm/controls/FlyControls.d.ts +1 -1
- three/examples/jsm/controls/OrbitControls.d.ts +1 -1
- three/examples/jsm/controls/PointerLockControls.d.ts +1 -1
- three/examples/jsm/controls/TrackballControls.d.ts +1 -1
- three/examples/jsm/controls/TransformControls.d.ts +1 -1
- three/examples/jsm/geometries/TextGeometry.d.ts +2 -0
- three/examples/jsm/gpgpu/BitonicSort.d.ts +21 -0
- three/examples/jsm/inspector/Inspector.d.ts +10 -0
- three/examples/jsm/inspector/RendererInspector.d.ts +4 -0
- three/examples/jsm/inspector/tabs/Parameters.d.ts +95 -0
- three/examples/jsm/inspector/ui/Tab.d.ts +3 -0
- three/examples/jsm/inspector/ui/Values.d.ts +80 -0
- three/examples/jsm/interactive/SelectionBox.d.ts +9 -9
- three/examples/jsm/lighting/TiledLighting.d.ts +1 -2
- three/examples/jsm/loaders/FontLoader.d.ts +1 -1
- three/examples/jsm/loaders/KTX2Loader.d.ts +3 -0
- three/examples/jsm/loaders/UltraHDRLoader.d.ts +7 -0
- three/examples/jsm/loaders/VOXLoader.d.ts +22 -5
- three/examples/jsm/math/Octree.d.ts +36 -14
- three/examples/jsm/objects/SkyMesh.d.ts +11 -7
- three/examples/jsm/objects/WaterMesh.d.ts +2 -2
- three/examples/jsm/physics/AmmoPhysics.d.ts +1 -1
- three/examples/jsm/postprocessing/OutputPass.d.ts +10 -6
- three/examples/jsm/postprocessing/RenderPass.d.ts +15 -10
- three/examples/jsm/renderers/CSS2DRenderer.d.ts +15 -10
- three/examples/jsm/transpiler/AST.d.ts +17 -0
- three/examples/jsm/transpiler/TSLEncoder.d.ts +2 -0
- three/examples/jsm/tsl/display/AfterImageNode.d.ts +4 -5
- three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/AnamorphicNode.d.ts +1 -2
- three/examples/jsm/tsl/display/BleachBypass.d.ts +1 -2
- three/examples/jsm/tsl/display/BloomNode.d.ts +2 -3
- three/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +1 -2
- three/examples/jsm/tsl/display/DenoiseNode.d.ts +1 -2
- three/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +1 -2
- three/examples/jsm/tsl/display/DotScreenNode.d.ts +1 -2
- three/examples/jsm/tsl/display/FXAANode.d.ts +1 -2
- three/examples/jsm/tsl/display/FilmNode.d.ts +1 -2
- three/examples/jsm/tsl/display/GTAONode.d.ts +11 -10
- three/examples/jsm/tsl/display/GaussianBlurNode.d.ts +2 -3
- three/examples/jsm/tsl/display/LensflareNode.d.ts +6 -7
- three/examples/jsm/tsl/display/Lut3DNode.d.ts +2 -3
- three/examples/jsm/tsl/display/MotionBlur.d.ts +1 -2
- three/examples/jsm/tsl/display/OutlineNode.d.ts +6 -7
- three/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/PixelationPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/RGBShiftNode.d.ts +1 -2
- three/examples/jsm/tsl/display/SMAANode.d.ts +1 -2
- three/examples/jsm/tsl/display/SSAAPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/SSGINode.d.ts +30 -0
- three/examples/jsm/tsl/display/SSRNode.d.ts +12 -13
- three/examples/jsm/tsl/display/SSSNode.d.ts +20 -0
- three/examples/jsm/tsl/display/Sepia.d.ts +1 -2
- three/examples/jsm/tsl/display/SobelOperatorNode.d.ts +1 -2
- three/examples/jsm/tsl/display/StereoPassNode.d.ts +1 -2
- three/examples/jsm/tsl/display/TRAANode.d.ts +6 -2
- three/examples/jsm/tsl/display/TransitionNode.d.ts +1 -2
- three/examples/jsm/tsl/display/boxBlur.d.ts +1 -2
- three/examples/jsm/tsl/display/hashBlur.d.ts +1 -2
- three/examples/jsm/tsl/display/radialBlur.d.ts +12 -0
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +3 -4
- three/examples/jsm/tsl/math/Bayer.d.ts +1 -2
- three/examples/jsm/tsl/utils/Raymarching.d.ts +2 -3
- three/package.json +3 -3
- three/src/Three.Core.d.ts +1 -1
- three/src/Three.TSL.d.ts +21 -3
- three/src/Three.WebGPU.Nodes.d.ts +2 -0
- three/src/Three.WebGPU.d.ts +2 -0
- three/src/animation/AnimationMixer.d.ts +45 -3
- three/src/animation/AnimationUtils.d.ts +3 -8
- three/src/constants.d.ts +14 -0
- three/src/core/BufferGeometry.d.ts +3 -1
- three/src/extras/Controls.d.ts +3 -3
- three/src/lights/DirectionalLight.d.ts +10 -3
- three/src/lights/HemisphereLight.d.ts +8 -1
- three/src/lights/Light.d.ts +8 -12
- three/src/lights/LightProbe.d.ts +7 -3
- three/src/lights/PointLight.d.ts +12 -1
- three/src/lights/PointLightShadow.d.ts +1 -8
- three/src/lights/SpotLight.d.ts +17 -2
- three/src/loaders/ObjectLoader.d.ts +3 -3
- three/src/loaders/TextureLoader.d.ts +3 -3
- three/src/materials/Material.d.ts +3 -2
- three/src/materials/MeshLambertMaterial.d.ts +1 -1
- three/src/materials/MeshMatcapMaterial.d.ts +14 -0
- three/src/materials/MeshPhongMaterial.d.ts +1 -1
- three/src/materials/MeshPhysicalMaterial.d.ts +1 -1
- three/src/materials/MeshStandardMaterial.d.ts +7 -7
- three/src/materials/PointsMaterial.d.ts +1 -1
- three/src/materials/ShaderMaterial.d.ts +26 -11
- three/src/materials/nodes/MeshSSSNodeMaterial.d.ts +1 -1
- three/src/materials/nodes/NodeMaterial.d.ts +9 -3
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +1 -2
- three/src/math/Vector3.d.ts +2 -2
- three/src/nodes/Nodes.d.ts +1 -1
- three/src/nodes/TSL.d.ts +5 -2
- three/src/nodes/accessors/AccessorsUtils.d.ts +4 -5
- three/src/nodes/accessors/Arrays.d.ts +2 -3
- three/src/nodes/accessors/BatchNode.d.ts +1 -2
- three/src/nodes/accessors/Bitangent.d.ts +4 -5
- three/src/nodes/accessors/BufferAttributeNode.d.ts +17 -17
- three/src/nodes/accessors/BufferNode.d.ts +2 -2
- three/src/nodes/accessors/BuiltinNode.d.ts +1 -2
- three/src/nodes/accessors/Camera.d.ts +10 -11
- three/src/nodes/accessors/ClippingNode.d.ts +3 -6
- three/src/nodes/accessors/CubeTextureNode.d.ts +8 -9
- three/src/nodes/accessors/InstanceNode.d.ts +8 -8
- three/src/nodes/accessors/InstancedMeshNode.d.ts +1 -2
- three/src/nodes/accessors/Lights.d.ts +6 -7
- three/src/nodes/accessors/MaterialNode.d.ts +38 -39
- three/src/nodes/accessors/MaterialProperties.d.ts +3 -4
- three/src/nodes/accessors/MaterialReferenceNode.d.ts +2 -2
- three/src/nodes/accessors/ModelNode.d.ts +12 -13
- three/src/nodes/accessors/ModelViewProjectionNode.d.ts +1 -2
- three/src/nodes/accessors/MorphNode.d.ts +1 -2
- three/src/nodes/accessors/Normal.d.ts +13 -14
- three/src/nodes/accessors/Object3DNode.d.ts +6 -7
- three/src/nodes/accessors/PointUVNode.d.ts +1 -2
- three/src/nodes/accessors/Position.d.ts +7 -8
- three/src/nodes/accessors/ReferenceBaseNode.d.ts +2 -3
- three/src/nodes/accessors/ReferenceNode.d.ts +2 -3
- three/src/nodes/accessors/ReflectVector.d.ts +4 -5
- three/src/nodes/accessors/RendererReferenceNode.d.ts +1 -2
- three/src/nodes/accessors/SceneNode.d.ts +3 -4
- three/src/nodes/accessors/SkinningNode.d.ts +5 -6
- three/src/nodes/accessors/StorageBufferNode.d.ts +5 -5
- three/src/nodes/accessors/StorageTextureNode.d.ts +7 -4
- three/src/nodes/accessors/Tangent.d.ts +4 -6
- three/src/nodes/accessors/TangentUtils.d.ts +2 -3
- three/src/nodes/accessors/Texture3DNode.d.ts +15 -4
- three/src/nodes/accessors/TextureBicubic.d.ts +2 -3
- three/src/nodes/accessors/TextureNode.d.ts +29 -24
- three/src/nodes/accessors/TextureSizeNode.d.ts +1 -2
- three/src/nodes/accessors/UV.d.ts +1 -2
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -3
- three/src/nodes/accessors/UserDataNode.d.ts +1 -2
- three/src/nodes/accessors/VelocityNode.d.ts +1 -2
- three/src/nodes/accessors/VertexColorNode.d.ts +1 -2
- three/src/nodes/code/CodeNode.d.ts +4 -5
- three/src/nodes/code/ExpressionNode.d.ts +1 -2
- three/src/nodes/code/FunctionCallNode.d.ts +6 -5
- three/src/nodes/code/FunctionNode.d.ts +4 -6
- three/src/nodes/code/ScriptableNode.d.ts +1 -2
- three/src/nodes/code/ScriptableValueNode.d.ts +1 -2
- three/src/nodes/core/ArrayNode.d.ts +6 -6
- three/src/nodes/core/AssignNode.d.ts +1 -8
- three/src/nodes/core/AttributeNode.d.ts +1 -2
- three/src/nodes/core/BypassNode.d.ts +5 -5
- three/src/nodes/core/ContextNode.d.ts +42 -14
- three/src/nodes/core/IndexNode.d.ts +10 -7
- three/src/nodes/core/InspectorNode.d.ts +16 -0
- three/src/nodes/core/IsolateNode.d.ts +36 -0
- three/src/nodes/core/MRTNode.d.ts +3 -4
- three/src/nodes/core/Node.d.ts +18 -2
- three/src/nodes/core/NodeUtils.d.ts +1 -11
- three/src/nodes/core/OutputStructNode.d.ts +1 -2
- three/src/nodes/core/ParameterNode.d.ts +1 -2
- three/src/nodes/core/PropertyNode.d.ts +32 -31
- three/src/nodes/core/StackNode.d.ts +1 -4
- three/src/nodes/core/StructNode.d.ts +3 -4
- three/src/nodes/core/SubBuildNode.d.ts +1 -2
- three/src/nodes/core/UniformNode.d.ts +3 -6
- three/src/nodes/core/VarNode.d.ts +12 -8
- three/src/nodes/core/VaryingNode.d.ts +12 -10
- three/src/nodes/display/BlendModes.d.ts +11 -12
- three/src/nodes/display/BumpMapNode.d.ts +1 -2
- three/src/nodes/display/ColorAdjustment.d.ts +7 -8
- three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -3
- three/src/nodes/display/ColorSpaceNode.d.ts +19 -9
- three/src/nodes/display/FrontFacingNode.d.ts +3 -4
- three/src/nodes/display/NormalMapNode.d.ts +4 -3
- three/src/nodes/display/PassNode.d.ts +28 -11
- three/src/nodes/display/PosterizeNode.d.ts +1 -2
- three/src/nodes/display/RenderOutputNode.d.ts +11 -6
- three/src/nodes/display/ScreenNode.d.ts +9 -10
- three/src/nodes/display/ToneMappingFunctions.d.ts +6 -7
- three/src/nodes/display/ToneMappingNode.d.ts +9 -8
- three/src/nodes/display/ToonOutlinePassNode.d.ts +1 -2
- three/src/nodes/display/ViewportDepthNode.d.ts +3 -4
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +1 -2
- three/src/nodes/display/ViewportSharedTextureNode.d.ts +1 -2
- three/src/nodes/display/ViewportTextureNode.d.ts +2 -3
- three/src/nodes/fog/Fog.d.ts +5 -6
- three/src/nodes/functions/BSDF/BRDF_GGX.d.ts +4 -5
- three/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts +14 -0
- three/src/nodes/functions/BSDF/BRDF_Lambert.d.ts +1 -2
- three/src/nodes/functions/BSDF/BRDF_Sheen.d.ts +1 -2
- three/src/nodes/functions/BSDF/DFGLUT.d.ts +12 -0
- three/src/nodes/functions/BSDF/D_GGX.d.ts +1 -2
- three/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +1 -2
- three/src/nodes/functions/BSDF/F_Schlick.d.ts +1 -2
- three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +1 -2
- three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +1 -2
- three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +1 -2
- three/src/nodes/functions/PhysicalLightingModel.d.ts +8 -1
- three/src/nodes/functions/ShadowMaskModel.d.ts +1 -2
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +1 -2
- three/src/nodes/functions/material/getGeometryRoughness.d.ts +1 -2
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +1 -2
- three/src/nodes/functions/material/getRoughness.d.ts +1 -2
- three/src/nodes/functions/material/getShIrradianceAt.d.ts +1 -2
- three/src/nodes/geometry/RangeNode.d.ts +1 -2
- three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +10 -11
- three/src/nodes/gpgpu/BarrierNode.d.ts +3 -4
- three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +5 -6
- three/src/nodes/gpgpu/ComputeNode.d.ts +21 -13
- three/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +25 -26
- three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +1 -2
- three/src/nodes/lighting/AnalyticLightNode.d.ts +3 -2
- three/src/nodes/lighting/LightUtils.d.ts +1 -2
- three/src/nodes/lighting/LightingContextNode.d.ts +1 -2
- three/src/nodes/lighting/LightsNode.d.ts +1 -2
- three/src/nodes/lighting/PointLightNode.d.ts +5 -6
- three/src/nodes/lighting/PointShadowNode.d.ts +12 -17
- three/src/nodes/lighting/ShadowBaseNode.d.ts +1 -2
- three/src/nodes/lighting/ShadowFilterNode.d.ts +6 -5
- three/src/nodes/lighting/ShadowNode.d.ts +1 -2
- three/src/nodes/lighting/SpotLightNode.d.ts +1 -2
- three/src/nodes/materialx/MaterialXNodes.d.ts +41 -42
- three/src/nodes/materialx/lib/mx_hsv.d.ts +2 -3
- three/src/nodes/materialx/lib/mx_noise.d.ts +73 -74
- three/src/nodes/materialx/lib/mx_transform_color.d.ts +1 -2
- three/src/nodes/math/BitcastNode.d.ts +5 -6
- three/src/nodes/math/BitcountNode.d.ts +21 -0
- three/src/nodes/math/ConditionalNode.d.ts +11 -5
- three/src/nodes/math/Hash.d.ts +1 -2
- three/src/nodes/math/MathNode.d.ts +223 -77
- three/src/nodes/math/OperatorNode.d.ts +203 -59
- three/src/nodes/math/PackFloatNode.d.ts +19 -0
- three/src/nodes/math/TriNoise3D.d.ts +3 -4
- three/src/nodes/math/UnpackFloatNode.d.ts +18 -0
- three/src/nodes/pmrem/PMREMNode.d.ts +1 -2
- three/src/nodes/pmrem/PMREMUtils.d.ts +3 -4
- three/src/nodes/procedural/Checker.d.ts +1 -2
- three/src/nodes/shapes/Shapes.d.ts +1 -2
- three/src/nodes/tsl/TSLBase.d.ts +2 -1
- three/src/nodes/tsl/TSLCore.d.ts +235 -128
- three/src/nodes/utils/CubeMapNode.d.ts +1 -2
- three/src/nodes/utils/DebugNode.d.ts +9 -5
- three/src/nodes/utils/Discard.d.ts +6 -6
- three/src/nodes/utils/EquirectUV.d.ts +1 -2
- three/src/nodes/utils/EventNode.d.ts +8 -3
- three/src/nodes/utils/FunctionOverloadingNode.d.ts +1 -2
- three/src/nodes/utils/LoopNode.d.ts +7 -6
- three/src/nodes/utils/MatcapUV.d.ts +1 -2
- three/src/nodes/utils/MaxMipLevelNode.d.ts +1 -2
- three/src/nodes/utils/Oscillators.d.ts +4 -5
- three/src/nodes/utils/Packing.d.ts +3 -3
- three/src/nodes/utils/PostProcessingUtils.d.ts +7 -4
- three/src/nodes/utils/RTTNode.d.ts +2 -3
- three/src/nodes/utils/ReflectorNode.d.ts +2 -3
- three/src/nodes/utils/RemapNode.d.ts +29 -7
- three/src/nodes/utils/RotateNode.d.ts +1 -2
- three/src/nodes/utils/SampleNode.d.ts +1 -2
- three/src/nodes/utils/SpriteSheetUVNode.d.ts +1 -2
- three/src/nodes/utils/SpriteUtils.d.ts +1 -2
- three/src/nodes/utils/StorageArrayElementNode.d.ts +1 -2
- three/src/nodes/utils/Timer.d.ts +3 -4
- three/src/nodes/utils/TriplanarTextures.d.ts +2 -3
- three/src/nodes/utils/UVUtils.d.ts +5 -3
- three/src/nodes/utils/ViewportUtils.d.ts +1 -2
- three/src/objects/LOD.d.ts +1 -1
- three/src/objects/Skeleton.d.ts +4 -2
- three/src/renderers/WebGLRenderer.d.ts +22 -4
- three/src/renderers/common/Animation.d.ts +4 -1
- three/src/renderers/common/Binding.d.ts +6 -0
- three/src/renderers/common/Bindings.d.ts +12 -0
- three/src/renderers/common/Buffer.d.ts +24 -0
- three/src/renderers/common/CanvasTarget.d.ts +142 -0
- three/src/renderers/common/ChainMap.d.ts +8 -1
- three/src/renderers/common/Geometries.d.ts +8 -0
- three/src/renderers/common/InspectorBase.d.ts +105 -0
- three/src/renderers/common/PostProcessing.d.ts +3 -0
- three/src/renderers/common/QuadMesh.d.ts +3 -0
- three/src/renderers/common/RenderContexts.d.ts +6 -2
- three/src/renderers/common/RenderObject.d.ts +6 -0
- three/src/renderers/common/Renderer.d.ts +145 -46
- three/src/renderers/common/SampledTexture.d.ts +2 -0
- three/src/renderers/common/Sampler.d.ts +2 -0
- three/src/renderers/common/Textures.d.ts +20 -0
- three/src/renderers/common/TimestampQueryPool.d.ts +24 -1
- three/src/renderers/common/UniformsGroup.d.ts +1 -0
- three/src/renderers/common/extras/PMREMGenerator.d.ts +19 -1
- three/src/renderers/common/nodes/NodeLibrary.d.ts +3 -7
- three/src/renderers/common/nodes/Nodes.d.ts +13 -14
- three/src/renderers/shaders/ShaderLib.d.ts +1 -1
- three/src/renderers/webgl/WebGLCapabilities.d.ts +2 -2
- three/src/renderers/webgl/WebGLPrograms.d.ts +0 -1
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +5 -0
- three/src/scenes/Scene.d.ts +2 -2
- three/src/textures/CanvasTexture.d.ts +3 -3
- three/src/textures/CompressedArrayTexture.d.ts +6 -9
- three/src/textures/CompressedCubeTexture.d.ts +3 -3
- three/src/textures/CompressedTexture.d.ts +6 -8
- three/src/textures/CubeDepthTexture.d.ts +41 -0
- three/src/textures/CubeTexture.d.ts +4 -11
- three/src/textures/Data3DTexture.d.ts +5 -10
- three/src/textures/DataArrayTexture.d.ts +10 -10
- three/src/textures/DataTexture.d.ts +4 -11
- three/src/textures/DepthTexture.d.ts +7 -8
- three/src/textures/ExternalTexture.d.ts +3 -1
- three/src/textures/FramebufferTexture.d.ts +6 -1
- three/src/textures/Source.d.ts +3 -3
- three/src/textures/Texture.d.ts +8 -8
- three/src/textures/VideoFrameTexture.d.ts +1 -1
- three/src/textures/VideoTexture.d.ts +2 -2
- three/src/utils.d.ts +30 -2
- three/src/nodes/core/CacheNode.d.ts +0 -21
- three/src/nodes/functions/BSDF/DFGApprox.d.ts +0 -11
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.182.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"@dimforge/rapier3d-compat": "~0.12.0",
|
|
44
44
|
"@tweenjs/tween.js": "~23.1.3",
|
|
45
45
|
"@types/stats.js": "*",
|
|
46
|
-
"@types/webxr": "
|
|
46
|
+
"@types/webxr": ">=0.5.17",
|
|
47
47
|
"@webgpu/types": "*",
|
|
48
48
|
"fflate": "~0.8.2",
|
|
49
49
|
"meshoptimizer": "~0.22.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {},
|
|
52
|
-
"typesPublisherContentHash": "
|
|
52
|
+
"typesPublisherContentHash": "f3281b335e326a31ecce951778649efebdd62165c3fa47922257c4a8aebf0fa4",
|
|
53
53
|
"typeScriptVersion": "5.2"
|
|
54
54
|
}
|
three/src/Three.Core.d.ts
CHANGED
|
@@ -160,4 +160,4 @@ export * from "./textures/Source.js";
|
|
|
160
160
|
export * from "./textures/Texture.js";
|
|
161
161
|
export * from "./textures/VideoFrameTexture.js";
|
|
162
162
|
export * from "./textures/VideoTexture.js";
|
|
163
|
-
export { createCanvasElement } from "./utils.js";
|
|
163
|
+
export { createCanvasElement, error, getConsoleFunction, log, setConsoleFunction, warn, warnOnce } from "./utils.js";
|
three/src/Three.TSL.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export const BasicShadowFilter: typeof TSL.BasicShadowFilter;
|
|
|
7
7
|
export const Break: typeof TSL.Break;
|
|
8
8
|
export const Const: typeof TSL.Const;
|
|
9
9
|
export const Continue: typeof TSL.Continue;
|
|
10
|
-
export const
|
|
10
|
+
export const DFGLUT: typeof TSL.DFGLUT;
|
|
11
11
|
export const D_GGX: typeof TSL.D_GGX;
|
|
12
12
|
export const Discard: typeof TSL.Discard;
|
|
13
13
|
export const EPSILON: typeof TSL.EPSILON;
|
|
@@ -24,6 +24,8 @@ export const PCFShadowFilter: typeof TSL.PCFShadowFilter;
|
|
|
24
24
|
export const PCFSoftShadowFilter: typeof TSL.PCFSoftShadowFilter;
|
|
25
25
|
export const PI: typeof TSL.PI;
|
|
26
26
|
export const PI2: typeof TSL.PI2;
|
|
27
|
+
export const TWO_PI: typeof TSL.TWO_PI;
|
|
28
|
+
export const HALF_PI: typeof TSL.HALF_PI;
|
|
27
29
|
export const PointShadowFilter: typeof TSL.PointShadowFilter;
|
|
28
30
|
export const Return: typeof TSL.Return;
|
|
29
31
|
export const Schlick_to_F0: typeof TSL.Schlick_to_F0;
|
|
@@ -98,6 +100,8 @@ export const bufferAttribute: typeof TSL.bufferAttribute;
|
|
|
98
100
|
export const bumpMap: typeof TSL.bumpMap;
|
|
99
101
|
export const burn: typeof TSL.burn;
|
|
100
102
|
export const builtin: typeof TSL.builtin;
|
|
103
|
+
export const builtinAOContext: typeof TSL.builtinAOContext;
|
|
104
|
+
export const builtinShadowContext: typeof TSL.builtinShadowContext;
|
|
101
105
|
export const bvec2: typeof TSL.bvec2;
|
|
102
106
|
export const bvec3: typeof TSL.bvec3;
|
|
103
107
|
export const bvec4: typeof TSL.bvec4;
|
|
@@ -134,11 +138,13 @@ export const context: typeof TSL.context;
|
|
|
134
138
|
export const convert: typeof TSL.convert;
|
|
135
139
|
export const convertColorSpace: typeof TSL.convertColorSpace;
|
|
136
140
|
export const convertToTexture: typeof TSL.convertToTexture;
|
|
141
|
+
export const countLeadingZeros: typeof TSL.countLeadingZeros;
|
|
142
|
+
export const countOneBits: typeof TSL.countOneBits;
|
|
143
|
+
export const countTrailingZeros: typeof TSL.countTrailingZeros;
|
|
137
144
|
export const cos: typeof TSL.cos;
|
|
138
145
|
export const cross: typeof TSL.cross;
|
|
139
146
|
export const cubeTexture: typeof TSL.cubeTexture;
|
|
140
147
|
export const cubeTextureBase: typeof TSL.cubeTextureBase;
|
|
141
|
-
export const cubeToUV: typeof TSL.cubeToUV;
|
|
142
148
|
export const dFdx: typeof TSL.dFdx;
|
|
143
149
|
export const dFdy: typeof TSL.dFdy;
|
|
144
150
|
export const dashSize: typeof TSL.dashSize;
|
|
@@ -196,6 +202,8 @@ export const getDirection: typeof TSL.getDirection;
|
|
|
196
202
|
export const getDistanceAttenuation: typeof TSL.getDistanceAttenuation;
|
|
197
203
|
export const getGeometryRoughness: typeof TSL.getGeometryRoughness;
|
|
198
204
|
export const getNormalFromDepth: typeof TSL.getNormalFromDepth;
|
|
205
|
+
export const interleavedGradientNoise: typeof TSL.interleavedGradientNoise;
|
|
206
|
+
export const vogelDiskSample: typeof TSL.vogelDiskSample;
|
|
199
207
|
export const getParallaxCorrectNormal: typeof TSL.getParallaxCorrectNormal;
|
|
200
208
|
export const getRoughness: typeof TSL.getRoughness;
|
|
201
209
|
export const getScreenPosition: typeof TSL.getScreenPosition;
|
|
@@ -396,6 +404,8 @@ export const objectRadius: typeof TSL.objectRadius;
|
|
|
396
404
|
export const objectScale: typeof TSL.objectScale;
|
|
397
405
|
export const objectViewPosition: typeof TSL.objectViewPosition;
|
|
398
406
|
export const objectWorldMatrix: typeof TSL.objectWorldMatrix;
|
|
407
|
+
export const OnBeforeObjectUpdate: typeof TSL.OnBeforeObjectUpdate;
|
|
408
|
+
export const OnBeforeMaterialUpdate: typeof TSL.OnBeforeMaterialUpdate;
|
|
399
409
|
export const OnObjectUpdate: typeof TSL.OnObjectUpdate;
|
|
400
410
|
export const OnMaterialUpdate: typeof TSL.OnMaterialUpdate;
|
|
401
411
|
export const oneMinus: typeof TSL.oneMinus;
|
|
@@ -409,6 +419,9 @@ export const output: typeof TSL.output;
|
|
|
409
419
|
export const outputStruct: typeof TSL.outputStruct;
|
|
410
420
|
export const overlay: typeof TSL.overlay;
|
|
411
421
|
export const overloadingFn: typeof TSL.overloadingFn;
|
|
422
|
+
export const packHalf2x16: typeof TSL.packHalf2x16;
|
|
423
|
+
export const packSnorm2x16: typeof TSL.packSnorm2x16;
|
|
424
|
+
export const packUnorm2x16: typeof TSL.packUnorm2x16;
|
|
412
425
|
export const parabola: typeof TSL.parabola;
|
|
413
426
|
export const parallaxDirection: typeof TSL.parallaxDirection;
|
|
414
427
|
export const parallaxUV: typeof TSL.parallaxUV;
|
|
@@ -456,6 +469,7 @@ export const remapClamp: typeof TSL.remapClamp;
|
|
|
456
469
|
export const renderGroup: typeof TSL.renderGroup;
|
|
457
470
|
export const renderOutput: typeof TSL.renderOutput;
|
|
458
471
|
export const rendererReference: typeof TSL.rendererReference;
|
|
472
|
+
export const replaceDefaultUV: typeof TSL.replaceDefaultUV;
|
|
459
473
|
export const rotate: typeof TSL.rotate;
|
|
460
474
|
export const rotateUV: typeof TSL.rotateUV;
|
|
461
475
|
export const roughness: typeof TSL.roughness;
|
|
@@ -547,6 +561,7 @@ export const textureBicubicLevel: typeof TSL.textureBicubicLevel;
|
|
|
547
561
|
export const textureCubeUV: typeof TSL.textureCubeUV;
|
|
548
562
|
export const textureLoad: typeof TSL.textureLoad;
|
|
549
563
|
export const textureSize: typeof TSL.textureSize;
|
|
564
|
+
export const textureLevel: typeof TSL.textureLevel;
|
|
550
565
|
export const textureStore: typeof TSL.textureStore;
|
|
551
566
|
export const thickness: typeof TSL.thickness;
|
|
552
567
|
export const time: typeof TSL.time;
|
|
@@ -573,6 +588,9 @@ export const uniformCubeTexture: typeof TSL.uniformCubeTexture;
|
|
|
573
588
|
export const uniformGroup: typeof TSL.uniformGroup;
|
|
574
589
|
export const uniformFlow: typeof TSL.uniformFlow;
|
|
575
590
|
export const uniformTexture: typeof TSL.uniformTexture;
|
|
591
|
+
export const unpackHalf2x16: typeof TSL.unpackHalf2x16;
|
|
592
|
+
export const unpackSnorm2x16: typeof TSL.unpackSnorm2x16;
|
|
593
|
+
export const unpackUnorm2x16: typeof TSL.unpackUnorm2x16;
|
|
576
594
|
export const unpremultiplyAlpha: typeof TSL.unpremultiplyAlpha;
|
|
577
595
|
export const userData: typeof TSL.userData;
|
|
578
596
|
export const uv: typeof TSL.uv;
|
|
@@ -612,4 +630,4 @@ export const workgroupId: typeof TSL.workgroupId;
|
|
|
612
630
|
export const workingToColorSpace: typeof TSL.workingToColorSpace;
|
|
613
631
|
export const xor: typeof TSL.xor;
|
|
614
632
|
|
|
615
|
-
export type { ProxiedObject,
|
|
633
|
+
export type { ProxiedObject, Swizzable } from "./nodes/TSL.js";
|
|
@@ -16,6 +16,8 @@ export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
|
|
|
16
16
|
export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
|
|
17
17
|
export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js";
|
|
18
18
|
export * from "./nodes/Nodes.js";
|
|
19
|
+
export { default as CanvasTarget } from "./renderers/common/CanvasTarget.js";
|
|
20
|
+
export { default as InspectorBase } from "./renderers/common/InspectorBase.js";
|
|
19
21
|
import * as TSL from "./nodes/TSL.js";
|
|
20
22
|
export { TSL };
|
|
21
23
|
export { ClippingGroup } from "./objects/ClippingGroup.js";
|
three/src/Three.WebGPU.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
|
|
|
16
16
|
export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
|
|
17
17
|
export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js";
|
|
18
18
|
export * from "./nodes/Nodes.js";
|
|
19
|
+
export { default as CanvasTarget } from "./renderers/common/CanvasTarget.js";
|
|
20
|
+
export { default as InspectorBase } from "./renderers/common/InspectorBase.js";
|
|
19
21
|
import * as TSL from "./nodes/TSL.js";
|
|
20
22
|
export { TSL };
|
|
21
23
|
export { ClippingGroup } from "./objects/ClippingGroup.js";
|
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
import { AnimationBlendMode } from "../constants.js";
|
|
2
2
|
import { EventDispatcher } from "../core/EventDispatcher.js";
|
|
3
3
|
import { Object3D } from "../core/Object3D.js";
|
|
4
|
+
import { LinearInterpolant } from "../math/interpolants/LinearInterpolant.js";
|
|
4
5
|
import { AnimationAction } from "./AnimationAction.js";
|
|
5
6
|
import { AnimationClip } from "./AnimationClip.js";
|
|
6
7
|
import { AnimationObjectGroup } from "./AnimationObjectGroup.js";
|
|
8
|
+
import { PropertyMixer } from "./PropertyMixer.js";
|
|
7
9
|
|
|
8
10
|
export interface AnimationMixerEventMap {
|
|
9
11
|
loop: { action: AnimationAction; loopDelta: number };
|
|
10
12
|
finished: { action: AnimationAction; direction: number };
|
|
11
13
|
}
|
|
12
14
|
|
|
15
|
+
export interface MixerControlInterpolant extends LinearInterpolant {
|
|
16
|
+
__cacheIndex: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface AnimationMixerStats {
|
|
20
|
+
actions: {
|
|
21
|
+
readonly total: number;
|
|
22
|
+
readonly inUse: number;
|
|
23
|
+
};
|
|
24
|
+
bindings: {
|
|
25
|
+
readonly total: number;
|
|
26
|
+
readonly inUse: number;
|
|
27
|
+
};
|
|
28
|
+
controlInterpolants: {
|
|
29
|
+
readonly total: number;
|
|
30
|
+
readonly inUse: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
13
34
|
/**
|
|
14
35
|
* `AnimationMixer` is a player for animations on a particular object in
|
|
15
36
|
* the scene. When multiple objects in the scene are animated independently,
|
|
@@ -28,6 +49,23 @@ export class AnimationMixer extends EventDispatcher<AnimationMixerEventMap> {
|
|
|
28
49
|
* @default 0
|
|
29
50
|
*/
|
|
30
51
|
time: number;
|
|
52
|
+
protected _root: Object3D | AnimationObjectGroup;
|
|
53
|
+
protected _actions: AnimationAction[];
|
|
54
|
+
protected _nActiveActions: number;
|
|
55
|
+
protected _bindings: PropertyMixer[];
|
|
56
|
+
protected _nActiveBindings: number;
|
|
57
|
+
protected _controlInterpolants: MixerControlInterpolant[];
|
|
58
|
+
protected _nActiveControlInterpolants: number;
|
|
59
|
+
protected _bindingsByRootAndName: {
|
|
60
|
+
[rootUuid: string]: { [trackName: string]: PropertyMixer };
|
|
61
|
+
};
|
|
62
|
+
protected _actionsByClip: {
|
|
63
|
+
[clipUuid: string]: {
|
|
64
|
+
knownActions: AnimationAction[];
|
|
65
|
+
actionByRoot: { [rootUuid: string]: AnimationAction };
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
protected _accuIndex: number;
|
|
31
69
|
/**
|
|
32
70
|
* A scaling factor for the global time.
|
|
33
71
|
*
|
|
@@ -38,6 +76,10 @@ export class AnimationMixer extends EventDispatcher<AnimationMixerEventMap> {
|
|
|
38
76
|
* @default 1
|
|
39
77
|
*/
|
|
40
78
|
timeScale: number;
|
|
79
|
+
/**
|
|
80
|
+
* The AnimationMixer stats track the actions of the mixer.
|
|
81
|
+
*/
|
|
82
|
+
stats: AnimationMixerStats;
|
|
41
83
|
/**
|
|
42
84
|
* Returns an instance of {@link AnimationAction} for the passed clip.
|
|
43
85
|
*
|
|
@@ -74,7 +116,7 @@ export class AnimationMixer extends EventDispatcher<AnimationMixerEventMap> {
|
|
|
74
116
|
/**
|
|
75
117
|
* Deactivates all previously scheduled actions on this mixer.
|
|
76
118
|
*
|
|
77
|
-
* @return {AnimationMixer} A reference to
|
|
119
|
+
* @return {AnimationMixer} A reference to this animation mixer.
|
|
78
120
|
*/
|
|
79
121
|
stopAllAction(): AnimationMixer;
|
|
80
122
|
/**
|
|
@@ -84,7 +126,7 @@ export class AnimationMixer extends EventDispatcher<AnimationMixerEventMap> {
|
|
|
84
126
|
* time from {@link Clock} or {@link Timer}.
|
|
85
127
|
*
|
|
86
128
|
* @param {number} deltaTime - The delta time in seconds.
|
|
87
|
-
* @return {AnimationMixer} A reference to
|
|
129
|
+
* @return {AnimationMixer} A reference to this animation mixer.
|
|
88
130
|
*/
|
|
89
131
|
update(deltaTime: number): AnimationMixer;
|
|
90
132
|
/**
|
|
@@ -94,7 +136,7 @@ export class AnimationMixer extends EventDispatcher<AnimationMixerEventMap> {
|
|
|
94
136
|
* input parameter will be scaled by {@link AnimationMixer#timeScale}
|
|
95
137
|
*
|
|
96
138
|
* @param {number} time - The time to set in seconds.
|
|
97
|
-
* @return {AnimationMixer} A reference to
|
|
139
|
+
* @return {AnimationMixer} A reference to this animation mixer.
|
|
98
140
|
*/
|
|
99
141
|
setTime(time: number): AnimationMixer;
|
|
100
142
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TypedArray, TypedArrayConstructor } from "../core/BufferAttribute.js";
|
|
2
|
+
import { isTypedArray } from "../utils.js";
|
|
2
3
|
import { AnimationClip } from "./AnimationClip.js";
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -8,14 +9,7 @@ import { AnimationClip } from "./AnimationClip.js";
|
|
|
8
9
|
* @param {TypedArray.constructor} type - The constructor of a typed array that defines the new type.
|
|
9
10
|
* @return {TypedArray} The converted array.
|
|
10
11
|
*/
|
|
11
|
-
export function convertArray(array: TypedArray | number[], type: TypedArrayConstructor): TypedArray
|
|
12
|
-
/**
|
|
13
|
-
* Returns `true` if the given object is a typed array.
|
|
14
|
-
*
|
|
15
|
-
* @param {any} object - The object to check.
|
|
16
|
-
* @return {boolean} Whether the given object is a typed array.
|
|
17
|
-
*/
|
|
18
|
-
export function isTypedArray(object: unknown): boolean;
|
|
12
|
+
export function convertArray(array: TypedArray | number[], type: TypedArrayConstructor): TypedArray;
|
|
19
13
|
/**
|
|
20
14
|
* Returns an array by which times and values can be sorted.
|
|
21
15
|
*
|
|
@@ -169,3 +163,4 @@ export class AnimationUtils {
|
|
|
169
163
|
fps?: number,
|
|
170
164
|
): AnimationClip;
|
|
171
165
|
}
|
|
166
|
+
export { isTypedArray };
|
three/src/constants.d.ts
CHANGED
|
@@ -508,6 +508,11 @@ export const RGB_ETC2_Format: 37492;
|
|
|
508
508
|
*/
|
|
509
509
|
export const RGBA_ETC2_EAC_Format: 37496;
|
|
510
510
|
|
|
511
|
+
export const R11_EAC_Format: 37488;
|
|
512
|
+
export const SIGNED_R11_EAC_Format: 37489;
|
|
513
|
+
export const RG11_EAC_Format: 37490;
|
|
514
|
+
export const SIGNED_RG11_EAC_Format: 37491;
|
|
515
|
+
|
|
511
516
|
// ASTC compressed texture formats
|
|
512
517
|
|
|
513
518
|
/**
|
|
@@ -598,6 +603,10 @@ export type CompressedPixelFormat =
|
|
|
598
603
|
| typeof RGB_ETC1_Format
|
|
599
604
|
| typeof RGB_ETC2_Format
|
|
600
605
|
| typeof RGBA_ETC2_EAC_Format
|
|
606
|
+
| typeof R11_EAC_Format
|
|
607
|
+
| typeof SIGNED_R11_EAC_Format
|
|
608
|
+
| typeof RG11_EAC_Format
|
|
609
|
+
| typeof SIGNED_RG11_EAC_Format
|
|
601
610
|
| typeof RGBA_ASTC_4x4_Format
|
|
602
611
|
| typeof RGBA_ASTC_5x4_Format
|
|
603
612
|
| typeof RGBA_ASTC_5x5_Format
|
|
@@ -693,6 +702,11 @@ export const LinearTransfer: "linear";
|
|
|
693
702
|
export const SRGBTransfer: "srgb";
|
|
694
703
|
export type ColorSpaceTransfer = typeof LinearTransfer | typeof SRGBTransfer;
|
|
695
704
|
|
|
705
|
+
export const NoNormalPacking: "";
|
|
706
|
+
export const NormalRGPacking: "rg";
|
|
707
|
+
export const NormalGAPacking: "ga";
|
|
708
|
+
export type NormalPacking = typeof NoNormalPacking | typeof NormalRGPacking | typeof NormalGAPacking;
|
|
709
|
+
|
|
696
710
|
// Stencil Op types
|
|
697
711
|
export const ZeroStencilOp: 0;
|
|
698
712
|
export const KeepStencilOp: 7680;
|
|
@@ -163,6 +163,8 @@ export class BufferGeometry<
|
|
|
163
163
|
|
|
164
164
|
indirect: IndirectStorageBufferAttribute | null;
|
|
165
165
|
|
|
166
|
+
indirectOffset: number | number[];
|
|
167
|
+
|
|
166
168
|
/**
|
|
167
169
|
* This hashmap has as id the name of the attribute to be set and as value the {@link THREE.BufferAttribute | buffer} to set it to. Rather than accessing this property directly,
|
|
168
170
|
* use {@link setAttribute | .setAttribute} and {@link getAttribute | .getAttribute} to access attributes of this geometry.
|
|
@@ -243,7 +245,7 @@ export class BufferGeometry<
|
|
|
243
245
|
*/
|
|
244
246
|
setIndex(index: BufferAttribute | number[] | null): this;
|
|
245
247
|
|
|
246
|
-
setIndirect(indirect: IndirectStorageBufferAttribute | null): this;
|
|
248
|
+
setIndirect(indirect: IndirectStorageBufferAttribute | null, indirectOffset?: number | number[]): this;
|
|
247
249
|
|
|
248
250
|
getIndirect(): IndirectStorageBufferAttribute | null;
|
|
249
251
|
|
three/src/extras/Controls.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare abstract class Controls<TEventMap extends {}> extends EventDispatcher<TE
|
|
|
14
14
|
* The HTML element used for event listeners. If not provided via the constructor, {@link .connect} must be called
|
|
15
15
|
* after `domElement` has been set.
|
|
16
16
|
*/
|
|
17
|
-
domElement: HTMLElement | null;
|
|
17
|
+
domElement: HTMLElement | SVGElement | null;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* When set to `false`, the controls will not respond to user input. Default is `true`.
|
|
@@ -26,13 +26,13 @@ declare abstract class Controls<TEventMap extends {}> extends EventDispatcher<TE
|
|
|
26
26
|
* @param object The object the controls should manage (usually the camera).
|
|
27
27
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
28
28
|
*/
|
|
29
|
-
constructor(object: Object3D, domElement?: HTMLElement | null);
|
|
29
|
+
constructor(object: Object3D, domElement?: HTMLElement | SVGElement | null);
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Connects the controls to the DOM. This method has so called "side effects" since it adds the module's event
|
|
33
33
|
* listeners to the DOM.
|
|
34
34
|
*/
|
|
35
|
-
connect(element: HTMLElement): void;
|
|
35
|
+
connect(element: HTMLElement | SVGElement): void;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Disconnects the controls from the DOM.
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { Object3D } from "../core/Object3D.js";
|
|
1
|
+
import { JSONMeta, Object3D } from "../core/Object3D.js";
|
|
2
2
|
import { ColorRepresentation } from "../math/Color.js";
|
|
3
3
|
import { Vector3 } from "../math/Vector3.js";
|
|
4
4
|
import { DirectionalLightShadow } from "./DirectionalLightShadow.js";
|
|
5
|
-
import { Light } from "./Light.js";
|
|
5
|
+
import { Light, LightJSON } from "./Light.js";
|
|
6
|
+
import { LightShadowJSON } from "./LightShadow.js";
|
|
7
|
+
|
|
8
|
+
export interface DirectionalLightJSON extends LightJSON {
|
|
9
|
+
shadow: LightShadowJSON;
|
|
10
|
+
target: string;
|
|
11
|
+
}
|
|
6
12
|
|
|
7
13
|
/**
|
|
8
14
|
* A light that gets emitted in a specific direction
|
|
@@ -10,7 +16,6 @@ import { Light } from "./Light.js";
|
|
|
10
16
|
* This light will behave as though it is infinitely far away and the rays produced from it are all parallel
|
|
11
17
|
* The common use case for this is to simulate daylight; the sun is far enough away that its position can be considered to be infinite, and all light rays coming from it are parallel.
|
|
12
18
|
* A common point of confusion for directional lights is that setting the rotation has no effect
|
|
13
|
-
* @remarks
|
|
14
19
|
* This is because three.js's {@link DirectionalLight} is the equivalent to what is often called a 'Target Direct Light' in other applications.
|
|
15
20
|
* This means that its direction is calculated as pointing from the light's {@link THREE.Object3D.position | position} to the {@link THREE.DirectionalLight.target | target}'s
|
|
16
21
|
* position (as opposed to a 'Free Direct Light' that just has a rotation component).
|
|
@@ -100,4 +105,6 @@ export class DirectionalLight extends Light<DirectionalLightShadow> {
|
|
|
100
105
|
* Call this method whenever this instance is no longer used in your app.
|
|
101
106
|
*/
|
|
102
107
|
dispose(): void;
|
|
108
|
+
|
|
109
|
+
toJSON(meta?: JSONMeta): DirectionalLightJSON;
|
|
103
110
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { JSONMeta } from "../core/Object3D.js";
|
|
1
2
|
import { Color, ColorRepresentation } from "../math/Color.js";
|
|
2
3
|
import { Vector3 } from "../math/Vector3.js";
|
|
3
|
-
import { Light } from "./Light.js";
|
|
4
|
+
import { Light, LightJSON } from "./Light.js";
|
|
5
|
+
|
|
6
|
+
export interface HemisphereLightJSON extends LightJSON {
|
|
7
|
+
groundColor: number;
|
|
8
|
+
}
|
|
4
9
|
|
|
5
10
|
/**
|
|
6
11
|
* A light source positioned directly above the scene, with color fading from the sky color to the ground color.
|
|
@@ -58,4 +63,6 @@ export class HemisphereLight extends Light<undefined> {
|
|
|
58
63
|
* @defaultValue `new THREE.Color()` set to white _(0xffffff)_.
|
|
59
64
|
*/
|
|
60
65
|
groundColor: Color;
|
|
66
|
+
|
|
67
|
+
toJSON(meta?: JSONMeta): HemisphereLightJSON;
|
|
61
68
|
}
|
three/src/lights/Light.d.ts
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import { JSONMeta, Object3D, Object3DJSON } from "../core/Object3D.js";
|
|
1
|
+
import { JSONMeta, Object3D, Object3DEventMap, Object3DJSON } from "../core/Object3D.js";
|
|
2
2
|
import { Color, ColorRepresentation } from "../math/Color.js";
|
|
3
|
-
import { LightShadow
|
|
3
|
+
import { LightShadow } from "./LightShadow.js";
|
|
4
4
|
|
|
5
5
|
export interface LightJSON extends Object3DJSON {
|
|
6
6
|
color: number;
|
|
7
7
|
intensity: number;
|
|
8
|
+
}
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
distance?: number;
|
|
12
|
-
angle?: number;
|
|
13
|
-
decay?: number;
|
|
14
|
-
penumbra?: number;
|
|
15
|
-
|
|
16
|
-
shadow?: LightShadowJSON;
|
|
17
|
-
target?: string;
|
|
10
|
+
export interface LightEventMap extends Object3DEventMap {
|
|
11
|
+
dispose: {};
|
|
18
12
|
}
|
|
19
13
|
|
|
20
14
|
/**
|
|
21
15
|
* Abstract base class for lights.
|
|
22
16
|
* @remarks All other light types inherit the properties and methods described here.
|
|
23
17
|
*/
|
|
24
|
-
export abstract class Light<TShadowSupport extends LightShadow | undefined = LightShadow | undefined>
|
|
18
|
+
export abstract class Light<TShadowSupport extends LightShadow | undefined = LightShadow | undefined>
|
|
19
|
+
extends Object3D<LightEventMap>
|
|
20
|
+
{
|
|
25
21
|
/**
|
|
26
22
|
* Creates a new {@link Light}
|
|
27
23
|
* @remarks
|
three/src/lights/LightProbe.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { JSONMeta } from "../core/Object3D.js";
|
|
1
2
|
import { SphericalHarmonics3 } from "../math/SphericalHarmonics3.js";
|
|
2
|
-
import { Light } from "./Light.js";
|
|
3
|
+
import { Light, LightJSON } from "./Light.js";
|
|
4
|
+
|
|
5
|
+
export interface LightProbeJSON extends LightJSON {
|
|
6
|
+
sh: number[];
|
|
7
|
+
}
|
|
3
8
|
|
|
4
9
|
/**
|
|
5
10
|
* Light probes are an alternative way of adding light to a 3D scene.
|
|
@@ -42,6 +47,5 @@ export class LightProbe extends Light {
|
|
|
42
47
|
*/
|
|
43
48
|
sh: SphericalHarmonics3;
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
fromJSON(json: {}): LightProbe;
|
|
50
|
+
toJSON(meta?: JSONMeta): LightProbeJSON;
|
|
47
51
|
}
|
three/src/lights/PointLight.d.ts
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
import { JSONMeta } from "../core/Object3D.js";
|
|
1
2
|
import { ColorRepresentation } from "../math/Color.js";
|
|
2
|
-
import { Light } from "./Light.js";
|
|
3
|
+
import { Light, LightJSON } from "./Light.js";
|
|
4
|
+
import { LightShadowJSON } from "./LightShadow.js";
|
|
3
5
|
import { PointLightShadow } from "./PointLightShadow.js";
|
|
4
6
|
|
|
7
|
+
export interface PointLightJSON extends LightJSON {
|
|
8
|
+
distance: number;
|
|
9
|
+
decay: number;
|
|
10
|
+
|
|
11
|
+
shadow: LightShadowJSON;
|
|
12
|
+
}
|
|
13
|
+
|
|
5
14
|
/**
|
|
6
15
|
* A light that gets emitted from a single point in all directions
|
|
7
16
|
* @remarks
|
|
@@ -99,4 +108,6 @@ export class PointLight extends Light<PointLightShadow> {
|
|
|
99
108
|
* @remarks Expects a `Float`
|
|
100
109
|
*/
|
|
101
110
|
power: number;
|
|
111
|
+
|
|
112
|
+
toJSON(meta?: JSONMeta): PointLightJSON;
|
|
102
113
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PerspectiveCamera } from "../cameras/PerspectiveCamera.js";
|
|
2
|
-
import { Light } from "./Light.js";
|
|
3
2
|
import { LightShadow } from "./LightShadow.js";
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -12,11 +11,5 @@ export class PointLightShadow extends LightShadow<PerspectiveCamera> {
|
|
|
12
11
|
* @remarks This is a _constant_ value
|
|
13
12
|
* @defaultValue `true`
|
|
14
13
|
*/
|
|
15
|
-
readonly isPointLightShadow
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Update the matrices for the camera and shadow, used internally by the renderer.
|
|
19
|
-
* @param light The light for which the shadow is being rendered.
|
|
20
|
-
*/
|
|
21
|
-
override updateMatrices(light: Light, viewportIndex?: number): void;
|
|
14
|
+
readonly isPointLightShadow: true;
|
|
22
15
|
}
|
three/src/lights/SpotLight.d.ts
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
|
-
import { Object3D } from "../core/Object3D.js";
|
|
1
|
+
import { JSONMeta, Object3D } from "../core/Object3D.js";
|
|
2
2
|
import { ColorRepresentation } from "../math/Color.js";
|
|
3
3
|
import { Vector3 } from "../math/Vector3.js";
|
|
4
4
|
import { Texture } from "../textures/Texture.js";
|
|
5
|
-
import { Light } from "./Light.js";
|
|
5
|
+
import { Light, LightJSON } from "./Light.js";
|
|
6
|
+
import { LightShadowJSON } from "./LightShadow.js";
|
|
6
7
|
import { SpotLightShadow } from "./SpotLightShadow.js";
|
|
7
8
|
|
|
9
|
+
export interface SpotLightJSON extends LightJSON {
|
|
10
|
+
distance: number;
|
|
11
|
+
angle: number;
|
|
12
|
+
decay: number;
|
|
13
|
+
penumbra: number;
|
|
14
|
+
|
|
15
|
+
target: string;
|
|
16
|
+
map?: string | undefined;
|
|
17
|
+
|
|
18
|
+
shadow: LightShadowJSON;
|
|
19
|
+
}
|
|
20
|
+
|
|
8
21
|
/**
|
|
9
22
|
* This light gets emitted from a single point in one direction, along a cone that increases in size the further from the light it gets.
|
|
10
23
|
* @example
|
|
@@ -161,4 +174,6 @@ export class SpotLight extends Light<SpotLightShadow> {
|
|
|
161
174
|
* @remarks **Warning**: {@link SpotLight.map} is disabled if {@link SpotLight.castShadow} is `false`.
|
|
162
175
|
*/
|
|
163
176
|
map: Texture | null;
|
|
177
|
+
|
|
178
|
+
toJSON(meta?: JSONMeta): SpotLightJSON;
|
|
164
179
|
}
|
|
@@ -23,9 +23,9 @@ export class ObjectLoader extends Loader<Object3D> {
|
|
|
23
23
|
parseGeometries(json: unknown): { [key: string]: InstancedBufferGeometry | BufferGeometry };
|
|
24
24
|
parseMaterials(json: unknown, textures: { [key: string]: Texture }): { [key: string]: Material };
|
|
25
25
|
parseAnimations(json: unknown): { [key: string]: AnimationClip };
|
|
26
|
-
parseImages(json: unknown, onLoad?: () => void): { [key: string]: Source };
|
|
27
|
-
parseImagesAsync(json: unknown): Promise<{ [key: string]: Source }>;
|
|
28
|
-
parseTextures(json: unknown, images: { [key: string]: Source }): { [key: string]: Texture };
|
|
26
|
+
parseImages(json: unknown, onLoad?: () => void): { [key: string]: Source<unknown> };
|
|
27
|
+
parseImagesAsync(json: unknown): Promise<{ [key: string]: Source<unknown> }>;
|
|
28
|
+
parseTextures(json: unknown, images: { [key: string]: Source<unknown> }): { [key: string]: Texture };
|
|
29
29
|
parseObject(
|
|
30
30
|
data: unknown,
|
|
31
31
|
geometries: { [key: string]: InstancedBufferGeometry | BufferGeometry },
|
|
@@ -6,13 +6,13 @@ import { LoadingManager } from "./LoadingManager.js";
|
|
|
6
6
|
* Class for loading a texture.
|
|
7
7
|
* Unlike other loaders, this one emits events instead of using predefined callbacks. So if you're interested in getting notified when things happen, you need to add listeners to the object.
|
|
8
8
|
*/
|
|
9
|
-
export class TextureLoader extends Loader<Texture
|
|
9
|
+
export class TextureLoader extends Loader<Texture<HTMLImageElement>> {
|
|
10
10
|
constructor(manager?: LoadingManager);
|
|
11
11
|
|
|
12
12
|
load(
|
|
13
13
|
url: string,
|
|
14
|
-
onLoad?: (data: Texture) => void,
|
|
14
|
+
onLoad?: (data: Texture<HTMLImageElement>) => void,
|
|
15
15
|
onProgress?: (event: ProgressEvent) => void,
|
|
16
16
|
onError?: (err: unknown) => void,
|
|
17
|
-
): Texture
|
|
17
|
+
): Texture<HTMLImageElement>;
|
|
18
18
|
}
|
|
@@ -541,13 +541,14 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
541
541
|
* The type property is used for detecting the object type
|
|
542
542
|
* in context of serialization/deserialization.
|
|
543
543
|
*/
|
|
544
|
-
|
|
544
|
+
type: string;
|
|
545
545
|
/**
|
|
546
546
|
* This starts at `0` and counts how many times {@link Material#needsUpdate} is set to `true`.
|
|
547
547
|
*
|
|
548
548
|
* @default 0
|
|
549
549
|
*/
|
|
550
550
|
readonly version: number;
|
|
551
|
+
defines?: Record<string, unknown> | undefined;
|
|
551
552
|
/**
|
|
552
553
|
* An optional callback that is executed immediately before the material is used to render a 3D object.
|
|
553
554
|
*
|
|
@@ -575,7 +576,7 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
575
576
|
*
|
|
576
577
|
* This method can only be used when rendering with {@link WebGLRenderer}. The
|
|
577
578
|
* recommended approach when customizing materials is to use `WebGPURenderer` with the new
|
|
578
|
-
* Node Material system and [TSL]
|
|
579
|
+
* Node Material system and [TSL](https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language).
|
|
579
580
|
*
|
|
580
581
|
* @param {{vertexShader:string,fragmentShader:string,uniforms:Object}} shaderobject - The object holds the uniforms and the vertex and fragment shader source.
|
|
581
582
|
* @param {WebGLRenderer} renderer - A reference to the renderer.
|
|
@@ -241,7 +241,7 @@ export interface MeshLambertMaterialParameters
|
|
|
241
241
|
/**
|
|
242
242
|
* A material for non-shiny surfaces, without specular highlights.
|
|
243
243
|
*
|
|
244
|
-
* The material uses a non-physically based [Lambertian]
|
|
244
|
+
* The material uses a non-physically based [Lambertian](https://en.wikipedia.org/wiki/Lambertian_reflectance)
|
|
245
245
|
* model for calculating reflectance. This can simulate some surfaces (such
|
|
246
246
|
* as untreated wood or stone) well, but cannot simulate shiny surfaces with
|
|
247
247
|
* specular highlights (such as varnished wood). `MeshLambertMaterial` uses per-fragment
|
|
@@ -103,6 +103,20 @@ export interface MeshMatcapMaterialProperties extends MaterialProperties {
|
|
|
103
103
|
* @default null
|
|
104
104
|
*/
|
|
105
105
|
alphaMap: Texture | null;
|
|
106
|
+
/**
|
|
107
|
+
* Renders the geometry as a wireframe.
|
|
108
|
+
*
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
wireframe: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Controls the thickness of the wireframe.
|
|
114
|
+
*
|
|
115
|
+
* Can only be used with {@link SVGRenderer}.
|
|
116
|
+
*
|
|
117
|
+
* @default 1
|
|
118
|
+
*/
|
|
119
|
+
wireframeLinewidth: number;
|
|
106
120
|
/**
|
|
107
121
|
* Whether the material is rendered with flat shading or not.
|
|
108
122
|
*
|
|
@@ -255,7 +255,7 @@ export interface MeshPhongMaterialParameters
|
|
|
255
255
|
/**
|
|
256
256
|
* A material for shiny surfaces with specular highlights.
|
|
257
257
|
*
|
|
258
|
-
* The material uses a non-physically based [Blinn-Phong]
|
|
258
|
+
* The material uses a non-physically based [Blinn-Phong](https://en.wikipedia.org/wiki/Blinn-Phong_shading_model)
|
|
259
259
|
* model for calculating reflectance. Unlike the Lambertian model used in the
|
|
260
260
|
* {@link MeshLambertMaterial} this can simulate shiny surfaces with specular
|
|
261
261
|
* highlights (such as varnished wood). `MeshPhongMaterial` uses per-fragment shading.
|
|
@@ -195,7 +195,7 @@ export interface MeshPhysicalMaterialProperties extends MeshStandardMaterialProp
|
|
|
195
195
|
specularColorMap: Texture | null;
|
|
196
196
|
set anisotropy(value: number);
|
|
197
197
|
/**
|
|
198
|
-
* The anisotropy strength.
|
|
198
|
+
* The anisotropy strength, from `0.0` to `1.0`.
|
|
199
199
|
*
|
|
200
200
|
* @default 0
|
|
201
201
|
*/
|