@types/three 0.160.0 → 0.161.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.d.cts +1 -1
- three/build/three.module.d.ts +1 -1
- three/build/three.module.min.d.ts +1 -1
- three/examples/jsm/Addons.d.ts +269 -265
- three/examples/jsm/animation/AnimationClipCreator.d.ts +1 -1
- three/examples/jsm/animation/CCDIKSolver.d.ts +1 -1
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +5 -5
- three/examples/jsm/animation/MMDPhysics.d.ts +1 -1
- three/examples/jsm/cameras/CinematicCamera.d.ts +4 -4
- three/examples/jsm/capabilities/WebGPU.d.ts +2 -0
- three/examples/jsm/controls/ArcballControls.d.ts +8 -8
- 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/MapControls.d.ts +2 -2
- 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 +37 -37
- three/examples/jsm/csm/CSM.d.ts +3 -3
- three/examples/jsm/csm/CSMFrustum.d.ts +1 -1
- three/examples/jsm/csm/CSMHelper.d.ts +2 -2
- three/examples/jsm/curves/CurveExtras.d.ts +1 -1
- three/examples/jsm/curves/NURBSCurve.d.ts +1 -1
- three/examples/jsm/curves/NURBSSurface.d.ts +1 -1
- three/examples/jsm/curves/NURBSUtils.d.ts +137 -11
- three/examples/jsm/curves/NURBSVolume.d.ts +23 -0
- three/examples/jsm/deprecated/Geometry.d.ts +10 -11
- three/examples/jsm/effects/AnaglyphEffect.d.ts +1 -1
- three/examples/jsm/effects/AsciiEffect.d.ts +1 -1
- three/examples/jsm/effects/OutlineEffect.d.ts +1 -1
- three/examples/jsm/effects/ParallaxBarrierEffect.d.ts +1 -1
- three/examples/jsm/effects/PeppersGhostEffect.d.ts +1 -1
- three/examples/jsm/effects/StereoEffect.d.ts +1 -1
- three/examples/jsm/environments/DebugEnvironment.d.ts +1 -1
- three/examples/jsm/environments/RoomEnvironment.d.ts +1 -1
- three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
- three/examples/jsm/exporters/EXRExporter.d.ts +1 -1
- three/examples/jsm/exporters/GLTFExporter.d.ts +1 -1
- three/examples/jsm/exporters/KTX2Exporter.d.ts +1 -1
- three/examples/jsm/exporters/MMDExporter.d.ts +1 -1
- three/examples/jsm/exporters/OBJExporter.d.ts +1 -1
- three/examples/jsm/exporters/PLYExporter.d.ts +1 -1
- three/examples/jsm/exporters/STLExporter.d.ts +1 -1
- three/examples/jsm/exporters/USDZExporter.d.ts +2 -1
- three/examples/jsm/geometries/BoxLineGeometry.d.ts +1 -1
- three/examples/jsm/geometries/ConvexGeometry.d.ts +1 -1
- three/examples/jsm/geometries/DecalGeometry.d.ts +1 -1
- three/examples/jsm/geometries/ParametricGeometries.d.ts +2 -2
- three/examples/jsm/geometries/ParametricGeometry.d.ts +1 -1
- three/examples/jsm/geometries/RoundedBoxGeometry.d.ts +1 -1
- three/examples/jsm/geometries/SDFGeometryGenerator.d.ts +1 -1
- three/examples/jsm/geometries/TeapotGeometry.d.ts +1 -1
- three/examples/jsm/geometries/TextGeometry.d.ts +3 -3
- three/examples/jsm/helpers/LightProbeHelper.d.ts +1 -1
- three/examples/jsm/helpers/OctreeHelper.d.ts +3 -3
- three/examples/jsm/helpers/PositionalAudioHelper.d.ts +1 -1
- three/examples/jsm/helpers/RectAreaLightHelper.d.ts +1 -1
- three/examples/jsm/helpers/TextureHelper.d.ts +2 -2
- three/examples/jsm/helpers/VertexNormalsHelper.d.ts +1 -1
- three/examples/jsm/helpers/VertexTangentsHelper.d.ts +1 -1
- three/examples/jsm/helpers/ViewHelper.d.ts +1 -1
- three/examples/jsm/interactive/HTMLMesh.d.ts +1 -1
- three/examples/jsm/interactive/InteractiveGroup.d.ts +1 -1
- three/examples/jsm/interactive/SelectionBox.d.ts +1 -1
- three/examples/jsm/interactive/SelectionHelper.d.ts +1 -1
- three/examples/jsm/libs/fflate.module.d.ts +1 -1
- three/examples/jsm/libs/lil-gui.module.min.d.ts +26 -27
- three/examples/jsm/libs/meshopt_decoder.module.d.ts +1 -1
- three/examples/jsm/libs/stats.module.d.ts +1 -1
- three/examples/jsm/libs/tween.module.d.ts +7 -7
- three/examples/jsm/lights/IESSpotLight.d.ts +1 -1
- three/examples/jsm/lights/LightProbeGenerator.d.ts +1 -1
- three/examples/jsm/lines/Line2.d.ts +3 -3
- three/examples/jsm/lines/LineGeometry.d.ts +2 -2
- three/examples/jsm/lines/LineMaterial.d.ts +1 -1
- three/examples/jsm/lines/LineSegments2.d.ts +3 -3
- three/examples/jsm/lines/LineSegmentsGeometry.d.ts +1 -1
- three/examples/jsm/lines/Wireframe.d.ts +3 -3
- three/examples/jsm/lines/WireframeGeometry2.d.ts +2 -2
- three/examples/jsm/loaders/3DMLoader.d.ts +1 -1
- three/examples/jsm/loaders/3MFLoader.d.ts +1 -1
- three/examples/jsm/loaders/AMFLoader.d.ts +1 -1
- three/examples/jsm/loaders/BVHLoader.d.ts +1 -1
- three/examples/jsm/loaders/ColladaLoader.d.ts +1 -1
- three/examples/jsm/loaders/DDSLoader.d.ts +1 -1
- three/examples/jsm/loaders/DRACOLoader.d.ts +1 -1
- three/examples/jsm/loaders/EXRLoader.d.ts +1 -1
- three/examples/jsm/loaders/FBXLoader.d.ts +1 -1
- three/examples/jsm/loaders/FontLoader.d.ts +1 -1
- three/examples/jsm/loaders/GCodeLoader.d.ts +1 -1
- three/examples/jsm/loaders/GLTFLoader.d.ts +9 -8
- three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +2 -2
- three/examples/jsm/loaders/IESLoader.d.ts +1 -1
- three/examples/jsm/loaders/KMZLoader.d.ts +2 -2
- three/examples/jsm/loaders/KTX2Loader.d.ts +46 -6
- three/examples/jsm/loaders/KTXLoader.d.ts +1 -1
- three/examples/jsm/loaders/LDrawLoader.d.ts +1 -1
- three/examples/jsm/loaders/LUT3dlLoader.d.ts +29 -2
- three/examples/jsm/loaders/LUTCubeLoader.d.ts +37 -2
- three/examples/jsm/loaders/LWOLoader.d.ts +1 -1
- three/examples/jsm/loaders/LogLuvLoader.d.ts +1 -1
- three/examples/jsm/loaders/LottieLoader.d.ts +1 -1
- three/examples/jsm/loaders/MD2Loader.d.ts +1 -1
- three/examples/jsm/loaders/MDDLoader.d.ts +1 -1
- three/examples/jsm/loaders/MMDLoader.d.ts +1 -1
- three/examples/jsm/loaders/MTLLoader.d.ts +4 -4
- three/examples/jsm/loaders/MaterialXLoader.d.ts +2 -2
- three/examples/jsm/loaders/NRRDLoader.d.ts +2 -2
- three/examples/jsm/loaders/OBJLoader.d.ts +2 -2
- three/examples/jsm/loaders/PCDLoader.d.ts +1 -1
- three/examples/jsm/loaders/PDBLoader.d.ts +1 -1
- three/examples/jsm/loaders/PLYLoader.d.ts +1 -1
- three/examples/jsm/loaders/PVRLoader.d.ts +1 -1
- three/examples/jsm/loaders/RGBELoader.d.ts +1 -1
- three/examples/jsm/loaders/RGBMLoader.d.ts +1 -1
- three/examples/jsm/loaders/STLLoader.d.ts +1 -1
- three/examples/jsm/loaders/SVGLoader.d.ts +1 -1
- three/examples/jsm/loaders/TDSLoader.d.ts +1 -1
- three/examples/jsm/loaders/TGALoader.d.ts +1 -1
- three/examples/jsm/loaders/TIFFLoader.d.ts +1 -1
- three/examples/jsm/loaders/TTFLoader.d.ts +1 -1
- three/examples/jsm/loaders/TiltLoader.d.ts +1 -1
- three/examples/jsm/loaders/USDZLoader.d.ts +1 -1
- three/examples/jsm/loaders/VOXLoader.d.ts +1 -1
- three/examples/jsm/loaders/VRMLLoader.d.ts +1 -1
- three/examples/jsm/loaders/VTKLoader.d.ts +1 -1
- three/examples/jsm/loaders/XYZLoader.d.ts +1 -1
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +2 -3
- three/examples/jsm/materials/MeshPostProcessingMaterial.d.ts +13 -0
- three/examples/jsm/math/Capsule.d.ts +1 -1
- three/examples/jsm/math/ColorConverter.d.ts +1 -1
- three/examples/jsm/math/ConvexHull.d.ts +1 -1
- three/examples/jsm/math/Lut.d.ts +1 -1
- three/examples/jsm/math/MeshSurfaceSampler.d.ts +1 -1
- three/examples/jsm/math/OBB.d.ts +1 -1
- three/examples/jsm/math/Octree.d.ts +2 -2
- three/examples/jsm/misc/ConvexObjectBreaker.d.ts +1 -1
- three/examples/jsm/misc/GPUComputationRenderer.d.ts +9 -9
- three/examples/jsm/misc/Gyroscope.d.ts +1 -1
- three/examples/jsm/misc/MD2Character.d.ts +1 -1
- three/examples/jsm/misc/MD2CharacterComplex.d.ts +1 -1
- three/examples/jsm/misc/MorphAnimMesh.d.ts +1 -1
- three/examples/jsm/misc/MorphBlendMesh.d.ts +1 -1
- three/examples/jsm/misc/ProgressiveLightMap.d.ts +2 -2
- three/examples/jsm/misc/RollerCoaster.d.ts +1 -1
- three/examples/jsm/misc/TubePainter.d.ts +1 -1
- three/examples/jsm/misc/Volume.d.ts +3 -3
- three/examples/jsm/misc/VolumeSlice.d.ts +2 -2
- three/examples/jsm/modifiers/CurveModifier.d.ts +4 -4
- three/examples/jsm/modifiers/EdgeSplitModifier.d.ts +1 -1
- three/examples/jsm/modifiers/SimplifyModifier.d.ts +1 -1
- three/examples/jsm/modifiers/TessellateModifier.d.ts +1 -1
- three/examples/jsm/nodes/Nodes.d.ts +261 -196
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +7 -7
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +3 -3
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +19 -8
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +12 -6
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +3 -3
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +9 -9
- three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +4 -4
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +4 -2
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +3 -3
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +6 -6
- three/examples/jsm/nodes/accessors/Object3DNode.d.ts +15 -11
- three/examples/jsm/nodes/accessors/PointUVNode.d.ts +2 -2
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +8 -8
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +3 -3
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +3 -3
- three/examples/jsm/nodes/accessors/SkinningNode.d.ts +3 -3
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +3 -3
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +7 -7
- three/examples/jsm/nodes/accessors/TextureBicubicNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +15 -7
- three/examples/jsm/nodes/accessors/UVNode.d.ts +2 -2
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +3 -3
- three/examples/jsm/nodes/accessors/VertexColorNode.d.ts +12 -0
- three/examples/jsm/nodes/code/CodeNode.d.ts +4 -4
- three/examples/jsm/nodes/code/ExpressionNode.d.ts +3 -3
- three/examples/jsm/nodes/code/FunctionCallNode.d.ts +10 -4
- three/examples/jsm/nodes/code/FunctionNode.d.ts +8 -9
- three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +2 -2
- three/examples/jsm/nodes/core/AssignNode.d.ts +17 -0
- three/examples/jsm/nodes/core/AttributeNode.d.ts +4 -4
- three/examples/jsm/nodes/core/BypassNode.d.ts +8 -2
- three/examples/jsm/nodes/core/CacheNode.d.ts +11 -3
- three/examples/jsm/nodes/core/ConstNode.d.ts +3 -3
- three/examples/jsm/nodes/core/ContextNode.d.ts +11 -3
- three/examples/jsm/nodes/core/IndexNode.d.ts +18 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +4 -4
- three/examples/jsm/nodes/core/LightingModel.d.ts +36 -0
- three/examples/jsm/nodes/core/Node.d.ts +34 -10
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +34 -33
- three/examples/jsm/nodes/core/NodeCache.d.ts +2 -2
- three/examples/jsm/nodes/core/NodeFrame.d.ts +19 -7
- three/examples/jsm/nodes/core/NodeFunction.d.ts +1 -1
- three/examples/jsm/nodes/core/NodeKeywords.d.ts +2 -2
- three/examples/jsm/nodes/core/NodeParser.d.ts +1 -1
- three/examples/jsm/nodes/core/NodeUniform.d.ts +1 -1
- three/examples/jsm/nodes/core/NodeUtils.d.ts +2 -2
- three/examples/jsm/nodes/core/NodeVarying.d.ts +1 -1
- three/examples/jsm/nodes/core/PropertyNode.d.ts +22 -5
- three/examples/jsm/nodes/core/StackNode.d.ts +1 -1
- three/examples/jsm/nodes/core/TempNode.d.ts +3 -3
- three/examples/jsm/nodes/core/UniformNode.d.ts +5 -5
- three/examples/jsm/nodes/core/VarNode.d.ts +11 -5
- three/examples/jsm/nodes/core/VaryingNode.d.ts +8 -2
- three/examples/jsm/nodes/core/constants.d.ts +57 -58
- three/examples/jsm/nodes/display/AfterImageNode.d.ts +25 -0
- three/examples/jsm/nodes/display/AnamorphicNode.d.ts +32 -0
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +21 -11
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +17 -6
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +21 -8
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +2 -2
- three/examples/jsm/nodes/display/GaussianBlurNode.d.ts +28 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +11 -5
- three/examples/jsm/nodes/display/PassNode.d.ts +44 -0
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -2
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +4 -4
- three/examples/jsm/nodes/display/ViewportDepthNode.d.ts +32 -0
- three/examples/jsm/nodes/display/ViewportNode.d.ts +8 -8
- three/examples/jsm/nodes/display/ViewportSharedTextureNode.d.ts +18 -0
- three/examples/jsm/nodes/display/ViewportTextureNode.d.ts +33 -0
- three/examples/jsm/nodes/fog/FogExp2Node.d.ts +9 -3
- three/examples/jsm/nodes/fog/FogNode.d.ts +8 -2
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +9 -3
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +10 -3
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +4 -3
- three/examples/jsm/nodes/functions/BSDF/BRDF_Sheen.d.ts +7 -0
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +4 -3
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +4 -3
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +4 -3
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +2 -2
- three/examples/jsm/nodes/functions/PhongLightingModel.d.ts +7 -0
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +18 -9
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +1 -1
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +2 -2
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +4 -4
- three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +8 -2
- three/examples/jsm/nodes/lighting/AONode.d.ts +2 -2
- three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +3 -3
- three/examples/jsm/nodes/lighting/EnvironmentNode.d.ts +2 -2
- three/examples/jsm/nodes/lighting/HemisphereLightNode.d.ts +4 -4
- three/examples/jsm/nodes/lighting/LightUtils.d.ts +2 -2
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +22 -15
- three/examples/jsm/nodes/lighting/LightingNode.d.ts +1 -1
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +6 -6
- three/examples/jsm/nodes/lighting/PointLightNode.d.ts +3 -3
- three/examples/jsm/nodes/lighting/SpotLightNode.d.ts +3 -3
- three/examples/jsm/nodes/loaders/NodeLoader.d.ts +2 -2
- three/examples/jsm/nodes/loaders/NodeMaterialLoader.d.ts +2 -2
- three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +3 -3
- three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +3 -4
- three/examples/jsm/nodes/materials/Materials.d.ts +9 -17
- three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +4 -6
- three/examples/jsm/nodes/materials/MeshPhongNodeMaterial.d.ts +12 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +6 -10
- three/examples/jsm/nodes/materials/MeshSSSNodeMaterial.d.ts +17 -0
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +4 -5
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +39 -23
- three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +5 -11
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +4 -14
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +4 -4
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +3 -3
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +3 -3
- three/examples/jsm/nodes/math/CondNode.d.ts +8 -2
- three/examples/jsm/nodes/math/HashNode.d.ts +16 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +65 -59
- three/examples/jsm/nodes/math/MathUtils.d.ts +16 -0
- three/examples/jsm/nodes/math/OperatorNode.d.ts +27 -26
- three/examples/jsm/nodes/math/TriNoise3D.d.ts +12 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +8 -2
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +100 -50
- three/examples/jsm/nodes/utils/ArrayElementNode.d.ts +2 -2
- three/examples/jsm/nodes/utils/ConvertNode.d.ts +2 -2
- three/examples/jsm/nodes/utils/DiscardNode.d.ts +16 -0
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +2 -2
- three/examples/jsm/nodes/utils/JoinNode.d.ts +2 -2
- three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +2 -2
- three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +4 -4
- three/examples/jsm/nodes/utils/OscNode.d.ts +6 -6
- three/examples/jsm/nodes/utils/ReflectorNode.d.ts +30 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +24 -5
- three/examples/jsm/nodes/utils/RotateNode.d.ts +21 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +9 -3
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +3 -3
- three/examples/jsm/nodes/utils/SplitNode.d.ts +2 -3
- three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +2 -2
- three/examples/jsm/nodes/utils/TimerNode.d.ts +6 -6
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +10 -4
- three/examples/jsm/objects/GroundedSkybox.d.ts +5 -0
- three/examples/jsm/objects/Lensflare.d.ts +1 -1
- three/examples/jsm/objects/MarchingCubes.d.ts +1 -1
- three/examples/jsm/objects/QuadMesh.d.ts +5 -3
- three/examples/jsm/objects/Reflector.d.ts +4 -4
- three/examples/jsm/objects/ReflectorForSSRPass.d.ts +8 -8
- three/examples/jsm/objects/Refractor.d.ts +5 -5
- three/examples/jsm/objects/ShadowMesh.d.ts +1 -1
- three/examples/jsm/objects/Sky.d.ts +1 -1
- three/examples/jsm/objects/Water.d.ts +1 -1
- three/examples/jsm/objects/Water2.d.ts +1 -1
- three/examples/jsm/physics/AmmoPhysics.d.ts +1 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +1 -1
- three/examples/jsm/postprocessing/AfterimagePass.d.ts +2 -2
- three/examples/jsm/postprocessing/BloomPass.d.ts +2 -2
- three/examples/jsm/postprocessing/BokehPass.d.ts +2 -2
- three/examples/jsm/postprocessing/ClearPass.d.ts +2 -2
- three/examples/jsm/postprocessing/CubeTexturePass.d.ts +2 -2
- three/examples/jsm/postprocessing/DotScreenPass.d.ts +2 -2
- three/examples/jsm/postprocessing/EffectComposer.d.ts +4 -4
- three/examples/jsm/postprocessing/FilmPass.d.ts +2 -2
- three/examples/jsm/postprocessing/GTAOPass.d.ts +5 -2
- three/examples/jsm/postprocessing/GlitchPass.d.ts +2 -2
- three/examples/jsm/postprocessing/HalftonePass.d.ts +2 -2
- three/examples/jsm/postprocessing/LUTPass.d.ts +2 -2
- three/examples/jsm/postprocessing/MaskPass.d.ts +2 -2
- three/examples/jsm/postprocessing/OutlinePass.d.ts +6 -6
- three/examples/jsm/postprocessing/OutputPass.d.ts +2 -2
- three/examples/jsm/postprocessing/Pass.d.ts +1 -1
- three/examples/jsm/postprocessing/RenderPass.d.ts +2 -2
- three/examples/jsm/postprocessing/RenderPixelatedPass.d.ts +4 -4
- three/examples/jsm/postprocessing/SAOPass.d.ts +5 -5
- three/examples/jsm/postprocessing/SMAAPass.d.ts +2 -2
- three/examples/jsm/postprocessing/SSAARenderPass.d.ts +2 -2
- three/examples/jsm/postprocessing/SSAOPass.d.ts +4 -4
- three/examples/jsm/postprocessing/SSRPass.d.ts +10 -10
- three/examples/jsm/postprocessing/SavePass.d.ts +2 -2
- three/examples/jsm/postprocessing/ShaderPass.d.ts +2 -2
- three/examples/jsm/postprocessing/TAARenderPass.d.ts +2 -2
- three/examples/jsm/postprocessing/TexturePass.d.ts +2 -2
- three/examples/jsm/postprocessing/UnrealBloomPass.d.ts +2 -2
- three/examples/jsm/renderers/CSS2DRenderer.d.ts +1 -1
- three/examples/jsm/renderers/CSS3DRenderer.d.ts +1 -1
- three/examples/jsm/renderers/Projector.d.ts +1 -1
- three/examples/jsm/renderers/SVGRenderer.d.ts +1 -1
- three/examples/jsm/renderers/common/Backend.d.ts +8 -4
- three/examples/jsm/renderers/common/Color4.d.ts +9 -0
- three/examples/jsm/renderers/common/Info.d.ts +8 -2
- three/examples/jsm/renderers/common/PostProcessing.d.ts +11 -0
- three/examples/jsm/renderers/common/Renderer.d.ts +245 -6
- three/examples/jsm/renderers/common/StorageTexture.d.ts +5 -0
- three/examples/jsm/renderers/webgl/WebGLBackend.d.ts +5 -3
- three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +2 -2
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +7 -7
- three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +1 -1
- three/examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.d.ts +1 -1
- three/examples/jsm/renderers/webgpu/WebGPUBackend.d.ts +16 -7
- three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +7 -7
- three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +1 -1
- three/examples/jsm/shaders/AfterimageShader.d.ts +1 -1
- three/examples/jsm/shaders/BleachBypassShader.d.ts +1 -1
- three/examples/jsm/shaders/BlendShader.d.ts +1 -1
- three/examples/jsm/shaders/BokehShader.d.ts +1 -1
- three/examples/jsm/shaders/BokehShader2.d.ts +1 -1
- three/examples/jsm/shaders/BrightnessContrastShader.d.ts +1 -1
- three/examples/jsm/shaders/ColorCorrectionShader.d.ts +1 -1
- three/examples/jsm/shaders/ColorifyShader.d.ts +1 -1
- three/examples/jsm/shaders/ConvolutionShader.d.ts +1 -1
- three/examples/jsm/shaders/CopyShader.d.ts +1 -1
- three/examples/jsm/shaders/DOFMipMapShader.d.ts +1 -1
- three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +1 -1
- three/examples/jsm/shaders/DigitalGlitch.d.ts +1 -1
- three/examples/jsm/shaders/DotScreenShader.d.ts +1 -1
- three/examples/jsm/shaders/ExposureShader.d.ts +2 -2
- three/examples/jsm/shaders/FXAAShader.d.ts +1 -1
- three/examples/jsm/shaders/FilmShader.d.ts +1 -1
- three/examples/jsm/shaders/FocusShader.d.ts +1 -1
- three/examples/jsm/shaders/FreiChenShader.d.ts +1 -1
- three/examples/jsm/shaders/GTAOShader.d.ts +1 -1
- three/examples/jsm/shaders/GammaCorrectionShader.d.ts +1 -1
- three/examples/jsm/shaders/GodRaysShader.d.ts +1 -1
- three/examples/jsm/shaders/HalftoneShader.d.ts +1 -1
- three/examples/jsm/shaders/HorizontalBlurShader.d.ts +1 -1
- three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +1 -1
- three/examples/jsm/shaders/HueSaturationShader.d.ts +1 -1
- three/examples/jsm/shaders/KaleidoShader.d.ts +1 -1
- three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +1 -1
- three/examples/jsm/shaders/LuminosityShader.d.ts +1 -1
- three/examples/jsm/shaders/MMDToonShader.d.ts +1 -1
- three/examples/jsm/shaders/MirrorShader.d.ts +1 -1
- three/examples/jsm/shaders/NormalMapShader.d.ts +1 -1
- three/examples/jsm/shaders/OutputShader.d.ts +1 -1
- three/examples/jsm/shaders/PoissonDenoiseShader.d.ts +1 -1
- three/examples/jsm/shaders/RGBShiftShader.d.ts +1 -1
- three/examples/jsm/shaders/SAOShader.d.ts +1 -1
- three/examples/jsm/shaders/SMAAShader.d.ts +1 -1
- three/examples/jsm/shaders/SSAOShader.d.ts +1 -1
- three/examples/jsm/shaders/SSRShader.d.ts +1 -1
- three/examples/jsm/shaders/SepiaShader.d.ts +1 -1
- three/examples/jsm/shaders/SobelOperatorShader.d.ts +1 -1
- three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +1 -1
- three/examples/jsm/shaders/TechnicolorShader.d.ts +1 -1
- three/examples/jsm/shaders/ToonShader.d.ts +1 -1
- three/examples/jsm/shaders/TriangleBlurShader.d.ts +1 -1
- three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +1 -1
- three/examples/jsm/shaders/VelocityShader.d.ts +5 -3
- three/examples/jsm/shaders/VerticalBlurShader.d.ts +1 -1
- three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +1 -1
- three/examples/jsm/shaders/VignetteShader.d.ts +1 -1
- three/examples/jsm/shaders/VolumeShader.d.ts +1 -1
- three/examples/jsm/shaders/WaterRefractionShader.d.ts +1 -1
- three/examples/jsm/transpiler/GLSLDecoder.d.ts +1 -1
- three/examples/jsm/transpiler/ShaderToyDecoder.d.ts +1 -1
- three/examples/jsm/transpiler/TSLEncoder.d.ts +1 -1
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +3 -13
- three/examples/jsm/utils/CameraUtils.d.ts +1 -1
- three/examples/jsm/utils/GPUStatsPanel.d.ts +1 -1
- three/examples/jsm/utils/GeometryCompressionUtils.d.ts +1 -1
- three/examples/jsm/utils/GeometryUtils.d.ts +1 -1
- three/examples/jsm/utils/LDrawUtils.d.ts +1 -1
- three/examples/jsm/utils/PackedPhongMaterial.d.ts +1 -1
- three/examples/jsm/utils/SceneUtils.d.ts +1 -1
- three/examples/jsm/utils/ShadowMapViewer.d.ts +1 -1
- three/examples/jsm/utils/SkeletonUtils.d.ts +1 -1
- three/examples/jsm/utils/TextureUtils.d.ts +1 -1
- three/examples/jsm/utils/UVsDebug.d.ts +1 -1
- three/examples/jsm/webxr/ARButton.d.ts +1 -1
- three/examples/jsm/webxr/OculusHandModel.d.ts +2 -2
- three/examples/jsm/webxr/OculusHandPointerModel.d.ts +3 -3
- three/examples/jsm/webxr/Text2D.d.ts +1 -1
- three/examples/jsm/webxr/VRButton.d.ts +1 -1
- three/examples/jsm/webxr/XRButton.d.ts +1 -1
- three/examples/jsm/webxr/XRControllerModelFactory.d.ts +6 -5
- three/examples/jsm/webxr/XREstimatedLight.d.ts +1 -1
- three/examples/jsm/webxr/XRHandMeshModel.d.ts +10 -2
- three/examples/jsm/webxr/XRHandModelFactory.d.ts +5 -5
- three/examples/jsm/webxr/XRHandPrimitiveModel.d.ts +3 -3
- three/examples/jsm/webxr/XRPlanes.d.ts +1 -1
- three/index.d.ts +1 -1
- three/package.json +2 -2
- three/src/Three.d.ts +187 -187
- three/src/animation/AnimationAction.d.ts +4 -4
- three/src/animation/AnimationClip.d.ts +4 -4
- three/src/animation/AnimationMixer.d.ts +6 -6
- three/src/animation/AnimationUtils.d.ts +1 -1
- three/src/animation/KeyframeTrack.d.ts +5 -5
- three/src/animation/tracks/BooleanKeyframeTrack.d.ts +1 -1
- three/src/animation/tracks/ColorKeyframeTrack.d.ts +2 -2
- three/src/animation/tracks/NumberKeyframeTrack.d.ts +2 -2
- three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +2 -2
- three/src/animation/tracks/StringKeyframeTrack.d.ts +2 -2
- three/src/animation/tracks/VectorKeyframeTrack.d.ts +2 -2
- three/src/audio/Audio.d.ts +4 -4
- three/src/audio/AudioAnalyser.d.ts +1 -1
- three/src/audio/AudioListener.d.ts +3 -3
- three/src/audio/PositionalAudio.d.ts +2 -2
- three/src/cameras/ArrayCamera.d.ts +1 -1
- three/src/cameras/Camera.d.ts +6 -6
- three/src/cameras/CubeCamera.d.ts +5 -5
- three/src/cameras/OrthographicCamera.d.ts +2 -2
- three/src/cameras/PerspectiveCamera.d.ts +15 -2
- three/src/cameras/StereoCamera.d.ts +3 -3
- three/src/constants.d.ts +75 -76
- three/src/core/BufferAttribute.d.ts +3 -3
- three/src/core/BufferGeometry.d.ts +11 -11
- three/src/core/InstancedBufferAttribute.d.ts +1 -1
- three/src/core/InstancedBufferGeometry.d.ts +1 -2
- three/src/core/InstancedInterleavedBuffer.d.ts +2 -2
- three/src/core/InterleavedBuffer.d.ts +3 -3
- three/src/core/InterleavedBufferAttribute.d.ts +16 -6
- three/src/core/Object3D.d.ts +29 -29
- three/src/core/Raycaster.d.ts +6 -6
- three/src/core/RenderTarget.d.ts +10 -10
- three/src/core/UniformsGroup.d.ts +3 -3
- three/src/extras/ImageUtils.d.ts +5 -5
- three/src/extras/PMREMGenerator.d.ts +5 -5
- three/src/extras/core/Curve.d.ts +11 -11
- three/src/extras/core/CurvePath.d.ts +10 -9
- three/src/extras/core/Interpolations.d.ts +1 -1
- three/src/extras/core/Path.d.ts +3 -3
- three/src/extras/core/Shape.d.ts +3 -3
- three/src/extras/core/ShapePath.d.ts +5 -5
- three/src/extras/curves/ArcCurve.d.ts +2 -2
- three/src/extras/curves/CatmullRomCurve3.d.ts +4 -4
- three/src/extras/curves/CubicBezierCurve.d.ts +3 -3
- three/src/extras/curves/CubicBezierCurve3.d.ts +3 -3
- three/src/extras/curves/Curves.d.ts +10 -10
- three/src/extras/curves/EllipseCurve.d.ts +3 -3
- three/src/extras/curves/LineCurve.d.ts +3 -3
- three/src/extras/curves/LineCurve3.d.ts +3 -3
- three/src/extras/curves/QuadraticBezierCurve.d.ts +3 -3
- three/src/extras/curves/QuadraticBezierCurve3.d.ts +3 -3
- three/src/extras/curves/SplineCurve.d.ts +3 -3
- three/src/geometries/BoxGeometry.d.ts +2 -2
- three/src/geometries/CapsuleGeometry.d.ts +2 -2
- three/src/geometries/CircleGeometry.d.ts +2 -2
- three/src/geometries/ConeGeometry.d.ts +2 -2
- three/src/geometries/CylinderGeometry.d.ts +2 -2
- three/src/geometries/DodecahedronGeometry.d.ts +2 -2
- three/src/geometries/EdgesGeometry.d.ts +2 -2
- three/src/geometries/ExtrudeGeometry.d.ts +6 -6
- three/src/geometries/Geometries.d.ts +21 -21
- three/src/geometries/IcosahedronGeometry.d.ts +2 -2
- three/src/geometries/LatheGeometry.d.ts +3 -3
- three/src/geometries/OctahedronGeometry.d.ts +2 -2
- three/src/geometries/PlaneGeometry.d.ts +2 -2
- three/src/geometries/PolyhedronGeometry.d.ts +2 -2
- three/src/geometries/RingGeometry.d.ts +3 -3
- three/src/geometries/ShapeGeometry.d.ts +3 -3
- three/src/geometries/SphereGeometry.d.ts +2 -2
- three/src/geometries/TetrahedronGeometry.d.ts +2 -2
- three/src/geometries/TorusGeometry.d.ts +2 -2
- three/src/geometries/TorusKnotGeometry.d.ts +2 -2
- three/src/geometries/TubeGeometry.d.ts +4 -4
- three/src/geometries/WireframeGeometry.d.ts +2 -2
- three/src/helpers/ArrowHelper.d.ts +6 -6
- three/src/helpers/AxesHelper.d.ts +3 -3
- three/src/helpers/Box3Helper.d.ts +4 -4
- three/src/helpers/BoxHelper.d.ts +6 -6
- three/src/helpers/CameraHelper.d.ts +5 -5
- three/src/helpers/DirectionalLightHelper.d.ts +6 -6
- three/src/helpers/GridHelper.d.ts +5 -5
- three/src/helpers/HemisphereLightHelper.d.ts +6 -6
- three/src/helpers/PlaneHelper.d.ts +3 -3
- three/src/helpers/PointLightHelper.d.ts +5 -5
- three/src/helpers/PolarGridHelper.d.ts +3 -3
- three/src/helpers/SkeletonHelper.d.ts +6 -6
- three/src/helpers/SpotLightHelper.d.ts +6 -6
- three/src/lights/AmbientLight.d.ts +3 -3
- three/src/lights/DirectionalLight.d.ts +6 -6
- three/src/lights/DirectionalLightShadow.d.ts +2 -2
- three/src/lights/HemisphereLight.d.ts +4 -4
- three/src/lights/Light.d.ts +4 -4
- three/src/lights/LightProbe.d.ts +2 -2
- three/src/lights/LightShadow.d.ts +7 -7
- three/src/lights/PointLight.d.ts +3 -3
- three/src/lights/PointLightShadow.d.ts +3 -3
- three/src/lights/RectAreaLight.d.ts +3 -3
- three/src/lights/SpotLight.d.ts +7 -7
- three/src/lights/SpotLightShadow.d.ts +2 -2
- three/src/loaders/AnimationLoader.d.ts +3 -3
- three/src/loaders/AudioLoader.d.ts +2 -2
- three/src/loaders/BufferGeometryLoader.d.ts +4 -4
- three/src/loaders/CompressedTextureLoader.d.ts +3 -3
- three/src/loaders/CubeTextureLoader.d.ts +3 -3
- three/src/loaders/DataTextureLoader.d.ts +3 -3
- three/src/loaders/FileLoader.d.ts +2 -2
- three/src/loaders/ImageBitmapLoader.d.ts +2 -2
- three/src/loaders/ImageLoader.d.ts +2 -2
- three/src/loaders/Loader.d.ts +1 -1
- three/src/loaders/LoadingManager.d.ts +1 -1
- three/src/loaders/MaterialLoader.d.ts +4 -4
- three/src/loaders/ObjectLoader.d.ts +9 -9
- three/src/loaders/TextureLoader.d.ts +3 -3
- three/src/materials/LineBasicMaterial.d.ts +3 -3
- three/src/materials/LineDashedMaterial.d.ts +1 -1
- three/src/materials/Material.d.ts +13 -11
- three/src/materials/Materials.d.ts +18 -18
- three/src/materials/MeshBasicMaterial.d.ts +4 -4
- three/src/materials/MeshDepthMaterial.d.ts +3 -3
- three/src/materials/MeshDistanceMaterial.d.ts +3 -3
- three/src/materials/MeshLambertMaterial.d.ts +5 -5
- three/src/materials/MeshMatcapMaterial.d.ts +5 -5
- three/src/materials/MeshNormalMaterial.d.ts +4 -4
- three/src/materials/MeshPhongMaterial.d.ts +5 -5
- three/src/materials/MeshPhysicalMaterial.d.ts +4 -4
- three/src/materials/MeshStandardMaterial.d.ts +5 -5
- three/src/materials/MeshToonMaterial.d.ts +5 -5
- three/src/materials/PointsMaterial.d.ts +3 -3
- three/src/materials/RawShaderMaterial.d.ts +2 -2
- three/src/materials/ShaderMaterial.d.ts +18 -10
- three/src/materials/ShadowMaterial.d.ts +2 -2
- three/src/materials/SpriteMaterial.d.ts +3 -3
- three/src/math/Box2.d.ts +1 -1
- three/src/math/Box3.d.ts +7 -7
- three/src/math/Color.d.ts +7 -7
- three/src/math/ColorManagement.d.ts +2 -2
- three/src/math/Cylindrical.d.ts +1 -1
- three/src/math/Euler.d.ts +5 -5
- three/src/math/Frustum.d.ts +8 -8
- three/src/math/Line3.d.ts +2 -2
- three/src/math/MathUtils.d.ts +1 -1
- three/src/math/Matrix3.d.ts +3 -3
- three/src/math/Matrix4.d.ts +5 -5
- three/src/math/Plane.d.ts +6 -6
- three/src/math/Quaternion.d.ts +31 -34
- three/src/math/Ray.d.ts +5 -5
- three/src/math/Sphere.d.ts +4 -4
- three/src/math/Spherical.d.ts +1 -1
- three/src/math/SphericalHarmonics3.d.ts +1 -1
- three/src/math/Triangle.d.ts +7 -24
- three/src/math/Vector2.d.ts +26 -161
- three/src/math/Vector3.d.ts +54 -62
- three/src/math/Vector4.d.ts +27 -22
- three/src/math/interpolants/CubicInterpolant.d.ts +1 -1
- three/src/math/interpolants/DiscreteInterpolant.d.ts +1 -1
- three/src/math/interpolants/LinearInterpolant.d.ts +1 -1
- three/src/math/interpolants/QuaternionLinearInterpolant.d.ts +1 -1
- three/src/objects/BatchedMesh.d.ts +9 -10
- three/src/objects/Bone.d.ts +3 -3
- three/src/objects/Group.d.ts +2 -2
- three/src/objects/InstancedMesh.d.ts +11 -10
- three/src/objects/LOD.d.ts +4 -4
- three/src/objects/Line.d.ts +6 -5
- three/src/objects/LineLoop.d.ts +7 -5
- three/src/objects/LineSegments.d.ts +7 -5
- three/src/objects/Mesh.d.ts +5 -6
- three/src/objects/Points.d.ts +9 -9
- three/src/objects/Skeleton.d.ts +3 -3
- three/src/objects/SkinnedMesh.d.ts +13 -16
- three/src/objects/Sprite.d.ts +6 -6
- three/src/renderers/WebGL1Renderer.d.ts +1 -1
- three/src/renderers/WebGL3DRenderTarget.d.ts +2 -2
- three/src/renderers/WebGLArrayRenderTarget.d.ts +2 -2
- three/src/renderers/WebGLCubeRenderTarget.d.ts +4 -4
- three/src/renderers/WebGLMultipleRenderTargets.d.ts +2 -2
- three/src/renderers/WebGLRenderTarget.d.ts +2 -2
- three/src/renderers/WebGLRenderer.d.ts +34 -34
- three/src/renderers/shaders/ShaderLib.d.ts +1 -1
- three/src/renderers/shaders/UniformsLib.d.ts +3 -3
- three/src/renderers/shaders/UniformsUtils.d.ts +3 -3
- three/src/renderers/webgl/WebGLAttributes.d.ts +10 -10
- three/src/renderers/webgl/WebGLBindingStates.d.ts +8 -8
- three/src/renderers/webgl/WebGLBufferRenderer.d.ts +3 -3
- three/src/renderers/webgl/WebGLClipping.d.ts +4 -4
- three/src/renderers/webgl/WebGLCubeMaps.d.ts +1 -1
- three/src/renderers/webgl/WebGLCubeUVMaps.d.ts +1 -1
- three/src/renderers/webgl/WebGLExtensions.d.ts +1 -1
- three/src/renderers/webgl/WebGLGeometries.d.ts +5 -5
- three/src/renderers/webgl/WebGLInfo.d.ts +1 -1
- three/src/renderers/webgl/WebGLLights.d.ts +2 -2
- three/src/renderers/webgl/WebGLProgram.d.ts +2 -3
- three/src/renderers/webgl/WebGLPrograms.d.ts +18 -16
- three/src/renderers/webgl/WebGLRenderLists.d.ts +8 -8
- three/src/renderers/webgl/WebGLShadowMap.d.ts +7 -7
- three/src/renderers/webgl/WebGLState.d.ts +8 -8
- three/src/renderers/webgl/WebGLTextures.d.ts +6 -6
- three/src/renderers/webgl/WebGLUniforms.d.ts +2 -2
- three/src/renderers/webgl/WebGLUniformsGroups.d.ts +5 -5
- three/src/renderers/webgl/WebGLUtils.d.ts +1 -1
- three/src/renderers/webxr/WebXRController.d.ts +4 -4
- three/src/renderers/webxr/WebXRDepthSensing.d.ts +27 -0
- three/src/renderers/webxr/WebXRManager.d.ts +8 -7
- three/src/scenes/Fog.d.ts +1 -1
- three/src/scenes/FogExp2.d.ts +2 -2
- three/src/scenes/Scene.d.ts +7 -7
- three/src/textures/CanvasTexture.d.ts +5 -5
- three/src/textures/CompressedArrayTexture.d.ts +2 -2
- three/src/textures/CompressedCubeTexture.d.ts +2 -2
- three/src/textures/CompressedTexture.d.ts +6 -6
- three/src/textures/CubeTexture.d.ts +7 -7
- three/src/textures/Data3DTexture.d.ts +3 -3
- three/src/textures/DataArrayTexture.d.ts +4 -4
- three/src/textures/DataTexture.d.ts +7 -7
- three/src/textures/DepthTexture.d.ts +5 -5
- three/src/textures/FramebufferTexture.d.ts +2 -2
- three/src/textures/Source.d.ts +11 -1
- three/src/textures/Texture.d.ts +11 -11
- three/src/textures/VideoTexture.d.ts +5 -5
- three/build/three.d.ts +0 -2
- three/build/three.min.d.ts +0 -2
- three/examples/jsm/objects/GroundProjectedSkybox.d.ts +0 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Node from
|
|
2
|
-
import TempNode from
|
|
3
|
-
import { NodeRepresentation, ShaderNodeObject } from
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import TempNode from "../core/TempNode.js";
|
|
3
|
+
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
4
|
|
|
5
5
|
export type MathNodeMethod1 =
|
|
6
6
|
| typeof MathNode.RADIANS
|
|
@@ -59,58 +59,58 @@ export type MathNodeMethod = MathNodeMethod1 | MathNodeMethod2 | MathNodeMethod3
|
|
|
59
59
|
export default class MathNode extends TempNode {
|
|
60
60
|
// 1 input
|
|
61
61
|
|
|
62
|
-
static RADIANS:
|
|
63
|
-
static DEGREES:
|
|
64
|
-
static EXP:
|
|
65
|
-
static EXP2:
|
|
66
|
-
static LOG:
|
|
67
|
-
static LOG2:
|
|
68
|
-
static SQRT:
|
|
69
|
-
static INVERSE_SQRT:
|
|
70
|
-
static FLOOR:
|
|
71
|
-
static CEIL:
|
|
72
|
-
static NORMALIZE:
|
|
73
|
-
static FRACT:
|
|
74
|
-
static SIN:
|
|
75
|
-
static COS:
|
|
76
|
-
static TAN:
|
|
77
|
-
static ASIN:
|
|
78
|
-
static ACOS:
|
|
79
|
-
static ATAN:
|
|
80
|
-
static ABS:
|
|
81
|
-
static SIGN:
|
|
82
|
-
static LENGTH:
|
|
83
|
-
static NEGATE:
|
|
84
|
-
static ONE_MINUS:
|
|
85
|
-
static DFDX:
|
|
86
|
-
static DFDY:
|
|
87
|
-
static ROUND:
|
|
88
|
-
static RECIPROCAL:
|
|
89
|
-
static TRUNC:
|
|
90
|
-
static FWIDTH:
|
|
91
|
-
static BITCAST:
|
|
62
|
+
static RADIANS: "radians";
|
|
63
|
+
static DEGREES: "degrees";
|
|
64
|
+
static EXP: "exp";
|
|
65
|
+
static EXP2: "exp2";
|
|
66
|
+
static LOG: "log";
|
|
67
|
+
static LOG2: "log2";
|
|
68
|
+
static SQRT: "sqrt";
|
|
69
|
+
static INVERSE_SQRT: "inversesqrt";
|
|
70
|
+
static FLOOR: "floor";
|
|
71
|
+
static CEIL: "ceil";
|
|
72
|
+
static NORMALIZE: "normalize";
|
|
73
|
+
static FRACT: "fract";
|
|
74
|
+
static SIN: "sin";
|
|
75
|
+
static COS: "cos";
|
|
76
|
+
static TAN: "tan";
|
|
77
|
+
static ASIN: "asin";
|
|
78
|
+
static ACOS: "acos";
|
|
79
|
+
static ATAN: "atan";
|
|
80
|
+
static ABS: "abs";
|
|
81
|
+
static SIGN: "sign";
|
|
82
|
+
static LENGTH: "length";
|
|
83
|
+
static NEGATE: "negate";
|
|
84
|
+
static ONE_MINUS: "oneMinus";
|
|
85
|
+
static DFDX: "dFdx";
|
|
86
|
+
static DFDY: "dFdy";
|
|
87
|
+
static ROUND: "round";
|
|
88
|
+
static RECIPROCAL: "reciprocal";
|
|
89
|
+
static TRUNC: "trunc";
|
|
90
|
+
static FWIDTH: "fwidth";
|
|
91
|
+
static BITCAST: "bitcast";
|
|
92
92
|
|
|
93
93
|
// 2 inputs
|
|
94
94
|
|
|
95
|
-
static ATAN2:
|
|
96
|
-
static MIN:
|
|
97
|
-
static MAX:
|
|
98
|
-
static MOD:
|
|
99
|
-
static STEP:
|
|
100
|
-
static REFLECT:
|
|
101
|
-
static DISTANCE:
|
|
102
|
-
static DOT:
|
|
103
|
-
static CROSS:
|
|
104
|
-
static POW:
|
|
105
|
-
static TRANSFORM_DIRECTION:
|
|
95
|
+
static ATAN2: "atan2";
|
|
96
|
+
static MIN: "min";
|
|
97
|
+
static MAX: "max";
|
|
98
|
+
static MOD: "mod";
|
|
99
|
+
static STEP: "step";
|
|
100
|
+
static REFLECT: "reflect";
|
|
101
|
+
static DISTANCE: "distance";
|
|
102
|
+
static DOT: "dot";
|
|
103
|
+
static CROSS: "cross";
|
|
104
|
+
static POW: "pow";
|
|
105
|
+
static TRANSFORM_DIRECTION: "transformDirection";
|
|
106
106
|
|
|
107
107
|
// 3 inputs
|
|
108
108
|
|
|
109
|
-
static MIX:
|
|
110
|
-
static CLAMP:
|
|
111
|
-
static REFRACT:
|
|
112
|
-
static SMOOTHSTEP:
|
|
113
|
-
static FACEFORWARD:
|
|
109
|
+
static MIX: "mix";
|
|
110
|
+
static CLAMP: "clamp";
|
|
111
|
+
static REFRACT: "refract";
|
|
112
|
+
static SMOOTHSTEP: "smoothstep";
|
|
113
|
+
static FACEFORWARD: "faceforward";
|
|
114
114
|
|
|
115
115
|
method: MathNodeMethod;
|
|
116
116
|
aNode: Node;
|
|
@@ -124,8 +124,10 @@ export default class MathNode extends TempNode {
|
|
|
124
124
|
|
|
125
125
|
export const EPSILON: ShaderNodeObject<Node>;
|
|
126
126
|
export const INFINITY: ShaderNodeObject<Node>;
|
|
127
|
+
export const PI: ShaderNodeObject<Node>;
|
|
128
|
+
export const PI2: ShaderNodeObject<Node>;
|
|
127
129
|
|
|
128
|
-
|
|
130
|
+
type Unary = (a: NodeRepresentation) => ShaderNodeObject<MathNode>;
|
|
129
131
|
|
|
130
132
|
export const radians: Unary;
|
|
131
133
|
export const degrees: Unary;
|
|
@@ -158,7 +160,7 @@ export const trunc: Unary;
|
|
|
158
160
|
export const fwidth: Unary;
|
|
159
161
|
export const bitcast: Unary;
|
|
160
162
|
|
|
161
|
-
|
|
163
|
+
type Binary = (a: NodeRepresentation, b: NodeRepresentation) => ShaderNodeObject<MathNode>;
|
|
162
164
|
|
|
163
165
|
export const atan2: Binary;
|
|
164
166
|
export const min: Binary;
|
|
@@ -176,15 +178,17 @@ export const pow3: Binary;
|
|
|
176
178
|
export const pow4: Binary;
|
|
177
179
|
export const transformDirection: Binary;
|
|
178
180
|
|
|
179
|
-
|
|
180
|
-
a: NodeRepresentation,
|
|
181
|
-
b: NodeRepresentation,
|
|
182
|
-
c: NodeRepresentation,
|
|
183
|
-
) => ShaderNodeObject<MathNode>;
|
|
181
|
+
type Ternary = (a: NodeRepresentation, b: NodeRepresentation, c: NodeRepresentation) => ShaderNodeObject<MathNode>;
|
|
184
182
|
|
|
183
|
+
export const cbrt: Unary;
|
|
184
|
+
export const lengthSq: Unary;
|
|
185
185
|
export const mix: Ternary;
|
|
186
|
-
export const clamp:
|
|
187
|
-
|
|
186
|
+
export const clamp: (
|
|
187
|
+
a: NodeRepresentation,
|
|
188
|
+
b?: NodeRepresentation,
|
|
189
|
+
c?: NodeRepresentation,
|
|
190
|
+
) => ShaderNodeObject<MathNode>;
|
|
191
|
+
export const saturate: Unary;
|
|
188
192
|
export const refract: Ternary;
|
|
189
193
|
export const smoothstep: Ternary;
|
|
190
194
|
export const faceForward: Ternary;
|
|
@@ -192,7 +196,7 @@ export const faceForward: Ternary;
|
|
|
192
196
|
export const mixElement: Ternary;
|
|
193
197
|
export const smoothstepElement: Ternary;
|
|
194
198
|
|
|
195
|
-
declare module
|
|
199
|
+
declare module "../shadernode/ShaderNode.js" {
|
|
196
200
|
interface NodeElements {
|
|
197
201
|
radians: typeof radians;
|
|
198
202
|
degrees: typeof degrees;
|
|
@@ -215,6 +219,7 @@ declare module '../shadernode/ShaderNode.js' {
|
|
|
215
219
|
abs: typeof abs;
|
|
216
220
|
sign: typeof sign;
|
|
217
221
|
length: typeof length;
|
|
222
|
+
lengthSq: typeof lengthSq;
|
|
218
223
|
negate: typeof negate;
|
|
219
224
|
oneMinus: typeof oneMinus;
|
|
220
225
|
dFdx: typeof dFdx;
|
|
@@ -244,5 +249,6 @@ declare module '../shadernode/ShaderNode.js' {
|
|
|
244
249
|
faceForward: typeof faceForward;
|
|
245
250
|
difference: typeof difference;
|
|
246
251
|
saturate: typeof saturate;
|
|
252
|
+
cbrt: typeof cbrt;
|
|
247
253
|
}
|
|
248
254
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Binary, Ternary } from "./MathNode.js";
|
|
2
|
+
|
|
3
|
+
// remapping functions
|
|
4
|
+
export const parabola: Binary;
|
|
5
|
+
export const gain: Binary;
|
|
6
|
+
export const pcurve: Ternary;
|
|
7
|
+
export const sinc: Binary;
|
|
8
|
+
|
|
9
|
+
declare module "../shadernode/ShaderNode.js" {
|
|
10
|
+
interface NodeElements {
|
|
11
|
+
parabola: typeof parabola;
|
|
12
|
+
gain: typeof gain;
|
|
13
|
+
pcurve: typeof pcurve;
|
|
14
|
+
sinc: typeof sinc;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { NodeRepresentation, ShaderNodeObject } from
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import TempNode from "../core/TempNode.js";
|
|
3
|
+
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
4
|
|
|
5
5
|
export type OperatorNodeOp =
|
|
6
|
-
|
|
|
7
|
-
|
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
| '/';
|
|
6
|
+
| "%"
|
|
7
|
+
| "&"
|
|
8
|
+
| "|"
|
|
9
|
+
| "^"
|
|
10
|
+
| ">>"
|
|
11
|
+
| "<<"
|
|
12
|
+
| "=="
|
|
13
|
+
| "&&"
|
|
14
|
+
| "||"
|
|
15
|
+
| "^^"
|
|
16
|
+
| "<"
|
|
17
|
+
| ">"
|
|
18
|
+
| "<="
|
|
19
|
+
| ">="
|
|
20
|
+
| "+"
|
|
21
|
+
| "-"
|
|
22
|
+
| "*"
|
|
23
|
+
| "/";
|
|
25
24
|
|
|
26
25
|
export default class OperatorNode extends TempNode {
|
|
27
26
|
aNode: Node;
|
|
@@ -31,7 +30,7 @@ export default class OperatorNode extends TempNode {
|
|
|
31
30
|
constructor(op: OperatorNodeOp, ...params: [Node, Node, ...Node[]]);
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
type Operator = (
|
|
35
34
|
a: NodeRepresentation,
|
|
36
35
|
b: NodeRepresentation,
|
|
37
36
|
...others: NodeRepresentation[]
|
|
@@ -43,21 +42,22 @@ export const mul: Operator;
|
|
|
43
42
|
export const div: Operator;
|
|
44
43
|
export const remainder: Operator;
|
|
45
44
|
export const equal: Operator;
|
|
46
|
-
export const assign: Operator;
|
|
47
45
|
export const lessThan: Operator;
|
|
48
46
|
export const greaterThan: Operator;
|
|
49
47
|
export const lessThanEqual: Operator;
|
|
50
48
|
export const greaterThanEqual: Operator;
|
|
51
49
|
export const and: Operator;
|
|
52
50
|
export const or: Operator;
|
|
51
|
+
export const not: (a: NodeRepresentation) => ShaderNodeObject<OperatorNode>;
|
|
53
52
|
export const xor: Operator;
|
|
54
53
|
export const bitAnd: Operator;
|
|
54
|
+
export const bitNot: (a: NodeRepresentation) => ShaderNodeObject<OperatorNode>;
|
|
55
55
|
export const bitOr: Operator;
|
|
56
56
|
export const bitXor: Operator;
|
|
57
57
|
export const shiftLeft: Operator;
|
|
58
58
|
export const shiftRight: Operator;
|
|
59
59
|
|
|
60
|
-
declare module
|
|
60
|
+
declare module "../shadernode/ShaderNode.js" {
|
|
61
61
|
interface NodeElements {
|
|
62
62
|
add: typeof add;
|
|
63
63
|
sub: typeof sub;
|
|
@@ -65,15 +65,16 @@ declare module '../shadernode/ShaderNode.js' {
|
|
|
65
65
|
div: typeof div;
|
|
66
66
|
remainder: typeof remainder;
|
|
67
67
|
equal: typeof equal;
|
|
68
|
-
assign: typeof assign;
|
|
69
68
|
lessThan: typeof lessThan;
|
|
70
69
|
greaterThan: typeof greaterThan;
|
|
71
70
|
lessThanEqual: typeof lessThanEqual;
|
|
72
71
|
greaterThanEqual: typeof greaterThanEqual;
|
|
73
72
|
and: typeof and;
|
|
74
73
|
or: typeof or;
|
|
74
|
+
not: typeof not;
|
|
75
75
|
xor: typeof xor;
|
|
76
76
|
bitAnd: typeof bitAnd;
|
|
77
|
+
bitNot: typeof bitNot;
|
|
77
78
|
bitOr: typeof bitOr;
|
|
78
79
|
bitXor: typeof bitXor;
|
|
79
80
|
shiftLeft: typeof shiftLeft;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
3
|
+
|
|
4
|
+
export const tri: (x: NodeRepresentation) => ShaderNodeObject<Node>;
|
|
5
|
+
|
|
6
|
+
export const tri3: (p: NodeRepresentation) => ShaderNodeObject<Node>;
|
|
7
|
+
|
|
8
|
+
export const triNoise3D: (
|
|
9
|
+
p_immutable: NodeRepresentation,
|
|
10
|
+
spd: NodeRepresentation,
|
|
11
|
+
time: NodeRepresentation,
|
|
12
|
+
) => ShaderNodeObject<Node>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import TempNode from
|
|
2
|
-
import { NodeRepresentation, ShaderNodeObject } from
|
|
1
|
+
import TempNode from "../core/TempNode.js";
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
3
3
|
|
|
4
4
|
export default class CheckerNode extends TempNode {
|
|
5
5
|
uvNode: Node;
|
|
@@ -7,3 +7,9 @@ export default class CheckerNode extends TempNode {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export const checker: (uvNode?: NodeRepresentation) => ShaderNodeObject<CheckerNode>;
|
|
10
|
+
|
|
11
|
+
declare module "../shadernode/ShaderNode.js" {
|
|
12
|
+
interface NodeElements {
|
|
13
|
+
checker: typeof checker;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,22 +1,63 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import NodeBuilder from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { AnyObject, NodeTypeOption, SwizzleOption } from "../core/constants.js";
|
|
2
|
+
import ConstNode from "../core/ConstNode.js";
|
|
3
|
+
import Node from "../core/Node.js";
|
|
4
|
+
import NodeBuilder from "../core/NodeBuilder.js";
|
|
5
|
+
|
|
6
|
+
export interface NodeElements {
|
|
7
|
+
append: typeof append;
|
|
8
|
+
|
|
9
|
+
color: typeof color;
|
|
10
|
+
float: typeof float;
|
|
11
|
+
int: typeof int;
|
|
12
|
+
uint: typeof uint;
|
|
13
|
+
bool: typeof bool;
|
|
14
|
+
vec2: typeof vec2;
|
|
15
|
+
ivec2: typeof ivec2;
|
|
16
|
+
uvec2: typeof uvec2;
|
|
17
|
+
bvec2: typeof bvec2;
|
|
18
|
+
vec3: typeof vec3;
|
|
19
|
+
ivec3: typeof ivec3;
|
|
20
|
+
uvec3: typeof uvec3;
|
|
21
|
+
bvec3: typeof bvec3;
|
|
22
|
+
vec4: typeof vec4;
|
|
23
|
+
ivec4: typeof ivec4;
|
|
24
|
+
uvec4: typeof uvec4;
|
|
25
|
+
bvec4: typeof bvec4;
|
|
26
|
+
mat2: typeof mat2;
|
|
27
|
+
imat2: typeof imat2;
|
|
28
|
+
umat2: typeof umat2;
|
|
29
|
+
bmat2: typeof bmat2;
|
|
30
|
+
mat3: typeof mat3;
|
|
31
|
+
imat3: typeof imat3;
|
|
32
|
+
umat3: typeof umat3;
|
|
33
|
+
bmat3: typeof bmat3;
|
|
34
|
+
mat4: typeof mat4;
|
|
35
|
+
imat4: typeof imat4;
|
|
36
|
+
umat4: typeof umat4;
|
|
37
|
+
bmat4: typeof bmat4;
|
|
38
|
+
string: typeof string;
|
|
39
|
+
arrayBuffer: typeof arrayBuffer;
|
|
40
|
+
|
|
41
|
+
element: typeof element;
|
|
42
|
+
convert: typeof convert;
|
|
43
|
+
}
|
|
8
44
|
|
|
9
45
|
export function addNodeElement(name: string, nodeElement: unknown): void;
|
|
10
46
|
|
|
11
|
-
export type Swizzable<T extends Node = Node> =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
47
|
+
export type Swizzable<T extends Node = Node> =
|
|
48
|
+
& T
|
|
49
|
+
& {
|
|
50
|
+
[key in SwizzleOption | number]: ShaderNodeObject<Node>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type ShaderNodeObject<T extends Node> =
|
|
54
|
+
& T
|
|
55
|
+
& {
|
|
56
|
+
[Key in keyof NodeElements]: NodeElements[Key] extends (node: T, ...args: infer Args) => infer R
|
|
57
|
+
? (...args: Args) => R
|
|
58
|
+
: never;
|
|
59
|
+
}
|
|
60
|
+
& Swizzable<T>;
|
|
20
61
|
|
|
21
62
|
/** anything that can be passed to {@link nodeObject} and returns a proxy */
|
|
22
63
|
export type NodeRepresentation<T extends Node = Node> = number | boolean | Node | ShaderNodeObject<T>;
|
|
@@ -25,10 +66,8 @@ export type NodeRepresentation<T extends Node = Node> = number | boolean | Node
|
|
|
25
66
|
export type NodeObjectOption = NodeRepresentation | string;
|
|
26
67
|
|
|
27
68
|
// same logic as in ShaderNodeObject: number,boolean,node->ShaderNodeObject, otherwise do nothing
|
|
28
|
-
export type NodeObject<T> = T extends Node
|
|
29
|
-
? ShaderNodeObject<
|
|
30
|
-
: T extends number | boolean
|
|
31
|
-
? ShaderNodeObject<ConstNode<number | boolean>>
|
|
69
|
+
export type NodeObject<T> = T extends Node ? ShaderNodeObject<T>
|
|
70
|
+
: T extends number | boolean ? ShaderNodeObject<ConstNode<number | boolean>>
|
|
32
71
|
: T;
|
|
33
72
|
|
|
34
73
|
// opposite of NodeObject: node -> node|ShaderNodeObject|boolean|number, otherwise do nothing
|
|
@@ -63,25 +102,21 @@ interface Construtors<
|
|
|
63
102
|
* <https://stackoverflow.com/a/52761156/1623826>
|
|
64
103
|
*/
|
|
65
104
|
type OverloadedConstructorsOf<T> = T extends {
|
|
66
|
-
new
|
|
67
|
-
new
|
|
68
|
-
new
|
|
69
|
-
new
|
|
70
|
-
}
|
|
71
|
-
? Construtors<A1, A2, A3, A4>
|
|
105
|
+
new(...args: infer A1): unknown;
|
|
106
|
+
new(...args: infer A2): unknown;
|
|
107
|
+
new(...args: infer A3): unknown;
|
|
108
|
+
new(...args: infer A4): unknown;
|
|
109
|
+
} ? Construtors<A1, A2, A3, A4>
|
|
72
110
|
: T extends {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
? Construtors<A1, A2, A3, undefined>
|
|
111
|
+
new(...args: infer A1): unknown;
|
|
112
|
+
new(...args: infer A2): unknown;
|
|
113
|
+
new(...args: infer A3): unknown;
|
|
114
|
+
} ? Construtors<A1, A2, A3, undefined>
|
|
78
115
|
: T extends {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
? Construtors<
|
|
83
|
-
: T extends new (...args: infer A) => unknown
|
|
84
|
-
? Construtors<A, undefined, undefined, undefined>
|
|
116
|
+
new(...args: infer A1): unknown;
|
|
117
|
+
new(...args: infer A2): unknown;
|
|
118
|
+
} ? Construtors<A1, A2, undefined, undefined>
|
|
119
|
+
: T extends new(...args: infer A) => unknown ? Construtors<A, undefined, undefined, undefined>
|
|
85
120
|
: Construtors<undefined, undefined, undefined, undefined>;
|
|
86
121
|
|
|
87
122
|
type AnyConstructors = Construtors<any, any, any, any>;
|
|
@@ -91,29 +126,29 @@ type AnyConstructors = Construtors<any, any, any, any>;
|
|
|
91
126
|
*/
|
|
92
127
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
93
128
|
type FilterConstructorsByScope<T extends AnyConstructors, S> = {
|
|
94
|
-
a: S extends T[
|
|
95
|
-
b: S extends T[
|
|
96
|
-
c: S extends T[
|
|
97
|
-
d: S extends T[
|
|
129
|
+
a: S extends T["a"][0] ? T["a"] : undefined;
|
|
130
|
+
b: S extends T["b"][0] ? T["b"] : undefined;
|
|
131
|
+
c: S extends T["c"][0] ? T["c"] : undefined;
|
|
132
|
+
d: S extends T["d"][0] ? T["d"] : undefined;
|
|
98
133
|
};
|
|
99
134
|
/**
|
|
100
135
|
* "flattens" the tuple into an union type
|
|
101
136
|
*/
|
|
102
137
|
type ConstructorUnion<T extends AnyConstructors> =
|
|
103
|
-
| Exclude<T[
|
|
104
|
-
| Exclude<T[
|
|
105
|
-
| Exclude<T[
|
|
106
|
-
| Exclude<T[
|
|
138
|
+
| Exclude<T["a"], undefined>
|
|
139
|
+
| Exclude<T["b"], undefined>
|
|
140
|
+
| Exclude<T["c"], undefined>
|
|
141
|
+
| Exclude<T["d"], undefined>;
|
|
107
142
|
|
|
108
143
|
/**
|
|
109
144
|
* Extract list of possible scopes - union of the first paramter
|
|
110
145
|
* of all constructors, should it be string
|
|
111
146
|
*/
|
|
112
147
|
type ExtractScopes<T extends AnyConstructors> =
|
|
113
|
-
| (T[
|
|
114
|
-
| (T[
|
|
115
|
-
| (T[
|
|
116
|
-
| (T[
|
|
148
|
+
| (T["a"][0] extends string ? T["a"][0] : never)
|
|
149
|
+
| (T["b"][0] extends string ? T["b"][0] : never)
|
|
150
|
+
| (T["c"][0] extends string ? T["c"][0] : never)
|
|
151
|
+
| (T["d"][0] extends string ? T["d"][0] : never);
|
|
117
152
|
|
|
118
153
|
type GetConstructorsByScope<T, S> = ConstructorUnion<FilterConstructorsByScope<OverloadedConstructorsOf<T>, S>>;
|
|
119
154
|
type GetConstructors<T> = ConstructorUnion<OverloadedConstructorsOf<T>>;
|
|
@@ -123,7 +158,7 @@ export type ConvertType = (...params: unknown[]) => ShaderNodeObject<Node>;
|
|
|
123
158
|
|
|
124
159
|
type NodeArray<T extends NodeObjectOption[]> = { [index in keyof T]: NodeObject<T[index]> };
|
|
125
160
|
type NodeObjects<T> = { [key in keyof T]: T[key] extends NodeObjectOption ? NodeObject<T[key]> : T[key] };
|
|
126
|
-
type ConstructedNode<T> = T extends new
|
|
161
|
+
type ConstructedNode<T> = T extends new(...args: any[]) => infer R ? (R extends Node ? R : never) : never;
|
|
127
162
|
|
|
128
163
|
export type NodeOrType = Node | NodeTypeOption;
|
|
129
164
|
|
|
@@ -162,6 +197,13 @@ export function nodeImmutable<T>(
|
|
|
162
197
|
...params: ProxiedTuple<GetConstructors<T>>
|
|
163
198
|
): ShaderNodeObject<ConstructedNode<T>>;
|
|
164
199
|
|
|
200
|
+
export function tslFn<R extends Node = ShaderNodeObject<Node>>(jsFunc: () => R): () => R;
|
|
201
|
+
export function tslFn<T extends AnyObject, R extends Node = ShaderNodeObject<Node>>(
|
|
202
|
+
jsFunc: (args: T) => R,
|
|
203
|
+
): (args: T) => R;
|
|
204
|
+
|
|
205
|
+
export function append(node: Node): Node;
|
|
206
|
+
|
|
165
207
|
export const color: ConvertType;
|
|
166
208
|
|
|
167
209
|
export const float: ConvertType;
|
|
@@ -184,6 +226,11 @@ export const ivec4: ConvertType;
|
|
|
184
226
|
export const uvec4: ConvertType;
|
|
185
227
|
export const bvec4: ConvertType;
|
|
186
228
|
|
|
229
|
+
export const mat2: ConvertType;
|
|
230
|
+
export const imat2: ConvertType;
|
|
231
|
+
export const umat2: ConvertType;
|
|
232
|
+
export const bmat2: ConvertType;
|
|
233
|
+
|
|
187
234
|
export const mat3: ConvertType;
|
|
188
235
|
export const imat3: ConvertType;
|
|
189
236
|
export const umat3: ConvertType;
|
|
@@ -194,5 +241,8 @@ export const imat4: ConvertType;
|
|
|
194
241
|
export const umat4: ConvertType;
|
|
195
242
|
export const bmat4: ConvertType;
|
|
196
243
|
|
|
244
|
+
export const string: (value?: string) => ShaderNodeObject<ConstNode<string>>;
|
|
245
|
+
export const arrayBuffer: (value: ArrayBuffer) => ShaderNodeObject<ConstNode<ArrayBuffer>>;
|
|
246
|
+
|
|
197
247
|
export const element: (node: NodeRepresentation, indexNode: NodeRepresentation) => ShaderNodeObject<Node>;
|
|
198
248
|
export const convert: (node: NodeRepresentation, types: NodeTypeOption) => ShaderNodeObject<Node>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import CondNode from "../math/CondNode.js";
|
|
3
|
+
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
4
|
+
|
|
5
|
+
export default class DiscardNode extends CondNode {
|
|
6
|
+
constructor(condNode: Node);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const inlineDiscard: (condNode: NodeRepresentation) => ShaderNodeObject<DiscardNode>;
|
|
10
|
+
export const discard: (condNode: NodeRepresentation) => ShaderNodeObject<Node>;
|
|
11
|
+
|
|
12
|
+
declare module "../shadernode/ShaderNode.js" {
|
|
13
|
+
interface NodeElements {
|
|
14
|
+
discard: typeof discard;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PositionNode, TempNode } from
|
|
2
|
-
import { ShaderNodeObject } from
|
|
1
|
+
import { PositionNode, TempNode } from "../Nodes.js";
|
|
2
|
+
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
3
3
|
|
|
4
4
|
export default class EquirectUVNode extends TempNode {
|
|
5
5
|
constructor(dirNode?: ShaderNodeObject<PositionNode>);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import TempNode from
|
|
2
|
-
import { ShaderNodeObject } from
|
|
1
|
+
import TempNode from "../core/TempNode.js";
|
|
2
|
+
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
3
3
|
|
|
4
4
|
export default class MatcapUVNode extends TempNode {
|
|
5
5
|
constructor();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Texture } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ShaderNodeObject } from
|
|
1
|
+
import { Texture } from "../../../../src/Three.js";
|
|
2
|
+
import TextureNode from "../accessors/TextureNode.js";
|
|
3
|
+
import UniformNode from "../core/UniformNode.js";
|
|
4
|
+
import { ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
5
5
|
|
|
6
6
|
export default class MaxMipLevelNode extends UniformNode<0> {
|
|
7
7
|
textureNode: TextureNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Node from
|
|
2
|
-
import { NodeRepresentation, ShaderNodeObject } from
|
|
1
|
+
import Node from "../core/Node.js";
|
|
2
|
+
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";
|
|
3
3
|
|
|
4
4
|
export type OscNodeMethod =
|
|
5
5
|
| typeof OscNode.SINE
|
|
@@ -8,10 +8,10 @@ export type OscNodeMethod =
|
|
|
8
8
|
| typeof OscNode.SAWTOOTH;
|
|
9
9
|
|
|
10
10
|
export default class OscNode extends Node {
|
|
11
|
-
static SINE:
|
|
12
|
-
static SQUARE:
|
|
13
|
-
static TRIANGLE:
|
|
14
|
-
static SAWTOOTH:
|
|
11
|
+
static SINE: "sine";
|
|
12
|
+
static SQUARE: "square";
|
|
13
|
+
static TRIANGLE: "triangle";
|
|
14
|
+
static SAWTOOTH: "sawtooth";
|
|
15
15
|
|
|
16
16
|
method: OscNodeMethod;
|
|
17
17
|
timeNode: Node;
|