Skip to content

Commit 66bb4ec

Browse files
authored
TSL: Add increment and decrement and fix unsual for() expression syntax for transpiler (#1615)
1 parent 3eedce0 commit 66bb4ec

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

types/three/src/Three.TSL.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ export const dFdx: typeof TSL.dFdx;
130130
export const dFdy: typeof TSL.dFdy;
131131
export const dashSize: typeof TSL.dashSize;
132132
export const debug: typeof TSL.debug;
133+
export const decrement: typeof TSL.decrement;
134+
export const decrementBefore: typeof TSL.decrementBefore;
133135
export const defaultBuildStages: typeof TSL.defaultBuildStages;
134136
export const defaultShaderStages: typeof TSL.defaultShaderStages;
135137
export const defined: typeof TSL.defined;
@@ -194,6 +196,8 @@ export const hash: typeof TSL.hash;
194196
export const highpModelNormalViewMatrix: typeof TSL.highpModelNormalViewMatrix;
195197
export const highPrecisionModelViewMatrix: typeof TSL.highpModelViewMatrix;
196198
export const hue: typeof TSL.hue;
199+
export const increment: typeof TSL.increment;
200+
export const incrementBefore: typeof TSL.incrementBefore;
197201
export const instance: typeof TSL.instance;
198202
export const instanceIndex: typeof TSL.instanceIndex;
199203
export const instancedArray: typeof TSL.instancedArray;

types/three/src/nodes/math/OperatorNode.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ export const bitXor: (a: NodeRepresentation, b: NodeRepresentation) => ShaderNod
7979
export const shiftLeft: (a: NodeRepresentation, b: NodeRepresentation) => ShaderNodeObject<OperatorNode>;
8080
export const shiftRight: (a: NodeRepresentation, b: NodeRepresentation) => ShaderNodeObject<OperatorNode>;
8181

82+
export const incrementBefore: (a: NodeRepresentation) => ShaderNodeObject<Node>;
83+
export const decrementBefore: (a: NodeRepresentation) => ShaderNodeObject<Node>;
84+
export const increment: (a: NodeRepresentation) => ShaderNodeObject<Node>;
85+
export const decrement: (a: NodeRepresentation) => ShaderNodeObject<Node>;
86+
8287
declare module "../tsl/TSLCore.js" {
8388
interface NodeElements {
8489
add: typeof add;
@@ -102,6 +107,10 @@ declare module "../tsl/TSLCore.js" {
102107
bitXor: typeof bitXor;
103108
shiftLeft: typeof shiftLeft;
104109
shiftRight: typeof shiftRight;
110+
incrementBefore: typeof incrementBefore;
111+
decrementBefore: typeof decrement;
112+
increment: typeof increment;
113+
decrement: typeof decrement;
105114
}
106115
}
107116

0 commit comments

Comments
 (0)