@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
|
@@ -249,9 +249,9 @@ export interface MeshStandardMaterialParameters
|
|
|
249
249
|
* A standard physically based material, using Metallic-Roughness workflow.
|
|
250
250
|
*
|
|
251
251
|
* Physically based rendering (PBR) has recently become the standard in many
|
|
252
|
-
* 3D applications, such as [Unity]
|
|
253
|
-
* [Unreal]
|
|
254
|
-
* [3D Studio Max]
|
|
252
|
+
* 3D applications, such as [Unity](https://blogs.unity3d.com/2014/10/29/physically-based-shading-in-unity-5-a-primer/),
|
|
253
|
+
* [Unreal](https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/) and
|
|
254
|
+
* [3D Studio Max](http://area.autodesk.com/blogs/the-3ds-max-blog/what039s-new-for-rendering-in-3ds-max-2017).
|
|
255
255
|
*
|
|
256
256
|
* This approach differs from older approaches in that instead of using
|
|
257
257
|
* approximations for the way in which light interacts with a surface, a
|
|
@@ -267,13 +267,13 @@ export interface MeshStandardMaterialParameters
|
|
|
267
267
|
* Note that for best results you should always specify an environment map when using this material.
|
|
268
268
|
*
|
|
269
269
|
* For a non-technical introduction to the concept of PBR and how to set up a
|
|
270
|
-
* PBR material, check out these articles by the people at [marmoset]
|
|
270
|
+
* PBR material, check out these articles by the people at [marmoset](https://www.marmoset.co):
|
|
271
271
|
*
|
|
272
|
-
* - [Basic Theory of Physically Based Rendering]
|
|
273
|
-
* - [Physically Based Rendering and You Can Too]
|
|
272
|
+
* - [Basic Theory of Physically Based Rendering](https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/)
|
|
273
|
+
* - [Physically Based Rendering and You Can Too](https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/)
|
|
274
274
|
*
|
|
275
275
|
* Technical details of the approach used in three.js (and most other PBR systems) can be found is this
|
|
276
|
-
* [paper from Disney]
|
|
276
|
+
* [paper from Disney](https://media.disneyanimation.com/uploads/production/publication_asset/48/asset/s2012_pbs_disney_brdf_notes_v3.pdf)
|
|
277
277
|
* (pdf), by Brent Burley.
|
|
278
278
|
*/
|
|
279
279
|
export class MeshStandardMaterial extends Material {
|
|
@@ -33,7 +33,7 @@ export interface PointsMaterialProperties extends MaterialProperties {
|
|
|
33
33
|
/**
|
|
34
34
|
* Defines the size of the points in pixels.
|
|
35
35
|
*
|
|
36
|
-
* Might be capped if the value exceeds hardware dependent parameters like [gl.ALIASED_POINT_SIZE_RANGE]
|
|
36
|
+
* Might be capped if the value exceeds hardware dependent parameters like [gl.ALIASED_POINT_SIZE_RANGE](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParamete).
|
|
37
37
|
*
|
|
38
38
|
* @default 1
|
|
39
39
|
*/
|
|
@@ -26,7 +26,7 @@ export interface ShaderMaterialProperties extends MaterialProperties {
|
|
|
26
26
|
* #define BAR true
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
defines:
|
|
29
|
+
defines: Record<string, unknown>;
|
|
30
30
|
/**
|
|
31
31
|
* An object of the form:
|
|
32
32
|
* ```js
|
|
@@ -85,9 +85,22 @@ export interface ShaderMaterialProperties extends MaterialProperties {
|
|
|
85
85
|
*/
|
|
86
86
|
wireframeLinewidth: number;
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* Defines whether the material color is affected by global fog settings; `true`
|
|
89
89
|
* to pass fog uniforms to the shader.
|
|
90
90
|
*
|
|
91
|
+
* Setting this property to `true` requires the definition of fog uniforms. It is
|
|
92
|
+
* recommended to use `UniformsUtils.merge()` to combine the custom shader uniforms
|
|
93
|
+
* with predefined fog uniforms.
|
|
94
|
+
*
|
|
95
|
+
* ```js
|
|
96
|
+
* const material = new ShaderMaterial( {
|
|
97
|
+
* uniforms: UniformsUtils.merge( [ UniformsLib[ 'fog' ], shaderUniforms ] );
|
|
98
|
+
* vertexShader: vertexShader,
|
|
99
|
+
* fragmentShader: fragmentShader,
|
|
100
|
+
* fog: true
|
|
101
|
+
* } );
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
91
104
|
* @default false
|
|
92
105
|
*/
|
|
93
106
|
fog: boolean;
|
|
@@ -130,7 +143,7 @@ export interface ShaderMaterialProperties extends MaterialProperties {
|
|
|
130
143
|
uv1: [number, number];
|
|
131
144
|
};
|
|
132
145
|
/**
|
|
133
|
-
* If set, this calls [gl.bindAttribLocation]
|
|
146
|
+
* If set, this calls [gl.bindAttribLocation](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation)
|
|
134
147
|
* to bind a generic vertex index to an attribute variable.
|
|
135
148
|
*
|
|
136
149
|
* @default undefined
|
|
@@ -209,7 +222,7 @@ export interface ShaderMaterialJSON extends MaterialJSON {
|
|
|
209
222
|
* - You can use the directive `#pragma unroll_loop_start` and `#pragma unroll_loop_end`
|
|
210
223
|
* in order to unroll a `for` loop in GLSL by the shader preprocessor. The directive has
|
|
211
224
|
* to be placed right above the loop. The loop formatting has to correspond to a defined standard.
|
|
212
|
-
* - The loop has to be [normalized]
|
|
225
|
+
* - The loop has to be [normalized](https://en.wikipedia.org/wiki/Normalized_loop).
|
|
213
226
|
* - The loop variable has to be *i*.
|
|
214
227
|
* - The value `UNROLLED_LOOP_INDEX` will be replaced with the explicitly
|
|
215
228
|
* value of *i* for the given iteration and can be used in preprocessor
|
|
@@ -217,12 +230,12 @@ export interface ShaderMaterialJSON extends MaterialJSON {
|
|
|
217
230
|
*
|
|
218
231
|
* ```js
|
|
219
232
|
* const material = new THREE.ShaderMaterial( {
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
233
|
+
* uniforms: {
|
|
234
|
+
* time: { value: 1.0 },
|
|
235
|
+
* resolution: { value: new THREE.Vector2() }
|
|
236
|
+
* },
|
|
237
|
+
* vertexShader: document.getElementById( 'vertexShader' ).textContent,
|
|
238
|
+
* fragmentShader: document.getElementById( 'fragmentShader' ).textContent
|
|
226
239
|
* } );
|
|
227
240
|
* ```
|
|
228
241
|
*/
|
|
@@ -248,4 +261,6 @@ export class ShaderMaterial extends Material {
|
|
|
248
261
|
}
|
|
249
262
|
|
|
250
263
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
251
|
-
export interface ShaderMaterial extends ShaderMaterialProperties {
|
|
264
|
+
export interface ShaderMaterial extends ShaderMaterialProperties {
|
|
265
|
+
defines: Record<string, unknown>;
|
|
266
|
+
}
|
|
@@ -40,7 +40,7 @@ declare class SSSLightingModel extends PhysicalLightingModel {
|
|
|
40
40
|
/**
|
|
41
41
|
* Extends the default implementation with a SSS term.
|
|
42
42
|
*
|
|
43
|
-
* Reference: [Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look]
|
|
43
|
+
* Reference: [Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look](https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/)
|
|
44
44
|
*
|
|
45
45
|
* @param {Object} input - The input data.
|
|
46
46
|
* @param {NodeBuilder} builder - The current node builder.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import ClippingNode from "../../nodes/accessors/ClippingNode.js";
|
|
2
|
+
import ContextNode from "../../nodes/core/ContextNode.js";
|
|
2
3
|
import LightingModel from "../../nodes/core/LightingModel.js";
|
|
3
4
|
import MRTNode from "../../nodes/core/MRTNode.js";
|
|
4
5
|
import Node from "../../nodes/core/Node.js";
|
|
5
6
|
import NodeBuilder from "../../nodes/core/NodeBuilder.js";
|
|
6
7
|
import LightsNode from "../../nodes/lighting/LightsNode.js";
|
|
7
|
-
import { ShaderNodeObject } from "../../nodes/tsl/TSLCore.js";
|
|
8
8
|
import { MapColorPropertiesToColorRepresentations, Material, MaterialParameters } from "../Material.js";
|
|
9
9
|
import NodeMaterialObserver from "./manager/NodeMaterialObserver.js";
|
|
10
10
|
|
|
@@ -105,7 +105,7 @@ export interface NodeMaterialNodeProperties {
|
|
|
105
105
|
* and `alphaMap` properties. This node property allows to overwrite the default
|
|
106
106
|
* and define the opacity with a node instead.
|
|
107
107
|
*
|
|
108
|
-
* If you don't want to overwrite the
|
|
108
|
+
* If you don't want to overwrite the opacity but modify the existing
|
|
109
109
|
* value instead, use {@link materialOpacity}.
|
|
110
110
|
*
|
|
111
111
|
* @default null
|
|
@@ -273,6 +273,12 @@ export interface NodeMaterialNodeProperties {
|
|
|
273
273
|
* @default null
|
|
274
274
|
*/
|
|
275
275
|
vertexNode: Node | null;
|
|
276
|
+
/**
|
|
277
|
+
* This node can be used as a global context management component for this material.
|
|
278
|
+
*
|
|
279
|
+
* @default null
|
|
280
|
+
*/
|
|
281
|
+
contextNode: ContextNode | null;
|
|
276
282
|
}
|
|
277
283
|
|
|
278
284
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
@@ -385,7 +391,7 @@ declare class NodeMaterial extends Material {
|
|
|
385
391
|
*
|
|
386
392
|
* @return {Node<vec3>} The normal node.
|
|
387
393
|
*/
|
|
388
|
-
setupNormal():
|
|
394
|
+
setupNormal(): Node;
|
|
389
395
|
/**
|
|
390
396
|
* Setups the environment node from the material.
|
|
391
397
|
*
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Node from "../../nodes/core/Node.js";
|
|
2
2
|
import VolumetricLightingModel from "../../nodes/functions/VolumetricLightingModel.js";
|
|
3
|
-
import { ShaderNodeObject } from "../../nodes/tsl/TSLCore.js";
|
|
4
3
|
import { MapColorPropertiesToColorRepresentations, MaterialParameters, MaterialProperties } from "../Material.js";
|
|
5
4
|
import NodeMaterial, { NodeMaterialNodeProperties } from "./NodeMaterial.js";
|
|
6
5
|
|
|
@@ -23,7 +22,7 @@ export interface VolumeNodeMaterialNodeProperties extends NodeMaterialNodeProper
|
|
|
23
22
|
*
|
|
24
23
|
* @default null
|
|
25
24
|
*/
|
|
26
|
-
scatteringNode: (params: { positionRay:
|
|
25
|
+
scatteringNode: (params: { positionRay: Node }) => Node | null;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
three/src/math/Vector3.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export class Vector3 {
|
|
|
103
103
|
/**
|
|
104
104
|
* Subtracts v from this vector.
|
|
105
105
|
*/
|
|
106
|
-
sub(
|
|
106
|
+
sub(v: Vector3Like): this;
|
|
107
107
|
|
|
108
108
|
subScalar(s: number): this;
|
|
109
109
|
|
|
@@ -208,7 +208,7 @@ export class Vector3 {
|
|
|
208
208
|
/**
|
|
209
209
|
* Sets this vector to cross product of itself and v.
|
|
210
210
|
*/
|
|
211
|
-
cross(
|
|
211
|
+
cross(v: Vector3Like): this;
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
214
|
* Sets this vector to cross product of a and b.
|
three/src/nodes/Nodes.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ export { default as ArrayNode } from "./core/ArrayNode.js";
|
|
|
6
6
|
export { default as AssignNode } from "./core/AssignNode.js";
|
|
7
7
|
export { default as AttributeNode } from "./core/AttributeNode.js";
|
|
8
8
|
export { default as BypassNode } from "./core/BypassNode.js";
|
|
9
|
-
export { default as CacheNode } from "./core/CacheNode.js";
|
|
10
9
|
export { default as ConstNode } from "./core/ConstNode.js";
|
|
11
10
|
export { default as ContextNode } from "./core/ContextNode.js";
|
|
12
11
|
export { default as IndexNode, IndexNodeScope } from "./core/IndexNode.js";
|
|
12
|
+
export { default as IsolateNode } from "./core/IsolateNode.js";
|
|
13
13
|
export {
|
|
14
14
|
default as LightingModel,
|
|
15
15
|
LightingModelDirectInput,
|
three/src/nodes/TSL.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export * from "./core/constants.js";
|
|
|
5
5
|
export * from "./core/AssignNode.js";
|
|
6
6
|
export * from "./core/AttributeNode.js";
|
|
7
7
|
export * from "./core/BypassNode.js";
|
|
8
|
-
export * from "./core/CacheNode.js";
|
|
9
8
|
export * from "./core/ContextNode.js";
|
|
10
9
|
export * from "./core/IndexNode.js";
|
|
10
|
+
export * from "./core/IsolateNode.js";
|
|
11
11
|
export * from "./core/MRTNode.js";
|
|
12
12
|
export * from "./core/OutputStructNode.js";
|
|
13
13
|
export * from "./core/ParameterNode.js";
|
|
@@ -20,9 +20,12 @@ export * from "./core/VaryingNode.js";
|
|
|
20
20
|
|
|
21
21
|
// math
|
|
22
22
|
export * from "./math/BitcastNode.js";
|
|
23
|
+
export * from "./math/BitcountNode.js";
|
|
23
24
|
export * from "./math/Hash.js";
|
|
24
25
|
export * from "./math/MathUtils.js";
|
|
26
|
+
export * from "./math/PackFloatNode.js";
|
|
25
27
|
export * from "./math/TriNoise3D.js";
|
|
28
|
+
export * from "./math/UnpackFloatNode.js";
|
|
26
29
|
|
|
27
30
|
// utils
|
|
28
31
|
export * from "./utils/EquirectUV.js";
|
|
@@ -160,7 +163,7 @@ export * from "./materialx/MaterialXNodes.js";
|
|
|
160
163
|
export { default as BRDF_GGX } from "./functions/BSDF/BRDF_GGX.js";
|
|
161
164
|
export { default as BRDF_Lambert } from "./functions/BSDF/BRDF_Lambert.js";
|
|
162
165
|
export { default as D_GGX } from "./functions/BSDF/D_GGX.js";
|
|
163
|
-
export { default as
|
|
166
|
+
export { default as DFGLUT } from "./functions/BSDF/DFGLUT.js";
|
|
164
167
|
export { default as F_Schlick } from "./functions/BSDF/F_Schlick.js";
|
|
165
168
|
export { default as Schlick_to_F0 } from "./functions/BSDF/Schlick_to_F0.js";
|
|
166
169
|
export { default as V_GGX_SmithCorrelated } from "./functions/BSDF/V_GGX_SmithCorrelated.js";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
|
|
4
|
-
export const TBNViewMatrix:
|
|
3
|
+
export const TBNViewMatrix: Node;
|
|
5
4
|
|
|
6
|
-
export const parallaxDirection:
|
|
7
|
-
export const parallaxUV: (uv:
|
|
5
|
+
export const parallaxDirection: Node;
|
|
6
|
+
export const parallaxUV: (uv: Node, scale: Node) => Node;
|
|
8
7
|
|
|
9
|
-
export const bentNormalView:
|
|
8
|
+
export const bentNormalView: Node;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { TypedArray } from "../../core/BufferAttribute.js";
|
|
2
2
|
import { Struct } from "../core/StructNode.js";
|
|
3
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
3
|
import StorageBufferNode from "./StorageBufferNode.js";
|
|
5
4
|
|
|
6
5
|
export const attributeArray: (
|
|
7
6
|
count: TypedArray | number,
|
|
8
7
|
type?: string | Struct,
|
|
9
|
-
) =>
|
|
8
|
+
) => StorageBufferNode;
|
|
10
9
|
|
|
11
10
|
export const instancedArray: (
|
|
12
11
|
count: TypedArray | number,
|
|
13
12
|
type?: string | Struct,
|
|
14
|
-
) =>
|
|
13
|
+
) => StorageBufferNode;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BatchedMesh } from "../../objects/BatchedMesh.js";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
3
|
|
|
5
4
|
export default class BatchNode extends Node {
|
|
6
5
|
batchMesh: BatchedMesh;
|
|
@@ -10,4 +9,4 @@ export default class BatchNode extends Node {
|
|
|
10
9
|
constructor(batchMesh: BatchedMesh);
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
export const batch: (batchMesh: BatchedMesh) =>
|
|
12
|
+
export const batch: (batchMesh: BatchedMesh) => BatchNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import MathNode from "../math/MathNode.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
|
|
4
|
-
export const bitangentGeometry:
|
|
5
|
-
export const bitangentLocal:
|
|
6
|
-
export const bitangentView:
|
|
7
|
-
export const bitangentWorld:
|
|
3
|
+
export const bitangentGeometry: MathNode;
|
|
4
|
+
export const bitangentLocal: MathNode;
|
|
5
|
+
export const bitangentView: MathNode;
|
|
6
|
+
export const bitangentWorld: MathNode;
|
|
@@ -3,9 +3,8 @@ import { BufferAttribute, TypedArray } from "../../core/BufferAttribute.js";
|
|
|
3
3
|
import { InterleavedBuffer } from "../../core/InterleavedBuffer.js";
|
|
4
4
|
import { InterleavedBufferAttribute } from "../../core/InterleavedBufferAttribute.js";
|
|
5
5
|
import InputNode from "../core/InputNode.js";
|
|
6
|
+
import Node from "../core/Node.js";
|
|
6
7
|
import NodeBuilder from "../core/NodeBuilder.js";
|
|
7
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
8
|
-
import BufferNode from "./BufferNode.js";
|
|
9
8
|
/**
|
|
10
9
|
* In earlier `three.js` versions it was only possible to define attribute data
|
|
11
10
|
* on geometry level. With `BufferAttributeNode`, it is also possible to do this
|
|
@@ -114,14 +113,14 @@ export default BufferAttributeNode;
|
|
|
114
113
|
* @param {?string} [type=null] - The buffer type (e.g. `'vec3'`).
|
|
115
114
|
* @param {number} [stride=0] - The buffer stride.
|
|
116
115
|
* @param {number} [offset=0] - The buffer offset.
|
|
117
|
-
* @returns {BufferAttributeNode}
|
|
116
|
+
* @returns {BufferAttributeNode|Node}
|
|
118
117
|
*/
|
|
119
118
|
export declare const bufferAttribute: (
|
|
120
|
-
array:
|
|
119
|
+
array: BufferAttribute | InterleavedBuffer | TypedArray,
|
|
121
120
|
type?: string | null,
|
|
122
121
|
stride?: number,
|
|
123
122
|
offset?: number,
|
|
124
|
-
) =>
|
|
123
|
+
) => Node;
|
|
125
124
|
/**
|
|
126
125
|
* TSL function for creating a buffer attribute node but with dynamic draw usage.
|
|
127
126
|
* Use this function if attribute data are updated per frame.
|
|
@@ -132,14 +131,14 @@ export declare const bufferAttribute: (
|
|
|
132
131
|
* @param {?string} [type=null] - The buffer type (e.g. `'vec3'`).
|
|
133
132
|
* @param {number} [stride=0] - The buffer stride.
|
|
134
133
|
* @param {number} [offset=0] - The buffer offset.
|
|
135
|
-
* @returns {BufferAttributeNode}
|
|
134
|
+
* @returns {BufferAttributeNode|Node}
|
|
136
135
|
*/
|
|
137
136
|
export declare const dynamicBufferAttribute: (
|
|
138
|
-
array:
|
|
137
|
+
array: BufferAttribute | InterleavedBuffer | TypedArray,
|
|
139
138
|
type?: string | null,
|
|
140
139
|
stride?: number,
|
|
141
140
|
offset?: number,
|
|
142
|
-
) =>
|
|
141
|
+
) => Node;
|
|
143
142
|
/**
|
|
144
143
|
* TSL function for creating a buffer attribute node but with enabled instancing
|
|
145
144
|
*
|
|
@@ -149,14 +148,14 @@ export declare const dynamicBufferAttribute: (
|
|
|
149
148
|
* @param {?string} [type=null] - The buffer type (e.g. `'vec3'`).
|
|
150
149
|
* @param {number} [stride=0] - The buffer stride.
|
|
151
150
|
* @param {number} [offset=0] - The buffer offset.
|
|
152
|
-
* @returns {BufferAttributeNode}
|
|
151
|
+
* @returns {BufferAttributeNode|Node}
|
|
153
152
|
*/
|
|
154
153
|
export declare const instancedBufferAttribute: (
|
|
155
|
-
array:
|
|
154
|
+
array: BufferAttribute | InterleavedBuffer | TypedArray,
|
|
156
155
|
type?: string | null,
|
|
157
156
|
stride?: number,
|
|
158
157
|
offset?: number,
|
|
159
|
-
) =>
|
|
158
|
+
) => Node;
|
|
160
159
|
/**
|
|
161
160
|
* TSL function for creating a buffer attribute node but with dynamic draw usage and enabled instancing
|
|
162
161
|
*
|
|
@@ -166,16 +165,17 @@ export declare const instancedBufferAttribute: (
|
|
|
166
165
|
* @param {?string} [type=null] - The buffer type (e.g. `'vec3'`).
|
|
167
166
|
* @param {number} [stride=0] - The buffer stride.
|
|
168
167
|
* @param {number} [offset=0] - The buffer offset.
|
|
169
|
-
* @returns {BufferAttributeNode}
|
|
168
|
+
* @returns {BufferAttributeNode|Node}
|
|
170
169
|
*/
|
|
171
170
|
export declare const instancedDynamicBufferAttribute: (
|
|
172
|
-
array:
|
|
171
|
+
array: BufferAttribute | InterleavedBuffer | TypedArray,
|
|
173
172
|
type?: string | null,
|
|
174
173
|
stride?: number,
|
|
175
174
|
offset?: number,
|
|
176
|
-
) =>
|
|
177
|
-
declare module "../
|
|
178
|
-
interface
|
|
179
|
-
toAttribute:
|
|
175
|
+
) => Node;
|
|
176
|
+
declare module "../Nodes.js" {
|
|
177
|
+
interface BufferNode<TValue> {
|
|
178
|
+
toAttribute: () => BufferAttributeNode;
|
|
179
|
+
toAttributeAssign: () => this;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import UniformNode from "../core/UniformNode.js";
|
|
2
|
-
import { NodeOrType
|
|
2
|
+
import { NodeOrType } from "../tsl/TSLCore.js";
|
|
3
3
|
|
|
4
4
|
export default class BufferNode<TValue> extends UniformNode<TValue> {
|
|
5
5
|
isBufferNode: true;
|
|
@@ -14,4 +14,4 @@ export const buffer: <TValue>(
|
|
|
14
14
|
value: unknown,
|
|
15
15
|
nodeOrType: NodeOrType,
|
|
16
16
|
count: number,
|
|
17
|
-
) =>
|
|
17
|
+
) => BufferNode<TValue>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Node from "../core/Node.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
|
|
4
3
|
declare class BuiltinNode extends Node {
|
|
5
4
|
name: string;
|
|
@@ -11,4 +10,4 @@ declare class BuiltinNode extends Node {
|
|
|
11
10
|
|
|
12
11
|
export default BuiltinNode;
|
|
13
12
|
|
|
14
|
-
export const builtin: (name: string) =>
|
|
13
|
+
export const builtin: (name: string) => BuiltinNode;
|
|
@@ -3,15 +3,14 @@ import { Matrix4 } from "../../math/Matrix4.js";
|
|
|
3
3
|
import { Vector3 } from "../../math/Vector3.js";
|
|
4
4
|
import { Vector4 } from "../../math/Vector4.js";
|
|
5
5
|
import UniformNode from "../core/UniformNode.js";
|
|
6
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
7
6
|
|
|
8
|
-
export const cameraIndex:
|
|
9
|
-
export const cameraNear:
|
|
10
|
-
export const cameraFar:
|
|
11
|
-
export const cameraProjectionMatrix:
|
|
12
|
-
export const cameraProjectionMatrixInverse:
|
|
13
|
-
export const cameraViewMatrix:
|
|
14
|
-
export const cameraWorldMatrix:
|
|
15
|
-
export const cameraNormalMatrix:
|
|
16
|
-
export const cameraPosition:
|
|
17
|
-
export const cameraViewport:
|
|
7
|
+
export const cameraIndex: UniformNode<number>;
|
|
8
|
+
export const cameraNear: UniformNode<number>;
|
|
9
|
+
export const cameraFar: UniformNode<number>;
|
|
10
|
+
export const cameraProjectionMatrix: UniformNode<Matrix4>;
|
|
11
|
+
export const cameraProjectionMatrixInverse: UniformNode<Matrix4>;
|
|
12
|
+
export const cameraViewMatrix: UniformNode<Matrix4>;
|
|
13
|
+
export const cameraWorldMatrix: UniformNode<Matrix4>;
|
|
14
|
+
export const cameraNormalMatrix: UniformNode<Matrix3>;
|
|
15
|
+
export const cameraPosition: UniformNode<Vector3>;
|
|
16
|
+
export const cameraViewport: UniformNode<Vector4>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { Plane } from "../../math/Plane.js";
|
|
2
1
|
import Node from "../core/Node.js";
|
|
3
|
-
import NodeBuilder from "../core/NodeBuilder.js";
|
|
4
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
5
2
|
|
|
6
3
|
export type ClippingNodeScope = typeof ClippingNode.ALPHA_TO_COVERAGE | typeof ClippingNode.DEFAULT;
|
|
7
4
|
|
|
@@ -17,6 +14,6 @@ export default class ClippingNode extends Node {
|
|
|
17
14
|
static HARDWARE: "hardware";
|
|
18
15
|
}
|
|
19
16
|
|
|
20
|
-
export const clipping: () =>
|
|
21
|
-
export const clippingAlpha: () =>
|
|
22
|
-
export const hardwareClipping: () =>
|
|
17
|
+
export const clipping: () => ClippingNode;
|
|
18
|
+
export const clippingAlpha: () => ClippingNode;
|
|
19
|
+
export const hardwareClipping: () => ClippingNode;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { CubeTexture } from "../../textures/CubeTexture.js";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
3
|
import TextureNode from "./TextureNode.js";
|
|
5
4
|
|
|
6
5
|
declare class CubeTextureNode extends TextureNode {
|
|
7
6
|
isCubeTextureNode: boolean;
|
|
8
|
-
uvNode:
|
|
9
|
-
levelNode:
|
|
7
|
+
uvNode: Node | null;
|
|
8
|
+
levelNode: Node | null;
|
|
10
9
|
|
|
11
10
|
constructor(
|
|
12
11
|
value: CubeTexture,
|
|
13
|
-
uvNode?:
|
|
14
|
-
levelNode?:
|
|
15
|
-
biasNode?:
|
|
12
|
+
uvNode?: Node | null,
|
|
13
|
+
levelNode?: Node | null,
|
|
14
|
+
biasNode?: Node | null,
|
|
16
15
|
);
|
|
17
16
|
|
|
18
17
|
getDefaultUV(): Node;
|
|
@@ -25,15 +24,15 @@ export const cubeTextureBase: (
|
|
|
25
24
|
uvNode?: Node,
|
|
26
25
|
levelNode?: Node,
|
|
27
26
|
biasNode?: Node,
|
|
28
|
-
) =>
|
|
27
|
+
) => CubeTextureNode;
|
|
29
28
|
|
|
30
29
|
export const cubeTexture: (
|
|
31
30
|
value?: CubeTexture,
|
|
32
31
|
uvNode?: Node | null,
|
|
33
32
|
levelNode?: Node | null,
|
|
34
33
|
biasNode?: Node | null,
|
|
35
|
-
) =>
|
|
34
|
+
) => CubeTextureNode;
|
|
36
35
|
|
|
37
36
|
export const uniformCubeTexture: (
|
|
38
37
|
value?: CubeTexture,
|
|
39
|
-
) =>
|
|
38
|
+
) => CubeTextureNode;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { InstancedBufferAttribute } from "../../core/InstancedBufferAttribute.js";
|
|
2
|
+
import StorageInstancedBufferAttribute from "../../renderers/common/StorageInstancedBufferAttribute.js";
|
|
2
3
|
import Node from "../core/Node.js";
|
|
3
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
4
|
|
|
5
5
|
export default class InstanceNode extends Node {
|
|
6
6
|
count: number;
|
|
7
|
-
instanceMatrix: InstancedBufferAttribute;
|
|
8
|
-
instanceColor: InstancedBufferAttribute | null;
|
|
7
|
+
instanceMatrix: InstancedBufferAttribute | StorageInstancedBufferAttribute;
|
|
8
|
+
instanceColor: InstancedBufferAttribute | StorageInstancedBufferAttribute | null;
|
|
9
9
|
|
|
10
10
|
instanceMatrixNode: Node | null;
|
|
11
11
|
instanceColorNode: Node | null;
|
|
12
12
|
|
|
13
13
|
constructor(
|
|
14
14
|
count: number,
|
|
15
|
-
instanceMatrix: InstancedBufferAttribute,
|
|
16
|
-
instanceColor?: InstancedBufferAttribute | null,
|
|
15
|
+
instanceMatrix: InstancedBufferAttribute | StorageInstancedBufferAttribute,
|
|
16
|
+
instanceColor?: InstancedBufferAttribute | StorageInstancedBufferAttribute | null,
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export const instance: (
|
|
21
21
|
count: number,
|
|
22
|
-
instanceMatrix: InstancedBufferAttribute,
|
|
23
|
-
instanceColor?: InstancedBufferAttribute | null,
|
|
24
|
-
) =>
|
|
22
|
+
instanceMatrix: InstancedBufferAttribute | StorageInstancedBufferAttribute,
|
|
23
|
+
instanceColor?: InstancedBufferAttribute | StorageInstancedBufferAttribute | null,
|
|
24
|
+
) => InstanceNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { InstancedMesh } from "../../objects/InstancedMesh.js";
|
|
2
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
3
2
|
import InstanceNode from "./InstanceNode.js";
|
|
4
3
|
|
|
5
4
|
declare class InstancedMeshNode extends InstanceNode {
|
|
@@ -8,4 +7,4 @@ declare class InstancedMeshNode extends InstanceNode {
|
|
|
8
7
|
|
|
9
8
|
export default InstancedMeshNode;
|
|
10
9
|
|
|
11
|
-
export const instancedMesh: (instancedMesh: InstancedMesh) =>
|
|
10
|
+
export const instancedMesh: (instancedMesh: InstancedMesh) => InstancedMeshNode;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Light } from "../../lights/Light.js";
|
|
2
2
|
import Node from "../core/Node.js";
|
|
3
|
-
import { ShaderNodeObject } from "../tsl/TSLCore.js";
|
|
4
3
|
|
|
5
|
-
export function lightShadowMatrix(light: Light):
|
|
4
|
+
export function lightShadowMatrix(light: Light): Node;
|
|
6
5
|
|
|
7
|
-
export function lightProjectionUV(light: Light, position?: Node):
|
|
6
|
+
export function lightProjectionUV(light: Light, position?: Node): Node;
|
|
8
7
|
|
|
9
|
-
export function lightPosition(light: Light):
|
|
8
|
+
export function lightPosition(light: Light): Node;
|
|
10
9
|
|
|
11
|
-
export function lightTargetPosition(light: Light):
|
|
10
|
+
export function lightTargetPosition(light: Light): Node;
|
|
12
11
|
|
|
13
|
-
export function lightViewPosition(light: Light):
|
|
12
|
+
export function lightViewPosition(light: Light): Node;
|
|
14
13
|
|
|
15
|
-
export const lightTargetDirection: (light: Light) =>
|
|
14
|
+
export const lightTargetDirection: (light: Light) => Node;
|