@types/three 0.166.0 → 0.167.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/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 +184 -0
- three/src/Three.d.ts +25 -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 +67 -115
- three/src/math/Matrix4.d.ts +48 -100
- 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
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
BlendingDstFactor,
|
|
5
5
|
BlendingEquation,
|
|
6
6
|
BlendingSrcFactor,
|
|
7
|
+
Combine,
|
|
7
8
|
DepthModes,
|
|
9
|
+
NormalMapTypes,
|
|
8
10
|
PixelFormat,
|
|
9
11
|
Side,
|
|
10
12
|
StencilFunc,
|
|
@@ -12,13 +14,14 @@ import {
|
|
|
12
14
|
} from "../constants.js";
|
|
13
15
|
import { BufferGeometry } from "../core/BufferGeometry.js";
|
|
14
16
|
import { EventDispatcher } from "../core/EventDispatcher.js";
|
|
15
|
-
import { Object3D } from "../core/Object3D.js";
|
|
17
|
+
import { JSONMeta, Object3D } from "../core/Object3D.js";
|
|
16
18
|
import { Color, ColorRepresentation } from "../math/Color.js";
|
|
17
19
|
import { Plane } from "../math/Plane.js";
|
|
18
20
|
import { Group } from "../objects/Group.js";
|
|
19
21
|
import { WebGLProgramParametersWithUniforms } from "../renderers/webgl/WebGLPrograms.js";
|
|
20
22
|
import { WebGLRenderer } from "../renderers/WebGLRenderer.js";
|
|
21
23
|
import { Scene } from "../scenes/Scene.js";
|
|
24
|
+
import { EulerTuple, SourceJSON, TextureJSON, Vector2Tuple } from "../Three.js";
|
|
22
25
|
|
|
23
26
|
export interface MaterialParameters {
|
|
24
27
|
alphaHash?: boolean | undefined;
|
|
@@ -68,6 +71,165 @@ export interface MaterialParameters {
|
|
|
68
71
|
userData?: Record<string, any> | undefined;
|
|
69
72
|
}
|
|
70
73
|
|
|
74
|
+
export interface MaterialJSON {
|
|
75
|
+
metadata: { version: number; type: string; generator: string };
|
|
76
|
+
|
|
77
|
+
uuid: string;
|
|
78
|
+
type: string;
|
|
79
|
+
|
|
80
|
+
name?: string;
|
|
81
|
+
|
|
82
|
+
color?: number;
|
|
83
|
+
roughness?: number;
|
|
84
|
+
metalness?: number;
|
|
85
|
+
|
|
86
|
+
sheen?: number;
|
|
87
|
+
sheenColor?: number;
|
|
88
|
+
sheenRoughness?: number;
|
|
89
|
+
emissive?: number;
|
|
90
|
+
emissiveIntensity?: number;
|
|
91
|
+
|
|
92
|
+
specular?: number;
|
|
93
|
+
specularIntensity?: number;
|
|
94
|
+
specularColor?: number;
|
|
95
|
+
shininess?: number;
|
|
96
|
+
clearcoat?: number;
|
|
97
|
+
clearcoatRoughness?: number;
|
|
98
|
+
clearcoatMap?: string;
|
|
99
|
+
clearcoatRoughnessMap?: string;
|
|
100
|
+
clearcoatNormalMap?: string;
|
|
101
|
+
clearcoatNormalScale?: Vector2Tuple;
|
|
102
|
+
|
|
103
|
+
dispersion?: number;
|
|
104
|
+
|
|
105
|
+
iridescence?: number;
|
|
106
|
+
iridescenceIOR?: number;
|
|
107
|
+
iridescenceThicknessRange?: number;
|
|
108
|
+
iridescenceMap?: string;
|
|
109
|
+
iridescenceThicknessMap?: string;
|
|
110
|
+
|
|
111
|
+
anisotropy?: number;
|
|
112
|
+
anisotropyRotation?: number;
|
|
113
|
+
anisotropyMap?: string;
|
|
114
|
+
|
|
115
|
+
map?: string;
|
|
116
|
+
matcap?: string;
|
|
117
|
+
alphaMap?: string;
|
|
118
|
+
|
|
119
|
+
lightMap?: string;
|
|
120
|
+
lightMapIntensity?: number;
|
|
121
|
+
|
|
122
|
+
aoMap?: string;
|
|
123
|
+
aoMapIntensity?: number;
|
|
124
|
+
|
|
125
|
+
bumpMap?: string;
|
|
126
|
+
bumpScale?: number;
|
|
127
|
+
|
|
128
|
+
normalMap?: string;
|
|
129
|
+
normalMapType?: NormalMapTypes;
|
|
130
|
+
normalScale?: Vector2Tuple;
|
|
131
|
+
|
|
132
|
+
displacementMap?: string;
|
|
133
|
+
displacementScale?: number;
|
|
134
|
+
displacementBias?: number;
|
|
135
|
+
|
|
136
|
+
roughnessMap?: string;
|
|
137
|
+
metalnessMap?: string;
|
|
138
|
+
|
|
139
|
+
emissiveMap?: string;
|
|
140
|
+
specularMap?: string;
|
|
141
|
+
specularIntensityMap?: string;
|
|
142
|
+
specularColorMap?: string;
|
|
143
|
+
|
|
144
|
+
envMap?: string;
|
|
145
|
+
combine?: Combine;
|
|
146
|
+
|
|
147
|
+
envMapRotation?: EulerTuple;
|
|
148
|
+
envMapIntensity?: number;
|
|
149
|
+
reflectivity?: number;
|
|
150
|
+
refractionRatio?: number;
|
|
151
|
+
|
|
152
|
+
gradientMap?: string;
|
|
153
|
+
|
|
154
|
+
transmission?: number;
|
|
155
|
+
transmissionMap?: string;
|
|
156
|
+
thickness?: number;
|
|
157
|
+
thicknessMap?: string;
|
|
158
|
+
attenuationDistance?: number;
|
|
159
|
+
attenuationColor?: number;
|
|
160
|
+
|
|
161
|
+
size?: number;
|
|
162
|
+
shadowSide?: number;
|
|
163
|
+
sizeAttenuation?: boolean;
|
|
164
|
+
|
|
165
|
+
blending?: Blending;
|
|
166
|
+
side?: Side;
|
|
167
|
+
vertexColors?: boolean;
|
|
168
|
+
|
|
169
|
+
opacity?: number;
|
|
170
|
+
transparent?: boolean;
|
|
171
|
+
|
|
172
|
+
blendSrc?: BlendingSrcFactor;
|
|
173
|
+
blendDst?: BlendingDstFactor;
|
|
174
|
+
blendEquation?: BlendingEquation;
|
|
175
|
+
blendSrcAlpha?: number | null;
|
|
176
|
+
blendDstAlpha?: number | null;
|
|
177
|
+
blendEquationAlpha?: number | null;
|
|
178
|
+
blendColor?: number;
|
|
179
|
+
blendAlpha?: number;
|
|
180
|
+
|
|
181
|
+
depthFunc?: DepthModes;
|
|
182
|
+
depthTest?: boolean;
|
|
183
|
+
depthWrite?: boolean;
|
|
184
|
+
colorWrite?: boolean;
|
|
185
|
+
|
|
186
|
+
stencilWriteMask?: number;
|
|
187
|
+
stencilFunc?: StencilFunc;
|
|
188
|
+
stencilRef?: number;
|
|
189
|
+
stencilFuncMask?: number;
|
|
190
|
+
stencilFail?: StencilOp;
|
|
191
|
+
stencilZFail?: StencilOp;
|
|
192
|
+
stencilZPass?: StencilOp;
|
|
193
|
+
stencilWrite?: boolean;
|
|
194
|
+
|
|
195
|
+
rotation?: number;
|
|
196
|
+
|
|
197
|
+
polygonOffset?: boolean;
|
|
198
|
+
polygonOffsetFactor?: number;
|
|
199
|
+
polygonOffsetUnits?: number;
|
|
200
|
+
|
|
201
|
+
linewidth?: number;
|
|
202
|
+
dashSize?: number;
|
|
203
|
+
gapSize?: number;
|
|
204
|
+
scale?: number;
|
|
205
|
+
|
|
206
|
+
dithering?: boolean;
|
|
207
|
+
|
|
208
|
+
alphaTest?: number;
|
|
209
|
+
alphaHash?: boolean;
|
|
210
|
+
alphaToCoverage?: boolean;
|
|
211
|
+
premultipliedAlpha?: boolean;
|
|
212
|
+
forceSinglePass?: boolean;
|
|
213
|
+
|
|
214
|
+
wireframe?: boolean;
|
|
215
|
+
wireframeLinewidth?: number;
|
|
216
|
+
wireframeLinecap?: string;
|
|
217
|
+
wireframeLinejoin?: string;
|
|
218
|
+
|
|
219
|
+
flatShading?: boolean;
|
|
220
|
+
|
|
221
|
+
visible?: boolean;
|
|
222
|
+
|
|
223
|
+
toneMapped?: boolean;
|
|
224
|
+
|
|
225
|
+
fog?: boolean;
|
|
226
|
+
|
|
227
|
+
userData?: Record<string, unknown>;
|
|
228
|
+
|
|
229
|
+
textures?: Array<Omit<TextureJSON, "metadata">>;
|
|
230
|
+
images?: SourceJSON[];
|
|
231
|
+
}
|
|
232
|
+
|
|
71
233
|
/**
|
|
72
234
|
* Materials describe the appearance of objects. They are defined in a (mostly) renderer-independent way, so you don't have to rewrite materials if you decide to use a different renderer.
|
|
73
235
|
*/
|
|
@@ -418,7 +580,7 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
|
|
|
418
580
|
* Convert the material to three.js JSON format.
|
|
419
581
|
* @param meta Object containing metadata such as textures or images for the material.
|
|
420
582
|
*/
|
|
421
|
-
toJSON(meta?:
|
|
583
|
+
toJSON(meta?: JSONMeta): MaterialJSON;
|
|
422
584
|
|
|
423
585
|
/**
|
|
424
586
|
* Return a new material with the same parameters as this material.
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { GLSLVersion } from "../constants.js";
|
|
2
|
+
import { JSONMeta } from "../core/Object3D.js";
|
|
2
3
|
import { UniformsGroup } from "../core/UniformsGroup.js";
|
|
4
|
+
import { Matrix3, Matrix3Tuple } from "../math/Matrix3.js";
|
|
5
|
+
import { Matrix4, Matrix4Tuple } from "../math/Matrix4.js";
|
|
6
|
+
import { Vector2Tuple } from "../math/Vector2.js";
|
|
7
|
+
import { Vector3Tuple } from "../math/Vector3.js";
|
|
8
|
+
import { Vector4Tuple } from "../math/Vector4.js";
|
|
3
9
|
import { IUniform } from "../renderers/shaders/UniformsLib.js";
|
|
4
|
-
import { Material, MaterialParameters } from "./Material.js";
|
|
10
|
+
import { Material, MaterialJSON, MaterialParameters } from "./Material.js";
|
|
5
11
|
|
|
6
12
|
export interface ShaderMaterialParameters extends MaterialParameters {
|
|
7
13
|
uniforms?: { [uniform: string]: IUniform } | undefined;
|
|
@@ -23,6 +29,46 @@ export interface ShaderMaterialParameters extends MaterialParameters {
|
|
|
23
29
|
glslVersion?: GLSLVersion | undefined;
|
|
24
30
|
}
|
|
25
31
|
|
|
32
|
+
export type ShaderMaterialUniformJSON = {
|
|
33
|
+
type: "t";
|
|
34
|
+
value: string;
|
|
35
|
+
} | {
|
|
36
|
+
type: "c";
|
|
37
|
+
value: number;
|
|
38
|
+
} | {
|
|
39
|
+
type: "v2";
|
|
40
|
+
value: Vector2Tuple;
|
|
41
|
+
} | {
|
|
42
|
+
type: "v3";
|
|
43
|
+
value: Vector3Tuple;
|
|
44
|
+
} | {
|
|
45
|
+
type: "v4";
|
|
46
|
+
value: Vector4Tuple;
|
|
47
|
+
} | {
|
|
48
|
+
type: "m3";
|
|
49
|
+
value: Matrix3Tuple;
|
|
50
|
+
} | {
|
|
51
|
+
type: "m4";
|
|
52
|
+
value: Matrix4Tuple;
|
|
53
|
+
} | {
|
|
54
|
+
value: unknown;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export interface ShaderMaterialJSON extends MaterialJSON {
|
|
58
|
+
glslVersion: number | null;
|
|
59
|
+
uniforms: Record<string, ShaderMaterialUniformJSON>;
|
|
60
|
+
|
|
61
|
+
defines?: Record<string, unknown>;
|
|
62
|
+
|
|
63
|
+
vertexShader: string;
|
|
64
|
+
ragmentShader: string;
|
|
65
|
+
|
|
66
|
+
lights: boolean;
|
|
67
|
+
clipping: boolean;
|
|
68
|
+
|
|
69
|
+
extensions?: Record<string, boolean>;
|
|
70
|
+
}
|
|
71
|
+
|
|
26
72
|
export class ShaderMaterial extends Material {
|
|
27
73
|
constructor(parameters?: ShaderMaterialParameters);
|
|
28
74
|
|
|
@@ -116,5 +162,6 @@ export class ShaderMaterial extends Material {
|
|
|
116
162
|
glslVersion: GLSLVersion | null;
|
|
117
163
|
|
|
118
164
|
setValues(parameters: ShaderMaterialParameters): void;
|
|
119
|
-
|
|
165
|
+
|
|
166
|
+
toJSON(meta?: JSONMeta): ShaderMaterialJSON;
|
|
120
167
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
SRGBColorSpace,
|
|
9
9
|
} from "../constants.js";
|
|
10
10
|
import { Color } from "./Color.js";
|
|
11
|
+
import { Vector3 } from "./Vector3.js";
|
|
11
12
|
|
|
12
13
|
export type WorkingColorSpace = typeof LinearSRGBColorSpace | typeof LinearDisplayP3ColorSpace;
|
|
13
14
|
export type DefinedColorSpace =
|
|
@@ -37,6 +38,8 @@ export interface ColorManagement {
|
|
|
37
38
|
getPrimaries: (colorSpace: DefinedColorSpace) => ColorSpacePrimaries;
|
|
38
39
|
|
|
39
40
|
getTransfer: (colorSpace: ColorSpace) => ColorSpaceTransfer;
|
|
41
|
+
|
|
42
|
+
getLuminanceCoefficients: (target: Vector3, colorSpace?: ColorSpace) => Vector3;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
export const ColorManagement: ColorManagement;
|
three/src/math/Euler.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ import { Vector3 } from "./Vector3.js";
|
|
|
4
4
|
|
|
5
5
|
export type EulerOrder = "XYZ" | "YXZ" | "ZXY" | "ZYX" | "YZX" | "XZY";
|
|
6
6
|
|
|
7
|
+
export type EulerTuple = [x: number, y: number, z: number, order?: EulerOrder];
|
|
8
|
+
|
|
7
9
|
export class Euler {
|
|
8
10
|
constructor(x?: number, y?: number, z?: number, order?: EulerOrder);
|
|
9
11
|
|
|
@@ -38,8 +40,8 @@ export class Euler {
|
|
|
38
40
|
setFromVector3(v: Vector3, order?: EulerOrder): Euler;
|
|
39
41
|
reorder(newOrder: EulerOrder): Euler;
|
|
40
42
|
equals(euler: Euler): boolean;
|
|
41
|
-
fromArray(
|
|
42
|
-
toArray(array?:
|
|
43
|
+
fromArray(array: EulerTuple): Euler;
|
|
44
|
+
toArray(array?: Partial<EulerTuple>, offset?: number): EulerTuple;
|
|
43
45
|
_onChange(callback: () => void): this;
|
|
44
46
|
|
|
45
47
|
static DEFAULT_ORDER: "XYZ";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type Matrix2Tuple = [
|
|
2
|
+
n11: number,
|
|
3
|
+
n12: number,
|
|
4
|
+
n21: number,
|
|
5
|
+
n22: number,
|
|
6
|
+
];
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A class representing a 2x2 {@link https://en.wikipedia.org/wiki/Matrix_(mathematics) matrix}.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const m = new Matrix2();
|
|
13
|
+
*/
|
|
14
|
+
export class Matrix2 {
|
|
15
|
+
readonly isMatrix2: true;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A {@link https://en.wikipedia.org/wiki/Row-_and_column-major_order column-major} list of matrix values.
|
|
19
|
+
*/
|
|
20
|
+
elements: Matrix2Tuple;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Creates a 2x2 {@link https://en.wikipedia.org/wiki/Identity_matrix identity matrix}.
|
|
24
|
+
*/
|
|
25
|
+
constructor();
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Creates a 2x2 matrix with the given arguments in row-major order.
|
|
29
|
+
*/
|
|
30
|
+
constructor(n11: number, n12: number, n21: number, n22: number);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Resets this matrix to the 2x2 identity matrix:
|
|
34
|
+
*/
|
|
35
|
+
identity(): this;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Sets the elements of this matrix based on an array in
|
|
39
|
+
* {@link https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order column-major} format.
|
|
40
|
+
*
|
|
41
|
+
* @param array the array to read the elements from
|
|
42
|
+
* @param offset (optional) index of first element in the array. Default is `0`.
|
|
43
|
+
*/
|
|
44
|
+
fromArray(array: ArrayLike<number>, offset?: number): this;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Sets the 2x2 matrix values to the given
|
|
48
|
+
* {@link https://en.wikipedia.org/wiki/Row-_and_column-major_order row-major} sequence of values:
|
|
49
|
+
* [n11, n12,
|
|
50
|
+
* n21, n22]
|
|
51
|
+
*/
|
|
52
|
+
set(n11: number, n12: number, n21: number, n22: number): this;
|
|
53
|
+
}
|
three/src/math/Matrix3.d.ts
CHANGED
|
@@ -4,55 +4,26 @@ import { Matrix4 } from "./Matrix4.js";
|
|
|
4
4
|
import { Vector2 } from "./Vector2.js";
|
|
5
5
|
import { Vector3 } from "./Vector3.js";
|
|
6
6
|
|
|
7
|
-
export type Matrix3Tuple = [
|
|
7
|
+
export type Matrix3Tuple = [
|
|
8
|
+
n11: number,
|
|
9
|
+
n12: number,
|
|
10
|
+
n13: number,
|
|
11
|
+
n21: number,
|
|
12
|
+
n22: number,
|
|
13
|
+
n23: number,
|
|
14
|
+
n31: number,
|
|
15
|
+
n32: number,
|
|
16
|
+
n33: number,
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
export class Matrix3 {
|
|
20
|
+
readonly isMatrix3: true;
|
|
8
21
|
|
|
9
|
-
/**
|
|
10
|
-
* ( interface Matrix<T> )
|
|
11
|
-
*/
|
|
12
|
-
export interface Matrix {
|
|
13
22
|
/**
|
|
14
23
|
* Array with matrix values.
|
|
24
|
+
* @default [1, 0, 0, 0, 1, 0, 0, 0, 1]
|
|
15
25
|
*/
|
|
16
|
-
elements:
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* identity():T;
|
|
20
|
-
*/
|
|
21
|
-
identity(): Matrix;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* copy(m:T):T;
|
|
25
|
-
*/
|
|
26
|
-
copy(m: this): this;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* multiplyScalar(s:number):T;
|
|
30
|
-
*/
|
|
31
|
-
multiplyScalar(s: number): Matrix;
|
|
32
|
-
|
|
33
|
-
determinant(): number;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* transpose():T;
|
|
37
|
-
*/
|
|
38
|
-
transpose(): Matrix;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* invert():T;
|
|
42
|
-
*/
|
|
43
|
-
invert(): Matrix;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* clone():T;
|
|
47
|
-
*/
|
|
48
|
-
clone(): Matrix;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* ( class Matrix3 implements Matrix<Matrix3> )
|
|
53
|
-
*/
|
|
54
|
-
export class Matrix3 implements Matrix {
|
|
55
|
-
readonly isMatrix3: true;
|
|
26
|
+
elements: Matrix3Tuple;
|
|
56
27
|
|
|
57
28
|
/**
|
|
58
29
|
* Creates an identity matrix.
|
|
@@ -73,12 +44,6 @@ export class Matrix3 implements Matrix {
|
|
|
73
44
|
n33: number,
|
|
74
45
|
);
|
|
75
46
|
|
|
76
|
-
/**
|
|
77
|
-
* Array with matrix values.
|
|
78
|
-
* @default [1, 0, 0, 0, 1, 0, 0, 0, 1]
|
|
79
|
-
*/
|
|
80
|
-
elements: number[];
|
|
81
|
-
|
|
82
47
|
set(
|
|
83
48
|
n11: number,
|
|
84
49
|
n12: number,
|
|
@@ -90,34 +55,68 @@ export class Matrix3 implements Matrix {
|
|
|
90
55
|
n32: number,
|
|
91
56
|
n33: number,
|
|
92
57
|
): Matrix3;
|
|
93
|
-
|
|
94
|
-
|
|
58
|
+
|
|
59
|
+
identity(): this;
|
|
60
|
+
|
|
95
61
|
copy(m: Matrix3): this;
|
|
96
|
-
|
|
62
|
+
|
|
63
|
+
extractBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): this;
|
|
64
|
+
|
|
97
65
|
setFromMatrix4(m: Matrix4): Matrix3;
|
|
98
|
-
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Multiplies this matrix by m.
|
|
69
|
+
*/
|
|
70
|
+
multiply(m: Matrix3): this;
|
|
71
|
+
|
|
72
|
+
premultiply(m: Matrix3): this;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Sets this matrix to a x b.
|
|
76
|
+
*/
|
|
77
|
+
multiplyMatrices(a: Matrix3, b: Matrix3): this;
|
|
78
|
+
|
|
79
|
+
multiplyScalar(s: number): this;
|
|
80
|
+
|
|
99
81
|
determinant(): number;
|
|
100
82
|
|
|
101
83
|
/**
|
|
102
84
|
* Inverts this matrix in place.
|
|
103
85
|
*/
|
|
104
|
-
invert():
|
|
86
|
+
invert(): this;
|
|
105
87
|
|
|
106
88
|
/**
|
|
107
89
|
* Transposes this matrix in place.
|
|
108
90
|
*/
|
|
109
|
-
transpose():
|
|
110
|
-
|
|
91
|
+
transpose(): this;
|
|
92
|
+
|
|
93
|
+
getNormalMatrix(matrix4: Matrix4): this;
|
|
111
94
|
|
|
112
95
|
/**
|
|
113
96
|
* Transposes this matrix into the supplied array r, and returns itself.
|
|
114
97
|
*/
|
|
115
|
-
transposeIntoArray(r: number[]):
|
|
98
|
+
transposeIntoArray(r: number[]): this;
|
|
116
99
|
|
|
117
|
-
setUvTransform(tx: number, ty: number, sx: number, sy: number, rotation: number, cx: number, cy: number):
|
|
100
|
+
setUvTransform(tx: number, ty: number, sx: number, sy: number, rotation: number, cx: number, cy: number): this;
|
|
118
101
|
|
|
119
|
-
scale(sx: number, sy: number):
|
|
102
|
+
scale(sx: number, sy: number): this;
|
|
120
103
|
|
|
104
|
+
rotate(theta: number): this;
|
|
105
|
+
|
|
106
|
+
translate(tx: number, ty: number): this;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Sets this matrix as a 2D translation transform:
|
|
110
|
+
*
|
|
111
|
+
* ```
|
|
112
|
+
* 1, 0, x,
|
|
113
|
+
* 0, 1, y,
|
|
114
|
+
* 0, 0, 1
|
|
115
|
+
* ```
|
|
116
|
+
*
|
|
117
|
+
* @param v the amount to translate.
|
|
118
|
+
*/
|
|
119
|
+
makeTranslation(v: Vector2): this;
|
|
121
120
|
/**
|
|
122
121
|
* Sets this matrix as a 2D translation transform:
|
|
123
122
|
*
|
|
@@ -130,7 +129,6 @@ export class Matrix3 implements Matrix {
|
|
|
130
129
|
* @param x the amount to translate in the X axis.
|
|
131
130
|
* @param y the amount to translate in the Y axis.
|
|
132
131
|
*/
|
|
133
|
-
makeTranslation(v: Vector2): this;
|
|
134
132
|
makeTranslation(x: number, y: number): this;
|
|
135
133
|
|
|
136
134
|
/**
|
|
@@ -145,7 +143,6 @@ export class Matrix3 implements Matrix {
|
|
|
145
143
|
* @param theta Rotation angle in radians. Positive values rotate counterclockwise.
|
|
146
144
|
*/
|
|
147
145
|
makeRotation(theta: number): this;
|
|
148
|
-
makeRotation(theta: number): Matrix3;
|
|
149
146
|
|
|
150
147
|
/**
|
|
151
148
|
* Sets this matrix as a 2D scale transform:
|
|
@@ -160,11 +157,6 @@ export class Matrix3 implements Matrix {
|
|
|
160
157
|
* @param y the amount to scale in the Y axis.
|
|
161
158
|
*/
|
|
162
159
|
makeScale(x: number, y: number): this;
|
|
163
|
-
makeScale(x: number, y: number): Matrix3;
|
|
164
|
-
|
|
165
|
-
rotate(theta: number): Matrix3;
|
|
166
|
-
|
|
167
|
-
translate(tx: number, ty: number): Matrix3;
|
|
168
160
|
|
|
169
161
|
equals(matrix: Matrix3): boolean;
|
|
170
162
|
|
|
@@ -173,55 +165,15 @@ export class Matrix3 implements Matrix {
|
|
|
173
165
|
* @param array the source array or array-like.
|
|
174
166
|
* @param offset (optional) offset into the array-like. Default is 0.
|
|
175
167
|
*/
|
|
176
|
-
fromArray(array:
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Returns an array with the values of this matrix, or copies them into the provided array.
|
|
180
|
-
* @param array (optional) array to store the matrix to. If this is not provided, a new array will be created.
|
|
181
|
-
* @param offset (optional) optional offset into the array.
|
|
182
|
-
* @return The created or provided array.
|
|
183
|
-
*/
|
|
184
|
-
toArray(array?: number[], offset?: number): number[];
|
|
185
|
-
toArray(array?: Matrix3Tuple, offset?: 0): Matrix3Tuple;
|
|
168
|
+
fromArray(array: ArrayLike<number>, offset?: number): this;
|
|
186
169
|
|
|
187
170
|
/**
|
|
188
|
-
*
|
|
189
|
-
* @
|
|
190
|
-
* @param
|
|
191
|
-
* @
|
|
171
|
+
* Writes the elements of this matrix to an array in
|
|
172
|
+
* {@link https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order column-major} format.
|
|
173
|
+
* @param array (optional) array to store the resulting vector in. If not given a new array will be created.
|
|
174
|
+
* @param offset (optional) offset in the array at which to put the result.
|
|
192
175
|
*/
|
|
193
|
-
toArray
|
|
176
|
+
toArray<TArray extends ArrayLike<number> = number[]>(array?: TArray, offset?: number): TArray;
|
|
194
177
|
|
|
195
|
-
|
|
196
|
-
* Multiplies this matrix by m.
|
|
197
|
-
*/
|
|
198
|
-
multiply(m: Matrix3): Matrix3;
|
|
199
|
-
|
|
200
|
-
premultiply(m: Matrix3): Matrix3;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Sets this matrix to a x b.
|
|
204
|
-
*/
|
|
205
|
-
multiplyMatrices(a: Matrix3, b: Matrix3): Matrix3;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* @deprecated Use {@link Vector3.applyMatrix3 vector.applyMatrix3( matrix )} instead.
|
|
209
|
-
*/
|
|
210
|
-
multiplyVector3(vector: Vector3): any;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* @deprecated This method has been removed completely.
|
|
214
|
-
*/
|
|
215
|
-
multiplyVector3Array(a: any): any;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* @deprecated Use {@link Matrix3#invert .invert()} instead.
|
|
219
|
-
*/
|
|
220
|
-
getInverse(matrix: Matrix4, throwOnDegenerate?: boolean): Matrix3;
|
|
221
|
-
getInverse(matrix: Matrix): Matrix;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* @deprecated Use {@link Matrix3#toArray .toArray()} instead.
|
|
225
|
-
*/
|
|
226
|
-
flattenToArrayOffset(array: number[], offset: number): number[];
|
|
178
|
+
clone(): this;
|
|
227
179
|
}
|