@plastic-software/three 0.178.0 → 0.180.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.
- package/README.md +1 -1
- package/build/three.cjs +950 -230
- package/build/three.core.js +754 -138
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +197 -96
- package/build/three.module.min.js +1 -1
- package/build/three.tsl.js +99 -25
- package/build/three.tsl.min.js +1 -1
- package/build/three.webgpu.js +4586 -1499
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +4544 -1499
- package/build/three.webgpu.nodes.min.js +1 -1
- package/examples/jsm/Addons.js +2 -3
- package/examples/jsm/capabilities/WebGPU.js +1 -1
- package/examples/jsm/controls/ArcballControls.js +7 -7
- package/examples/jsm/controls/DragControls.js +6 -56
- package/examples/jsm/controls/FirstPersonControls.js +2 -2
- package/examples/jsm/controls/PointerLockControls.js +0 -8
- package/examples/jsm/csm/CSMShadowNode.js +4 -4
- package/examples/jsm/environments/RoomEnvironment.js +8 -3
- package/examples/jsm/exporters/GLTFExporter.js +30 -22
- package/examples/jsm/exporters/KTX2Exporter.js +4 -2
- package/examples/jsm/exporters/PLYExporter.js +1 -1
- package/examples/jsm/exporters/USDZExporter.js +676 -299
- package/examples/jsm/geometries/RoundedBoxGeometry.js +47 -8
- package/examples/jsm/interactive/HTMLMesh.js +5 -3
- package/examples/jsm/libs/ktx-parse.module.js +1 -1
- package/examples/jsm/libs/meshopt_decoder.module.js +75 -58
- package/examples/jsm/lights/LightProbeGenerator.js +14 -3
- package/examples/jsm/lines/Line2.js +3 -3
- package/examples/jsm/lines/LineGeometry.js +1 -1
- package/examples/jsm/lines/LineSegments2.js +2 -2
- package/examples/jsm/lines/Wireframe.js +2 -2
- package/examples/jsm/lines/WireframeGeometry2.js +1 -1
- package/examples/jsm/lines/webgpu/LineSegments2.js +1 -1
- package/examples/jsm/lines/webgpu/Wireframe.js +1 -1
- package/examples/jsm/loaders/ColladaLoader.js +1 -1
- package/examples/jsm/loaders/EXRLoader.js +210 -22
- package/examples/jsm/loaders/FBXLoader.js +1 -1
- package/examples/jsm/loaders/GLTFLoader.js +9 -5
- package/examples/jsm/loaders/HDRCubeTextureLoader.js +5 -5
- package/examples/jsm/loaders/HDRLoader.js +486 -0
- package/examples/jsm/loaders/KTX2Loader.js +112 -32
- package/examples/jsm/loaders/MaterialXLoader.js +212 -30
- package/examples/jsm/loaders/RGBELoader.js +7 -473
- package/examples/jsm/loaders/TTFLoader.js +13 -1
- package/examples/jsm/loaders/USDLoader.js +219 -0
- package/examples/jsm/loaders/USDZLoader.js +4 -892
- package/examples/jsm/loaders/UltraHDRLoader.js +1 -1
- package/examples/jsm/loaders/lwo/IFFParser.js +1 -1
- package/examples/jsm/loaders/usd/USDAParser.js +741 -0
- package/examples/jsm/loaders/usd/USDCParser.js +17 -0
- package/examples/jsm/materials/WoodNodeMaterial.js +533 -0
- package/examples/jsm/math/ColorSpaces.js +19 -1
- package/examples/jsm/math/ConvexHull.js +2 -2
- package/examples/jsm/math/Lut.js +2 -2
- package/examples/jsm/misc/MD2CharacterComplex.js +1 -1
- package/examples/jsm/misc/ProgressiveLightMap.js +1 -1
- package/examples/jsm/misc/Volume.js +1 -1
- package/examples/jsm/objects/LensflareMesh.js +3 -3
- package/examples/jsm/objects/SkyMesh.js +2 -2
- package/examples/jsm/physics/RapierPhysics.js +14 -5
- package/examples/jsm/postprocessing/GTAOPass.js +10 -9
- package/examples/jsm/postprocessing/OutlinePass.js +17 -17
- package/examples/jsm/postprocessing/SSAOPass.js +10 -9
- package/examples/jsm/postprocessing/SSRPass.js +37 -8
- package/examples/jsm/shaders/UnpackDepthRGBAShader.js +11 -2
- package/examples/jsm/transpiler/GLSLDecoder.js +23 -20
- package/examples/jsm/transpiler/TSLEncoder.js +2 -10
- package/examples/jsm/transpiler/WGSLEncoder.js +24 -0
- package/examples/jsm/tsl/display/AnamorphicNode.js +27 -4
- package/examples/jsm/tsl/display/BloomNode.js +7 -6
- package/examples/jsm/tsl/display/ChromaticAberrationNode.js +2 -1
- package/examples/jsm/tsl/display/DepthOfFieldNode.js +439 -90
- package/examples/jsm/tsl/display/GTAONode.js +8 -0
- package/examples/jsm/tsl/display/GaussianBlurNode.js +51 -41
- package/examples/jsm/tsl/display/OutlineNode.js +2 -2
- package/examples/jsm/tsl/display/SSRNode.js +180 -65
- package/examples/jsm/tsl/display/{TRAAPassNode.js → TRAANode.js} +181 -172
- package/examples/jsm/tsl/display/boxBlur.js +64 -0
- package/examples/jsm/tsl/display/hashBlur.js +15 -18
- package/examples/jsm/tsl/lighting/TiledLightsNode.js +1 -1
- package/examples/jsm/utils/BufferGeometryUtils.js +1 -1
- package/examples/jsm/utils/ShadowMapViewerGPU.js +12 -5
- package/examples/jsm/webxr/OculusHandModel.js +1 -1
- package/package.json +1 -1
- package/src/Three.Core.js +2 -0
- package/src/Three.TSL.js +98 -24
- package/src/animation/AnimationClip.js +17 -2
- package/src/animation/KeyframeTrack.js +1 -1
- package/src/animation/tracks/BooleanKeyframeTrack.js +1 -1
- package/src/animation/tracks/StringKeyframeTrack.js +1 -1
- package/src/cameras/Camera.js +14 -0
- package/src/cameras/OrthographicCamera.js +1 -1
- package/src/cameras/PerspectiveCamera.js +1 -1
- package/src/constants.js +11 -3
- package/src/core/BufferGeometry.js +2 -2
- package/{examples/jsm/misc → src/core}/Timer.js +4 -42
- package/src/extras/PMREMGenerator.js +11 -0
- package/src/extras/TextureUtils.js +2 -1
- package/src/extras/lib/earcut.js +1 -1
- package/src/helpers/CameraHelper.js +41 -11
- package/src/helpers/SkeletonHelper.js +35 -6
- package/src/lights/LightShadow.js +21 -8
- package/src/lights/PointLightShadow.js +1 -1
- package/src/lights/webgpu/ProjectorLight.js +1 -1
- package/src/loaders/FileLoader.js +25 -2
- package/src/loaders/ImageBitmapLoader.js +23 -0
- package/src/loaders/Loader.js +14 -0
- package/src/loaders/LoadingManager.js +23 -0
- package/src/materials/Material.js +12 -0
- package/src/materials/MeshBasicMaterial.js +1 -1
- package/src/materials/MeshDistanceMaterial.js +1 -1
- package/src/materials/nodes/Line2NodeMaterial.js +0 -8
- package/src/materials/nodes/NodeMaterial.js +1 -1
- package/src/materials/nodes/PointsNodeMaterial.js +86 -28
- package/src/materials/nodes/SpriteNodeMaterial.js +3 -15
- package/src/materials/nodes/manager/NodeMaterialObserver.js +87 -2
- package/src/math/ColorManagement.js +7 -1
- package/src/math/Frustum.js +19 -8
- package/src/math/FrustumArray.js +10 -5
- package/src/math/Line3.js +129 -2
- package/src/math/Matrix4.js +48 -27
- package/src/math/Spherical.js +2 -2
- package/src/nodes/Nodes.js +4 -0
- package/src/nodes/TSL.js +4 -0
- package/src/nodes/accessors/BufferNode.js +1 -1
- package/src/nodes/accessors/Camera.js +142 -16
- package/src/nodes/accessors/ClippingNode.js +6 -5
- package/src/nodes/accessors/CubeTextureNode.js +2 -2
- package/src/nodes/accessors/InstanceNode.js +3 -1
- package/src/nodes/accessors/Normal.js +11 -11
- package/src/nodes/accessors/Object3DNode.js +1 -1
- package/src/nodes/accessors/ReferenceBaseNode.js +1 -1
- package/src/nodes/accessors/ReferenceNode.js +19 -4
- package/src/nodes/accessors/SceneNode.js +1 -1
- package/src/nodes/accessors/StorageTextureNode.js +1 -1
- package/src/nodes/accessors/Texture3DNode.js +13 -0
- package/src/nodes/accessors/TextureNode.js +83 -19
- package/src/nodes/code/FunctionCallNode.js +19 -0
- package/src/nodes/code/FunctionNode.js +23 -0
- package/src/nodes/core/ArrayNode.js +12 -0
- package/src/nodes/core/AssignNode.js +6 -2
- package/src/nodes/core/ContextNode.js +44 -1
- package/src/nodes/core/Node.js +30 -22
- package/src/nodes/core/NodeBuilder.js +71 -32
- package/src/nodes/core/NodeFrame.js +1 -1
- package/src/nodes/core/NodeUniform.js +1 -1
- package/src/nodes/core/NodeUtils.js +5 -3
- package/src/nodes/core/StackNode.js +71 -4
- package/src/nodes/core/StructNode.js +5 -5
- package/src/nodes/core/StructTypeNode.js +1 -0
- package/src/nodes/core/SubBuildNode.js +2 -2
- package/src/nodes/core/UniformNode.js +79 -14
- package/src/nodes/core/VarNode.js +83 -15
- package/src/nodes/display/FrontFacingNode.js +4 -8
- package/src/nodes/display/PassNode.js +148 -2
- package/src/nodes/display/ScreenNode.js +42 -13
- package/src/nodes/display/ViewportDepthTextureNode.js +16 -4
- package/src/nodes/display/ViewportSharedTextureNode.js +12 -0
- package/src/nodes/display/ViewportTextureNode.js +94 -4
- package/src/nodes/functions/PhysicalLightingModel.js +2 -2
- package/src/nodes/gpgpu/AtomicFunctionNode.js +1 -1
- package/src/nodes/gpgpu/ComputeNode.js +67 -23
- package/src/nodes/gpgpu/SubgroupFunctionNode.js +430 -0
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +28 -3
- package/src/nodes/lighting/LightsNode.js +1 -1
- package/src/nodes/lighting/ProjectorLightNode.js +19 -6
- package/src/nodes/lighting/ShadowFilterNode.js +1 -1
- package/src/nodes/materialx/MaterialXNodes.js +131 -2
- package/src/nodes/materialx/lib/mx_noise.js +165 -1
- package/src/nodes/math/BitcastNode.js +156 -0
- package/src/nodes/math/ConditionalNode.js +19 -3
- package/src/nodes/math/MathNode.js +72 -60
- package/src/nodes/math/OperatorNode.js +26 -25
- package/src/nodes/tsl/TSLCore.js +477 -142
- package/src/nodes/utils/DebugNode.js +1 -1
- package/src/nodes/utils/EventNode.js +83 -0
- package/src/nodes/utils/JoinNode.js +3 -1
- package/src/nodes/utils/MemberNode.js +58 -7
- package/src/nodes/utils/RTTNode.js +10 -1
- package/src/nodes/utils/ReflectorNode.js +51 -7
- package/src/nodes/utils/SampleNode.js +12 -2
- package/src/nodes/utils/SplitNode.js +11 -0
- package/src/nodes/utils/Timer.js +0 -47
- package/src/objects/BatchedMesh.js +6 -4
- package/src/objects/LOD.js +1 -1
- package/src/objects/Sprite.js +2 -2
- package/src/renderers/WebGLRenderer.js +21 -31
- package/src/renderers/common/Attributes.js +1 -1
- package/src/renderers/common/Backend.js +19 -1
- package/src/renderers/common/Bindings.js +21 -18
- package/src/renderers/common/ChainMap.js +1 -1
- package/src/renderers/common/Color4.js +2 -2
- package/src/renderers/common/DataMap.js +1 -1
- package/src/renderers/common/Pipelines.js +1 -1
- package/src/renderers/common/PostProcessing.js +60 -5
- package/src/renderers/common/RenderContext.js +2 -2
- package/src/renderers/common/RenderObject.js +14 -2
- package/src/renderers/common/Renderer.js +55 -32
- package/src/renderers/common/SampledTexture.js +4 -72
- package/src/renderers/common/Sampler.js +91 -0
- package/src/renderers/common/Storage3DTexture.js +21 -0
- package/src/renderers/common/StorageArrayTexture.js +21 -0
- package/src/renderers/common/StorageTexture.js +19 -0
- package/src/renderers/common/Textures.js +52 -14
- package/src/renderers/common/TimestampQueryPool.js +3 -3
- package/src/renderers/common/XRManager.js +51 -17
- package/src/renderers/common/nodes/NodeBuilderState.js +1 -1
- package/src/renderers/common/nodes/NodeLibrary.js +5 -5
- package/src/renderers/common/nodes/NodeSampledTexture.js +0 -12
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +21 -11
- package/src/renderers/shaders/ShaderLib/depth.glsl.js +11 -2
- package/src/renderers/webgl/WebGLCapabilities.js +2 -2
- package/src/renderers/webgl/WebGLMaterials.js +6 -6
- package/src/renderers/webgl/WebGLProgram.js +24 -18
- package/src/renderers/webgl/WebGLPrograms.js +4 -4
- package/src/renderers/webgl/WebGLShadowMap.js +11 -1
- package/src/renderers/webgl/WebGLTextures.js +20 -7
- package/src/renderers/webgl/WebGLUtils.js +3 -2
- package/src/renderers/webgl-fallback/WebGLBackend.js +207 -146
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +112 -19
- package/src/renderers/webgl-fallback/utils/WebGLState.js +1 -1
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +52 -3
- package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +9 -10
- package/src/renderers/webgl-fallback/utils/WebGLUtils.js +3 -2
- package/src/renderers/webgpu/WebGPUBackend.js +87 -44
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +169 -99
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +35 -31
- package/src/renderers/webgpu/utils/WebGPUConstants.js +2 -2
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +10 -19
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +120 -84
- package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +3 -3
- package/src/renderers/webgpu/utils/WebGPUUtils.js +2 -17
- package/src/renderers/webxr/WebXRDepthSensing.js +6 -10
- package/src/renderers/webxr/WebXRManager.js +86 -11
- package/src/textures/ExternalTexture.js +56 -0
- package/src/textures/FramebufferTexture.js +2 -2
- package/src/textures/Source.js +12 -2
- package/src/textures/VideoTexture.js +27 -2
- package/examples/jsm/loaders/RGBMLoader.js +0 -1148
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import TempNode from '../core/TempNode.js';
|
|
2
2
|
import { sub, mul, div, mod, equal } from './OperatorNode.js';
|
|
3
|
-
import { addMethodChaining, nodeObject,
|
|
3
|
+
import { addMethodChaining, nodeObject, nodeProxyIntent, float, vec2, vec3, vec4, Fn } from '../tsl/TSLCore.js';
|
|
4
4
|
import { WebGLCoordinateSystem, WebGPUCoordinateSystem } from '../../constants.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -361,10 +361,11 @@ MathNode.RECIPROCAL = 'reciprocal';
|
|
|
361
361
|
MathNode.TRUNC = 'trunc';
|
|
362
362
|
MathNode.FWIDTH = 'fwidth';
|
|
363
363
|
MathNode.TRANSPOSE = 'transpose';
|
|
364
|
+
MathNode.DETERMINANT = 'determinant';
|
|
365
|
+
MathNode.INVERSE = 'inverse';
|
|
364
366
|
|
|
365
367
|
// 2 inputs
|
|
366
368
|
|
|
367
|
-
MathNode.BITCAST = 'bitcast';
|
|
368
369
|
MathNode.EQUALS = 'equals';
|
|
369
370
|
MathNode.MIN = 'min';
|
|
370
371
|
MathNode.MAX = 'max';
|
|
@@ -429,7 +430,7 @@ export const PI2 = /*@__PURE__*/ float( Math.PI * 2 );
|
|
|
429
430
|
* @param {Node | number} x - The parameter.
|
|
430
431
|
* @returns {Node<bool>}
|
|
431
432
|
*/
|
|
432
|
-
export const all = /*@__PURE__*/
|
|
433
|
+
export const all = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.ALL ).setParameterLength( 1 );
|
|
433
434
|
|
|
434
435
|
/**
|
|
435
436
|
* Returns `true` if any components of `x` are `true`.
|
|
@@ -439,7 +440,7 @@ export const all = /*@__PURE__*/ nodeProxy( MathNode, MathNode.ALL ).setParamete
|
|
|
439
440
|
* @param {Node | number} x - The parameter.
|
|
440
441
|
* @returns {Node<bool>}
|
|
441
442
|
*/
|
|
442
|
-
export const any = /*@__PURE__*/
|
|
443
|
+
export const any = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.ANY ).setParameterLength( 1 );
|
|
443
444
|
|
|
444
445
|
/**
|
|
445
446
|
* Converts a quantity in degrees to radians.
|
|
@@ -449,7 +450,7 @@ export const any = /*@__PURE__*/ nodeProxy( MathNode, MathNode.ANY ).setParamete
|
|
|
449
450
|
* @param {Node | number} x - The input in degrees.
|
|
450
451
|
* @returns {Node}
|
|
451
452
|
*/
|
|
452
|
-
export const radians = /*@__PURE__*/
|
|
453
|
+
export const radians = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.RADIANS ).setParameterLength( 1 );
|
|
453
454
|
|
|
454
455
|
/**
|
|
455
456
|
* Convert a quantity in radians to degrees.
|
|
@@ -459,7 +460,7 @@ export const radians = /*@__PURE__*/ nodeProxy( MathNode, MathNode.RADIANS ).set
|
|
|
459
460
|
* @param {Node | number} x - The input in radians.
|
|
460
461
|
* @returns {Node}
|
|
461
462
|
*/
|
|
462
|
-
export const degrees = /*@__PURE__*/
|
|
463
|
+
export const degrees = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.DEGREES ).setParameterLength( 1 );
|
|
463
464
|
|
|
464
465
|
/**
|
|
465
466
|
* Returns the natural exponentiation of the parameter.
|
|
@@ -469,7 +470,7 @@ export const degrees = /*@__PURE__*/ nodeProxy( MathNode, MathNode.DEGREES ).set
|
|
|
469
470
|
* @param {Node | number} x - The parameter.
|
|
470
471
|
* @returns {Node}
|
|
471
472
|
*/
|
|
472
|
-
export const exp = /*@__PURE__*/
|
|
473
|
+
export const exp = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.EXP ).setParameterLength( 1 );
|
|
473
474
|
|
|
474
475
|
/**
|
|
475
476
|
* Returns 2 raised to the power of the parameter.
|
|
@@ -479,7 +480,7 @@ export const exp = /*@__PURE__*/ nodeProxy( MathNode, MathNode.EXP ).setParamete
|
|
|
479
480
|
* @param {Node | number} x - The parameter.
|
|
480
481
|
* @returns {Node}
|
|
481
482
|
*/
|
|
482
|
-
export const exp2 = /*@__PURE__*/
|
|
483
|
+
export const exp2 = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.EXP2 ).setParameterLength( 1 );
|
|
483
484
|
|
|
484
485
|
/**
|
|
485
486
|
* Returns the natural logarithm of the parameter.
|
|
@@ -489,7 +490,7 @@ export const exp2 = /*@__PURE__*/ nodeProxy( MathNode, MathNode.EXP2 ).setParame
|
|
|
489
490
|
* @param {Node | number} x - The parameter.
|
|
490
491
|
* @returns {Node}
|
|
491
492
|
*/
|
|
492
|
-
export const log = /*@__PURE__*/
|
|
493
|
+
export const log = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.LOG ).setParameterLength( 1 );
|
|
493
494
|
|
|
494
495
|
/**
|
|
495
496
|
* Returns the base 2 logarithm of the parameter.
|
|
@@ -499,7 +500,7 @@ export const log = /*@__PURE__*/ nodeProxy( MathNode, MathNode.LOG ).setParamete
|
|
|
499
500
|
* @param {Node | number} x - The parameter.
|
|
500
501
|
* @returns {Node}
|
|
501
502
|
*/
|
|
502
|
-
export const log2 = /*@__PURE__*/
|
|
503
|
+
export const log2 = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.LOG2 ).setParameterLength( 1 );
|
|
503
504
|
|
|
504
505
|
/**
|
|
505
506
|
* Returns the square root of the parameter.
|
|
@@ -509,7 +510,7 @@ export const log2 = /*@__PURE__*/ nodeProxy( MathNode, MathNode.LOG2 ).setParame
|
|
|
509
510
|
* @param {Node | number} x - The parameter.
|
|
510
511
|
* @returns {Node}
|
|
511
512
|
*/
|
|
512
|
-
export const sqrt = /*@__PURE__*/
|
|
513
|
+
export const sqrt = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.SQRT ).setParameterLength( 1 );
|
|
513
514
|
|
|
514
515
|
/**
|
|
515
516
|
* Returns the inverse of the square root of the parameter.
|
|
@@ -519,7 +520,7 @@ export const sqrt = /*@__PURE__*/ nodeProxy( MathNode, MathNode.SQRT ).setParame
|
|
|
519
520
|
* @param {Node | number} x - The parameter.
|
|
520
521
|
* @returns {Node}
|
|
521
522
|
*/
|
|
522
|
-
export const inverseSqrt = /*@__PURE__*/
|
|
523
|
+
export const inverseSqrt = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.INVERSE_SQRT ).setParameterLength( 1 );
|
|
523
524
|
|
|
524
525
|
/**
|
|
525
526
|
* Finds the nearest integer less than or equal to the parameter.
|
|
@@ -529,7 +530,7 @@ export const inverseSqrt = /*@__PURE__*/ nodeProxy( MathNode, MathNode.INVERSE_S
|
|
|
529
530
|
* @param {Node | number} x - The parameter.
|
|
530
531
|
* @returns {Node}
|
|
531
532
|
*/
|
|
532
|
-
export const floor = /*@__PURE__*/
|
|
533
|
+
export const floor = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.FLOOR ).setParameterLength( 1 );
|
|
533
534
|
|
|
534
535
|
/**
|
|
535
536
|
* Finds the nearest integer that is greater than or equal to the parameter.
|
|
@@ -539,7 +540,7 @@ export const floor = /*@__PURE__*/ nodeProxy( MathNode, MathNode.FLOOR ).setPara
|
|
|
539
540
|
* @param {Node | number} x - The parameter.
|
|
540
541
|
* @returns {Node}
|
|
541
542
|
*/
|
|
542
|
-
export const ceil = /*@__PURE__*/
|
|
543
|
+
export const ceil = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.CEIL ).setParameterLength( 1 );
|
|
543
544
|
|
|
544
545
|
/**
|
|
545
546
|
* Calculates the unit vector in the same direction as the original vector.
|
|
@@ -549,7 +550,7 @@ export const ceil = /*@__PURE__*/ nodeProxy( MathNode, MathNode.CEIL ).setParame
|
|
|
549
550
|
* @param {Node} x - The input vector.
|
|
550
551
|
* @returns {Node}
|
|
551
552
|
*/
|
|
552
|
-
export const normalize = /*@__PURE__*/
|
|
553
|
+
export const normalize = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.NORMALIZE ).setParameterLength( 1 );
|
|
553
554
|
|
|
554
555
|
/**
|
|
555
556
|
* Computes the fractional part of the parameter.
|
|
@@ -559,7 +560,7 @@ export const normalize = /*@__PURE__*/ nodeProxy( MathNode, MathNode.NORMALIZE )
|
|
|
559
560
|
* @param {Node | number} x - The parameter.
|
|
560
561
|
* @returns {Node}
|
|
561
562
|
*/
|
|
562
|
-
export const fract = /*@__PURE__*/
|
|
563
|
+
export const fract = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.FRACT ).setParameterLength( 1 );
|
|
563
564
|
|
|
564
565
|
/**
|
|
565
566
|
* Returns the sine of the parameter.
|
|
@@ -569,7 +570,7 @@ export const fract = /*@__PURE__*/ nodeProxy( MathNode, MathNode.FRACT ).setPara
|
|
|
569
570
|
* @param {Node | number} x - The parameter.
|
|
570
571
|
* @returns {Node}
|
|
571
572
|
*/
|
|
572
|
-
export const sin = /*@__PURE__*/
|
|
573
|
+
export const sin = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.SIN ).setParameterLength( 1 );
|
|
573
574
|
|
|
574
575
|
/**
|
|
575
576
|
* Returns the cosine of the parameter.
|
|
@@ -579,7 +580,7 @@ export const sin = /*@__PURE__*/ nodeProxy( MathNode, MathNode.SIN ).setParamete
|
|
|
579
580
|
* @param {Node | number} x - The parameter.
|
|
580
581
|
* @returns {Node}
|
|
581
582
|
*/
|
|
582
|
-
export const cos = /*@__PURE__*/
|
|
583
|
+
export const cos = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.COS ).setParameterLength( 1 );
|
|
583
584
|
|
|
584
585
|
/**
|
|
585
586
|
* Returns the tangent of the parameter.
|
|
@@ -589,7 +590,7 @@ export const cos = /*@__PURE__*/ nodeProxy( MathNode, MathNode.COS ).setParamete
|
|
|
589
590
|
* @param {Node | number} x - The parameter.
|
|
590
591
|
* @returns {Node}
|
|
591
592
|
*/
|
|
592
|
-
export const tan = /*@__PURE__*/
|
|
593
|
+
export const tan = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.TAN ).setParameterLength( 1 );
|
|
593
594
|
|
|
594
595
|
/**
|
|
595
596
|
* Returns the arcsine of the parameter.
|
|
@@ -599,7 +600,7 @@ export const tan = /*@__PURE__*/ nodeProxy( MathNode, MathNode.TAN ).setParamete
|
|
|
599
600
|
* @param {Node | number} x - The parameter.
|
|
600
601
|
* @returns {Node}
|
|
601
602
|
*/
|
|
602
|
-
export const asin = /*@__PURE__*/
|
|
603
|
+
export const asin = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.ASIN ).setParameterLength( 1 );
|
|
603
604
|
|
|
604
605
|
/**
|
|
605
606
|
* Returns the arccosine of the parameter.
|
|
@@ -609,7 +610,7 @@ export const asin = /*@__PURE__*/ nodeProxy( MathNode, MathNode.ASIN ).setParame
|
|
|
609
610
|
* @param {Node | number} x - The parameter.
|
|
610
611
|
* @returns {Node}
|
|
611
612
|
*/
|
|
612
|
-
export const acos = /*@__PURE__*/
|
|
613
|
+
export const acos = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.ACOS ).setParameterLength( 1 );
|
|
613
614
|
|
|
614
615
|
/**
|
|
615
616
|
* Returns the arc-tangent of the parameter.
|
|
@@ -621,7 +622,7 @@ export const acos = /*@__PURE__*/ nodeProxy( MathNode, MathNode.ACOS ).setParame
|
|
|
621
622
|
* @param {?(Node | number)} x - The x parameter.
|
|
622
623
|
* @returns {Node}
|
|
623
624
|
*/
|
|
624
|
-
export const atan = /*@__PURE__*/
|
|
625
|
+
export const atan = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.ATAN ).setParameterLength( 1, 2 );
|
|
625
626
|
|
|
626
627
|
/**
|
|
627
628
|
* Returns the absolute value of the parameter.
|
|
@@ -631,7 +632,7 @@ export const atan = /*@__PURE__*/ nodeProxy( MathNode, MathNode.ATAN ).setParame
|
|
|
631
632
|
* @param {Node | number} x - The parameter.
|
|
632
633
|
* @returns {Node}
|
|
633
634
|
*/
|
|
634
|
-
export const abs = /*@__PURE__*/
|
|
635
|
+
export const abs = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.ABS ).setParameterLength( 1 );
|
|
635
636
|
|
|
636
637
|
/**
|
|
637
638
|
* Extracts the sign of the parameter.
|
|
@@ -641,7 +642,7 @@ export const abs = /*@__PURE__*/ nodeProxy( MathNode, MathNode.ABS ).setParamete
|
|
|
641
642
|
* @param {Node | number} x - The parameter.
|
|
642
643
|
* @returns {Node}
|
|
643
644
|
*/
|
|
644
|
-
export const sign = /*@__PURE__*/
|
|
645
|
+
export const sign = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.SIGN ).setParameterLength( 1 );
|
|
645
646
|
|
|
646
647
|
/**
|
|
647
648
|
* Calculates the length of a vector.
|
|
@@ -651,7 +652,7 @@ export const sign = /*@__PURE__*/ nodeProxy( MathNode, MathNode.SIGN ).setParame
|
|
|
651
652
|
* @param {Node} x - The parameter.
|
|
652
653
|
* @returns {Node<float>}
|
|
653
654
|
*/
|
|
654
|
-
export const length = /*@__PURE__*/
|
|
655
|
+
export const length = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.LENGTH ).setParameterLength( 1 );
|
|
655
656
|
|
|
656
657
|
/**
|
|
657
658
|
* Negates the value of the parameter (-x).
|
|
@@ -661,7 +662,7 @@ export const length = /*@__PURE__*/ nodeProxy( MathNode, MathNode.LENGTH ).setPa
|
|
|
661
662
|
* @param {Node | number} x - The parameter.
|
|
662
663
|
* @returns {Node}
|
|
663
664
|
*/
|
|
664
|
-
export const negate = /*@__PURE__*/
|
|
665
|
+
export const negate = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.NEGATE ).setParameterLength( 1 );
|
|
665
666
|
|
|
666
667
|
/**
|
|
667
668
|
* Return `1` minus the parameter.
|
|
@@ -671,7 +672,7 @@ export const negate = /*@__PURE__*/ nodeProxy( MathNode, MathNode.NEGATE ).setPa
|
|
|
671
672
|
* @param {Node | number} x - The parameter.
|
|
672
673
|
* @returns {Node}
|
|
673
674
|
*/
|
|
674
|
-
export const oneMinus = /*@__PURE__*/
|
|
675
|
+
export const oneMinus = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.ONE_MINUS ).setParameterLength( 1 );
|
|
675
676
|
|
|
676
677
|
/**
|
|
677
678
|
* Returns the partial derivative of the parameter with respect to x.
|
|
@@ -681,7 +682,7 @@ export const oneMinus = /*@__PURE__*/ nodeProxy( MathNode, MathNode.ONE_MINUS ).
|
|
|
681
682
|
* @param {Node | number} x - The parameter.
|
|
682
683
|
* @returns {Node}
|
|
683
684
|
*/
|
|
684
|
-
export const dFdx = /*@__PURE__*/
|
|
685
|
+
export const dFdx = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.DFDX ).setParameterLength( 1 );
|
|
685
686
|
|
|
686
687
|
/**
|
|
687
688
|
* Returns the partial derivative of the parameter with respect to y.
|
|
@@ -691,7 +692,7 @@ export const dFdx = /*@__PURE__*/ nodeProxy( MathNode, MathNode.DFDX ).setParame
|
|
|
691
692
|
* @param {Node | number} x - The parameter.
|
|
692
693
|
* @returns {Node}
|
|
693
694
|
*/
|
|
694
|
-
export const dFdy = /*@__PURE__*/
|
|
695
|
+
export const dFdy = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.DFDY ).setParameterLength( 1 );
|
|
695
696
|
|
|
696
697
|
/**
|
|
697
698
|
* Rounds the parameter to the nearest integer.
|
|
@@ -701,7 +702,7 @@ export const dFdy = /*@__PURE__*/ nodeProxy( MathNode, MathNode.DFDY ).setParame
|
|
|
701
702
|
* @param {Node | number} x - The parameter.
|
|
702
703
|
* @returns {Node}
|
|
703
704
|
*/
|
|
704
|
-
export const round = /*@__PURE__*/
|
|
705
|
+
export const round = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.ROUND ).setParameterLength( 1 );
|
|
705
706
|
|
|
706
707
|
/**
|
|
707
708
|
* Returns the reciprocal of the parameter `(1/x)`.
|
|
@@ -711,7 +712,7 @@ export const round = /*@__PURE__*/ nodeProxy( MathNode, MathNode.ROUND ).setPara
|
|
|
711
712
|
* @param {Node | number} x - The parameter.
|
|
712
713
|
* @returns {Node}
|
|
713
714
|
*/
|
|
714
|
-
export const reciprocal = /*@__PURE__*/
|
|
715
|
+
export const reciprocal = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.RECIPROCAL ).setParameterLength( 1 );
|
|
715
716
|
|
|
716
717
|
/**
|
|
717
718
|
* Truncates the parameter, removing the fractional part.
|
|
@@ -721,7 +722,7 @@ export const reciprocal = /*@__PURE__*/ nodeProxy( MathNode, MathNode.RECIPROCAL
|
|
|
721
722
|
* @param {Node | number} x - The parameter.
|
|
722
723
|
* @returns {Node}
|
|
723
724
|
*/
|
|
724
|
-
export const trunc = /*@__PURE__*/
|
|
725
|
+
export const trunc = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.TRUNC ).setParameterLength( 1 );
|
|
725
726
|
|
|
726
727
|
/**
|
|
727
728
|
* Returns the sum of the absolute derivatives in x and y.
|
|
@@ -731,7 +732,7 @@ export const trunc = /*@__PURE__*/ nodeProxy( MathNode, MathNode.TRUNC ).setPara
|
|
|
731
732
|
* @param {Node | number} x - The parameter.
|
|
732
733
|
* @returns {Node}
|
|
733
734
|
*/
|
|
734
|
-
export const fwidth = /*@__PURE__*/
|
|
735
|
+
export const fwidth = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.FWIDTH ).setParameterLength( 1 );
|
|
735
736
|
|
|
736
737
|
/**
|
|
737
738
|
* Returns the transpose of a matrix.
|
|
@@ -741,20 +742,29 @@ export const fwidth = /*@__PURE__*/ nodeProxy( MathNode, MathNode.FWIDTH ).setPa
|
|
|
741
742
|
* @param {Node<mat2|mat3|mat4>} x - The parameter.
|
|
742
743
|
* @returns {Node}
|
|
743
744
|
*/
|
|
744
|
-
export const transpose = /*@__PURE__*/
|
|
745
|
+
export const transpose = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.TRANSPOSE ).setParameterLength( 1 );
|
|
745
746
|
|
|
746
|
-
|
|
747
|
+
/**
|
|
748
|
+
* Returns the determinant of a matrix.
|
|
749
|
+
*
|
|
750
|
+
* @tsl
|
|
751
|
+
* @function
|
|
752
|
+
* @param {Node<mat2|mat3|mat4>} x - The parameter.
|
|
753
|
+
* @returns {Node<float>}
|
|
754
|
+
*/
|
|
755
|
+
export const determinant = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.DETERMINANT ).setParameterLength( 1 );
|
|
747
756
|
|
|
748
757
|
/**
|
|
749
|
-
*
|
|
758
|
+
* Returns the inverse of a matrix.
|
|
750
759
|
*
|
|
751
760
|
* @tsl
|
|
752
761
|
* @function
|
|
753
|
-
* @param {Node
|
|
754
|
-
* @
|
|
755
|
-
* @returns {Node}
|
|
762
|
+
* @param {Node<mat2|mat3|mat4>} x - The parameter.
|
|
763
|
+
* @returns {Node<mat2|mat3|mat4>}
|
|
756
764
|
*/
|
|
757
|
-
export const
|
|
765
|
+
export const inverse = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.INVERSE ).setParameterLength( 1 );
|
|
766
|
+
|
|
767
|
+
// 2 inputs
|
|
758
768
|
|
|
759
769
|
/**
|
|
760
770
|
* Returns `true` if `x` equals `y`.
|
|
@@ -781,7 +791,7 @@ export const equals = ( x, y ) => { // @deprecated, r172
|
|
|
781
791
|
* @param {...(Node | number)} values - The values to compare.
|
|
782
792
|
* @returns {Node}
|
|
783
793
|
*/
|
|
784
|
-
export const min = /*@__PURE__*/
|
|
794
|
+
export const min = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.MIN ).setParameterLength( 2, Infinity );
|
|
785
795
|
|
|
786
796
|
/**
|
|
787
797
|
* Returns the greatest of the given values.
|
|
@@ -791,7 +801,7 @@ export const min = /*@__PURE__*/ nodeProxy( MathNode, MathNode.MIN ).setParamete
|
|
|
791
801
|
* @param {...(Node | number)} values - The values to compare.
|
|
792
802
|
* @returns {Node}
|
|
793
803
|
*/
|
|
794
|
-
export const max = /*@__PURE__*/
|
|
804
|
+
export const max = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.MAX ).setParameterLength( 2, Infinity );
|
|
795
805
|
|
|
796
806
|
/**
|
|
797
807
|
* Generate a step function by comparing two values.
|
|
@@ -802,7 +812,7 @@ export const max = /*@__PURE__*/ nodeProxy( MathNode, MathNode.MAX ).setParamete
|
|
|
802
812
|
* @param {Node | number} y - The x parameter.
|
|
803
813
|
* @returns {Node}
|
|
804
814
|
*/
|
|
805
|
-
export const step = /*@__PURE__*/
|
|
815
|
+
export const step = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.STEP ).setParameterLength( 2 );
|
|
806
816
|
|
|
807
817
|
/**
|
|
808
818
|
* Calculates the reflection direction for an incident vector.
|
|
@@ -813,7 +823,7 @@ export const step = /*@__PURE__*/ nodeProxy( MathNode, MathNode.STEP ).setParame
|
|
|
813
823
|
* @param {Node<vec2|vec3|vec4>} N - The normal vector.
|
|
814
824
|
* @returns {Node<vec2|vec3|vec4>}
|
|
815
825
|
*/
|
|
816
|
-
export const reflect = /*@__PURE__*/
|
|
826
|
+
export const reflect = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.REFLECT ).setParameterLength( 2 );
|
|
817
827
|
|
|
818
828
|
/**
|
|
819
829
|
* Calculates the distance between two points.
|
|
@@ -824,7 +834,7 @@ export const reflect = /*@__PURE__*/ nodeProxy( MathNode, MathNode.REFLECT ).set
|
|
|
824
834
|
* @param {Node<vec2|vec3|vec4>} y - The second point.
|
|
825
835
|
* @returns {Node<float>}
|
|
826
836
|
*/
|
|
827
|
-
export const distance = /*@__PURE__*/
|
|
837
|
+
export const distance = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.DISTANCE ).setParameterLength( 2 );
|
|
828
838
|
|
|
829
839
|
/**
|
|
830
840
|
* Calculates the absolute difference between two values.
|
|
@@ -835,7 +845,7 @@ export const distance = /*@__PURE__*/ nodeProxy( MathNode, MathNode.DISTANCE ).s
|
|
|
835
845
|
* @param {Node | number} y - The second parameter.
|
|
836
846
|
* @returns {Node}
|
|
837
847
|
*/
|
|
838
|
-
export const difference = /*@__PURE__*/
|
|
848
|
+
export const difference = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.DIFFERENCE ).setParameterLength( 2 );
|
|
839
849
|
|
|
840
850
|
/**
|
|
841
851
|
* Calculates the dot product of two vectors.
|
|
@@ -846,18 +856,18 @@ export const difference = /*@__PURE__*/ nodeProxy( MathNode, MathNode.DIFFERENCE
|
|
|
846
856
|
* @param {Node<vec2|vec3|vec4>} y - The second vector.
|
|
847
857
|
* @returns {Node<float>}
|
|
848
858
|
*/
|
|
849
|
-
export const dot = /*@__PURE__*/
|
|
859
|
+
export const dot = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.DOT ).setParameterLength( 2 );
|
|
850
860
|
|
|
851
861
|
/**
|
|
852
862
|
* Calculates the cross product of two vectors.
|
|
853
863
|
*
|
|
854
864
|
* @tsl
|
|
855
865
|
* @function
|
|
856
|
-
* @param {Node<vec2|vec3
|
|
857
|
-
* @param {Node<vec2|vec3
|
|
858
|
-
* @returns {Node<
|
|
866
|
+
* @param {Node<vec2|vec3>} x - The first vector.
|
|
867
|
+
* @param {Node<vec2|vec3>} y - The second vector.
|
|
868
|
+
* @returns {Node<float|vec3>}
|
|
859
869
|
*/
|
|
860
|
-
export const cross = /*@__PURE__*/
|
|
870
|
+
export const cross = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.CROSS ).setParameterLength( 2 );
|
|
861
871
|
|
|
862
872
|
/**
|
|
863
873
|
* Return the value of the first parameter raised to the power of the second one.
|
|
@@ -868,7 +878,7 @@ export const cross = /*@__PURE__*/ nodeProxy( MathNode, MathNode.CROSS ).setPara
|
|
|
868
878
|
* @param {Node | number} y - The second parameter.
|
|
869
879
|
* @returns {Node}
|
|
870
880
|
*/
|
|
871
|
-
export const pow = /*@__PURE__*/
|
|
881
|
+
export const pow = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.POW ).setParameterLength( 2 );
|
|
872
882
|
|
|
873
883
|
/**
|
|
874
884
|
* Returns the square of the parameter.
|
|
@@ -878,7 +888,7 @@ export const pow = /*@__PURE__*/ nodeProxy( MathNode, MathNode.POW ).setParamete
|
|
|
878
888
|
* @param {Node | number} x - The first parameter.
|
|
879
889
|
* @returns {Node}
|
|
880
890
|
*/
|
|
881
|
-
export const pow2 =
|
|
891
|
+
export const pow2 = ( x ) => mul( x, x );
|
|
882
892
|
|
|
883
893
|
/**
|
|
884
894
|
* Returns the cube of the parameter.
|
|
@@ -888,7 +898,7 @@ export const pow2 = /*@__PURE__*/ nodeProxy( MathNode, MathNode.POW, 2 ).setPara
|
|
|
888
898
|
* @param {Node | number} x - The first parameter.
|
|
889
899
|
* @returns {Node}
|
|
890
900
|
*/
|
|
891
|
-
export const pow3 =
|
|
901
|
+
export const pow3 = ( x ) => mul( x, x, x );
|
|
892
902
|
|
|
893
903
|
/**
|
|
894
904
|
* Returns the fourth power of the parameter.
|
|
@@ -898,7 +908,7 @@ export const pow3 = /*@__PURE__*/ nodeProxy( MathNode, MathNode.POW, 3 ).setPara
|
|
|
898
908
|
* @param {Node | number} x - The first parameter.
|
|
899
909
|
* @returns {Node}
|
|
900
910
|
*/
|
|
901
|
-
export const pow4 =
|
|
911
|
+
export const pow4 = ( x ) => mul( x, x, x, x );
|
|
902
912
|
|
|
903
913
|
/**
|
|
904
914
|
* Transforms the direction of a vector by a matrix and then normalizes the result.
|
|
@@ -909,7 +919,7 @@ export const pow4 = /*@__PURE__*/ nodeProxy( MathNode, MathNode.POW, 4 ).setPara
|
|
|
909
919
|
* @param {Node<mat2|mat3|mat4>} matrix - The transformation matrix.
|
|
910
920
|
* @returns {Node}
|
|
911
921
|
*/
|
|
912
|
-
export const transformDirection = /*@__PURE__*/
|
|
922
|
+
export const transformDirection = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.TRANSFORM_DIRECTION ).setParameterLength( 2 );
|
|
913
923
|
|
|
914
924
|
/**
|
|
915
925
|
* Returns the cube root of a number.
|
|
@@ -941,7 +951,7 @@ export const lengthSq = ( a ) => dot( a, a );
|
|
|
941
951
|
* @param {Node | number} t - The interpolation value.
|
|
942
952
|
* @returns {Node}
|
|
943
953
|
*/
|
|
944
|
-
export const mix = /*@__PURE__*/
|
|
954
|
+
export const mix = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.MIX ).setParameterLength( 3 );
|
|
945
955
|
|
|
946
956
|
/**
|
|
947
957
|
* Constrains a value to lie between two further values.
|
|
@@ -975,7 +985,7 @@ export const saturate = ( value ) => clamp( value );
|
|
|
975
985
|
* @param {Node<float>} eta - The ratio of indices of refraction.
|
|
976
986
|
* @returns {Node<vec2|vec3|vec4>}
|
|
977
987
|
*/
|
|
978
|
-
export const refract = /*@__PURE__*/
|
|
988
|
+
export const refract = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.REFRACT ).setParameterLength( 3 );
|
|
979
989
|
|
|
980
990
|
/**
|
|
981
991
|
* Performs a Hermite interpolation between two values.
|
|
@@ -987,7 +997,7 @@ export const refract = /*@__PURE__*/ nodeProxy( MathNode, MathNode.REFRACT ).set
|
|
|
987
997
|
* @param {Node | number} x - The source value for interpolation.
|
|
988
998
|
* @returns {Node}
|
|
989
999
|
*/
|
|
990
|
-
export const smoothstep = /*@__PURE__*/
|
|
1000
|
+
export const smoothstep = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.SMOOTHSTEP ).setParameterLength( 3 );
|
|
991
1001
|
|
|
992
1002
|
/**
|
|
993
1003
|
* Returns a vector pointing in the same direction as another.
|
|
@@ -999,7 +1009,7 @@ export const smoothstep = /*@__PURE__*/ nodeProxy( MathNode, MathNode.SMOOTHSTEP
|
|
|
999
1009
|
* @param {Node<vec2|vec3|vec4>} Nref - The reference vector.
|
|
1000
1010
|
* @returns {Node<vec2|vec3|vec4>}
|
|
1001
1011
|
*/
|
|
1002
|
-
export const faceForward = /*@__PURE__*/
|
|
1012
|
+
export const faceForward = /*@__PURE__*/ nodeProxyIntent( MathNode, MathNode.FACEFORWARD ).setParameterLength( 3 );
|
|
1003
1013
|
|
|
1004
1014
|
/**
|
|
1005
1015
|
* Returns a random value for the given uv.
|
|
@@ -1134,4 +1144,6 @@ addMethodChaining( 'difference', difference );
|
|
|
1134
1144
|
addMethodChaining( 'saturate', saturate );
|
|
1135
1145
|
addMethodChaining( 'cbrt', cbrt );
|
|
1136
1146
|
addMethodChaining( 'transpose', transpose );
|
|
1147
|
+
addMethodChaining( 'determinant', determinant );
|
|
1148
|
+
addMethodChaining( 'inverse', inverse );
|
|
1137
1149
|
addMethodChaining( 'rand', rand );
|