@poolzin/pool-bot 2026.1.37 → 2026.1.39
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/CHANGELOG.md +9 -98
- package/dist/agents/tools/memory-tool.js +1 -2
- package/dist/agents/workspace.js +1 -5
- package/dist/build-info.json +3 -3
- package/dist/channels/plugins/agent-tools/whatsapp-login.js +1 -17
- package/dist/commands/doctor-state-integrity.js +2 -14
- package/dist/config/types.js +0 -1
- package/dist/config/zod-schema.js +0 -6
- package/dist/discord/monitor/message-handler.process.js +6 -4
- package/dist/gateway/client.js +0 -14
- package/dist/gateway/server.impl.js +0 -4
- package/dist/memory/index.js +0 -5
- package/dist/memory/manager.js +2 -25
- package/dist/slack/monitor/message-handler/prepare.js +10 -4
- package/dist/slack/monitor/slash.js +10 -4
- package/extensions/memory-core/package.json +0 -3
- package/package.json +3 -2
- package/skills/webgpu-threejs-tsl/REFERENCE.md +0 -283
- package/skills/webgpu-threejs-tsl/SKILL.md +0 -91
- package/skills/webgpu-threejs-tsl/docs/compute-shaders.md +0 -404
- package/skills/webgpu-threejs-tsl/docs/core-concepts.md +0 -453
- package/skills/webgpu-threejs-tsl/docs/materials.md +0 -353
- package/skills/webgpu-threejs-tsl/docs/post-processing.md +0 -434
- package/skills/webgpu-threejs-tsl/docs/wgsl-integration.md +0 -324
- package/skills/webgpu-threejs-tsl/examples/basic-setup.js +0 -87
- package/skills/webgpu-threejs-tsl/examples/custom-material.js +0 -170
- package/skills/webgpu-threejs-tsl/examples/earth-shader.js +0 -292
- package/skills/webgpu-threejs-tsl/examples/particle-system.js +0 -259
- package/skills/webgpu-threejs-tsl/examples/post-processing.js +0 -199
- package/skills/webgpu-threejs-tsl/templates/compute-shader.js +0 -305
- package/skills/webgpu-threejs-tsl/templates/webgpu-project.js +0 -276
|
@@ -1,453 +0,0 @@
|
|
|
1
|
-
# TSL Core Concepts
|
|
2
|
-
|
|
3
|
-
## Types and Constructors
|
|
4
|
-
|
|
5
|
-
### Scalar Types
|
|
6
|
-
```javascript
|
|
7
|
-
import { float, int, uint, bool } from 'three/tsl';
|
|
8
|
-
|
|
9
|
-
const f = float(1.0);
|
|
10
|
-
const i = int(42);
|
|
11
|
-
const u = uint(100);
|
|
12
|
-
const b = bool(true);
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Vector Types
|
|
16
|
-
```javascript
|
|
17
|
-
import { vec2, vec3, vec4, color } from 'three/tsl';
|
|
18
|
-
|
|
19
|
-
const v2 = vec2(1.0, 2.0);
|
|
20
|
-
const v3 = vec3(1.0, 2.0, 3.0);
|
|
21
|
-
const v4 = vec4(1.0, 2.0, 3.0, 1.0);
|
|
22
|
-
|
|
23
|
-
// Color (RGB, accepts hex or components)
|
|
24
|
-
const c = color(0xff0000); // Red
|
|
25
|
-
const c2 = color(1, 0.5, 0); // Orange
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Matrix Types
|
|
29
|
-
```javascript
|
|
30
|
-
import { mat2, mat3, mat4 } from 'three/tsl';
|
|
31
|
-
|
|
32
|
-
const m3 = mat3();
|
|
33
|
-
const m4 = mat4();
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Type Conversion
|
|
37
|
-
```javascript
|
|
38
|
-
const v = vec3(1, 2, 3);
|
|
39
|
-
const v4 = v.toVec4(1.0); // vec4(1, 2, 3, 1)
|
|
40
|
-
const f = int(42).toFloat(); // 42.0
|
|
41
|
-
const c = v.toColor(); // Convert to color
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Vector Swizzling
|
|
45
|
-
|
|
46
|
-
Access and reorder vector components using standard notation:
|
|
47
|
-
|
|
48
|
-
```javascript
|
|
49
|
-
const v = vec3(1.0, 2.0, 3.0);
|
|
50
|
-
|
|
51
|
-
// Single component access
|
|
52
|
-
v.x // 1.0
|
|
53
|
-
v.y // 2.0
|
|
54
|
-
v.z // 3.0
|
|
55
|
-
|
|
56
|
-
// Multiple components
|
|
57
|
-
v.xy // vec2(1.0, 2.0)
|
|
58
|
-
v.xyz // vec3(1.0, 2.0, 3.0)
|
|
59
|
-
|
|
60
|
-
// Reorder components
|
|
61
|
-
v.zyx // vec3(3.0, 2.0, 1.0)
|
|
62
|
-
v.xxy // vec3(1.0, 1.0, 2.0)
|
|
63
|
-
v.rrr // vec3(1.0, 1.0, 1.0) - same as xxx
|
|
64
|
-
|
|
65
|
-
// Alternative accessors (all equivalent)
|
|
66
|
-
v.xyz // position
|
|
67
|
-
v.rgb // color
|
|
68
|
-
v.stp // texture coordinates
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Uniforms
|
|
72
|
-
|
|
73
|
-
Uniforms pass values from JavaScript to shaders:
|
|
74
|
-
|
|
75
|
-
```javascript
|
|
76
|
-
import { uniform } from 'three/tsl';
|
|
77
|
-
import * as THREE from 'three/webgpu';
|
|
78
|
-
|
|
79
|
-
// Create uniforms
|
|
80
|
-
const myColor = uniform(new THREE.Color(0x0066ff));
|
|
81
|
-
const myFloat = uniform(0.5);
|
|
82
|
-
const myVec3 = uniform(new THREE.Vector3(1, 2, 3));
|
|
83
|
-
|
|
84
|
-
// Update at runtime
|
|
85
|
-
myColor.value.set(0xff0000);
|
|
86
|
-
myFloat.value = 0.8;
|
|
87
|
-
myVec3.value.set(4, 5, 6);
|
|
88
|
-
|
|
89
|
-
// Use in material
|
|
90
|
-
material.colorNode = myColor;
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Auto-Updating Uniforms
|
|
94
|
-
|
|
95
|
-
```javascript
|
|
96
|
-
// Update every frame
|
|
97
|
-
const animatedValue = uniform(0).onFrameUpdate((frame) => {
|
|
98
|
-
return Math.sin(frame.time);
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// Update per object render
|
|
102
|
-
const perObjectValue = uniform(0).onObjectUpdate((object) => {
|
|
103
|
-
return object.userData.customValue;
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
// Update once per render cycle
|
|
107
|
-
const renderValue = uniform(0).onRenderUpdate((state) => {
|
|
108
|
-
return state.delta;
|
|
109
|
-
});
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Operators
|
|
113
|
-
|
|
114
|
-
### Arithmetic
|
|
115
|
-
```javascript
|
|
116
|
-
// Method chaining (preferred)
|
|
117
|
-
const result = a.add(b).mul(c).sub(d).div(e);
|
|
118
|
-
|
|
119
|
-
// Individual operations
|
|
120
|
-
a.add(b) // a + b
|
|
121
|
-
a.sub(b) // a - b
|
|
122
|
-
a.mul(b) // a * b
|
|
123
|
-
a.div(b) // a / b
|
|
124
|
-
a.mod(b) // a % b
|
|
125
|
-
a.negate() // -a
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Comparison
|
|
129
|
-
```javascript
|
|
130
|
-
a.equal(b) // a == b
|
|
131
|
-
a.notEqual(b) // a != b
|
|
132
|
-
a.lessThan(b) // a < b
|
|
133
|
-
a.greaterThan(b) // a > b
|
|
134
|
-
a.lessThanEqual(b) // a <= b
|
|
135
|
-
a.greaterThanEqual(b) // a >= b
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Logical
|
|
139
|
-
```javascript
|
|
140
|
-
a.and(b) // a && b
|
|
141
|
-
a.or(b) // a || b
|
|
142
|
-
a.not() // !a
|
|
143
|
-
a.xor(b) // a ^ b
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Bitwise
|
|
147
|
-
```javascript
|
|
148
|
-
a.bitAnd(b) // a & b
|
|
149
|
-
a.bitOr(b) // a | b
|
|
150
|
-
a.bitXor(b) // a ^ b
|
|
151
|
-
a.bitNot() // ~a
|
|
152
|
-
a.shiftLeft(n) // a << n
|
|
153
|
-
a.shiftRight(n) // a >> n
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
### Assignment (for variables)
|
|
157
|
-
```javascript
|
|
158
|
-
const v = vec3(0).toVar(); // Create mutable variable
|
|
159
|
-
|
|
160
|
-
v.assign(vec3(1, 2, 3)); // v = vec3(1, 2, 3)
|
|
161
|
-
v.addAssign(vec3(1)); // v += vec3(1)
|
|
162
|
-
v.subAssign(vec3(1)); // v -= vec3(1)
|
|
163
|
-
v.mulAssign(2.0); // v *= 2.0
|
|
164
|
-
v.divAssign(2.0); // v /= 2.0
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
## Variables
|
|
168
|
-
|
|
169
|
-
### Mutable Variables
|
|
170
|
-
```javascript
|
|
171
|
-
// Create mutable variable with toVar()
|
|
172
|
-
const myVar = vec3(1, 0, 0).toVar();
|
|
173
|
-
myVar.assign(vec3(0, 1, 0));
|
|
174
|
-
myVar.addAssign(vec3(0, 0, 1));
|
|
175
|
-
|
|
176
|
-
// Name the variable (useful for debugging)
|
|
177
|
-
const named = vec3(0).toVar('myPosition');
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Constants
|
|
181
|
-
```javascript
|
|
182
|
-
// Create compile-time constant
|
|
183
|
-
const PI_HALF = float(Math.PI / 2).toConst();
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### Properties (named values for shader stages)
|
|
187
|
-
```javascript
|
|
188
|
-
import { property } from 'three/tsl';
|
|
189
|
-
|
|
190
|
-
// Create named property
|
|
191
|
-
const myProp = property('vec3', 'customColor');
|
|
192
|
-
myProp.assign(vec3(1, 0, 0));
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
## Control Flow
|
|
196
|
-
|
|
197
|
-
### Conditionals
|
|
198
|
-
|
|
199
|
-
```javascript
|
|
200
|
-
import { If, select } from 'three/tsl';
|
|
201
|
-
|
|
202
|
-
// If-ElseIf-Else
|
|
203
|
-
const result = vec3(0).toVar();
|
|
204
|
-
|
|
205
|
-
If(value.greaterThan(0.5), () => {
|
|
206
|
-
result.assign(vec3(1, 0, 0)); // Red
|
|
207
|
-
}).ElseIf(value.greaterThan(0.25), () => {
|
|
208
|
-
result.assign(vec3(0, 1, 0)); // Green
|
|
209
|
-
}).Else(() => {
|
|
210
|
-
result.assign(vec3(0, 0, 1)); // Blue
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
// Ternary operator (select)
|
|
214
|
-
const color = select(
|
|
215
|
-
condition, // if true
|
|
216
|
-
vec3(1, 0, 0), // return this
|
|
217
|
-
vec3(0, 0, 1) // else return this
|
|
218
|
-
);
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### Switch-Case
|
|
222
|
-
|
|
223
|
-
```javascript
|
|
224
|
-
import { Switch } from 'three/tsl';
|
|
225
|
-
|
|
226
|
-
const col = vec3(0).toVar();
|
|
227
|
-
|
|
228
|
-
Switch(intValue)
|
|
229
|
-
.Case(0, () => { col.assign(color(1, 0, 0)); })
|
|
230
|
-
.Case(1, () => { col.assign(color(0, 1, 0)); })
|
|
231
|
-
.Case(2, () => { col.assign(color(0, 0, 1)); })
|
|
232
|
-
.Default(() => { col.assign(color(1, 1, 1)); });
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### Loops
|
|
236
|
-
|
|
237
|
-
```javascript
|
|
238
|
-
import { Loop, Break, Continue } from 'three/tsl';
|
|
239
|
-
|
|
240
|
-
// Simple loop (0 to 9)
|
|
241
|
-
const sum = float(0).toVar();
|
|
242
|
-
Loop(10, ({ i }) => {
|
|
243
|
-
sum.addAssign(float(i));
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
// Ranged loop with options
|
|
247
|
-
Loop({ start: int(0), end: int(count), type: 'int' }, ({ i }) => {
|
|
248
|
-
// Loop body
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
// Nested loops
|
|
252
|
-
Loop(width, height, ({ i, j }) => {
|
|
253
|
-
// i = outer loop index
|
|
254
|
-
// j = inner loop index
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
// Loop control
|
|
258
|
-
Loop(100, ({ i }) => {
|
|
259
|
-
If(shouldStop, () => {
|
|
260
|
-
Break(); // Exit loop
|
|
261
|
-
});
|
|
262
|
-
If(shouldSkip, () => {
|
|
263
|
-
Continue(); // Skip to next iteration
|
|
264
|
-
});
|
|
265
|
-
});
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
### Flow Control
|
|
269
|
-
|
|
270
|
-
```javascript
|
|
271
|
-
import { Discard, Return } from 'three/tsl';
|
|
272
|
-
|
|
273
|
-
// Discard fragment (make transparent)
|
|
274
|
-
If(alpha.lessThan(0.5), () => {
|
|
275
|
-
Discard();
|
|
276
|
-
});
|
|
277
|
-
|
|
278
|
-
// Return from function
|
|
279
|
-
const myFn = Fn(() => {
|
|
280
|
-
If(condition, () => {
|
|
281
|
-
Return(vec3(1, 0, 0));
|
|
282
|
-
});
|
|
283
|
-
return vec3(0, 0, 1);
|
|
284
|
-
});
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
## Custom Functions with Fn()
|
|
288
|
-
|
|
289
|
-
### Basic Function
|
|
290
|
-
```javascript
|
|
291
|
-
import { Fn } from 'three/tsl';
|
|
292
|
-
|
|
293
|
-
const addVectors = Fn(([a, b]) => {
|
|
294
|
-
return a.add(b);
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
// Usage
|
|
298
|
-
const result = addVectors(vec3(1, 0, 0), vec3(0, 1, 0));
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
### Default Parameters
|
|
302
|
-
```javascript
|
|
303
|
-
const oscillate = Fn(([frequency = 1.0, amplitude = 1.0]) => {
|
|
304
|
-
return time.mul(frequency).sin().mul(amplitude);
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
// Call variations
|
|
308
|
-
oscillate(); // Uses defaults
|
|
309
|
-
oscillate(2.0); // frequency = 2.0
|
|
310
|
-
oscillate(2.0, 0.5); // frequency = 2.0, amplitude = 0.5
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
### Named Parameters (Object Style)
|
|
314
|
-
```javascript
|
|
315
|
-
const createGradient = Fn(({ colorA = vec3(0), colorB = vec3(1), t = 0.5 }) => {
|
|
316
|
-
return mix(colorA, colorB, t);
|
|
317
|
-
});
|
|
318
|
-
|
|
319
|
-
// Call with named parameters
|
|
320
|
-
createGradient({ colorA: vec3(1, 0, 0), t: uv().x });
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
### Function with Context
|
|
324
|
-
```javascript
|
|
325
|
-
// Access shader context
|
|
326
|
-
const customShader = Fn(({ material, geometry, object }) => {
|
|
327
|
-
if (material.userData.customColor) {
|
|
328
|
-
return uniform(material.userData.customColor);
|
|
329
|
-
}
|
|
330
|
-
return vec3(1);
|
|
331
|
-
});
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
## Time and Animation
|
|
335
|
-
|
|
336
|
-
```javascript
|
|
337
|
-
import { time, deltaTime } from 'three/tsl';
|
|
338
|
-
|
|
339
|
-
// time - seconds since start
|
|
340
|
-
const rotation = time.mul(0.5); // Half rotation per second
|
|
341
|
-
|
|
342
|
-
// deltaTime - time since last frame
|
|
343
|
-
const velocity = speed.mul(deltaTime);
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
### Oscillators
|
|
347
|
-
|
|
348
|
-
```javascript
|
|
349
|
-
import { oscSine, oscSquare, oscTriangle, oscSawtooth } from 'three/tsl';
|
|
350
|
-
|
|
351
|
-
// All oscillators return 0-1 range
|
|
352
|
-
oscSine(time) // Smooth sine wave
|
|
353
|
-
oscSquare(time) // Square wave (0 or 1)
|
|
354
|
-
oscTriangle(time) // Triangle wave
|
|
355
|
-
oscSawtooth(time) // Sawtooth wave
|
|
356
|
-
|
|
357
|
-
// Custom frequency
|
|
358
|
-
oscSine(time.mul(2.0)) // 2Hz oscillation
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
## Math Functions
|
|
362
|
-
|
|
363
|
-
### Basic Math
|
|
364
|
-
```javascript
|
|
365
|
-
import { abs, sign, floor, ceil, fract, mod, min, max, clamp } from 'three/tsl';
|
|
366
|
-
|
|
367
|
-
abs(x) // Absolute value
|
|
368
|
-
sign(x) // -1, 0, or 1
|
|
369
|
-
floor(x) // Round down
|
|
370
|
-
ceil(x) // Round up
|
|
371
|
-
fract(x) // Fractional part (x - floor(x))
|
|
372
|
-
mod(x, y) // Modulo
|
|
373
|
-
min(x, y) // Minimum
|
|
374
|
-
max(x, y) // Maximum
|
|
375
|
-
clamp(x, 0, 1) // Clamp to range
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
### Trigonometry
|
|
379
|
-
```javascript
|
|
380
|
-
import { sin, cos, tan, asin, acos, atan, atan2 } from 'three/tsl';
|
|
381
|
-
|
|
382
|
-
sin(x)
|
|
383
|
-
cos(x)
|
|
384
|
-
tan(x)
|
|
385
|
-
asin(x)
|
|
386
|
-
acos(x)
|
|
387
|
-
atan(x)
|
|
388
|
-
atan2(y, x)
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
### Exponential
|
|
392
|
-
```javascript
|
|
393
|
-
import { pow, exp, log, sqrt, inverseSqrt } from 'three/tsl';
|
|
394
|
-
|
|
395
|
-
pow(x, 2.0) // x^2
|
|
396
|
-
exp(x) // e^x
|
|
397
|
-
log(x) // Natural log
|
|
398
|
-
sqrt(x) // Square root
|
|
399
|
-
inverseSqrt(x) // 1 / sqrt(x)
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
### Interpolation
|
|
403
|
-
```javascript
|
|
404
|
-
import { mix, step, smoothstep } from 'three/tsl';
|
|
405
|
-
|
|
406
|
-
mix(a, b, 0.5) // Linear interpolation
|
|
407
|
-
step(0.5, x) // 0 if x < 0.5, else 1
|
|
408
|
-
smoothstep(0.0, 1.0, x) // Smooth 0-1 transition
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
### Vector Math
|
|
412
|
-
```javascript
|
|
413
|
-
import { length, distance, dot, cross, normalize, reflect, refract } from 'three/tsl';
|
|
414
|
-
|
|
415
|
-
length(v) // Vector length
|
|
416
|
-
distance(a, b) // Distance between points
|
|
417
|
-
dot(a, b) // Dot product
|
|
418
|
-
cross(a, b) // Cross product (vec3 only)
|
|
419
|
-
normalize(v) // Unit vector
|
|
420
|
-
reflect(incident, normal)
|
|
421
|
-
refract(incident, normal, eta)
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
### Constants
|
|
425
|
-
```javascript
|
|
426
|
-
import { PI, TWO_PI, HALF_PI, EPSILON } from 'three/tsl';
|
|
427
|
-
|
|
428
|
-
PI // 3.14159...
|
|
429
|
-
TWO_PI // 6.28318...
|
|
430
|
-
HALF_PI // 1.57079...
|
|
431
|
-
EPSILON // Very small number
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
## Utility Functions
|
|
435
|
-
|
|
436
|
-
```javascript
|
|
437
|
-
import { hash, checker, remap, range, rotate } from 'three/tsl';
|
|
438
|
-
|
|
439
|
-
// Pseudo-random hash
|
|
440
|
-
hash(seed) // Returns 0-1
|
|
441
|
-
|
|
442
|
-
// Checkerboard pattern
|
|
443
|
-
checker(uv()) // Returns 0 or 1
|
|
444
|
-
|
|
445
|
-
// Remap value from one range to another
|
|
446
|
-
remap(x, 0, 1, -1, 1) // Map 0-1 to -1 to 1
|
|
447
|
-
|
|
448
|
-
// Generate value in range
|
|
449
|
-
range(min, max) // Random in range (per instance)
|
|
450
|
-
|
|
451
|
-
// Rotate 2D vector
|
|
452
|
-
rotate(vec2(1, 0), angle)
|
|
453
|
-
```
|