From c439991a90b1580aa84926f7e9e3022ce5745743 Mon Sep 17 00:00:00 2001 From: sunag Date: Tue, 17 Dec 2024 18:09:31 -0300 Subject: [PATCH] GLSL alias functions --- src/Three.TSL.js | 2 ++ src/nodes/math/MathNode.js | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/Three.TSL.js b/src/Three.TSL.js index 07fd8ff155a309..f91d84b539417d 100644 --- a/src/Three.TSL.js +++ b/src/Three.TSL.js @@ -155,6 +155,7 @@ export const exp2 = TSL.exp2; export const expression = TSL.expression; export const faceDirection = TSL.faceDirection; export const faceForward = TSL.faceForward; +export const faceforward = TSL.faceforward; export const float = TSL.float; export const floor = TSL.floor; export const fog = TSL.fog; @@ -194,6 +195,7 @@ export const instancedDynamicBufferAttribute = TSL.instancedDynamicBufferAttribu export const instancedMesh = TSL.instancedMesh; export const int = TSL.int; export const inverseSqrt = TSL.inverseSqrt; +export const inversesqrt = TSL.inversesqrt; export const invocationLocalIndex = TSL.invocationLocalIndex; export const invocationSubgroupIndex = TSL.invocationSubgroupIndex; export const ior = TSL.ior; diff --git a/src/nodes/math/MathNode.js b/src/nodes/math/MathNode.js index 1cb67be51ba0b0..1d36e805c97f66 100644 --- a/src/nodes/math/MathNode.js +++ b/src/nodes/math/MathNode.js @@ -943,6 +943,13 @@ export const atan2 = ( y, x ) => { // @deprecated, r172 }; +// GLSL alias function + +export const faceforward = faceForward; +export const inversesqrt = inverseSqrt; + +// Method chaining + addMethodChaining( 'all', all ); addMethodChaining( 'any', any ); addMethodChaining( 'equals', equals );