@zushah/wasmgpu 0.7.0 → 0.8.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/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # WasmGPU changelog
2
2
  All release notes of WasmGPU are recorded in this file.
3
3
 
4
+ ## [v0.8.0](https://www.github.com/Zushah/WasmGPU/releases/tag/v0.8.0) - 05/24/2026
5
+ The ninth release of WasmGPU. Commits: [`v0.7.0...v0.8.0`](https://www.github.com/Zushah/WasmGPU/compare/v0.7.0...v0.8.0)
6
+ - Added substantially broader glTF 2.0 runtime fidelity with morph-target import, base and per-node morph weights, morph-weight animation playback, imported node records, extension metadata, safe imported-asset shutdown, texture transforms, material variants, XMP metadata, bound punctual lights, spot lights, node visibility, and animation pointers.
7
+ - Added much richer glTF 2.0 material support covering clearcoat, specular, index of refraction, sheen, iridescence, anisotropy, transmission, diffuse transmission, volume, and dispersion, which makes the physically based material model substantially closer to modern glTF assets and more useful for real asset inspection rather than only simple demonstration scenes.
8
+ - Added the nodelink scientific visualization primitive, with node and edge rendering paths that can represent graph, molecule, and relationship data alongside meshes, pointclouds, glyphfields, overlays, picking, scaling, and colormaps.
9
+ - Added LU factorization and solve compute kernels for real and complex systems, expanding the compute subsystem from general-purpose parallel primitives toward domain-relevant computational science.
10
+ - Added external WebAssembly interoperability, as a sibling to the existing Python interoperability, so WasmGPU can wrap foreign WebAssembly instances, exports, or memories and create typed views over other linear memories, making it easier to connect additional WebAssembly modules to WasmGPU workflows.
11
+ - Added occlusion culling using previous-frame hierarchical Z-buffer data, with explicit culling statistics and safety rules that keep picking and warmup unfiltered while conservatively excluding ambiguous occluders from capture.
12
+ - Added renderer warmup and configurable WebGPU device-limit requests, so applications can prepare render paths more deliberately and request larger buffer or binding limits when the workload requires them.
13
+ - Added per-point coloring for point clouds, allowing point cloud data to use explicit RGBA color buffers in addition to scalar-driven colormaps, just like glyphfields and nodelinks.
14
+ - Fixed glTF animation robustness by refreshing animation sampler views after WebAssembly allocations, preventing stale memory views from corrupting animation playback after importer-side allocation activity.
15
+ - Fixed close-range camera inspection by further relaxing the perspective near clip.
16
+ - Added a benchmark example that exercises both rendering and computing and compares WasmGPU's performance against Three.js and Babylon.js.
17
+
4
18
  ## [v0.7.0](https://www.github.com/Zushah/WasmGPU/releases/tag/v0.7.0) - 03/30/2026
5
19
  The eighth release of WasmGPU. Commits: [`v0.6.0...v0.7.0`](https://www.github.com/Zushah/WasmGPU/compare/v0.6.0...v0.7.0)
6
20
  - Added an interactive analysis stack built around GPU ID-pass picking, rectangular and lasso region selection, composable overlay layers, and an annotation toolkit, so applications can move from raw hits to typed selections, legends, triads, probes, markers, and distance or angle measurements.
package/README.md CHANGED
@@ -7,9 +7,9 @@
7
7
  </a>
8
8
  </p>
9
9
  <p align="center">
10
- <a href="https://www.github.com/Zushah/WasmGPU/releases/tag/v0.7.0"><img src="https://img.shields.io/badge/release-v0.7.0-005a9c?logo=github&logoColor=white" alt="Latest release"></a>
11
- <a href="https://raw.githubusercontent.com/Zushah/WasmGPU/v0.7.0/dist/WasmGPU.js"><img src="https://img.shields.io/badge/minified-450.6_kB-654ff0?logo=javascript&logoColor=white" alt="450.6 kilobytes minified bundle size"></a>
12
- <a href="https://www.npmjs.com/package/@zushah/wasmgpu"><img src="https://img.shields.io/npm/dm/%40zushah/wasmgpu?logo=npm&logoColor=white" alt="npm downloads per month"></a>
10
+ <a href="https://www.github.com/Zushah/WasmGPU/releases/tag/v0.8.0"><img src="https://img.shields.io/badge/release-v0.8.0-005a9c?logo=github&logoColor=white" alt="Latest release"></a>
11
+ <a href="https://raw.githubusercontent.com/Zushah/WasmGPU/v0.8.0/dist/WasmGPU.js"><img src="https://img.shields.io/badge/minified-838.7_kB-654ff0?logo=javascript&logoColor=white" alt="838.7 kilobytes minified bundle size"></a>
12
+ <a href="https://www.npmjs.com/package/@zushah/wasmgpu"><img src="https://img.shields.io/npm/dm/%40zushah%2Fwasmgpu?logo=npm&logoColor=white&color=9b8df5" alt="npm downloads per month"></a>
13
13
  <a href="https://www.jsdelivr.com/package/gh/Zushah/WasmGPU"><img src="https://img.shields.io/jsdelivr/gh/hm/Zushah/WasmGPU?color=654ff0&logo=jsdelivr&logoColor=white" alt="jsDelivr requests per month"></a>
14
14
  <a href="https://www.github.com/Zushah/WasmGPU/blob/main/LICENSE.md"><img src="https://img.shields.io/badge/license-MPL--2.0-005a9c?logo=gitbook&logoColor=white" alt="Mozilla Public License 2.0"></a>
15
15
  </p><br>
@@ -17,38 +17,40 @@
17
17
  ## About
18
18
 
19
19
  - 🔥 WebGPU × WebAssembly rendering and computing engine for scientific workloads in the browser.
20
- - 🚀 Latest release: [**`v0.7.0`**](https://github.com/Zushah/WasmGPU/releases/tag/v0.7.0).
21
- - 💡 Website: [https://zushah.github.io/WasmGPU](https://zushah.github.io/WasmGPU)
22
- - ⚙️ WebGPU engine written in TypeScript, spanning **scene & assets** (meshes, pointclouds, glyphfields, data materials, lights, cameras, glTF 2.0 assets, mipmapped texture sampling, transparency, animations, 4- or 8-influence skinning, and richer built-in geometry including 2D primitives plus cartesian and parametric curves and surfaces for graphing); **rendering architecture** (WebAssembly-driven frustum culling, opaque draw batching with automatic instanced rendering, optional subpixel morphological anti-aliasing, configurable canvas format selection, and GPU ID-pass picking for both single-hit queries and rectangular or lasso region queries with typed results); **interaction, overlays, & diagnostics** (orbit/trackball orthographic/perspective camera navigation with bounds-based scene framing, inspection views, and a composable overlay and annotation toolkit with triads, grids, legends, markers, probes, and measurements); and **compute & interop** (a first-class WebGPU compute subsystem with reusable pipelines and buffers, an extensive kernels library, an ndarray abstraction, asynchronous readback utilities, a unified scale-transform model shared across rendering and computing workflows, and Python-in-the-browser interoperability).
23
- - 🦀 WebAssembly driver written in Rust, spanning **data layout & transforms** (transforms stored in SoA memory with per-index dirty tracking and partial local or world propagation plus model and normal matrix packing); **animation & asset hot paths** (animation sampling and joint-matrix generation executed in WebAssembly together with glTF accessor deinterleaving, sparse patch application, numeric conversion, and mesh normal generation); **bounds, culling, & visibility** (world-space bounds computation for geometry, pointclouds, and glyphfields together with frustum plane extraction and sphere-frustum culling kernels); **array semantics & zero-copy staging** (ndarray indexing utilities for explicit shape-and-stride byte-offset math plus uniforms and instance data staged as zero-copy views into WebAssembly memory with explicit typed-slice handles for JavaScript interop); and **performance envelope** (hot-path allocations avoided via cached pipelines and bind-group layouts plus a frame arena and user heap arenas, with builds optimized via LLVM and Binaryen and SIMD128 enabled for even higher throughput).
20
+ - 🚀 Latest release: [**`v0.8.0`**](https://www.github.com/Zushah/WasmGPU/releases/tag/v0.8.0).
21
+ - 💡 Website: [https://zushah.github.io/WasmGPU](https://zushah.github.io/WasmGPU).
22
+ - ⚙️ WebGPU engine written in TypeScript, spanning **scene & assets** (meshes, pointclouds, glyphfields, nodelinks, data materials, lights, cameras, glTF 2.0 assets with over a dozen extensions, metadata, and animation-extension coverage, mipmapped texture sampling, transparency including transmission rendering, animations, 4- or 8-influence skinning, and rich built-in geometry including cartesian and parametric curves and surfaces for mathematics); **rendering architecture** (WebAssembly-powered frustum culling, previous-frame occlusion culling, opaque draw batching with automatic instanced rendering, optional subpixel morphological anti-aliasing, configurable canvas format selection, and GPU ID-pass picking for both single-hit queries and rectangular or lasso region queries with typed results); **interaction, overlays, & diagnostics** (orbit/trackball orthographic/perspective camera navigation with bounds-based scene framing, inspection views, and a composable overlay and annotation toolkit with triads, grids, legends, markers, probes, and measurements); and **compute & interop** (a first-class compute subsystem with reusable pipelines and buffers, an extensive kernels library, an ndarray abstraction, asynchronous readback utilities, a unified scale-transform model shared across rendering and computing workflows, external WebAssembly module interoperability, and Python-in-the-browser interoperability).
23
+ - 🦀 WebAssembly driver written in Rust, spanning **data layout & transforms** (transforms stored in SoA memory with per-index dirty tracking and partial local or world propagation plus model and normal matrix packing); **animation & asset hot paths** (animation sampling and joint-matrix generation executed in WebAssembly together with glTF accessor deinterleaving, sparse patch application, numeric conversion, richer import-side data preparation, and mesh normal generation); **bounds, culling, & visibility** (world-space bounds computation for geometry, pointclouds, glyphfields, and nodelinks together with frustum plane extraction, sphere-frustum culling kernels, and CPU-side support for render-only occlusion filtering); **array semantics & zero-copy staging** (ndarray indexing utilities for explicit shape-and-stride byte-offset math plus uniforms and instance data staged as zero-copy views into WebAssembly memory with explicit typed-slice handles and module-facing views for external WebAssembly interoperability); and **performance envelope** (hot-path allocations avoided via cached pipelines and bind-group layouts plus a frame arena and user heap arenas, with builds optimized via LLVM and Binaryen and SIMD128 enabled for even higher throughput).
24
24
 
25
25
  ## Architecture Diagram
26
26
 
27
- The diagram below reflects currently implemented subsystems and runtime flow in WasmGPU v0.7.0.
27
+ The diagram below reflects the implemented architecture of WasmGPU v0.8.0.
28
28
 
29
- Solid arrows indicate control flow while dashed arrows indicate data and resource flow.
29
+ Solid arrows indicate creation, ownership, stored references, or call direction. Dashed arrows indicate data movement through WebAssembly memory or WebGPU resources.
30
+
31
+ Click [here](https://mermaid.live/view#pako:eNqNWFlv4zgS_iuEBugnJvAVXwMsIF9pI_EB25mgd7MPtEzbmuhakkriafR_3ypSVkQ6nl2_xPpULFbVV5fz0wvSHff63j5K34MjE4o8rl4SAh-Zbw-CZUfiL6f_evGW-TYKA3x48f5tJPDjL5fw8klyQfwsAwmmwjSxRMbzexB5ZjK-Xz6Rt9pt97ZmCUz8IQhMWKBScYJ7xZ4FvE9kwBNOScBiLhj8TRMl0khScuBpzJU4URIzxUXIIkoU_1C5APGYyyMlWRomKojSfAfi0Sk77kMewfcEvI3C5JWSKDwcFSVMSq5IGGepwKckjLUDlKRvXETshFiSqgIEpVykWWk9T3YviROuZ_AS_eVbdHecHMKEW-4-LhYYs4kAx0iUVtThZzWej-DtClRzwYX1bj30H8fwch0wcOJAIOpvYWBrX_wxXoHIwphP9njLeypebdbm8wUI-aVrRKVp9BoqS2o5HT4g82HwirflKoxCdbJEhosZ-jJM4yxXHIMgT1Lx2BYaPE1AaJDv95Amgss0FwEH8hJ2cDwcLqdLfWWGNPEz6ZErNpquQWwUyoyp4EjQwYNI84xkEfDlSj_okDxwkfBIAvNbwYTjhw76_GYXxjyREBAWESYEBDDGjCH7VIBtT-QbQVJjHqeugtXYRxW-PCXBUaRJmktwle22LHglAuJni6-HK02k0PZvTWgyIOFvc2vkb3wkd_snDxQYM2KKkRla6OTJXCvnTuZt1pvFChNoI1giwaeYSKg5DnlN1qn_lV-z8fo7HJhBVZH3UB3_R_GlIjuCrxRsk5A0iev38h4tW16pzm9lfdrBmvkmySKwmGWZq3T9MNX-FheCN1KxBDJsB-Gx8_4cgErm6wjYUo8LzeVjyqAGNfeHaDMhjdta0S8uFY_G2MP8IOBSgvyOQ19FW75pWcxjKEjptkZ_qstnqtsPXiXSuHIFVKXpgmXRSPv4bKzzoTi_0-GT2AMVw_OUvDFgKFHy3EYlBlm3PlvT83S-MU3Lh9vjbXS66HWavh_I3kkdIW7_Vy_01zNH7UiEb059Pn8fa4K_c5YRFkWpGSI68BlGDTpKoog6ZeDiFzn6PFlBJMqWygRPmD6sMM3Dvz-7WfnztVUSGXjFDpdz7Hnmb3QtMCXCD4gtx4GFAf1PjqWQoM1QFEeOMyRwAny1wYTQ6D9MqkhQvOM36X4PGaDcNH-eL1azcy0mWAoRVCM0uy9MvX_cYMvVacvcpKQE2qaQnOjmWZRrkkN-wIC_kqnP_nw604VTTEgiWZxFxu4_sZ7RdYjLVZMGi6f5CCM9SPNkJ-EinBlfCA6fHh81mblUeUyCPIqqofgqz8zIHYj0HReR1ZfFMhr_ATL3KA_kQDBwdGryeG7X_9Affh9bU4gFRxTdAldmzGjEmdvrcsbJsiXqetORAtSWX_rrdTnogQooEKmzFrIPbEIdmJIZprM6P8WhRGokbjhS3UCqIrcFhTk6r8sSVik3rMPivvOorlz4agbjVxEOIhAb8T20I_G6jXJO9mEU9X9rjTu9yYRCwqavvP9bbdAYdM-PN-_hTh37jeyDBtiy4XW7ftcc_e6oPAjOk0JfozFqdkaf-vz2qDm8rq_VrNd9V59uaxUb652hZWPtbtytXdfZaLSaTVfniUM7ei8UTiaDRrNbKuz5rVHtusI7vzGs1VyFWS4gFwqFg3rXr1gIJyZ--6rCxrjevhtfKIRpWdp3N_ar9jXG7cZVda0RkNL43WIa13kK-zqFlbykvHqjXl4p7qhUL6MU102K6yTFbdFwah3ADZHiBkhxt6O4uVFcyCisXFRvTRSXoU_2rNOwyVCztVDcRCjsDxTXAYozn5pxTvW8pjiCKQ5UqscixZFGlz8KCi2teuBQMzaomQBUd3cKbZrqPkt1C6W67dGid1HdmgoKLYXQW6juGhCaNdWlTXXBaXrKGEN0yc3NP_AXkQHgiwYg3DaAYbYRjLmNYGRtRFNiQ8iPjSBZBkGSzbG5DZiI2xiG30aACxvQPDjQ9GzjGUFaHD0_zvEBQ5y7zkh5F766sBHeXmCYII4ybZ8xC3KlwOCbYyl-s-NSIhVdpRDc40A6_wyGueqcLKHSJ02boRTeuZgWMyBmhZMMJWSy2YD4WoOQlw6is9TBIGddBHPXwbC-HagMUIlUGShBXTYuZkqq4A9bh3MvJq7DAiSuiW_lkhL8NK-E9Mki6IuCG-xELgR9yYWgS7nQw7mQPqEzCZ8I9jMXg-5WQHC3HXC8urChdBzvvsAeimBUsTOjnx7h7c4F2FqdK7EtlclhQEMbublFZnQ_rFabRrEpXoAWiViEF6ipLw1jQ63Wpgaxv1b8MVeNqsly-2VyaxRbdjXaGsTebkBsNQb8jBEMhBtb6oxUrtBvzckybuZ9CXrUO8Cy7vWVyDn1YHeOGT56P1H8xcNfAbAg9uErztEX7yX5BWcylvwzTePzMdglD0evv2eRhKc8gx9tfBQyWGo_RfR-OISdWXn9ntbg9X96H_BwW-u06q1OvdbtNLutJvVOXr9x2-v1OnedXq3T63bazUbrF_X-0lfWbnuwN7W6tXq71-i1G-076vFdCL9hZuZ_gPpfgb_-C-Os4DI) to interactively view the diagram if it doesn't properly appear below.
30
32
 
31
33
  ```mermaid
32
34
  flowchart LR
33
35
  subgraph API["Public API"]
34
36
  APP["User Application"]
35
- ENG["WasmGPU v0.7.0"]
36
- FAC["Factory surface: scene, camera, controls, geometry, material, texture, mesh, pointcloud, glyphfield, light, asset import, animation, overlay, annotation"]
37
+ ENG["WasmGPU v0.8.0"]
38
+ FAC["Factory surface: scene, camera, controls, geometry, material, texture, mesh, pointcloud, glyphfield, nodelink, light, asset import, animation, overlay, annotation, interop"]
37
39
  end
38
40
 
39
- subgraph RT["WebGPU Engine"]
41
+ subgraph WGPU["WebGPU Engine"]
40
42
  LOOP["Frame loop"]
41
43
  REND["Renderer"]
42
44
  SCALE["Scaling service"]
43
45
  OVER["Overlay framework"]
44
46
  ANNO["Annotation toolkit"]
45
47
  PICK["Picking utility"]
46
- CAPI["Compute subsystem"]
48
+ COMP["Compute subsystem"]
47
49
  CBUF["Buffer resource manager"]
48
- CPIPE["Pipeline controller"]
49
- CPLAN["Dispatch workgroup planner"]
50
- CKERN["Kernels library"]
51
- CARR["N-dimensional array abstraction for CPU & GPU memory"]
50
+ CPIP["Pipeline controller"]
51
+ CDIS["Dispatch workgroup planner"]
52
+ CKER["Kernels library"]
53
+ CND["N-dimensional array model for CPU & GPU memory"]
52
54
  CREAD["Asynchronous readback ring"]
53
55
  CSCR["Scratch buffer pool"]
54
56
  end
@@ -56,34 +58,37 @@ flowchart LR
56
58
  subgraph DATA["Object & Data Model"]
57
59
  SCN["Scene"]
58
60
  TSTORE["Transform store in SoA memory"]
59
- MESH["Mesh with geometry, material, & texture"]
60
- PGG["Pointcloud & glyphfield"]
61
+ MESH["Mesh with geometry, material, texture, morphing, & skinning"]
62
+ PGN["Pointcloud, glyphfield, & nodelink"]
61
63
  CMAP["Colormapping"]
62
- SKIN["Skin instance data"]
64
+ SKIN["Skinning instance data"]
63
65
  ASTORE["Annotation store"]
64
66
  ALOAD["Loader for glTF 2.0 asset data"]
65
67
  ADEC["Accessor decoding & data conversion"]
66
68
  AIMP["Importer from asset data to scene resources"]
69
+ AMETA["Imported nodes, metadata, variants, cameras, & lights"]
70
+ WINT["WebAssembly interop"]
71
+ PY["Python interop"]
67
72
  end
68
73
 
69
74
  subgraph WASM["WebAssembly Driver"]
70
75
  WHEAP["Heap allocation for persistent typed memory"]
71
- WFAR["Frame arena for transient typed memory"]
72
- WTR["Transform propagation"]
76
+ WFRAME["Frame arena for transient typed memory"]
77
+ WTRANS["Transform propagation"]
73
78
  WMATH["Matrix, vector, & quaternion mathematics"]
74
79
  WND["N-dimensional array indexing & stride-offsetting"]
75
- WMESH["Mesh normal generation"]
80
+ WNORM["Mesh normal generation"]
76
81
  WGLTF["glTF accessor decoding, sparse patching, & numeric conversion"]
77
- WANI["Animation sampling & joint matrix generation"]
78
- WBOUNDS["Bounds for mesh, pointcloud, & glyphfield"]
82
+ WANIM["Animation sampling & joint matrix generation"]
83
+ WBOUNDS["Bounds computation"]
79
84
  WCULL["Frustum culling"]
80
85
  end
81
86
 
82
87
  subgraph GPU["Browser Resources"]
83
88
  DEV["Graphics device & queue"]
84
89
  CACHE["Pipeline cache & bindgroup cache"]
85
- RES["Graphics buffers, textures, & samplers"]
86
- RPASS["Render passes for opaque geometry, transparent geometry, post-processing, & user interaction"]
90
+ RES["Buffers, textures, & samplers"]
91
+ RPASS["Render passes for opaques, transparents, transmissions, post-processing, & user interaction"]
87
92
  CPASS["Compute passes for kernels"]
88
93
  end
89
94
 
@@ -96,96 +101,92 @@ flowchart LR
96
101
 
97
102
  class APP,ENG,FAC darkblue;
98
103
  class LOOP,REND,SCALE,OVER,ANNO,PICK green;
99
- class CAPI,CBUF,CPIPE,CPLAN,CKERN,CARR,CREAD,CSCR lightblue;
100
- class SCN,TSTORE,MESH,PGG,CMAP,SKIN,ASTORE,ALOAD,ADEC,AIMP yellow;
101
- class WHEAP,WFAR,WTR,WMATH,WND,WMESH,WGLTF,WANI,WBOUNDS,WCULL purple;
104
+ class COMP,CBUF,CPIP,CDIS,CKER,CND,CREAD,CSCR lightblue;
105
+ class SCN,TSTORE,MESH,PGN,CMAP,SKIN,ASTORE,ALOAD,ADEC,AIMP,AMETA,WINT,PY yellow;
106
+ class WHEAP,WFRAME,WTRANS,WMATH,WND,WNORM,WGLTF,WANIM,WBOUNDS,WCULL purple;
102
107
  class DEV,CACHE,RES,RPASS,CPASS pink;
103
-
108
+
104
109
  APP --> ENG
105
110
  ENG --> FAC
106
111
  ENG --> LOOP
112
+ ENG --> REND
113
+ ENG --> COMP
114
+ ENG --> SCALE
107
115
  ENG --> OVER
108
116
  ENG --> ANNO
109
- ENG --> PICK
110
- ENG --> CAPI
111
-
112
117
  FAC --> SCN
118
+ FAC --> TSTORE
113
119
  FAC --> MESH
114
- FAC --> PGG
115
- FAC --> CMAP
116
- FAC --> SKIN
120
+ FAC --> PGN
117
121
  FAC --> ALOAD
118
- MESH --> CMAP
119
-
120
- ALOAD --> ADEC --> AIMP
121
- AIMP -.-> SCN
122
- AIMP -.-> MESH
123
- AIMP -.-> SKIN
124
- AIMP -.-> TSTORE
125
- ADEC -.-> WGLTF
122
+ FAC --> AIMP
123
+ FAC --> WINT
124
+ FAC --> PY
125
+
126
+ SCN --> MESH
127
+ SCN --> PGN
128
+ MESH --> TSTORE
129
+ PGN --> TSTORE
130
+ SKIN --> MESH
131
+ ALOAD --> ADEC
132
+ ADEC --> AIMP
133
+ AIMP --> SCN
134
+ AIMP --> MESH
135
+ AIMP --> SKIN
136
+ AIMP --> AMETA
137
+ CMAP --> MESH
138
+ CMAP --> PGN
139
+ SCALE --> CMAP
140
+ SCALE --> PGN
126
141
 
127
142
  LOOP --> REND
128
- SCN --> REND
129
- TSTORE --> REND
130
- MESH --> REND
131
- PGG --> REND
132
- CMAP --> REND
133
- SKIN --> REND
134
- OVER --> REND
143
+ LOOP --> WFRAME
144
+ REND --> DEV
145
+ REND --> CACHE
146
+ REND --> RES
147
+ REND --> RPASS
135
148
  REND --> PICK
136
- PICK --> ANNO
137
- ASTORE --> ANNO
138
- ANNO --> OVER
139
-
140
- CAPI --> CBUF
141
- CAPI --> CPIPE
142
- CAPI --> CPLAN
143
- CAPI --> CKERN
144
- CAPI --> CARR
145
- CAPI --> CREAD
146
- CAPI --> CSCR
147
- CAPI --> SCALE
148
- SCALE --> MESH
149
- SCALE --> PGG
150
- SCALE --> CMAP
151
- CBUF --> CPASS
152
- CPIPE --> CPASS
153
- CPLAN --> CPASS
154
- CKERN --> CPASS
155
- CSCR --> CPASS
149
+ REND --> SCN
150
+ REND --> TSTORE
151
+ REND --> WCULL
152
+ REND --> WBOUNDS
153
+ PICK --> RPASS
154
+ OVER --> SCN
155
+ ANNO --> ASTORE
156
+ ANNO --> PICK
157
+ ANNO --> SCN
158
+
159
+ COMP --> CBUF
160
+ COMP --> CPIP
161
+ COMP --> CDIS
162
+ COMP --> CKER
163
+ COMP --> CND
164
+ COMP --> CREAD
165
+ COMP --> CSCR
166
+ CBUF --> RES
167
+ CPIP --> CPASS
168
+ CDIS --> CPASS
169
+ CKER --> CPASS
170
+ CND --> CBUF
171
+ CREAD --> RES
172
+ CSCR --> RES
156
173
  CPASS --> DEV
157
- CREAD --> DEV
158
174
 
159
- REND --> RPASS
160
- REND --> CACHE
161
- CACHE --> DEV
162
- RPASS --> DEV
163
-
164
- ENG -.-> WHEAP
165
- LOOP -.-> WFAR
166
- WHEAP -.-> TSTORE
167
- WHEAP -.-> CARR
168
- WFAR -.-> REND
169
- TSTORE -.-> WTR
170
- WTR -.-> WMATH
171
- SKIN -.-> WANI
172
- WANI -.-> WMATH
173
- MESH -.-> WMESH
174
- WMESH -.-> MESH
175
+ TSTORE -.-> WTRANS
176
+ MESH -.-> WNORM
175
177
  MESH -.-> WBOUNDS
176
- PGG -.-> WBOUNDS
177
- WBOUNDS -.-> WCULL
178
- REND -.-> WCULL
179
- WCULL -.-> REND
180
- WTR -.-> TSTORE
181
- WANI -.-> RES
182
- WGLTF -.-> ADEC
183
- WGLTF -.-> WND
184
- WND -.-> CARR
185
- CBUF -.-> MESH
186
- MESH -.-> RES
187
- REND -.-> RES
188
- CBUF -.-> RES
178
+ PGN -.-> WBOUNDS
179
+ ADEC -.-> WGLTF
180
+ SKIN -.-> WANIM
181
+ CND -.-> WND
182
+ REND -.-> WFRAME
183
+ REND -.-> WMATH
184
+ COMP -.-> WHEAP
185
+ WINT -.-> CBUF
186
+ PY --> WHEAP
187
+ PY --> WFRAME
188
+ WHEAP -.-> RES
189
+ WFRAME -.-> RES
189
190
  ```
190
191
 
191
192
  ## Architecture Comparison Tables
@@ -218,23 +219,23 @@ flowchart LR
218
219
  | **Uniform Uploads** | Manual packing | Extraction & packing | Zero-copy views & no packing |
219
220
  | **Render State Caching** | Manual | State filtering | Pipeline caching |
220
221
  | **Instancing** | Manual | Manual | Automatic |
221
- | **Visibility Culling** | Not available | Frustum culling in JavaScript | Frustum culling in WebAssembly |
222
+ | **Visibility Culling** | Not available | Frustum culling in JavaScript | Frustum & occlusion culling in WebAssembly |
222
223
  | **Picking** | Manual GPU / CPU picking | Often CPU-centered | GPU ID-pass with typed hits |
223
224
  | **Skinning** | Not available | Data textures | Storage buffers |
224
225
  | **Anti-aliasing** | Not available | MSAA | SMAA |
225
226
  | **Textures** | Manual | Managed objects | Managed objects |
226
227
  | **Animation System** | Not available | Executed in JavaScript | Executed in WebAssembly |
227
228
  | **Asset Importing** | Not available | glTF 2.0 | glTF 2.0 |
228
- | **Camera Controls** | Not available | Built-in | Built-in unified orbit & trackball navigation |
229
+ | **Camera Controls** | Not available | Built-in | Built-in |
229
230
 
230
231
  ### 4. Compute Workloads and Scientific Visualizations
231
232
  | | **WebGL / WebGPU** | **Three.js / Babylon.js** | **WasmGPU** |
232
233
  | :--- | :--- | :--- | :--- |
233
- | **GPGPU** | Manual, low-level, high-boilerplate | Integrated, high-abstraction, scene-centric | Automated, kernel-driven, compute-optimized |
234
+ | **GPGPU** | Manual, low-level, high-boilerplate | Integrated, renderer-adjacent, framework-specific | Automated, kernel-driven, compute-optimized |
234
235
  | **Ndarray Abstraction** | Not available | Not available | CPU & GPU ndarrays |
235
236
  | **GPU Readback** | Manual | Manual | Async readback ring |
236
237
  | **Python Interoperability** | Not available | Not available | With Pyodide |
237
- | **Scientific Primitives** | Manual | Manual | Point clouds & glyph fields |
238
+ | **Scientific Primitives** | Manual | Manual | Pointclouds, glyphfields, & nodelinks |
238
239
  | **Mathematical Geometry** | Manual | Manual | Cartesian & parametric curves & surfaces |
239
240
  | **Scaling Statistics** | Manual | Manual | Min/max & percentile analysis |
240
241
  | **Colormap Support** | Manual | Manual | Built-ins & custom |
@@ -244,24 +245,25 @@ flowchart LR
244
245
 
245
246
  ## Getting Started
246
247
 
247
- Examples:
248
- 1. [`./examples/esm.html`](https://zushah.github.io/WasmGPU/examples/esm.html) to see how to get started with the ESM build.
249
- 2. [`./examples/iife.html`](https://zushah.github.io/WasmGPU/examples/iife.html) to see how to get started with the IIFE build.
250
- 3. [`./examples/gltf.html`](https://zushah.github.io/WasmGPU/examples/gltf.html) to see how a glTF model of a chessboard can be loaded and imported.
251
- 4. [`./examples/controls.html`](https://zushah.github.io/WasmGPU/examples/controls.html) to see how the camera controls and navigation functionalities work.
252
- 5. [`./examples/picking.html`](https://zushah.github.io/WasmGPU/examples/picking.html) to see how the picking, probing, and selecting utility works.
253
- 6. [`./examples/scaling.html`](https://zushah.github.io/WasmGPU/examples/scaling.html) to see how the scaling service and colormapping works.
254
- 7. [`./examples/overlay.html`](https://zushah.github.io/WasmGPU/examples/overlay.html) to see how the overlay framework and annotation toolkit works.
255
- 8. [`./examples/mandelbulb.html`](https://zushah.github.io/WasmGPU/examples/mandelbulb.html) to see how the compute subsystem can be used to render a Mandelbulb fractal.
256
- 9. [`./examples/galaxy.html`](https://zushah.github.io/WasmGPU/examples/galaxy.html) to see how a point cloud can be used with Python intero via Pyodide and the compute subsystem to render a realistic galaxy.
257
- 10. [`./examples/fluid.html`](https://zushah.github.io/WasmGPU/examples/fluid.html) to see how a glyph field and a point cloud can be used with Python interop, the compute subsystem, navigation, selection, and overlay features to render a fluid dynamics demo.
258
- 11. [`./examples/graphing.html`](https://zushah.github.io/WasmGPU/examples/graphing.html) to see how the mathematical function primitives and data materials can be used with Python interop, navigation, selection, and overlay features to render for a 3D graphing calculator.
259
- 12. [`./examples/protein.html`](https://zushah.github.io/WasmGPU/examples/protein.html) to see how a point cloud can be used with Python interop, navigation, selection, colormap, and overlay features to render a visualization of a protein structure (hemoglobin) from the Protein Data Bank.
248
+ Examples:
249
+ 1. [`./examples/benchmark.html`](https://zushah.github.io/WasmGPU/examples/benchmark.html) to see how the performance of WasmGPU compares to Three.js and Babylon.js for both rendering and computing.
250
+ 2. [`./examples/esm.html`](https://zushah.github.io/WasmGPU/examples/esm.html) to see how to get started with the ESM build.
251
+ 3. [`./examples/iife.html`](https://zushah.github.io/WasmGPU/examples/iife.html) to see how to get started with the IIFE build.
252
+ 4. [`./examples/gltf.html`](https://zushah.github.io/WasmGPU/examples/gltf.html) to see how a glTF model of a chessboard can be loaded and imported.
253
+ 5. [`./examples/controls.html`](https://zushah.github.io/WasmGPU/examples/controls.html) to see how the camera controls and navigation functionalities work.
254
+ 6. [`./examples/picking.html`](https://zushah.github.io/WasmGPU/examples/picking.html) to see how the picking, probing, and selecting utility works.
255
+ 7. [`./examples/scaling.html`](https://zushah.github.io/WasmGPU/examples/scaling.html) to see how the scaling service and colormapping works.
256
+ 8. [`./examples/overlay.html`](https://zushah.github.io/WasmGPU/examples/overlay.html) to see how the overlay framework and annotation toolkit works.
257
+ 9. [`./examples/mandelbulb.html`](https://zushah.github.io/WasmGPU/examples/mandelbulb.html) to see how the compute subsystem can be used to render a Mandelbulb fractal.
258
+ 10. [`./examples/galaxy.html`](https://zushah.github.io/WasmGPU/examples/galaxy.html) to see how a point cloud can be used with Python intero via Pyodide and the compute subsystem to render a realistic galaxy.
259
+ 11. [`./examples/fluid.html`](https://zushah.github.io/WasmGPU/examples/fluid.html) to see how a glyph field and a point cloud can be used with Python interop, the compute subsystem, navigation, selection, and overlay features to render a fluid dynamics demo.
260
+ 12. [`./examples/graphing.html`](https://zushah.github.io/WasmGPU/examples/graphing.html) to see how the mathematical function primitives and data materials can be used with Python interop, navigation, selection, and overlay features to render for a 3D graphing calculator.
261
+ 13. [`./examples/protein.html`](https://zushah.github.io/WasmGPU/examples/protein.html) to see how a point cloud can be used with Python interop, navigation, selection, colormap, and overlay features to render a visualization of a protein structure (hemoglobin) from the Protein Data Bank.
260
262
 
261
263
  Super basic example to render a cube:
262
264
  ```js
263
265
  // Setup
264
- import { WasmGPU } from "https://cdn.jsdelivr.net/gh/Zushah/WasmGPU@0.7.0/dist/WasmGPU.min.js";
266
+ import { WasmGPU } from "@zushah/wasmgpu";
265
267
  const canvas = document.querySelector("canvas");
266
268
  const wgpu = await WasmGPU.create(canvas, { antialias: true});
267
269
 
@@ -302,34 +304,29 @@ wgpu.run((dt, time) => {
302
304
 
303
305
  Using the IIFE bundle instead of the ESM bundle is exactly the same as above, except you must use an HTML `script` tag instead of a JavaScript `import` statement:
304
306
  ```html
305
- <script src="https://cdn.jsdelivr.net/gh/Zushah/WasmGPU@0.7.0/dist/WasmGPU.iife.min.js"></script>
307
+ <script src="https://cdn.jsdelivr.net/gh/Zushah/WasmGPU@0.8.0/dist/WasmGPU.iife.min.js"></script>
306
308
  ```
307
309
 
308
- ## Development
310
+ To get started with the comprehensive [documentation](https://zushah.github.io/WasmGPU/docs/), consider visiting the pages for these fundamentals first:
311
+ - [`WasmGPU.create`](https://zushah.github.io/WasmGPU/docs/render/wasmgpu-create/)
312
+ - [`WasmGPU.compute.createPipeline`](https://zushah.github.io/WasmGPU/docs/compute/wasmgpu-compute-createpipeline/)
313
+ - [`WasmGPU.createMesh`](https://zushah.github.io/WasmGPU/docs/objects/wasmgpu-createmesh/)
314
+ - [`WasmGPU.createCamera.perspective`](https://zushah.github.io/WasmGPU/docs/world/wasmgpu-createcamera-perspective/)
315
+ - [`WasmGPU.createControls.orbit`](https://zushah.github.io/WasmGPU/docs/interact/wasmgpu-createcontrols-orbit/)
316
+ - [`WasmGPU.webassembly`](https://zushah.github.io/WasmGPU/docs/interop/wasmgpu-webassembly/)
317
+ - [`WasmGPU.python`](https://zushah.github.io/WasmGPU/docs/interop/wasmgpu-python/)
318
+ - [`WasmGPU.math`](https://zushah.github.io/WasmGPU/docs/math/wasmgpu-math/)
309
319
 
310
- 1. Install dev dependencies: `npm install`.
311
- 2. Make sure you develop in `./src/` rather than `./dist/`.
312
- 3. Build and test: `npm run build` & `npm run test`, or just `npm run dev`.
313
- 4. Serve locally to check if the `./examples/` work: `npm run start` or use the [live server extension](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer).
314
- 5. Restore latest release build since builds are only committed during releases: `npm run restore`.
320
+ ## Contributing
315
321
 
316
- The `./dist/` folder contains:
317
- - ESM bundle: `WasmGPU.js` & `WasmGPU.min.js`
318
- - IIFE bundle: `WasmGPU.iife.min.js`
319
- - WebAssembly bridge: `wasm.js`
320
- - WebAssembly driver: `wasm.wasm`
322
+ Asking questions, reporting bugs, suggesting features, and contributing code is very welcome. The guidelines can be found [here](https://www.github.com/Zushah/WasmGPU/blob/main/CONTRIBUTING.md).
321
323
 
322
- Note: `wasm.js` and `wasm.wasm` must be located beside the WasmGPU bundles, i.e. in the `./dist/` folder. These files are automatically copied from the `./build/` folder by `./esbuild.config.js`, so this should not be a problem, but it could become one.
324
+ ## Acknowledgements
323
325
 
324
- The `./build/` folder contains:
325
- - WebAssembly bridge: `wasm.js`
326
- - WebAssembly type declarations: `wasm.d.ts`
327
- - WebAssembly driver: `wasm.wasm`
328
- - WebAssembly text format: `wasm.wat`
329
-
330
- The WasmGPU logo is built by `npm run logo` which runs `./scripts/rasterize_logo.py` to rasterize the `./assets/logo.svg` file to the `./assets/*.png` files used in the repository and on the website.
331
-
332
- The WasmGPU [website](https://zushah.github.io/WasmGPU) is built by `npm run website` which runs `./scripts/build_website.py` to compile the files in `./website/src/` to `./website/build/` and then deploys to GitHub Pages via the `./.github/workflows/deploy_website.yaml` action.
326
+ - [@Zushah](https://www.github.com/Zushah): main author.
327
+ - [@ZacharyVarley](https://www.github.com/ZacharyVarley): LU factor and solve kernels ([#3](https://www.github.com/Zushah/WasmGPU/pull/3)).
328
+ - [@L1quidH2O](https://www.github.com/L1quidH2O): optimization of pointcloud shader ([#1](https://www.github.com/Zushah/WasmGPU/pull/1)).
333
329
 
334
330
  ## License
335
- WasmGPU is available under the [Mozilla Public License 2.0 (MPL-2.0)](https://www.github.com/Zushah/WasmGPU/blob/main/LICENSE.md).
331
+
332
+ WasmGPU is available under the [Mozilla Public License 2.0](https://www.github.com/Zushah/WasmGPU/blob/main/LICENSE.md).