@thi.ng/shader-ast-js 1.2.50 → 1.2.51
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/README.md +35 -34
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
|
-
<!-- Please see: https://
|
|
3
|
-
# 
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@thi.ng/shader-ast-js)
|
|
6
6
|

|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
10
|
> This is one of 214 standalone projects, maintained as part
|
|
11
|
-
> of the [@thi.ng/umbrella](https://
|
|
11
|
+
> of the [@thi.ng/umbrella](https://codeberg.org/thi.ng/umbrella/) ecosystem
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
14
|
-
> 🚀 Please help me to work full-time on these projects by [sponsoring
|
|
15
|
-
>
|
|
14
|
+
> 🚀 Please help me to work full-time on these projects by [sponsoring
|
|
15
|
+
> me](https://codeberg.org/thi.ng/umbrella/src/branch/develop/CONTRIBUTING.md#donations).
|
|
16
|
+
> Thank you! ❤️
|
|
16
17
|
|
|
17
18
|
- [About](#about)
|
|
18
19
|
- [Unsupported features](#unsupported-features)
|
|
@@ -27,39 +28,39 @@
|
|
|
27
28
|
|
|
28
29
|
## About
|
|
29
30
|
|
|
30
|
-
Customizable JS codegen, compiler & runtime for [@thi.ng/shader-ast](https://
|
|
31
|
+
Customizable JS codegen, compiler & runtime for [@thi.ng/shader-ast](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/shader-ast).
|
|
31
32
|
|
|
32
33
|
Due to the lack of native vector operations in JS, this compile target
|
|
33
34
|
is much more involved than the
|
|
34
|
-
[@thi.ng/shader-ast-glsl](https://
|
|
35
|
+
[@thi.ng/shader-ast-glsl](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/shader-ast-glsl)
|
|
35
36
|
code gen and uses a pluggable backend to perform all math ops. The
|
|
36
37
|
default backend delegates all ops to
|
|
37
|
-
[@thi.ng/vectors](https://
|
|
38
|
+
[@thi.ng/vectors](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/vectors)
|
|
38
39
|
and
|
|
39
|
-
[@thi.ng/matrices](https://
|
|
40
|
+
[@thi.ng/matrices](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/matrices),
|
|
40
41
|
which altogether provide ~750 optimized vector/matrix functions.
|
|
41
42
|
|
|
42
43
|
### Unsupported features
|
|
43
44
|
|
|
44
45
|
- texture lookups (see [texture tunnel
|
|
45
|
-
demo](https://
|
|
46
|
+
demo](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/shader-ast-tunnel)
|
|
46
47
|
for a monkey-patched solution)
|
|
47
48
|
- derivatives (`dFdx`, `dFdy`, `fwidth`) - probably never supported in
|
|
48
49
|
this env
|
|
49
50
|
- `out` / `inout` function args (see
|
|
50
|
-
[#96](https://
|
|
51
|
+
[#96](https://codeberg.org/thi.ng/umbrella/issues/96) for discussion)
|
|
51
52
|
|
|
52
53
|
## Status
|
|
53
54
|
|
|
54
55
|
**STABLE** - used in production
|
|
55
56
|
|
|
56
|
-
[Search or submit any issues for this package](https://
|
|
57
|
+
[Search or submit any issues for this package](https://codeberg.org/thi.ng/umbrella/issues?q=%5Bshader-ast-js%5D)
|
|
57
58
|
|
|
58
59
|
## Related packages
|
|
59
60
|
|
|
60
|
-
- [@thi.ng/pixel](https://
|
|
61
|
-
- [@thi.ng/shader-ast-glsl](https://
|
|
62
|
-
- [@thi.ng/shader-ast-stdlib](https://
|
|
61
|
+
- [@thi.ng/pixel](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/pixel) - Typedarray integer & float pixel buffers w/ customizable formats, blitting, drawing, convolution
|
|
62
|
+
- [@thi.ng/shader-ast-glsl](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/shader-ast-glsl) - Customizable GLSL codegen for [@thi.ng/shader-ast](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/shader-ast)
|
|
63
|
+
- [@thi.ng/shader-ast-stdlib](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/shader-ast-stdlib) - Function collection for modular GPGPU / shader programming with [@thi.ng/shader-ast](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/shader-ast)
|
|
63
64
|
|
|
64
65
|
## Installation
|
|
65
66
|
|
|
@@ -91,33 +92,33 @@ Package sizes (brotli'd, pre-treeshake): ESM: 6.72 KB
|
|
|
91
92
|
|
|
92
93
|
## Dependencies
|
|
93
94
|
|
|
94
|
-
- [@thi.ng/api](https://
|
|
95
|
-
- [@thi.ng/checks](https://
|
|
96
|
-
- [@thi.ng/errors](https://
|
|
97
|
-
- [@thi.ng/math](https://
|
|
98
|
-
- [@thi.ng/matrices](https://
|
|
99
|
-
- [@thi.ng/pixel](https://
|
|
100
|
-
- [@thi.ng/shader-ast](https://
|
|
101
|
-
- [@thi.ng/vectors](https://
|
|
95
|
+
- [@thi.ng/api](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/api)
|
|
96
|
+
- [@thi.ng/checks](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/checks)
|
|
97
|
+
- [@thi.ng/errors](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/errors)
|
|
98
|
+
- [@thi.ng/math](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/math)
|
|
99
|
+
- [@thi.ng/matrices](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/matrices)
|
|
100
|
+
- [@thi.ng/pixel](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/pixel)
|
|
101
|
+
- [@thi.ng/shader-ast](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/shader-ast)
|
|
102
|
+
- [@thi.ng/vectors](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/vectors)
|
|
102
103
|
|
|
103
104
|
Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
|
|
104
105
|
|
|
105
106
|
## Usage examples
|
|
106
107
|
|
|
107
108
|
Eight projects in this repo's
|
|
108
|
-
[/examples](https://
|
|
109
|
+
[/examples](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples)
|
|
109
110
|
directory are using this package:
|
|
110
111
|
|
|
111
|
-
| Screenshot | Description | Live demo | Source
|
|
112
|
-
|
|
113
|
-
| <img src="https://
|
|
114
|
-
| <img src="https://
|
|
115
|
-
| <img src="https://
|
|
116
|
-
| <img src="https://
|
|
117
|
-
| <img src="https://
|
|
118
|
-
| <img src="https://
|
|
119
|
-
| <img src="https://
|
|
120
|
-
| <img src="https://
|
|
112
|
+
| Screenshot | Description | Live demo | Source |
|
|
113
|
+
|:-----------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------|:----------------------------------------------------------|:-----------------------------------------------------------------------------------------------|
|
|
114
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/ascii-raymarch.jpg" width="240"/> | ASCII art raymarching with thi.ng/shader-ast & thi.ng/text-canvas | [Demo](https://demo.thi.ng/umbrella/ascii-raymarch/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/ascii-raymarch) |
|
|
115
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/shader-ast/shader-ast-01.jpg" width="240"/> | 2D canvas shader emulation | [Demo](https://demo.thi.ng/umbrella/shader-ast-canvas2d/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/shader-ast-canvas2d) |
|
|
116
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/shader-ast-noise.jpg" width="240"/> | HOF shader procedural noise function composition | [Demo](https://demo.thi.ng/umbrella/shader-ast-noise/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/shader-ast-noise) |
|
|
117
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/shader-ast/shader-ast-raymarch.jpg" width="240"/> | WebGL & JS canvas2D raymarch shader cross-compilation | [Demo](https://demo.thi.ng/umbrella/shader-ast-raymarch/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/shader-ast-raymarch) |
|
|
118
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/shader-ast-sdf2d.jpg" width="240"/> | WebGL & JS canvas 2D SDF | [Demo](https://demo.thi.ng/umbrella/shader-ast-sdf2d/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/shader-ast-sdf2d) |
|
|
119
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/shader-ast-tunnel.jpg" width="240"/> | WebGL & Canvas2D textured tunnel shader | [Demo](https://demo.thi.ng/umbrella/shader-ast-tunnel/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/shader-ast-tunnel) |
|
|
120
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/shader-ast-workers.jpg" width="240"/> | Fork-join worker-based raymarch renderer (JS/CPU only) | [Demo](https://demo.thi.ng/umbrella/shader-ast-workers/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/shader-ast-workers) |
|
|
121
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/viz-ridge-lines.avif" width="240"/> | Interactive ridge-line plot | [Demo](https://demo.thi.ng/umbrella/viz-ridge-lines/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/viz-ridge-lines) |
|
|
121
122
|
|
|
122
123
|
## API
|
|
123
124
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/shader-ast-js",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.51",
|
|
4
4
|
"description": "Customizable JS codegen, compiler & runtime for @thi.ng/shader-ast",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://
|
|
11
|
+
"url": "git+https://codeberg.org/thi.ng/umbrella.git",
|
|
12
12
|
"directory": "packages/shader-ast-js"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://thi.ng/shader-ast-js",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.12.
|
|
44
|
-
"@thi.ng/checks": "^3.8.
|
|
45
|
-
"@thi.ng/errors": "^2.6.
|
|
46
|
-
"@thi.ng/math": "^5.15.
|
|
47
|
-
"@thi.ng/matrices": "^3.0.
|
|
48
|
-
"@thi.ng/pixel": "^7.5.
|
|
49
|
-
"@thi.ng/shader-ast": "^1.1.
|
|
50
|
-
"@thi.ng/vectors": "^8.6.
|
|
43
|
+
"@thi.ng/api": "^8.12.18",
|
|
44
|
+
"@thi.ng/checks": "^3.8.8",
|
|
45
|
+
"@thi.ng/errors": "^2.6.7",
|
|
46
|
+
"@thi.ng/math": "^5.15.7",
|
|
47
|
+
"@thi.ng/matrices": "^3.0.41",
|
|
48
|
+
"@thi.ng/pixel": "^7.5.27",
|
|
49
|
+
"@thi.ng/shader-ast": "^1.1.45",
|
|
50
|
+
"@thi.ng/vectors": "^8.6.26"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"esbuild": "^0.27.2",
|
|
@@ -166,5 +166,5 @@
|
|
|
166
166
|
],
|
|
167
167
|
"year": 2019
|
|
168
168
|
},
|
|
169
|
-
"gitHead": "
|
|
169
|
+
"gitHead": "8ddf86ea0a1e658ddbf19cc645b29d0c176e29c4\n"
|
|
170
170
|
}
|