@almadar/std 16.44.0 → 16.46.0
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/canonical-operators.json +55 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +115 -3
- package/dist/index.js.map +1 -1
- package/dist/modules/agent.d.ts +1 -1
- package/dist/modules/anim.d.ts +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/composition.d.ts +1 -1
- package/dist/modules/contract.d.ts +1 -1
- package/dist/modules/core.d.ts +1 -1
- package/dist/modules/data.d.ts +1 -1
- package/dist/modules/ease.d.ts +1 -1
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/geo.d.ts +1 -1
- package/dist/modules/graph.d.ts +1 -1
- package/dist/modules/grid.d.ts +1 -1
- package/dist/modules/index.d.ts +3 -1
- package/dist/modules/index.js +97 -1
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/math.d.ts +1 -1
- package/dist/modules/nn.d.ts +1 -1
- package/dist/modules/noise.d.ts +22 -0
- package/dist/modules/noise.js +56 -0
- package/dist/modules/noise.js.map +1 -0
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/os.d.ts +1 -1
- package/dist/modules/path.d.ts +22 -0
- package/dist/modules/path.js +46 -0
- package/dist/modules/path.js.map +1 -0
- package/dist/modules/prob.d.ts +1 -1
- package/dist/modules/str.d.ts +1 -1
- package/dist/modules/tensor.d.ts +1 -1
- package/dist/modules/time.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/modules/vector.d.ts +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.js +99 -3
- package/dist/registry.js.map +1 -1
- package/dist/{types-Bc_qzeWd.d.ts → types-cxNzLgmy.d.ts} +3 -3
- package/package.json +1 -1
package/dist/modules/agent.d.ts
CHANGED
package/dist/modules/anim.d.ts
CHANGED
package/dist/modules/array.d.ts
CHANGED
package/dist/modules/async.d.ts
CHANGED
package/dist/modules/core.d.ts
CHANGED
package/dist/modules/data.d.ts
CHANGED
package/dist/modules/ease.d.ts
CHANGED
package/dist/modules/format.d.ts
CHANGED
package/dist/modules/geo.d.ts
CHANGED
package/dist/modules/graph.d.ts
CHANGED
package/dist/modules/grid.d.ts
CHANGED
package/dist/modules/index.d.ts
CHANGED
|
@@ -22,4 +22,6 @@ export { GEO_OPERATORS, getGeoOperators } from './geo.js';
|
|
|
22
22
|
export { GRID_OPERATORS, getGridOperators } from './grid.js';
|
|
23
23
|
export { ANIM_OPERATORS, getAnimOperators } from './anim.js';
|
|
24
24
|
export { EASE_OPERATORS, getEaseOperators } from './ease.js';
|
|
25
|
-
|
|
25
|
+
export { NOISE_OPERATORS, getNoiseOperators } from './noise.js';
|
|
26
|
+
export { PATH_OPERATORS, getPathOperators } from './path.js';
|
|
27
|
+
import '../types-cxNzLgmy.js';
|
package/dist/modules/index.js
CHANGED
|
@@ -5686,6 +5686,102 @@ function getEaseOperators() {
|
|
|
5686
5686
|
return Object.keys(EASE_OPERATORS);
|
|
5687
5687
|
}
|
|
5688
5688
|
|
|
5689
|
-
|
|
5689
|
+
// modules/noise.ts
|
|
5690
|
+
var NOISE_OPERATORS = {
|
|
5691
|
+
"noise/perlin": {
|
|
5692
|
+
module: "noise",
|
|
5693
|
+
category: "std-noise",
|
|
5694
|
+
minArity: 2,
|
|
5695
|
+
maxArity: 3,
|
|
5696
|
+
description: "2D Perlin noise at (x,y) with optional seed; output [-1,1]",
|
|
5697
|
+
hasSideEffects: false,
|
|
5698
|
+
returnType: "number",
|
|
5699
|
+
params: [
|
|
5700
|
+
{ name: "x", type: "number", description: "X coordinate" },
|
|
5701
|
+
{ name: "y", type: "number", description: "Y coordinate" },
|
|
5702
|
+
{ name: "seed", type: "number", description: "Optional integer seed (default 0)", optional: true }
|
|
5703
|
+
],
|
|
5704
|
+
example: '["noise/perlin", 1.5, 2.5, 0] // => coherent value in [-1,1]'
|
|
5705
|
+
},
|
|
5706
|
+
"noise/simplex": {
|
|
5707
|
+
module: "noise",
|
|
5708
|
+
category: "std-noise",
|
|
5709
|
+
minArity: 2,
|
|
5710
|
+
maxArity: 3,
|
|
5711
|
+
description: "Value-coherent noise (perlin-derived) at (x,y) with optional seed; output [-1,1]",
|
|
5712
|
+
hasSideEffects: false,
|
|
5713
|
+
returnType: "number",
|
|
5714
|
+
params: [
|
|
5715
|
+
{ name: "x", type: "number", description: "X coordinate" },
|
|
5716
|
+
{ name: "y", type: "number", description: "Y coordinate" },
|
|
5717
|
+
{ name: "seed", type: "number", description: "Optional integer seed (default 0)", optional: true }
|
|
5718
|
+
],
|
|
5719
|
+
example: '["noise/simplex", 1.5, 2.5, 0] // => coherent value in [-1,1]'
|
|
5720
|
+
},
|
|
5721
|
+
"noise/fbm": {
|
|
5722
|
+
module: "noise",
|
|
5723
|
+
category: "std-noise",
|
|
5724
|
+
minArity: 3,
|
|
5725
|
+
maxArity: 4,
|
|
5726
|
+
description: "Fractal Brownian motion: summed perlin octaves (clamped 1..8); output [-1,1]",
|
|
5727
|
+
hasSideEffects: false,
|
|
5728
|
+
returnType: "number",
|
|
5729
|
+
params: [
|
|
5730
|
+
{ name: "x", type: "number", description: "X coordinate" },
|
|
5731
|
+
{ name: "y", type: "number", description: "Y coordinate" },
|
|
5732
|
+
{ name: "octaves", type: "number", description: "Octave count (floored, clamped to 1..8)" },
|
|
5733
|
+
{ name: "seed", type: "number", description: "Optional integer seed (default 0)", optional: true }
|
|
5734
|
+
],
|
|
5735
|
+
example: '["noise/fbm", 1.5, 2.5, 4, 0] // => layered value in [-1,1]'
|
|
5736
|
+
}
|
|
5737
|
+
};
|
|
5738
|
+
function getNoiseOperators() {
|
|
5739
|
+
return Object.keys(NOISE_OPERATORS);
|
|
5740
|
+
}
|
|
5741
|
+
|
|
5742
|
+
// modules/path.ts
|
|
5743
|
+
var PATH_OPERATORS = {
|
|
5744
|
+
"path/astar": {
|
|
5745
|
+
module: "path",
|
|
5746
|
+
category: "std-path",
|
|
5747
|
+
minArity: 5,
|
|
5748
|
+
maxArity: 6,
|
|
5749
|
+
description: "A* shortest path on a w\xD7h grid; returns cells start\u2192goal (incl. both) or [] if none",
|
|
5750
|
+
hasSideEffects: false,
|
|
5751
|
+
returnType: "array",
|
|
5752
|
+
params: [
|
|
5753
|
+
{ name: "start", type: "vector", description: "Start cell {x,y}" },
|
|
5754
|
+
{ name: "goal", type: "vector", description: "Goal cell {x,y}" },
|
|
5755
|
+
{ name: "blocked", type: { kind: "array", of: "vector" }, description: "Blocked cells [{x,y}, ...]" },
|
|
5756
|
+
{ name: "w", type: "number", description: "Grid width (x in [0,w))" },
|
|
5757
|
+
{ name: "h", type: "number", description: "Grid height (y in [0,h))" },
|
|
5758
|
+
{ name: "diagonal", type: "boolean", description: "Allow 8-direction moves (default false)", optional: true }
|
|
5759
|
+
],
|
|
5760
|
+
example: '["path/astar", {"x":0,"y":0}, {"x":2,"y":0}, [], 3, 1] // => [{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0}]'
|
|
5761
|
+
},
|
|
5762
|
+
"path/reachable": {
|
|
5763
|
+
module: "path",
|
|
5764
|
+
category: "std-path",
|
|
5765
|
+
minArity: 5,
|
|
5766
|
+
maxArity: 6,
|
|
5767
|
+
description: "BFS cells reachable within N moves from start (incl. start); sorted row-major",
|
|
5768
|
+
hasSideEffects: false,
|
|
5769
|
+
returnType: "array",
|
|
5770
|
+
params: [
|
|
5771
|
+
{ name: "start", type: "vector", description: "Start cell {x,y}" },
|
|
5772
|
+
{ name: "steps", type: "number", description: "Maximum number of moves" },
|
|
5773
|
+
{ name: "blocked", type: { kind: "array", of: "vector" }, description: "Blocked cells [{x,y}, ...]" },
|
|
5774
|
+
{ name: "w", type: "number", description: "Grid width (x in [0,w))" },
|
|
5775
|
+
{ name: "h", type: "number", description: "Grid height (y in [0,h))" },
|
|
5776
|
+
{ name: "diagonal", type: "boolean", description: "Allow 8-direction moves (default false)", optional: true }
|
|
5777
|
+
],
|
|
5778
|
+
example: '["path/reachable", {"x":1,"y":1}, 1, [], 3, 3, false] // => 5 cross-shaped cells, row-major'
|
|
5779
|
+
}
|
|
5780
|
+
};
|
|
5781
|
+
function getPathOperators() {
|
|
5782
|
+
return Object.keys(PATH_OPERATORS);
|
|
5783
|
+
}
|
|
5784
|
+
|
|
5785
|
+
export { AGENT_OPERATORS, ANIM_OPERATORS, ARRAY_OPERATORS, ASYNC_OPERATORS, COMPOSITION_OPERATORS, CONTRACT_OPERATORS, CORE_OPERATORS, DATA_OPERATORS, EASE_OPERATORS, FORMAT_OPERATORS, GEO_OPERATORS, GRAPH_OPERATORS, GRID_OPERATORS, MATH_OPERATORS, NN_OPERATORS, NOISE_OPERATORS, OBJECT_OPERATORS, OS_OPERATORS, PATH_OPERATORS, PROB_OPERATORS, STR_OPERATORS, TENSOR_OPERATORS, TIME_OPERATORS, TRAIN_OPERATORS, VALIDATE_OPERATORS, VEC_OPERATORS, getAgentOperators, getAnimOperators, getArrayOperators, getAsyncOperators, getCompositionOperators, getContractOperators, getCoreOperators, getDataOperators, getEaseOperators, getFormatOperators, getGeoOperators, getGraphOperators, getGridOperators, getLambdaArrayOperators, getMathOperators, getNnOperators, getNoiseOperators, getObjectOperators, getPathOperators, getProbOperators, getStrOperators, getTensorOperators, getTimeOperators, getTrainOperators, getValidateOperators, getVecOperators };
|
|
5690
5786
|
//# sourceMappingURL=index.js.map
|
|
5691
5787
|
//# sourceMappingURL=index.js.map
|