Skip to content

Commit

Permalink
usage ES6
Browse files Browse the repository at this point in the history
  • Loading branch information
linbingquan committed Dec 25, 2024
1 parent 1cd70f3 commit a91ea44
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 101 deletions.
114 changes: 57 additions & 57 deletions src/nodes/math/MathNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -951,61 +951,61 @@ export const inversesqrt = inverseSqrt;
// Method chaining

addMethodsChaining( {
all: all,
any: any,
equals: equals,
radians: radians,
degrees: degrees,
exp: exp,
exp2: exp2,
log: log,
log2: log2,
sqrt: sqrt,
inverseSqrt: inverseSqrt,
floor: floor,
ceil: ceil,
normalize: normalize,
fract: fract,
sin: sin,
cos: cos,
tan: tan,
asin: asin,
acos: acos,
atan: atan,
abs: abs,
sign: sign,
length: length,
lengthSq: lengthSq,
negate: negate,
oneMinus: oneMinus,
dFdx: dFdx,
dFdy: dFdy,
round: round,
reciprocal: reciprocal,
trunc: trunc,
fwidth: fwidth,
atan2: atan2,
min: min,
max: max,
mod: mod,
step: step,
reflect: reflect,
distance: distance,
dot: dot,
cross: cross,
pow: pow,
pow2: pow2,
pow3: pow3,
pow4: pow4,
transformDirection: transformDirection,
mix: mixElement,
clamp: clamp,
refract: refract,
smoothstep: smoothstepElement,
faceForward: faceForward,
difference: difference,
saturate: saturate,
cbrt: cbrt,
transpose: transpose,
rand: rand,
all,
any,
equals,
radians,
degrees,
exp,
exp2,
log,
log2,
sqrt,
inverseSqrt,
floor,
ceil,
normalize,
fract,
sin,
cos,
tan,
asin,
acos,
atan,
abs,
sign,
length,
lengthSq,
negate,
oneMinus,
dFdx,
dFdy,
round,
reciprocal,
trunc,
fwidth,
atan2,
min,
max,
mod,
step,
reflect,
distance,
dot,
cross,
pow,
pow2,
pow3,
pow4,
transformDirection,
mixElement,
clamp,
refract,
smoothstepElement,
faceForward,
difference,
saturate,
cbrt,
transpose,
rand,
} );
44 changes: 22 additions & 22 deletions src/nodes/math/OperatorNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,26 +527,26 @@ export const remainder = ( ...params ) => { // @deprecated, r168
};

addMethodsChaining( {
add: add,
sub: sub,
mul: mul,
div: div,
modInt: modInt,
equal: equal,
notEqual: notEqual,
lessThan: lessThan,
greaterThan: greaterThan,
lessThanEqual: lessThanEqual,
greaterThanEqual: greaterThanEqual,
and: and,
or: or,
not: not,
xor: xor,
bitAnd: bitAnd,
bitNot: bitNot,
bitOr: bitOr,
bitXor: bitXor,
shiftLeft: shiftLeft,
shiftRight: shiftRight,
remainder: remainder
add,
sub,
mul,
div,
modInt,
equal,
notEqual,
lessThan,
greaterThan,
lessThanEqual,
greaterThanEqual,
and,
or,
not,
xor,
bitAnd,
bitNot,
bitOr,
bitXor,
shiftLeft,
shiftRight,
remainder,
} );
44 changes: 22 additions & 22 deletions src/nodes/tsl/TSLCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -646,26 +646,26 @@ export const convert = ( node, types ) => nodeObject( new ConvertNode( nodeObjec
export const split = ( node, channels ) => nodeObject( new SplitNode( nodeObject( node ), channels ) );

addMethodsChaining( {
toColor: color,
toFloat: float,
toInt: int,
toUint: uint,
toBool: bool,
toVec2: vec2,
toIVec2: ivec2,
toUVec2: uvec2,
toBVec2: bvec2,
toVec3: vec3,
toIVec3: ivec3,
toUVec3: uvec3,
toBVec3: bvec3,
toVec4: vec4,
toIVec4: ivec4,
toUVec4: uvec4,
toBVec4: bvec4,
toMat2: mat2,
toMat3: mat3,
toMat4: mat4,
element: element,
convert: convert
color,
float,
int,
uint,
bool,
vec2,
ivec2,
uvec2,
bvec2,
vec3,
ivec3,
uvec3,
bvec3,
vec4,
ivec4,
uvec4,
bvec4,
mat2,
mat3,
mat4,
element,
convert,
} );

0 comments on commit a91ea44

Please sign in to comment.