@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/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for three (https://threejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Wed,
|
|
11
|
+
* Last updated: Wed, 10 Dec 2025 22:36:27 GMT
|
|
12
12
|
* Dependencies: [@dimforge/rapier3d-compat](https://npmjs.com/package/@dimforge/rapier3d-compat), [@tweenjs/tween.js](https://npmjs.com/package/@tweenjs/tween.js), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [@webgpu/types](https://npmjs.com/package/@webgpu/types), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -130,7 +130,7 @@ declare class ArcballControls extends Controls<ArcballControlsEventMap> {
|
|
|
130
130
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
131
131
|
* @param scene The scene rendered by the camera. If not given, gizmos cannot be shown. (optional)
|
|
132
132
|
*/
|
|
133
|
-
constructor(camera: Camera, domElement?: HTMLElement | null, scene?: Scene | null);
|
|
133
|
+
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null, scene?: Scene | null);
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* Set a new mouse action by specifying the operation to be performed and a mouse/key combination. In case of
|
|
@@ -75,7 +75,7 @@ declare class DragControls extends Controls<DragControlsEventMap> {
|
|
|
75
75
|
* @param camera The camera of the rendered scene.
|
|
76
76
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
77
77
|
*/
|
|
78
|
-
constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | null);
|
|
78
|
+
constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export { DragControls };
|
|
@@ -76,7 +76,7 @@ declare class FirstPersonControls extends Controls<{}> {
|
|
|
76
76
|
* @param object The camera to be controlled.
|
|
77
77
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
78
78
|
*/
|
|
79
|
-
constructor(object: Camera, domElement?: HTMLElement);
|
|
79
|
+
constructor(object: Camera, domElement?: HTMLElement | SVGElement);
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Should be called if the application window is resized.
|
|
@@ -38,7 +38,7 @@ declare class FlyControls extends Controls<FlyControlsEventMap> {
|
|
|
38
38
|
* @param object The camera to be controlled.
|
|
39
39
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
40
40
|
*/
|
|
41
|
-
constructor(object: Camera, domElement?: HTMLElement | null);
|
|
41
|
+
constructor(object: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export { FlyControls };
|
|
@@ -206,7 +206,7 @@ declare class OrbitControls extends Controls<OrbitControlsEventMap> {
|
|
|
206
206
|
* is the scene itself.
|
|
207
207
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
208
208
|
*/
|
|
209
|
-
constructor(object: Camera, domElement?: HTMLElement | null);
|
|
209
|
+
constructor(object: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
210
210
|
|
|
211
211
|
/**
|
|
212
212
|
* Get the current vertical rotation, in radians.
|
|
@@ -47,7 +47,7 @@ declare class PointerLockControls extends Controls<PointerLockControlsEventMap>
|
|
|
47
47
|
* @param camera The camera of the rendered scene.
|
|
48
48
|
* @param domElement The HTML element used for event listeners.
|
|
49
49
|
*/
|
|
50
|
-
constructor(camera: Camera, domElement?: HTMLElement | null);
|
|
50
|
+
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Returns the look direction of the camera.
|
|
@@ -124,7 +124,7 @@ declare class TrackballControls extends Controls<TrackballControlsEventMap> {
|
|
|
124
124
|
* @param camera The camera of the rendered scene.
|
|
125
125
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
126
126
|
*/
|
|
127
|
-
constructor(camera: Camera, domElement?: HTMLElement | null);
|
|
127
|
+
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* Should be called if the application window is resized.
|
|
@@ -163,7 +163,7 @@ declare class TransformControls extends Controls<TransformControlsEventMap> {
|
|
|
163
163
|
* @param camera The camera of the rendered scene.
|
|
164
164
|
* @param domElement The HTML element used for event listeners. (optional)
|
|
165
165
|
*/
|
|
166
|
-
constructor(camera: Camera, domElement?: HTMLElement);
|
|
166
|
+
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
* Returns the visual representation of the controls. Add the helper to your scene to visually transform the
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Node, Renderer, StorageBufferNode } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
export const getBitonicFlipIndices: (index: Node, blockHeight: Node) => Node;
|
|
4
|
+
|
|
5
|
+
export const getBitonicDisperseIndices: (index: Node, swapSpan: Node) => Node;
|
|
6
|
+
|
|
7
|
+
export interface BitonicSortOptions {
|
|
8
|
+
workgroupSize?: number | undefined;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class BitonicSort {
|
|
12
|
+
infoStorage: StorageBufferNode;
|
|
13
|
+
|
|
14
|
+
swapOpCount: number;
|
|
15
|
+
stepCount: number;
|
|
16
|
+
|
|
17
|
+
constructor(renderer: Renderer, dataBuffer: StorageBufferNode, options?: BitonicSortOptions);
|
|
18
|
+
|
|
19
|
+
computeStep(renderer: Renderer): Promise<void>;
|
|
20
|
+
compute(renderer: Renderer): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RendererInspector } from "./RendererInspector.js";
|
|
2
|
+
import { ParametersGroup } from "./tabs/Parameters.js";
|
|
3
|
+
|
|
4
|
+
declare class Inspector extends RendererInspector {
|
|
5
|
+
createParameters(name: string): ParametersGroup;
|
|
6
|
+
|
|
7
|
+
get domElement(): HTMLDivElement;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { Inspector };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Tab } from "../ui/Tab.js";
|
|
2
|
+
import { ValueButton, ValueCheckbox, ValueColor, ValueNumber, ValueSelect, ValueSlider } from "../ui/Values.js";
|
|
3
|
+
|
|
4
|
+
type KeyToValueOfType<T, V> = { [K in keyof T]: T[K] extends V ? K : never }[keyof T];
|
|
5
|
+
|
|
6
|
+
interface ValueSelectWithParameters<T = Record<string, unknown>, K extends keyof T = keyof T>
|
|
7
|
+
extends ValueSelect<T, K>
|
|
8
|
+
{
|
|
9
|
+
name: (name: string) => this;
|
|
10
|
+
listen: () => this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface ValueNumberWithParameters<
|
|
14
|
+
T = Record<string, unknown>,
|
|
15
|
+
K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
|
|
16
|
+
> extends ValueNumber<T, K> {
|
|
17
|
+
name: (name: string) => this;
|
|
18
|
+
listen: () => this;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface ValueSliderWithParameters<
|
|
22
|
+
T = Record<string, unknown>,
|
|
23
|
+
K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
|
|
24
|
+
> extends ValueSlider<T, K> {
|
|
25
|
+
name: (name: string) => this;
|
|
26
|
+
listen: () => this;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface ValueCheckboxWithParameters<
|
|
30
|
+
T = Record<string, unknown>,
|
|
31
|
+
K extends KeyToValueOfType<T, boolean> = KeyToValueOfType<T, boolean>,
|
|
32
|
+
> extends ValueCheckbox<T, K> {
|
|
33
|
+
name: (name: string) => this;
|
|
34
|
+
listen: () => this;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface ValueButtonWithParameters<
|
|
38
|
+
T = Record<string, unknown>,
|
|
39
|
+
K extends KeyToValueOfType<T, (this: T) => void> = KeyToValueOfType<T, (this: T) => void>,
|
|
40
|
+
> extends ValueButton<T, K> {
|
|
41
|
+
name: (name: string) => this;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface ValueColorWithParameters<
|
|
45
|
+
T = Record<string, unknown>,
|
|
46
|
+
K extends keyof T = keyof T,
|
|
47
|
+
> extends ValueColor<T, K> {
|
|
48
|
+
name: (name: string) => this;
|
|
49
|
+
listen: () => this;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare class ParametersGroup {
|
|
53
|
+
name: string;
|
|
54
|
+
|
|
55
|
+
constructor(parameters: never, name: string);
|
|
56
|
+
|
|
57
|
+
add<T, K extends keyof T>(
|
|
58
|
+
object: T,
|
|
59
|
+
property: K,
|
|
60
|
+
options: ReadonlyArray<T[K]> | Record<string, T[K]>,
|
|
61
|
+
): ValueSelectWithParameters<T, K>;
|
|
62
|
+
add<T, K extends KeyToValueOfType<T, number>>(
|
|
63
|
+
object: T,
|
|
64
|
+
property: K,
|
|
65
|
+
min: number,
|
|
66
|
+
max: number,
|
|
67
|
+
step?: number,
|
|
68
|
+
): ValueSliderWithParameters<T, K>;
|
|
69
|
+
add<T, K extends KeyToValueOfType<T, number>>(
|
|
70
|
+
object: T,
|
|
71
|
+
property: K,
|
|
72
|
+
min?: number,
|
|
73
|
+
): ValueNumberWithParameters<T, K>;
|
|
74
|
+
add<T, K extends KeyToValueOfType<T, boolean>>(
|
|
75
|
+
object: T,
|
|
76
|
+
property: K,
|
|
77
|
+
options?: never,
|
|
78
|
+
): ValueCheckboxWithParameters<T, K>;
|
|
79
|
+
add<T, K extends KeyToValueOfType<T, (this: T) => void>>(
|
|
80
|
+
object: T,
|
|
81
|
+
property: K,
|
|
82
|
+
options?: never,
|
|
83
|
+
): ValueButtonWithParameters<T, K>;
|
|
84
|
+
|
|
85
|
+
addFolder(name: string): ParametersGroup;
|
|
86
|
+
|
|
87
|
+
addColor<T, K extends keyof T>(object: T, property: K, rgbScale?: number): ValueColorWithParameters<T, K>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare class Parameters extends Tab {
|
|
91
|
+
createGroup(name: string): ParametersGroup;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { Parameters };
|
|
95
|
+
export type { ParametersGroup };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ColorRepresentation, EventDispatcher } from "three";
|
|
2
|
+
|
|
3
|
+
type KeyToValueOfType<T, V> = { [K in keyof T]: T[K] extends V ? K : never }[keyof T];
|
|
4
|
+
|
|
5
|
+
declare class Value<T = Record<string, unknown>, K extends keyof T = keyof T> extends EventDispatcher {
|
|
6
|
+
onChange(callback: (value: T[K]) => void): this;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ValueNumberParams {
|
|
10
|
+
value?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
min?: number;
|
|
13
|
+
max?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare class ValueNumber<
|
|
17
|
+
T = Record<string, unknown>,
|
|
18
|
+
K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
|
|
19
|
+
> extends Value<T, K> {
|
|
20
|
+
constructor(params: ValueNumberParams);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ValueCheckboxParams {
|
|
24
|
+
value?: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare class ValueCheckbox<
|
|
28
|
+
T = Record<string, unknown>,
|
|
29
|
+
K extends KeyToValueOfType<T, boolean> = KeyToValueOfType<T, boolean>,
|
|
30
|
+
> extends Value<T, K> {
|
|
31
|
+
constructor(params: ValueCheckboxParams);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ValueSliderParams {
|
|
35
|
+
value?: number;
|
|
36
|
+
min?: number;
|
|
37
|
+
max?: number;
|
|
38
|
+
step?: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare class ValueSlider<
|
|
42
|
+
T = Record<string, unknown>,
|
|
43
|
+
K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
|
|
44
|
+
> extends Value<T, K> {
|
|
45
|
+
constructor(params: ValueSliderParams);
|
|
46
|
+
|
|
47
|
+
setValue(val: number): this;
|
|
48
|
+
step(value: number): this;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ValueSelectParams<T, K extends keyof T> {
|
|
52
|
+
options?: ReadonlyArray<T[K]> | Record<string, T[K]>;
|
|
53
|
+
value?: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class ValueSelect<T = Record<string, unknown>, K extends keyof T = keyof T> extends Value<T, K> {
|
|
57
|
+
constructor(params: ValueSelectParams<T, K>);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ValueColorParams {
|
|
61
|
+
value?: ColorRepresentation;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare class ValueColor<T = Record<string, unknown>, K extends keyof T = keyof T> extends Value<T, K> {
|
|
65
|
+
constructor(params: ValueColorParams);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface ValueButtonParams {
|
|
69
|
+
text?: string;
|
|
70
|
+
value?: () => void;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare class ValueButton<
|
|
74
|
+
T = Record<string, unknown>,
|
|
75
|
+
K extends KeyToValueOfType<T, (this: T) => void> = KeyToValueOfType<T, (this: T) => void>,
|
|
76
|
+
> extends Value<T, K> {
|
|
77
|
+
constructor(params: ValueColorParams);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { Value, ValueButton, ValueCheckbox, ValueColor, ValueNumber, ValueSelect, ValueSlider };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Camera,
|
|
1
|
+
import { Camera, Object3D, Scene, Vector3 } from "three";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
constructor(camera: Camera, scene: Scene, deep?: number);
|
|
3
|
+
declare class SelectionBox {
|
|
5
4
|
camera: Camera;
|
|
6
|
-
collection: Mesh[];
|
|
7
|
-
deep: number;
|
|
8
|
-
endPoint: Vector3;
|
|
9
5
|
scene: Scene;
|
|
10
6
|
startPoint: Vector3;
|
|
7
|
+
endPoint: Vector3;
|
|
8
|
+
collection: Object3D[];
|
|
11
9
|
instances: Record<string, number[]>;
|
|
10
|
+
batches: Record<string, number[]>;
|
|
11
|
+
deep: number;
|
|
12
|
+
|
|
13
|
+
constructor(camera: Camera, scene: Scene, deep?: number);
|
|
12
14
|
|
|
13
|
-
select(startPoint?: Vector3, endPoint?: Vector3):
|
|
14
|
-
updateFrustum(startPoint: Vector3, endPoint: Vector3): void;
|
|
15
|
-
searchChildInFrustum(frustum: Frustum, object: Object3D): void;
|
|
15
|
+
select(startPoint?: Vector3, endPoint?: Vector3): Object3D[];
|
|
16
16
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "three/tsl";
|
|
2
1
|
import { Lighting } from "three/webgpu";
|
|
3
2
|
import { Light } from "../../../src/lights/Light.js";
|
|
4
3
|
import TiledLightsNode from "../tsl/lighting/TiledLightsNode.js";
|
|
@@ -6,5 +5,5 @@ import TiledLightsNode from "../tsl/lighting/TiledLightsNode.js";
|
|
|
6
5
|
export class TiledLighting extends Lighting {
|
|
7
6
|
constructor();
|
|
8
7
|
|
|
9
|
-
createNode(lights?: Light[]):
|
|
8
|
+
createNode(lights?: Light[]): TiledLightsNode;
|
|
10
9
|
}
|
|
@@ -35,6 +35,9 @@ export class KTX2Loader extends Loader<CompressedTexture> {
|
|
|
35
35
|
*/
|
|
36
36
|
setWorkerLimit(limit: number): this;
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.
|
|
40
|
+
*/
|
|
38
41
|
detectSupportAsync(renderer: Renderer): Promise<this>;
|
|
39
42
|
|
|
40
43
|
/**
|
|
@@ -16,6 +16,13 @@ declare class UltraHDRLoader extends Loader<DataTexture> {
|
|
|
16
16
|
setDataType(value: TextureDataType): this;
|
|
17
17
|
|
|
18
18
|
parse(buffer: ArrayBuffer, onLoad: (texData: UltraHDRLoaderTextureData) => void): void;
|
|
19
|
+
|
|
20
|
+
load(
|
|
21
|
+
url: string,
|
|
22
|
+
onLoad: (data: DataTexture) => void,
|
|
23
|
+
onProgress?: (event: ProgressEvent) => void,
|
|
24
|
+
onError?: (err: unknown) => void,
|
|
25
|
+
): DataTexture;
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
export { UltraHDRLoader };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Data3DTexture, Loader, LoadingManager, Mesh } from "three";
|
|
1
|
+
import { BufferGeometry, Data3DTexture, Loader, LoadingManager, Mesh, MeshStandardMaterial, Object3D } from "three";
|
|
2
2
|
|
|
3
3
|
export interface Chunk {
|
|
4
4
|
palette: number[];
|
|
@@ -6,16 +6,33 @@ export interface Chunk {
|
|
|
6
6
|
data: Uint8Array;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export interface VOXLoaderResult {
|
|
10
|
+
chunks: Chunk[];
|
|
11
|
+
scene: Object3D;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare class VOXLoader extends Loader<VOXLoaderResult> {
|
|
10
15
|
constructor(manager?: LoadingManager);
|
|
11
16
|
|
|
12
|
-
parse(data: ArrayBuffer):
|
|
17
|
+
parse(data: ArrayBuffer): VOXLoaderResult;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
declare function buildMesh(chunk: Chunk): Mesh<BufferGeometry, MeshStandardMaterial>;
|
|
21
|
+
|
|
22
|
+
declare function buildData3DTexture(chunk: Chunk): Data3DTexture;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use buildMesh() instead.
|
|
26
|
+
*/
|
|
27
|
+
declare class VOXMesh extends Mesh {
|
|
16
28
|
constructor(chunk: Chunk);
|
|
17
29
|
}
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use buildData3DTexture() instead.
|
|
33
|
+
*/
|
|
34
|
+
declare class VOXData3DTexture extends Data3DTexture {
|
|
20
35
|
constructor(chunk: Chunk);
|
|
21
36
|
}
|
|
37
|
+
|
|
38
|
+
export { buildData3DTexture, buildMesh, VOXData3DTexture, VOXLoader, VOXMesh };
|
|
@@ -1,32 +1,54 @@
|
|
|
1
|
-
import { Box3, Layers, Object3D, Ray, Sphere, Triangle } from "three";
|
|
1
|
+
import { Box3, Layers, Object3D, Ray, Sphere, Triangle, Vector3 } from "three";
|
|
2
2
|
|
|
3
3
|
import { Capsule } from "./Capsule.js";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
interface OctreeTriangleIntersection {
|
|
6
|
+
normal: Vector3;
|
|
7
|
+
point: Vector3;
|
|
8
|
+
depth: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface OctreeIntersection {
|
|
12
|
+
normal: Vector3;
|
|
13
|
+
depth: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface OctreeRayIntersection {
|
|
17
|
+
distance: number;
|
|
18
|
+
triangle: Triangle;
|
|
19
|
+
position: Vector3;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class Octree {
|
|
23
|
+
box: Box3 | undefined;
|
|
7
24
|
bounds: Box3;
|
|
8
25
|
|
|
9
|
-
subTrees: Octree[];
|
|
10
|
-
triangles: Triangle[];
|
|
11
26
|
layers: Layers;
|
|
12
|
-
|
|
13
27
|
trianglesPerLeaf: number;
|
|
14
28
|
maxLevel: number;
|
|
15
29
|
|
|
16
|
-
|
|
30
|
+
subTrees: Octree[];
|
|
31
|
+
triangles: Triangle[];
|
|
32
|
+
|
|
33
|
+
constructor(box?: Box3);
|
|
17
34
|
|
|
18
35
|
addTriangle(triangle: Triangle): this;
|
|
19
36
|
calcBox(): this;
|
|
20
37
|
split(level: number): this;
|
|
21
38
|
build(): this;
|
|
22
39
|
getRayTriangles(ray: Ray, triangles: Triangle[]): Triangle[];
|
|
23
|
-
triangleCapsuleIntersect(capsule: Capsule, triangle: Triangle):
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
triangleCapsuleIntersect(capsule: Capsule, triangle: Triangle): OctreeTriangleIntersection | false;
|
|
41
|
+
triangleBoxIntersect(box: Box3, triangle: Triangle): OctreeTriangleIntersection | false;
|
|
42
|
+
triangleSphereIntersect(sphere: Sphere, triangle: Triangle): OctreeTriangleIntersection | false;
|
|
43
|
+
getSphereTriangles(sphere: Sphere, triangles: Triangle[]): void;
|
|
44
|
+
getBoxTriangles(box: Box3, triangles: Triangle[]): void;
|
|
45
|
+
getCapsuleTriangles(capsule: Capsule, triangles: Triangle[]): void;
|
|
46
|
+
boxIntersect(box: Box3): OctreeIntersection | false;
|
|
47
|
+
sphereIntersect(sphere: Sphere): OctreeIntersection | false;
|
|
48
|
+
capsuleIntersect(capsule: Capsule): OctreeIntersection | false;
|
|
49
|
+
rayIntersect(ray: Ray): OctreeRayIntersection | false;
|
|
30
50
|
fromGraphNode(group: Object3D): this;
|
|
31
51
|
clear(): this;
|
|
32
52
|
}
|
|
53
|
+
|
|
54
|
+
export { Octree };
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { ShaderNodeObject } from "three/tsl";
|
|
2
1
|
import { BoxGeometry, Mesh, NodeMaterial, UniformNode, Vector3 } from "three/webgpu";
|
|
3
2
|
|
|
4
3
|
declare class SkyMesh extends Mesh<BoxGeometry, NodeMaterial> {
|
|
5
|
-
turbidity:
|
|
6
|
-
rayleigh:
|
|
7
|
-
mieCoefficient:
|
|
8
|
-
mieDirectionalG:
|
|
9
|
-
sunPosition:
|
|
10
|
-
upUniform:
|
|
4
|
+
turbidity: UniformNode<number>;
|
|
5
|
+
rayleigh: UniformNode<number>;
|
|
6
|
+
mieCoefficient: UniformNode<number>;
|
|
7
|
+
mieDirectionalG: UniformNode<number>;
|
|
8
|
+
sunPosition: UniformNode<Vector3>;
|
|
9
|
+
upUniform: UniformNode<Vector3>;
|
|
11
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
*/
|
|
12
14
|
readonly isSky: true;
|
|
13
15
|
|
|
16
|
+
readonly isSkyMesh: true;
|
|
17
|
+
|
|
14
18
|
constructor();
|
|
15
19
|
}
|
|
16
20
|
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "three/webgpu";
|
|
12
12
|
|
|
13
13
|
export interface WaterMeshOptions {
|
|
14
|
-
|
|
14
|
+
resolutionScale?: number | undefined;
|
|
15
15
|
waterNormals: Texture;
|
|
16
16
|
alpha?: number | undefined;
|
|
17
17
|
size?: number | undefined;
|
|
@@ -24,7 +24,7 @@ export interface WaterMeshOptions {
|
|
|
24
24
|
declare class WaterMesh extends Mesh<BufferGeometry, NodeMaterial> {
|
|
25
25
|
readonly isWater: true;
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
resolutionScale: number;
|
|
28
28
|
|
|
29
29
|
waterNormals: TextureNode;
|
|
30
30
|
alpha: UniformNode<number>;
|
|
@@ -2,7 +2,7 @@ import { Mesh, Object3D, Vector3 } from "three";
|
|
|
2
2
|
|
|
3
3
|
export interface AmmoPhysicsObject {
|
|
4
4
|
addScene: (scene: Object3D) => void;
|
|
5
|
-
addMesh: (mesh: Mesh, mass?: number) => void;
|
|
5
|
+
addMesh: (mesh: Mesh, mass?: number, restitution?: number) => void;
|
|
6
6
|
setMeshPosition: (mesh: Mesh, position: Vector3, index?: number) => void;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IUniform, RawShaderMaterial } from "three";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Pass } from "./Pass.js";
|
|
4
|
+
|
|
5
|
+
declare class OutputPass extends Pass {
|
|
6
|
+
readonly isOutputPass: true;
|
|
7
|
+
|
|
8
|
+
uniforms: Record<string, IUniform>;
|
|
9
|
+
material: RawShaderMaterial;
|
|
4
10
|
|
|
5
|
-
export class OutputPass extends Pass {
|
|
6
11
|
constructor();
|
|
7
|
-
uniforms: object;
|
|
8
|
-
material: ShaderMaterial;
|
|
9
|
-
fsQuad: FullScreenQuad;
|
|
10
12
|
}
|
|
13
|
+
|
|
14
|
+
export { OutputPass };
|
|
@@ -2,15 +2,7 @@ import { Camera, Color, Material, Scene } from "three";
|
|
|
2
2
|
|
|
3
3
|
import { Pass } from "./Pass.js";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
constructor(
|
|
7
|
-
scene: Scene,
|
|
8
|
-
camera: Camera,
|
|
9
|
-
overrideMaterial?: Material | null,
|
|
10
|
-
clearColor?: Color | null,
|
|
11
|
-
clearAlpha?: number | null,
|
|
12
|
-
);
|
|
13
|
-
|
|
5
|
+
declare class RenderPass extends Pass {
|
|
14
6
|
scene: Scene;
|
|
15
7
|
camera: Camera;
|
|
16
8
|
|
|
@@ -18,6 +10,19 @@ export class RenderPass extends Pass {
|
|
|
18
10
|
|
|
19
11
|
clearColor: Color | null;
|
|
20
12
|
clearAlpha: number | null;
|
|
21
|
-
|
|
13
|
+
clear: boolean;
|
|
22
14
|
clearDepth: boolean;
|
|
15
|
+
needsSwap: boolean;
|
|
16
|
+
|
|
17
|
+
readonly isRenderPass: true;
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
scene: Scene,
|
|
21
|
+
camera: Camera,
|
|
22
|
+
overrideMaterial?: Material | null,
|
|
23
|
+
clearColor?: Color | null,
|
|
24
|
+
clearAlpha?: number | null,
|
|
25
|
+
);
|
|
23
26
|
}
|
|
27
|
+
|
|
28
|
+
export { RenderPass };
|
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
import { Camera, Object3D, Scene, Vector2 } from "three";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
constructor(element: HTMLElement);
|
|
3
|
+
declare class CSS2DObject extends Object3D {
|
|
5
4
|
element: HTMLElement;
|
|
6
5
|
center: Vector2;
|
|
7
6
|
|
|
7
|
+
constructor(element: HTMLElement);
|
|
8
|
+
|
|
8
9
|
onBeforeRender: (renderer: unknown, scene: Scene, camera: Camera) => void;
|
|
9
10
|
onAfterRender: (renderer: unknown, scene: Scene, camera: Camera) => void;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
export
|
|
13
|
-
element?: HTMLElement;
|
|
14
|
-
}
|
|
13
|
+
export interface CSS2DParameters {
|
|
14
|
+
element?: HTMLElement | undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class CSS2DRenderer {
|
|
18
|
+
domElement: HTMLElement;
|
|
19
|
+
sortObjects: boolean;
|
|
15
20
|
|
|
16
|
-
export class CSS2DRenderer {
|
|
17
21
|
constructor(parameters?: CSS2DParameters);
|
|
18
|
-
domElement: HTMLElement;
|
|
19
22
|
|
|
20
|
-
getSize()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
getSize: () => { width: number; height: number };
|
|
24
|
+
render: (scene: Scene, camera: Camera) => void;
|
|
25
|
+
setSize: (width: number, height: number) => void;
|
|
23
26
|
}
|
|
27
|
+
|
|
28
|
+
export { CSS2DObject, CSS2DRenderer };
|