@types/three 0.166.0 → 0.167.1
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/build/three.webgpu.d.ts +1 -0
- three/build/three.webgpu.min.d.ts +1 -0
- three/examples/jsm/Addons.d.ts +1 -1
- three/examples/jsm/animation/MMDPhysics.d.ts +4 -4
- three/examples/jsm/csm/CSM.d.ts +3 -4
- three/examples/jsm/csm/CSMFrustum.d.ts +1 -1
- three/examples/jsm/lights/RectAreaLightTexturesLib.d.ts +7 -0
- three/examples/jsm/lights/RectAreaLightUniformsLib.d.ts +4 -2
- three/examples/jsm/lines/webgpu/Line2.d.ts +14 -0
- three/examples/jsm/lines/webgpu/LineSegments2.d.ts +15 -0
- three/examples/jsm/loaders/KTX2Loader.d.ts +1 -2
- three/examples/jsm/loaders/LUTImageLoader.d.ts +18 -0
- three/examples/jsm/loaders/MaterialXLoader.d.ts +1 -2
- three/examples/jsm/loaders/UltraHDRLoader.d.ts +21 -0
- three/package.json +4 -3
- three/src/Three.WebGPU.d.ts +188 -0
- three/src/Three.d.ts +29 -91
- three/src/animation/AnimationClip.d.ts +12 -4
- three/src/animation/AnimationUtils.d.ts +32 -7
- three/src/animation/KeyframeTrack.d.ts +9 -1
- three/src/animation/PropertyBinding.d.ts +12 -12
- three/src/cameras/OrthographicCamera.d.ts +27 -0
- three/src/cameras/PerspectiveCamera.d.ts +31 -0
- three/src/constants.d.ts +7 -1
- three/src/core/BufferAttribute.d.ts +11 -6
- three/src/core/BufferGeometry.d.ts +26 -3
- three/src/core/InterleavedBufferAttribute.d.ts +3 -3
- three/src/core/Object3D.d.ts +51 -6
- three/src/extras/DataUtils.d.ts +9 -2
- three/src/extras/ImageUtils.d.ts +6 -7
- three/src/extras/core/Curve.d.ts +8 -2
- three/src/extras/core/CurvePath.d.ts +9 -1
- three/src/extras/core/Path.d.ts +9 -2
- three/src/extras/core/Shape.d.ts +9 -1
- three/src/lights/Light.d.ts +19 -2
- three/src/lights/LightShadow.d.ts +13 -2
- three/src/lights/webgpu/IESSpotLight.d.ts +6 -0
- three/src/loaders/Cache.d.ts +13 -8
- three/src/materials/Material.d.ts +164 -2
- three/src/materials/ShaderMaterial.d.ts +49 -2
- three/src/math/ColorManagement.d.ts +3 -0
- three/src/math/Euler.d.ts +4 -2
- three/src/math/Matrix2.d.ts +53 -0
- three/src/math/Matrix3.d.ts +70 -113
- three/src/math/Matrix4.d.ts +51 -98
- three/src/math/Quaternion.d.ts +5 -3
- three/src/math/Vector2.d.ts +1 -1
- three/{examples/jsm → src}/nodes/Nodes.d.ts +28 -5
- three/{examples/jsm → src}/nodes/accessors/BatchNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/accessors/BufferAttributeNode.d.ts +4 -1
- three/{examples/jsm → src}/nodes/accessors/CameraNode.d.ts +3 -1
- three/{examples/jsm → src}/nodes/accessors/CubeTextureNode.d.ts +11 -3
- three/{examples/jsm → src}/nodes/accessors/InstanceNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/accessors/MaterialNode.d.ts +11 -2
- three/{examples/jsm → src}/nodes/accessors/MaterialReferenceNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/accessors/ModelNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/accessors/NormalNode.d.ts +3 -3
- three/{examples/jsm → src}/nodes/accessors/Object3DNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/accessors/ReflectVectorNode.d.ts +3 -0
- three/{examples/jsm → src}/nodes/accessors/SkinningNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/accessors/StorageTextureNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/accessors/Texture3DNode.d.ts +3 -2
- three/{examples/jsm → src}/nodes/accessors/TextureNode.d.ts +9 -2
- three/{examples/jsm → src}/nodes/core/IndexNode.d.ts +3 -1
- three/{examples/jsm → src}/nodes/core/LightingModel.d.ts +1 -3
- three/src/nodes/core/MRTNode.d.ts +19 -0
- three/{examples/jsm → src}/nodes/core/Node.d.ts +3 -10
- three/{examples/jsm → src}/nodes/core/NodeBuilder.d.ts +7 -1
- three/{examples/jsm → src}/nodes/core/NodeCache.d.ts +2 -1
- three/{examples/jsm → src}/nodes/core/NodeFrame.d.ts +5 -2
- three/{examples/jsm → src}/nodes/core/NodeUtils.d.ts +6 -1
- three/{examples/jsm → src}/nodes/core/PropertyNode.d.ts +1 -0
- three/{examples/jsm → src}/nodes/display/AnamorphicNode.d.ts +1 -1
- three/src/nodes/display/BloomNode.d.ts +35 -0
- three/{examples/jsm → src}/nodes/display/ColorAdjustmentNode.d.ts +0 -1
- three/{examples/jsm → src}/nodes/display/ColorSpaceNode.d.ts +1 -1
- three/src/nodes/display/DenoiseNode.d.ts +38 -0
- three/{examples/jsm → src}/nodes/display/DepthOfFieldNode.d.ts +4 -4
- three/{examples/jsm → src}/nodes/display/DotScreenNode.d.ts +3 -8
- three/src/nodes/display/FXAANode.d.ts +19 -0
- three/src/nodes/display/FilmNode.d.ts +25 -0
- three/src/nodes/display/GTAONode.d.ts +46 -0
- three/{examples/jsm → src}/nodes/display/GaussianBlurNode.d.ts +8 -5
- three/src/nodes/display/Lut3DNode.d.ts +30 -0
- three/{examples/jsm → src}/nodes/display/NormalMapNode.d.ts +1 -2
- three/src/nodes/display/PassNode.d.ts +62 -0
- three/src/nodes/display/PixelationPassNode.d.ts +67 -0
- three/src/nodes/display/RenderOutputNode.d.ts +28 -0
- three/{examples/jsm → src}/nodes/display/ToneMappingNode.d.ts +1 -1
- three/src/nodes/display/TransitionNode.d.ts +41 -0
- three/{examples/jsm → src}/nodes/display/ViewportTextureNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +1 -1
- three/src/nodes/functions/BasicLightingModel.d.ts +7 -0
- three/src/nodes/functions/PhongLightingModel.d.ts +7 -0
- three/{examples/jsm → src}/nodes/geometry/RangeNode.d.ts +4 -1
- three/{examples/jsm → src}/nodes/lighting/AnalyticLightNode.d.ts +1 -1
- three/src/nodes/lighting/BasicEnvironmentNode.d.ts +10 -0
- three/src/nodes/lighting/BasicLightMapNode.d.ts +8 -0
- three/{examples/jsm → src}/nodes/lighting/HemisphereLightNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/lighting/LightingNode.d.ts +2 -0
- three/{examples/jsm → src}/nodes/lighting/LightsNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/lighting/PointLightNode.d.ts +1 -1
- three/src/nodes/lighting/RectAreaLightNode.d.ts +21 -0
- three/{examples/jsm → src}/nodes/lighting/SpotLightNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/loaders/NodeLoader.d.ts +3 -1
- three/{examples/jsm → src}/nodes/loaders/NodeMaterialLoader.d.ts +1 -1
- three/{examples/jsm → src}/nodes/loaders/NodeObjectLoader.d.ts +3 -1
- three/src/nodes/materials/Line2NodeMaterial.d.ts +53 -0
- three/{examples/jsm → src}/nodes/materials/LineBasicNodeMaterial.d.ts +3 -1
- three/{examples/jsm → src}/nodes/materials/Materials.d.ts +2 -1
- three/{examples/jsm → src}/nodes/materials/MeshBasicNodeMaterial.d.ts +5 -1
- three/{examples/jsm → src}/nodes/materials/MeshMatcapNodeMaterial.d.ts +5 -1
- three/{examples/jsm → src}/nodes/materials/MeshNormalNodeMaterial.d.ts +4 -1
- three/{examples/jsm → src}/nodes/materials/MeshPhongNodeMaterial.d.ts +6 -1
- three/{examples/jsm → src}/nodes/materials/MeshPhysicalNodeMaterial.d.ts +4 -2
- three/{examples/jsm → src}/nodes/materials/MeshStandardNodeMaterial.d.ts +6 -1
- three/{examples/jsm → src}/nodes/materials/MeshToonNodeMaterial.d.ts +5 -1
- three/{examples/jsm → src}/nodes/materials/NodeMaterial.d.ts +22 -16
- three/{examples/jsm → src}/nodes/materials/PointsNodeMaterial.d.ts +3 -1
- three/{examples/jsm → src}/nodes/materials/ShadowNodeMaterial.d.ts +2 -1
- three/{examples/jsm → src}/nodes/materials/SpriteNodeMaterial.d.ts +3 -1
- three/{examples/jsm → src}/nodes/math/MathNode.d.ts +4 -0
- three/{examples/jsm → src}/nodes/pmrem/PMREMNode.d.ts +1 -1
- three/{examples/jsm → src}/nodes/utils/MaxMipLevelNode.d.ts +3 -3
- three/src/nodes/utils/PackingNode.d.ts +24 -0
- three/src/nodes/utils/RTTNode.d.ts +45 -0
- three/{examples/jsm → src}/nodes/utils/ReflectorNode.d.ts +3 -1
- three/src/objects/InstancedMesh.d.ts +15 -2
- three/src/objects/LOD.d.ts +17 -1
- three/src/objects/Mesh.d.ts +11 -1
- three/src/objects/Points.d.ts +0 -3
- three/src/objects/Skeleton.d.ts +10 -3
- three/src/objects/SkinnedMesh.d.ts +15 -3
- three/{examples/jsm → src}/renderers/common/Animation.d.ts +0 -1
- three/{examples/jsm → src}/renderers/common/Attributes.d.ts +4 -2
- three/{examples/jsm → src}/renderers/common/Backend.d.ts +1 -1
- three/{examples/jsm → src}/renderers/common/Background.d.ts +2 -1
- three/{examples/jsm → src}/renderers/common/ClippingContext.d.ts +6 -1
- three/{examples/jsm → src}/renderers/common/Color4.d.ts +1 -1
- three/{examples/jsm → src}/renderers/common/CubeRenderTarget.d.ts +4 -1
- three/{examples/jsm → src}/renderers/common/Geometries.d.ts +4 -1
- three/{examples/jsm → src}/renderers/common/Info.d.ts +1 -1
- three/{examples/jsm → src}/renderers/common/PostProcessing.d.ts +9 -3
- three/{examples/jsm/objects → src/renderers/common}/QuadMesh.d.ts +4 -2
- three/{examples/jsm → src}/renderers/common/RenderBundle.d.ts +2 -1
- three/{examples/jsm → src}/renderers/common/RenderBundles.d.ts +2 -1
- three/{examples/jsm → src}/renderers/common/RenderContext.d.ts +4 -1
- three/{examples/jsm → src}/renderers/common/RenderContexts.d.ts +3 -1
- three/{examples/jsm → src}/renderers/common/RenderList.d.ts +5 -1
- three/{examples/jsm → src}/renderers/common/RenderLists.d.ts +2 -1
- three/{examples/jsm → src}/renderers/common/RenderObject.d.ts +16 -13
- three/{examples/jsm → src}/renderers/common/RenderObjects.d.ts +5 -2
- three/{examples/jsm → src}/renderers/common/Renderer.d.ts +30 -29
- three/{examples/jsm → src}/renderers/common/SampledTexture.d.ts +1 -1
- three/{examples/jsm → src}/renderers/common/StorageBufferAttribute.d.ts +1 -1
- three/{examples/jsm → src}/renderers/common/StorageInstancedBufferAttribute.d.ts +2 -1
- three/{examples/jsm → src}/renderers/common/StorageTexture.d.ts +1 -1
- three/{examples/jsm → src}/renderers/common/Textures.d.ts +4 -1
- three/{examples/jsm → src}/renderers/common/Uniform.d.ts +6 -1
- three/{examples/jsm → src}/renderers/common/extras/PMREMGenerator.d.ts +2 -1
- three/{examples/jsm → src}/renderers/common/nodes/NodeUniform.d.ts +6 -1
- three/{examples/jsm → src}/renderers/common/nodes/NodeUniformsGroup.d.ts +1 -2
- three/{examples/jsm → src}/renderers/common/nodes/Nodes.d.ts +21 -8
- three/src/renderers/shaders/ShaderLib.d.ts +3 -1
- three/src/renderers/shaders/UniformsUtils.d.ts +6 -3
- three/{examples/jsm/renderers/webgl → src/renderers/webgl-fallback}/WebGLBackend.d.ts +1 -1
- three/{examples/jsm → src}/renderers/webgpu/WebGPUBackend.d.ts +1 -1
- three/{examples/jsm → src}/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +6 -4
- three/src/scenes/Fog.d.ts +7 -24
- three/src/scenes/FogExp2.d.ts +9 -3
- three/src/scenes/Scene.d.ts +21 -5
- three/src/textures/Source.d.ts +15 -1
- three/src/textures/Texture.d.ts +37 -1
- three/examples/jsm/deprecated/Geometry.d.ts +0 -341
- three/examples/jsm/lights/IESSpotLight.d.ts +0 -5
- three/examples/jsm/nodes/display/PassNode.d.ts +0 -46
- three/examples/jsm/nodes/functions/PhongLightingModel.d.ts +0 -7
- three/examples/jsm/nodes/lighting/RectAreaLightNode.d.ts +0 -10
- /three/{examples/jsm → src}/nodes/accessors/AccessorsUtils.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/BitangentNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/BufferNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/ClippingNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/ModelViewProjectionNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/PointUVNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/PositionNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/ReferenceNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/RendererReferenceNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/StorageBufferNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/TangentNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/TextureBicubicNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/UVNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/UniformsNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/UserDataNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/accessors/VertexColorNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/code/CodeNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/code/ExpressionNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/code/FunctionCallNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/code/FunctionNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/AssignNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/AttributeNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/BypassNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/CacheNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/ConstNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/ContextNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/InputNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/NodeAttribute.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/NodeCode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/NodeFunction.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/NodeFunctionInput.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/NodeKeywords.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/NodeParser.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/NodeUniform.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/NodeVar.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/NodeVarying.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/OutputStructNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/StackNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/StructTypeNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/TempNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/UniformGroup.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/UniformGroupNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/UniformNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/VarNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/VaryingNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/core/constants.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/display/AfterImageNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/display/BlendModeNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/display/FrontFacingNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/display/PosterizeNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/display/RGBShiftNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/display/SobelOperatorNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/display/ViewportDepthNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/display/ViewportDepthTextureNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/display/ViewportNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/display/ViewportSharedTextureNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/fog/FogExp2Node.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/fog/FogNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/fog/FogRangeNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/BSDF/BRDF_GGX.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/BSDF/BRDF_Lambert.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/BSDF/BRDF_Sheen.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/BSDF/DFGApprox.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/BSDF/D_GGX.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/BSDF/F_Schlick.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/BSDF/LTC.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/PhysicalLightingModel.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/ShadowMaskModel.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/ToonLightingModel.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/material/getGeometryRoughness.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/functions/material/getRoughness.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/gpgpu/ComputeNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/lighting/AONode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/lighting/EnvironmentNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/lighting/IrradianceNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/lighting/LightUtils.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/lighting/LightingContextNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/materials/MeshSSSNodeMaterial.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/materials/VolumeNodeMaterial.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/materialx/MaterialXNodes.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/materialx/lib/mx_hsv.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/materialx/lib/mx_noise.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/materialx/lib/mx_transform_color.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/math/CondNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/math/HashNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/math/MathUtils.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/math/OperatorNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/math/TriNoise3D.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/procedural/CheckerNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/shadernode/ShaderNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/ArrayElementNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/ConvertNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/DiscardNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/EquirectUVNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/JoinNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/MatcapUVNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/OscNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/RemapNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/RotateNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/RotateUVNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/SplitNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/SpriteSheetUVNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/StoargeArrayElementNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/TimerNode.d.ts +0 -0
- /three/{examples/jsm → src}/nodes/utils/TriplanarTexturesNode.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/BindGroup.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/Binding.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/Bindings.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/Buffer.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/BufferUtils.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/ChainMap.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/ComputePipeline.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/Constants.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/DataMap.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/Pipeline.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/Pipelines.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/ProgrammableStage.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/RenderPipeline.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/Sampler.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/UniformBuffer.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/UniformsGroup.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/nodes/NodeBuilderState.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/nodes/NodeSampledTexture.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/common/nodes/NodeSampler.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/webgpu/WebGPURenderer.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/webgpu/nodes/WGSLNodeParser.d.ts +0 -0
- /three/{examples/jsm → src}/renderers/webgpu/utils/WebGPUConstants.d.ts +0 -0
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { AnimationBlendMode } from "../constants.js";
|
|
2
2
|
import { Vector3 } from "../math/Vector3.js";
|
|
3
3
|
import { Bone } from "../objects/Bone.js";
|
|
4
|
-
import { KeyframeTrack } from "./KeyframeTrack.js";
|
|
4
|
+
import { KeyframeTrack, KeyframeTrackJSON } from "./KeyframeTrack.js";
|
|
5
|
+
|
|
6
|
+
export interface AnimationClipJSON {
|
|
7
|
+
name: string;
|
|
8
|
+
duration: number;
|
|
9
|
+
tracks: KeyframeTrackJSON[];
|
|
10
|
+
uuid: string;
|
|
11
|
+
blendMode: AnimationBlendMode;
|
|
12
|
+
}
|
|
5
13
|
|
|
6
14
|
export interface MorphTarget {
|
|
7
15
|
name: string;
|
|
@@ -45,7 +53,7 @@ export class AnimationClip {
|
|
|
45
53
|
fps: number,
|
|
46
54
|
noLoop: boolean,
|
|
47
55
|
): AnimationClip[];
|
|
48
|
-
static parse(json:
|
|
49
|
-
static parseAnimation(animation:
|
|
50
|
-
static toJSON(clip: AnimationClip):
|
|
56
|
+
static parse(json: AnimationClipJSON): AnimationClip;
|
|
57
|
+
static parseAnimation(animation: AnimationClipJSON, bones: Bone[]): AnimationClip;
|
|
58
|
+
static toJSON(clip: AnimationClip): AnimationClipJSON;
|
|
51
59
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { AnimationClip } from "./AnimationClip.js";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
declare function convertArray(array: any, type: any, forceClone: boolean): any;
|
|
4
|
+
|
|
5
|
+
declare function isTypedArray(object: any): boolean;
|
|
6
|
+
|
|
7
|
+
declare function getKeyframeOrder(times: number[]): number[];
|
|
8
|
+
|
|
9
|
+
declare function sortedArray(values: any[], stride: number, order: number[]): any[];
|
|
10
|
+
|
|
11
|
+
declare function flattenJSON(jsonKeys: string[], times: any[], values: any[], valuePropertyName: string): void;
|
|
8
12
|
|
|
9
13
|
/**
|
|
10
14
|
* @param sourceClip
|
|
@@ -13,7 +17,7 @@ export function flattenJSON(jsonKeys: string[], times: any[], values: any[], val
|
|
|
13
17
|
* @param endFrame
|
|
14
18
|
* @param [fps=30]
|
|
15
19
|
*/
|
|
16
|
-
|
|
20
|
+
declare function subclip(
|
|
17
21
|
sourceClip: AnimationClip,
|
|
18
22
|
name: string,
|
|
19
23
|
startFrame: number,
|
|
@@ -27,9 +31,30 @@ export function subclip(
|
|
|
27
31
|
* @param [referenceClip=targetClip]
|
|
28
32
|
* @param [fps=30]
|
|
29
33
|
*/
|
|
30
|
-
|
|
34
|
+
declare function makeClipAdditive(
|
|
31
35
|
targetClip: AnimationClip,
|
|
32
36
|
referenceFrame?: number,
|
|
33
37
|
referenceClip?: AnimationClip,
|
|
34
38
|
fps?: number,
|
|
35
39
|
): AnimationClip;
|
|
40
|
+
|
|
41
|
+
declare const AnimationUtils: {
|
|
42
|
+
convertArray: typeof convertArray;
|
|
43
|
+
isTypedArray: typeof isTypedArray;
|
|
44
|
+
getKeyframeOrder: typeof getKeyframeOrder;
|
|
45
|
+
sortedArray: typeof sortedArray;
|
|
46
|
+
flattenJSON: typeof flattenJSON;
|
|
47
|
+
subclip: typeof subclip;
|
|
48
|
+
makeClipAdditive: typeof makeClipAdditive;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
AnimationUtils,
|
|
53
|
+
convertArray,
|
|
54
|
+
flattenJSON,
|
|
55
|
+
getKeyframeOrder,
|
|
56
|
+
isTypedArray,
|
|
57
|
+
makeClipAdditive,
|
|
58
|
+
sortedArray,
|
|
59
|
+
subclip,
|
|
60
|
+
};
|
|
@@ -4,6 +4,14 @@ import { CubicInterpolant } from "../math/interpolants/CubicInterpolant.js";
|
|
|
4
4
|
import { DiscreteInterpolant } from "../math/interpolants/DiscreteInterpolant.js";
|
|
5
5
|
import { LinearInterpolant } from "../math/interpolants/LinearInterpolant.js";
|
|
6
6
|
|
|
7
|
+
export interface KeyframeTrackJSON {
|
|
8
|
+
name: string;
|
|
9
|
+
times: number[];
|
|
10
|
+
values: number[];
|
|
11
|
+
interpolation?: InterpolationModes;
|
|
12
|
+
type: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
7
15
|
export class KeyframeTrack {
|
|
8
16
|
/**
|
|
9
17
|
* @param name
|
|
@@ -43,5 +51,5 @@ export class KeyframeTrack {
|
|
|
43
51
|
optimize(): KeyframeTrack;
|
|
44
52
|
clone(): this;
|
|
45
53
|
|
|
46
|
-
static toJSON(track: KeyframeTrack):
|
|
54
|
+
static toJSON(track: KeyframeTrack): KeyframeTrackJSON;
|
|
47
55
|
}
|
|
@@ -6,7 +6,16 @@ export interface ParseTrackNameResults {
|
|
|
6
6
|
propertyIndex: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
declare class Composite {
|
|
10
|
+
constructor(targetGroup: any, path: any, parsedPath?: any);
|
|
11
|
+
|
|
12
|
+
getValue(array: any, offset: number): any;
|
|
13
|
+
setValue(array: any, offset: number): void;
|
|
14
|
+
bind(): void;
|
|
15
|
+
unbind(): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class PropertyBinding {
|
|
10
19
|
constructor(rootNode: any, path: string, parsedPath?: any);
|
|
11
20
|
|
|
12
21
|
path: string;
|
|
@@ -25,19 +34,10 @@ export class PropertyBinding {
|
|
|
25
34
|
GetterByBindingType: Array<() => void>;
|
|
26
35
|
SetterByBindingTypeAndVersioning: Array<Array<() => void>>;
|
|
27
36
|
|
|
28
|
-
static create(root: any, path: any, parsedPath?: any): PropertyBinding |
|
|
37
|
+
static create(root: any, path: any, parsedPath?: any): PropertyBinding | Composite;
|
|
29
38
|
static sanitizeNodeName(name: string): string;
|
|
30
39
|
static parseTrackName(trackName: string): ParseTrackNameResults;
|
|
31
40
|
static findNode(root: any, nodeName: string): any;
|
|
32
41
|
}
|
|
33
42
|
|
|
34
|
-
export
|
|
35
|
-
class Composite {
|
|
36
|
-
constructor(targetGroup: any, path: any, parsedPath?: any);
|
|
37
|
-
|
|
38
|
-
getValue(array: any, offset: number): any;
|
|
39
|
-
setValue(array: any, offset: number): void;
|
|
40
|
-
bind(): void;
|
|
41
|
-
unbind(): void;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
43
|
+
export { PropertyBinding };
|
|
@@ -1,5 +1,30 @@
|
|
|
1
|
+
import { JSONMeta, Object3DJSON, Object3DJSONObject } from "../core/Object3D.js";
|
|
1
2
|
import { Camera } from "./Camera.js";
|
|
2
3
|
|
|
4
|
+
export interface OrthographicCameraJSONObject extends Object3DJSONObject {
|
|
5
|
+
zoom: number;
|
|
6
|
+
left: number;
|
|
7
|
+
right: number;
|
|
8
|
+
top: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
near: number;
|
|
11
|
+
far: number;
|
|
12
|
+
|
|
13
|
+
view?: {
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
fullWidth: number;
|
|
16
|
+
fullHeight: number;
|
|
17
|
+
offsetX: number;
|
|
18
|
+
offsetY: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface OrthographicCameraJSON extends Object3DJSON {
|
|
25
|
+
object: OrthographicCameraJSONObject;
|
|
26
|
+
}
|
|
27
|
+
|
|
3
28
|
/**
|
|
4
29
|
* Camera that uses {@link https://en.wikipedia.org/wiki/Orthographic_projection | orthographic projection}.
|
|
5
30
|
* In this projection mode, an object's size in the rendered image stays constant regardless of its distance from the camera.
|
|
@@ -144,4 +169,6 @@ export class OrthographicCamera extends Camera {
|
|
|
144
169
|
* Removes any offset set by the {@link setViewOffset | .setViewOffset} method.
|
|
145
170
|
*/
|
|
146
171
|
clearViewOffset(): void;
|
|
172
|
+
|
|
173
|
+
toJSON(meta?: JSONMeta): OrthographicCameraJSON;
|
|
147
174
|
}
|
|
@@ -1,6 +1,35 @@
|
|
|
1
|
+
import { JSONMeta, Object3DJSON, Object3DJSONObject } from "../core/Object3D.js";
|
|
1
2
|
import { Vector2 } from "../math/Vector2.js";
|
|
2
3
|
import { Camera } from "./Camera.js";
|
|
3
4
|
|
|
5
|
+
export interface PerspectiveCameraJSONObject extends Object3DJSONObject {
|
|
6
|
+
fov: number;
|
|
7
|
+
zoom: number;
|
|
8
|
+
|
|
9
|
+
near: number;
|
|
10
|
+
far: number;
|
|
11
|
+
focus: number;
|
|
12
|
+
|
|
13
|
+
aspect: number;
|
|
14
|
+
|
|
15
|
+
view?: {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
fullWidth: number;
|
|
18
|
+
fullHeight: number;
|
|
19
|
+
offsetX: number;
|
|
20
|
+
offsetY: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
filmGauge: number;
|
|
26
|
+
filmOffset: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface PerspectiveCameraJSON extends Object3DJSON {
|
|
30
|
+
object: PerspectiveCameraJSONObject;
|
|
31
|
+
}
|
|
32
|
+
|
|
4
33
|
/**
|
|
5
34
|
* Camera that uses {@link https://en.wikipedia.org/wiki/Perspective_(graphical) | perspective projection}.
|
|
6
35
|
* This projection mode is designed to mimic the way the human eye sees
|
|
@@ -220,4 +249,6 @@ export class PerspectiveCamera extends Camera {
|
|
|
220
249
|
* @deprecated Use {@link PerspectiveCamera.setFocalLength | .setFocalLength()} and {@link PerspectiveCamera.filmGauge | .filmGauge} instead.
|
|
221
250
|
*/
|
|
222
251
|
setLens(focalLength: number, frameHeight?: number): void;
|
|
252
|
+
|
|
253
|
+
toJSON(meta?: JSONMeta): PerspectiveCameraJSON;
|
|
223
254
|
}
|
three/src/constants.d.ts
CHANGED
|
@@ -679,7 +679,13 @@ export type TrianglesDrawModes = typeof TrianglesDrawMode | typeof TriangleStrip
|
|
|
679
679
|
|
|
680
680
|
export const BasicDepthPacking: 3200;
|
|
681
681
|
export const RGBADepthPacking: 3201;
|
|
682
|
-
export
|
|
682
|
+
export const RGBDepthPacking: 3202;
|
|
683
|
+
export const RGDepthPacking: 3203;
|
|
684
|
+
export type DepthPackingStrategies =
|
|
685
|
+
| typeof BasicDepthPacking
|
|
686
|
+
| typeof RGBADepthPacking
|
|
687
|
+
| typeof RGBDepthPacking
|
|
688
|
+
| typeof RGDepthPacking;
|
|
683
689
|
|
|
684
690
|
///////////////////////////////////////////////////////////////////////////////
|
|
685
691
|
// Normal Map types
|
|
@@ -13,6 +13,16 @@ export type TypedArray =
|
|
|
13
13
|
| Float32Array
|
|
14
14
|
| Float64Array;
|
|
15
15
|
|
|
16
|
+
export interface BufferAttributeJSON {
|
|
17
|
+
itemSize: number;
|
|
18
|
+
type: string;
|
|
19
|
+
array: number[];
|
|
20
|
+
normalized: boolean;
|
|
21
|
+
|
|
22
|
+
name?: string;
|
|
23
|
+
usage?: Usage;
|
|
24
|
+
}
|
|
25
|
+
|
|
16
26
|
/**
|
|
17
27
|
* This class stores data for an attribute (such as vertex positions, face indices, normals, colors, UVs, and any custom attributes )
|
|
18
28
|
* associated with a {@link THREE.BufferGeometry | BufferGeometry}, which allows for more efficient passing of data to the GPU
|
|
@@ -336,12 +346,7 @@ export class BufferAttribute {
|
|
|
336
346
|
/**
|
|
337
347
|
* Convert this object to three.js to the `data.attributes` part of {@link https://github.com/mrdoob/three.js/wiki/JSON-Geometry-format-4 | JSON Geometry format v4},
|
|
338
348
|
*/
|
|
339
|
-
toJSON():
|
|
340
|
-
itemSize: number;
|
|
341
|
-
type: string;
|
|
342
|
-
array: number[];
|
|
343
|
-
normalized: boolean;
|
|
344
|
-
};
|
|
349
|
+
toJSON(): BufferAttributeJSON;
|
|
345
350
|
}
|
|
346
351
|
|
|
347
352
|
/**
|
|
@@ -3,8 +3,8 @@ import { Matrix4 } from "../math/Matrix4.js";
|
|
|
3
3
|
import { Quaternion } from "../math/Quaternion.js";
|
|
4
4
|
import { Sphere } from "../math/Sphere.js";
|
|
5
5
|
import { Vector2 } from "../math/Vector2.js";
|
|
6
|
-
import { Vector3 } from "../math/Vector3.js";
|
|
7
|
-
import { BufferAttribute } from "./BufferAttribute.js";
|
|
6
|
+
import { Vector3, Vector3Tuple } from "../math/Vector3.js";
|
|
7
|
+
import { BufferAttribute, BufferAttributeJSON } from "./BufferAttribute.js";
|
|
8
8
|
import { EventDispatcher } from "./EventDispatcher.js";
|
|
9
9
|
import { GLBufferAttribute } from "./GLBufferAttribute.js";
|
|
10
10
|
import { InterleavedBufferAttribute } from "./InterleavedBufferAttribute.js";
|
|
@@ -15,6 +15,29 @@ export type NormalOrGLBufferAttributes = Record<
|
|
|
15
15
|
BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute
|
|
16
16
|
>;
|
|
17
17
|
|
|
18
|
+
export interface BufferGeometryJSON {
|
|
19
|
+
metadata?: { version: number; type: string; generator: string };
|
|
20
|
+
|
|
21
|
+
uuid: string;
|
|
22
|
+
type: string;
|
|
23
|
+
|
|
24
|
+
name?: string;
|
|
25
|
+
userData?: Record<string, unknown>;
|
|
26
|
+
|
|
27
|
+
data?: {
|
|
28
|
+
attributes: Record<string, BufferAttributeJSON>;
|
|
29
|
+
|
|
30
|
+
index?: { type: string; array: number[] };
|
|
31
|
+
|
|
32
|
+
morphAttributes?: Record<string, BufferAttributeJSON[]>;
|
|
33
|
+
morphTargetsRelative?: boolean;
|
|
34
|
+
|
|
35
|
+
groups?: GeometryGroup[];
|
|
36
|
+
|
|
37
|
+
boundingSphere?: { center: Vector3Tuple; radius: number };
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
18
41
|
export interface GeometryGroup {
|
|
19
42
|
/**
|
|
20
43
|
* Specifies the first element in this draw call – the first vertex for non-indexed geometry, otherwise the first triangle index.
|
|
@@ -378,7 +401,7 @@ export class BufferGeometry<
|
|
|
378
401
|
/**
|
|
379
402
|
* Convert the buffer geometry to three.js {@link https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 | JSON Object/Scene format}.
|
|
380
403
|
*/
|
|
381
|
-
toJSON():
|
|
404
|
+
toJSON(): BufferGeometryJSON;
|
|
382
405
|
|
|
383
406
|
/**
|
|
384
407
|
* Creates a clone of this BufferGeometry
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Matrix3 } from "../math/Matrix3.js";
|
|
2
2
|
import { Matrix4 } from "../math/Matrix4.js";
|
|
3
3
|
import { BufferAttribute, TypedArray } from "./BufferAttribute.js";
|
|
4
4
|
import { InterleavedBuffer } from "./InterleavedBuffer.js";
|
|
@@ -84,13 +84,13 @@ export class InterleavedBufferAttribute {
|
|
|
84
84
|
* Applies normal matrix {@link Matrix3 | m} to every Vector3 element of this InterleavedBufferAttribute.
|
|
85
85
|
* @param m
|
|
86
86
|
*/
|
|
87
|
-
applyNormalMatrix(m:
|
|
87
|
+
applyNormalMatrix(m: Matrix3): this;
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* Applies matrix {@link Matrix4 | m} to every Vector3 element of this InterleavedBufferAttribute, interpreting the elements as a direction vectors.
|
|
91
91
|
* @param m
|
|
92
92
|
*/
|
|
93
|
-
transformDirection(m:
|
|
93
|
+
transformDirection(m: Matrix4): this;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* Returns the given component of the vector at the given index.
|
three/src/core/Object3D.d.ts
CHANGED
|
@@ -1,19 +1,64 @@
|
|
|
1
|
-
import { AnimationClip } from "../animation/AnimationClip.js";
|
|
1
|
+
import { AnimationClip, AnimationClipJSON } from "../animation/AnimationClip.js";
|
|
2
2
|
import { Camera } from "../cameras/Camera.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ShapeJSON } from "../extras/core/Shape.js";
|
|
4
|
+
import { Material, MaterialJSON } from "../materials/Material.js";
|
|
4
5
|
import { Euler } from "../math/Euler.js";
|
|
5
6
|
import { Matrix3 } from "../math/Matrix3.js";
|
|
6
|
-
import { Matrix4 } from "../math/Matrix4.js";
|
|
7
|
+
import { Matrix4, Matrix4Tuple } from "../math/Matrix4.js";
|
|
7
8
|
import { Quaternion } from "../math/Quaternion.js";
|
|
8
|
-
import { Vector3 } from "../math/Vector3.js";
|
|
9
|
+
import { Vector3, Vector3Tuple } from "../math/Vector3.js";
|
|
9
10
|
import { Group } from "../objects/Group.js";
|
|
11
|
+
import { SkeletonJSON } from "../objects/Skeleton.js";
|
|
10
12
|
import { WebGLRenderer } from "../renderers/WebGLRenderer.js";
|
|
11
13
|
import { Scene } from "../scenes/Scene.js";
|
|
12
|
-
import {
|
|
14
|
+
import { SourceJSON } from "../textures/Source.js";
|
|
15
|
+
import { TextureJSON } from "../textures/Texture.js";
|
|
16
|
+
import { BufferGeometry, BufferGeometryJSON } from "./BufferGeometry.js";
|
|
13
17
|
import { EventDispatcher } from "./EventDispatcher.js";
|
|
14
18
|
import { Layers } from "./Layers.js";
|
|
15
19
|
import { Intersection, Raycaster } from "./Raycaster.js";
|
|
16
20
|
|
|
21
|
+
export interface Object3DJSONObject {
|
|
22
|
+
uuid: string;
|
|
23
|
+
type: string;
|
|
24
|
+
|
|
25
|
+
name?: string;
|
|
26
|
+
castShadow?: boolean;
|
|
27
|
+
receiveShadow?: boolean;
|
|
28
|
+
visible?: boolean;
|
|
29
|
+
frustumCulled?: boolean;
|
|
30
|
+
renderOrder?: number;
|
|
31
|
+
userData?: Record<string, unknown>;
|
|
32
|
+
|
|
33
|
+
layers: number;
|
|
34
|
+
matrix: Matrix4Tuple;
|
|
35
|
+
up: Vector3Tuple;
|
|
36
|
+
|
|
37
|
+
matrixAutoUpdate?: boolean;
|
|
38
|
+
|
|
39
|
+
material?: string | string[];
|
|
40
|
+
|
|
41
|
+
children?: string[];
|
|
42
|
+
|
|
43
|
+
animations?: string[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface Object3DJSON {
|
|
47
|
+
metadata?: { version: number; type: string; generator: string };
|
|
48
|
+
object: Object3DJSONObject;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface JSONMeta {
|
|
52
|
+
geometries: Record<string, BufferGeometryJSON>;
|
|
53
|
+
materials: Record<string, MaterialJSON>;
|
|
54
|
+
textures: Record<string, TextureJSON>;
|
|
55
|
+
images: Record<string, SourceJSON>;
|
|
56
|
+
shapes: Record<string, ShapeJSON>;
|
|
57
|
+
skeletons: Record<string, SkeletonJSON>;
|
|
58
|
+
animations: Record<string, AnimationClipJSON>;
|
|
59
|
+
nodes: Record<string, unknown>;
|
|
60
|
+
}
|
|
61
|
+
|
|
17
62
|
export interface Object3DEventMap {
|
|
18
63
|
/**
|
|
19
64
|
* Fires when the object has been added to its parent object.
|
|
@@ -608,7 +653,7 @@ export class Object3D<TEventMap extends Object3DEventMap = Object3DEventMap> ext
|
|
|
608
653
|
* Convert the object to three.js {@link https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4 | JSON Object/Scene format}.
|
|
609
654
|
* @param meta Object containing metadata such as materials, textures or images for the object.
|
|
610
655
|
*/
|
|
611
|
-
toJSON(meta?:
|
|
656
|
+
toJSON(meta?: JSONMeta): Object3DJSON;
|
|
612
657
|
|
|
613
658
|
/**
|
|
614
659
|
* Returns a clone of `this` object and optionally all descendants.
|
three/src/extras/DataUtils.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @see {@link https://threejs.org/docs/index.html#api/en/extras/DataUtils | Official Documentation}
|
|
5
5
|
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/extras/DataUtils.js | Source}
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
declare function toHalfFloat(val: number): number;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Returns a single precision floating point value from the given half precision floating point value.
|
|
@@ -12,4 +12,11 @@ export function toHalfFloat(val: number): number;
|
|
|
12
12
|
* @see {@link https://threejs.org/docs/index.html#api/en/extras/DataUtils | Official Documentation}
|
|
13
13
|
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/extras/DataUtils.js | Source}
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
declare function fromHalfFloat(val: number): number;
|
|
16
|
+
|
|
17
|
+
declare const DataUtils: {
|
|
18
|
+
toHalfFloat: typeof toHalfFloat;
|
|
19
|
+
fromHalfFloat: typeof fromHalfFloat;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { DataUtils, fromHalfFloat, toHalfFloat };
|
three/src/extras/ImageUtils.d.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { Mapping } from "../constants.js";
|
|
2
|
-
import { Texture } from "../textures/Texture.js";
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
2
|
* A class containing utility functions for images.
|
|
6
3
|
* @see {@link https://threejs.org/docs/index.html#api/en/extras/ImageUtils | Official Documentation}
|
|
7
4
|
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/extras/ImageUtils.js | Source}
|
|
8
5
|
*/
|
|
9
|
-
|
|
6
|
+
declare class ImageUtils {
|
|
10
7
|
/**
|
|
11
8
|
* Returns a data URI containing a representation of the given image.
|
|
12
9
|
* @param image The image object.
|
|
13
10
|
*/
|
|
14
|
-
|
|
11
|
+
static getDataURL(
|
|
15
12
|
image: HTMLImageElement | HTMLCanvasElement | CanvasImageSource | ImageBitmap | ImageData,
|
|
16
13
|
): string;
|
|
17
14
|
|
|
@@ -19,15 +16,17 @@ export namespace ImageUtils {
|
|
|
19
16
|
* Converts the given sRGB image data to linear color space.
|
|
20
17
|
* @param image
|
|
21
18
|
*/
|
|
22
|
-
|
|
19
|
+
static sRGBToLinear(image: HTMLImageElement | HTMLCanvasElement | ImageBitmap): HTMLCanvasElement;
|
|
23
20
|
|
|
24
21
|
/**
|
|
25
22
|
* Converts the given sRGB image data to linear color space.
|
|
26
23
|
* @param image
|
|
27
24
|
*/
|
|
28
|
-
|
|
25
|
+
static sRGBToLinear(image: ImageData): {
|
|
29
26
|
data: ImageData["data"];
|
|
30
27
|
width: ImageData["width"];
|
|
31
28
|
height: ImageData["height"];
|
|
32
29
|
};
|
|
33
30
|
}
|
|
31
|
+
|
|
32
|
+
export { ImageUtils };
|
three/src/extras/core/Curve.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Vector2 } from "../../math/Vector2.js";
|
|
2
2
|
import { Vector3 } from "../../math/Vector3.js";
|
|
3
3
|
|
|
4
|
+
export interface CurveJSON {
|
|
5
|
+
metadata: { version: number; type: string; generator: string };
|
|
6
|
+
arcLengthDivisions: number;
|
|
7
|
+
type: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
4
10
|
/**
|
|
5
11
|
* An abstract base class for creating a {@link Curve} object that contains methods for interpolation
|
|
6
12
|
* @remarks
|
|
@@ -146,11 +152,11 @@ export abstract class Curve<TVector extends Vector2 | Vector3> {
|
|
|
146
152
|
/**
|
|
147
153
|
* Returns a JSON object representation of this instance.
|
|
148
154
|
*/
|
|
149
|
-
toJSON():
|
|
155
|
+
toJSON(): CurveJSON;
|
|
150
156
|
|
|
151
157
|
/**
|
|
152
158
|
* Copies the data from the given JSON object to this instance.
|
|
153
159
|
* @param json
|
|
154
160
|
*/
|
|
155
|
-
fromJSON(json:
|
|
161
|
+
fromJSON(json: CurveJSON): this;
|
|
156
162
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Vector2 } from "../../math/Vector2.js";
|
|
2
2
|
import { Vector3 } from "../../math/Vector3.js";
|
|
3
|
-
import { Curve } from "./Curve.js";
|
|
3
|
+
import { Curve, CurveJSON } from "./Curve.js";
|
|
4
|
+
|
|
5
|
+
export interface CurvePathJSON extends CurveJSON {
|
|
6
|
+
autoClose: boolean;
|
|
7
|
+
curves: CurveJSON[];
|
|
8
|
+
}
|
|
4
9
|
|
|
5
10
|
/**
|
|
6
11
|
* Curved Path - a curve path is simply a array of connected curves, but retains the api of a curve.
|
|
@@ -66,4 +71,7 @@ export class CurvePath<TVector extends Vector2 | Vector3> extends Curve<TVector>
|
|
|
66
71
|
* @param divisions Number of pieces to divide the curve into. Expects a `Integer`. Default `40`
|
|
67
72
|
*/
|
|
68
73
|
override getSpacedPoints(divisions?: number): TVector[];
|
|
74
|
+
|
|
75
|
+
toJSON(): CurvePathJSON;
|
|
76
|
+
fromJSON(json: CurvePathJSON): this;
|
|
69
77
|
}
|
three/src/extras/core/Path.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { Vector2 } from "../../math/Vector2.js";
|
|
2
|
-
import { CurvePath } from "./CurvePath.js";
|
|
1
|
+
import { Vector2, Vector2Tuple } from "../../math/Vector2.js";
|
|
2
|
+
import { CurvePath, CurvePathJSON } from "./CurvePath.js";
|
|
3
|
+
|
|
4
|
+
export interface PathJSON extends CurvePathJSON {
|
|
5
|
+
currentPoint: Vector2Tuple;
|
|
6
|
+
}
|
|
3
7
|
|
|
4
8
|
/**
|
|
5
9
|
* A 2D {@link Path} representation.
|
|
@@ -156,4 +160,7 @@ export class Path extends CurvePath<Vector2> {
|
|
|
156
160
|
* @param points An array of {@link Vector2 | Vector2's}
|
|
157
161
|
*/
|
|
158
162
|
splineThru(pts: Vector2[]): this;
|
|
163
|
+
|
|
164
|
+
toJSON(): PathJSON;
|
|
165
|
+
fromJSON(json: PathJSON): this;
|
|
159
166
|
}
|
three/src/extras/core/Shape.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Vector2 } from "../../math/Vector2.js";
|
|
2
|
-
import { Path } from "./Path.js";
|
|
2
|
+
import { Path, PathJSON } from "./Path.js";
|
|
3
|
+
|
|
4
|
+
export interface ShapeJSON extends PathJSON {
|
|
5
|
+
uuid: string;
|
|
6
|
+
holes: PathJSON[];
|
|
7
|
+
}
|
|
3
8
|
|
|
4
9
|
/**
|
|
5
10
|
* Defines an arbitrary 2d {@link Shape} plane using paths with optional holes
|
|
@@ -75,4 +80,7 @@ export class Shape extends Path {
|
|
|
75
80
|
* @param divisions The fineness of the result. Expects a `Integer`
|
|
76
81
|
*/
|
|
77
82
|
getPointsHoles(divisions: number): Vector2[][];
|
|
83
|
+
|
|
84
|
+
toJSON(): ShapeJSON;
|
|
85
|
+
fromJSON(json: ShapeJSON): this;
|
|
78
86
|
}
|
three/src/lights/Light.d.ts
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import { Object3D } from "../core/Object3D.js";
|
|
1
|
+
import { JSONMeta, Object3D, Object3DJSON } from "../core/Object3D.js";
|
|
2
2
|
import { Color, ColorRepresentation } from "../math/Color.js";
|
|
3
|
-
import { LightShadow } from "./LightShadow.js";
|
|
3
|
+
import { LightShadow, LightShadowJSON } from "./LightShadow.js";
|
|
4
|
+
|
|
5
|
+
export interface LightJSON extends Object3DJSON {
|
|
6
|
+
color: number;
|
|
7
|
+
intensity: number;
|
|
8
|
+
|
|
9
|
+
groundColor?: number;
|
|
10
|
+
|
|
11
|
+
distance?: number;
|
|
12
|
+
angle?: number;
|
|
13
|
+
decay?: number;
|
|
14
|
+
penumbra?: number;
|
|
15
|
+
|
|
16
|
+
shadow?: LightShadowJSON;
|
|
17
|
+
target?: string;
|
|
18
|
+
}
|
|
4
19
|
|
|
5
20
|
/**
|
|
6
21
|
* Abstract base class for lights.
|
|
@@ -62,4 +77,6 @@ export abstract class Light<TShadowSupport extends LightShadow | undefined = Lig
|
|
|
62
77
|
* Call this method whenever this instance is no longer used in your app.
|
|
63
78
|
*/
|
|
64
79
|
dispose(): void;
|
|
80
|
+
|
|
81
|
+
toJSON(meta?: JSONMeta): LightJSON;
|
|
65
82
|
}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { Camera } from "../cameras/Camera.js";
|
|
2
|
+
import { Object3DJSONObject } from "../core/Object3D.js";
|
|
2
3
|
import { Frustum } from "../math/Frustum.js";
|
|
3
4
|
import { Matrix4 } from "../math/Matrix4.js";
|
|
4
|
-
import { Vector2 } from "../math/Vector2.js";
|
|
5
|
+
import { Vector2, Vector2Tuple } from "../math/Vector2.js";
|
|
5
6
|
import { Vector4 } from "../math/Vector4.js";
|
|
6
7
|
import { WebGLRenderTarget } from "../renderers/WebGLRenderTarget.js";
|
|
7
8
|
import { Light } from "./Light.js";
|
|
8
9
|
|
|
10
|
+
export interface LightShadowJSON {
|
|
11
|
+
intensity?: number;
|
|
12
|
+
bias?: number;
|
|
13
|
+
normalBias?: number;
|
|
14
|
+
radius?: number;
|
|
15
|
+
mapSize?: Vector2Tuple;
|
|
16
|
+
|
|
17
|
+
camera: Omit<Object3DJSONObject, "matrix">;
|
|
18
|
+
}
|
|
19
|
+
|
|
9
20
|
/**
|
|
10
21
|
* Serves as a base class for the other shadow classes.
|
|
11
22
|
* @see {@link https://threejs.org/docs/index.html#api/en/lights/shadows/LightShadow | Official Documentation}
|
|
@@ -127,7 +138,7 @@ export class LightShadow<TCamera extends Camera = Camera> {
|
|
|
127
138
|
/**
|
|
128
139
|
* Serialize this LightShadow.
|
|
129
140
|
*/
|
|
130
|
-
toJSON():
|
|
141
|
+
toJSON(): LightShadowJSON;
|
|
131
142
|
|
|
132
143
|
/**
|
|
133
144
|
* Gets the shadow cameras frustum
|