From 86018eb716f9fc161dc3982983324206df4ac177 Mon Sep 17 00:00:00 2001 From: sunag Date: Wed, 18 Dec 2024 19:05:01 -0300 Subject: [PATCH] TSL: GLSL alias functions (#30150) --- 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 6264204b519a59..868db5198be559 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 );