@plasius/gpu-shared 0.1.1 → 0.1.3

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
@@ -4,6 +4,39 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ - **Added**
8
+ - (placeholder)
9
+
10
+ - **Changed**
11
+ - (placeholder)
12
+
13
+ - **Fixed**
14
+ - (placeholder)
15
+
16
+ - **Security**
17
+ - (placeholder)
18
+
19
+ ## [0.1.3] - 2026-03-26
20
+
21
+ - **Added**
22
+ - Public-contract tests that lock the package export surface for the shared
23
+ runtime and bundled brigantine asset.
24
+ - Public `destroy()` teardown hook on `mountGpuShowcase()` so browser consumers can clean up the shared runtime safely on route/page unmount.
25
+
26
+ - **Changed**
27
+ - Documented the import-map pattern for browser demos so consumers stay on the
28
+ published `@plasius/gpu-shared` package surface instead of deep internal
29
+ paths.
30
+ - README usage now documents the shared teardown contract for public consumers.
31
+
32
+ - **Fixed**
33
+ - (placeholder)
34
+
35
+ - **Security**
36
+ - (placeholder)
37
+
38
+ ## [0.1.2] - 2026-03-23
39
+
7
40
  - **Added**
8
41
  - (placeholder)
9
42
 
@@ -50,3 +83,5 @@ All notable changes to this project will be documented in this file.
50
83
 
51
84
  [0.1.0]: https://github.com/Plasius-LTD/gpu-shared/releases/tag/v0.1.0
52
85
  [0.1.1]: https://github.com/Plasius-LTD/gpu-shared/releases/tag/v0.1.1
86
+ [0.1.2]: https://github.com/Plasius-LTD/gpu-shared/releases/tag/v0.1.2
87
+ [0.1.3]: https://github.com/Plasius-LTD/gpu-shared/releases/tag/v0.1.3
package/README.md CHANGED
@@ -34,12 +34,29 @@ npm install @plasius/gpu-shared
34
34
  ```js
35
35
  import { mountGpuShowcase } from "@plasius/gpu-shared";
36
36
 
37
- await mountGpuShowcase({
37
+ const showcase = await mountGpuShowcase({
38
38
  root: document.getElementById("app"),
39
39
  packageName: "@plasius/gpu-demo-viewer",
40
40
  title: "Flag by the Sea",
41
41
  subtitle: "Shared 3D validation scene for the gpu-* family.",
42
42
  });
43
+
44
+ // Teardown is safe to call repeatedly from a route/page cleanup.
45
+ showcase.destroy();
46
+ ```
47
+
48
+ For browser-only demos served without a bundler, keep the import surface on the
49
+ published package name and resolve it with an import map rather than importing a
50
+ viewer-private or workspace-private source file:
51
+
52
+ ```html
53
+ <script type="importmap">
54
+ {
55
+ "imports": {
56
+ "@plasius/gpu-shared": "../node_modules/@plasius/gpu-shared/dist/index.js"
57
+ }
58
+ }
59
+ </script>
43
60
  ```
44
61
 
45
62
  ## Asset Helpers
@@ -80,6 +97,7 @@ surface for these family demos.
80
97
  ## API
81
98
 
82
99
  - `mountGpuShowcase(options)`
100
+ - Returns `{ state, shipModel, canvas, destroy() }`
83
101
  - `loadGltfModel(url)`
84
102
  - `resolveShowcaseAssetUrl(baseUrl?)`
85
103
  - `showcaseFocusModes`