@plasius/gpu-demo-viewer 0.2.2 → 0.3.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
@@ -18,6 +18,34 @@ The format is based on Keep a Changelog and this project adheres to SemVer.
18
18
  - **Security**
19
19
  - (placeholder)
20
20
 
21
+ ## [0.3.0] - 2026-10-21
22
+
23
+ - **Added**
24
+ - Typed, data-only composite study definitions for host applications, sharing the four workshop arrangements without copying placements.
25
+
26
+ - **Changed**
27
+ - (placeholder)
28
+
29
+ - **Fixed**
30
+ - (placeholder)
31
+
32
+ - **Security**
33
+ - (placeholder)
34
+
35
+ ## [0.2.3] - 2026-10-21
36
+
37
+ - **Added**
38
+ - Relic collection and tool-chest composite studies using five credited originals each, with shared camera and render-quality controls.
39
+
40
+ - **Changed**
41
+ - (placeholder)
42
+
43
+ - **Fixed**
44
+ - (placeholder)
45
+
46
+ - **Security**
47
+ - (placeholder)
48
+
21
49
  ## [0.2.2] - 2026-10-21
22
50
 
23
51
  - **Added**
@@ -323,3 +351,5 @@ The format is based on Keep a Changelog and this project adheres to SemVer.
323
351
  [0.2.0]: https://github.com/Plasius-LTD/gpu-demo-viewer/releases/tag/v0.2.0
324
352
  [0.2.1]: https://github.com/Plasius-LTD/gpu-demo-viewer/releases/tag/v0.2.1
325
353
  [0.2.2]: https://github.com/Plasius-LTD/gpu-demo-viewer/releases/tag/v0.2.2
354
+ [0.2.3]: https://github.com/Plasius-LTD/gpu-demo-viewer/releases/tag/v0.2.3
355
+ [0.3.0]: https://github.com/Plasius-LTD/gpu-demo-viewer/releases/tag/v0.3.0
package/README.md CHANGED
@@ -12,7 +12,7 @@ plus a workspace launcher for the `gpu-*` package demos. The workshop provides
12
12
  camera gestures, progressive rendering, quality controls and model credits.
13
13
 
14
14
  The npm package includes the viewer source, manifest and build-time acquisition
15
- helper. Model binaries are downloaded separately; they are not bundled in npm.
15
+ helper and typed composite layout definitions. Model binaries are downloaded separately; they are not bundled in npm.
16
16
 
17
17
  ## Run the model workshop
18
18
 
@@ -63,15 +63,19 @@ or enabled on the production site. The download helper admits only configured
63
63
  resources and keeps two workers, a 100 MiB per-file limit and a 200 MiB batch limit.
64
64
  Source, creator, licence and review notes appear beside each model.
65
65
 
66
- Two composite studies appear after the individual models in **Choose a model or
67
- study**: a furnished interior and a workshop still life. They arrange four and
68
- five credited originals under shared lighting and one camera. They are additional
66
+ Four composite studies appear after the individual models in **Choose a model or
67
+ study**: a furnished interior, workshop still life, relic collection and tool-chest
68
+ arrangement. They arrange four or five credited originals under shared lighting
69
+ and one camera. They are additional
69
70
  views of existing models rather than additional source assets. Each
70
71
  study lists its sources, licences and chosen dimensions; these are static review
71
72
  arrangements, not verified physical-scale scenes. See the
72
73
  [composite study guide](https://github.com/Plasius-LTD/gpu-demo-viewer/blob/main/docs/composite-model-studies.md).
73
74
  Keep `?review=first-twelve` in the local URL and append
74
- `&model=study-furnished-interior` or `&model=study-workshop` to bookmark a study.
75
+ `&model=study-furnished-interior`, `&model=study-workshop`,
76
+ `&model=study-relic-collection` or `&model=study-tool-chest` to bookmark a study.
77
+ The [relic and tool study guide](https://github.com/Plasius-LTD/gpu-demo-viewer/blob/main/docs/relic-and-tool-composites.md)
78
+ describes the newer arrangements and their qualification.
75
79
 
76
80
  ## Camera and render quality
77
81
 
@@ -198,3 +202,26 @@ npm 11.5.1 or newer, uses the protected `production` environment and
198
202
  short-lived npm OIDC with provenance, and has no long-lived npm write-token
199
203
  fallback. Rollback disables CD; it never rewrites published package history.
200
204
  <!-- END PLASIUS RELEASE INTEGRITY -->
205
+
206
+ ## Reuse composite layouts
207
+
208
+ Import the small data-only subpath to offer the workshop's four arrangements in
209
+ another application:
210
+
211
+ ```ts
212
+ import { compositeStudyDefinitions } from '@plasius/gpu-demo-viewer/model-library/studies';
213
+
214
+ const layouts = compositeStudyDefinitions();
215
+ const interior = layouts.find(layout => layout.key === 'study-furnished-interior');
216
+ // Each placement is [sourceKey, bottomCentreAnchor, longestDimension, yawRadians].
217
+ console.log(interior?.placements);
218
+ ```
219
+
220
+ Every call returns independent arrays. The import performs no asset requests,
221
+ DOM work or GPU allocation. Resolve each source key against your admitted asset
222
+ catalogue and pass its URL, complete integrity map and placement to
223
+ `createSceneInspection` from `@plasius/gpu-shared/model-inspection`. Omit a layout
224
+ if any source is unavailable. Keep source licences/credits, translate the supplied
225
+ review copy as needed, and enforce the host application's access controls before
226
+ loading models. Dimensions are illustrative scene units. See the
227
+ [host integration contract](https://github.com/Plasius-LTD/gpu-demo-viewer/blob/main/docs/public-composite-definitions.md).
@@ -19,3 +19,12 @@ browser review with the registry package before release.
19
19
  The existing scene-fidelity feature flag and route capability continue to govern
20
20
  hosted product access. This local review does not add public-site navigation or
21
21
  change the existing localhost review gate.
22
+
23
+ ## Host-consumer contract — 21 October 2026
24
+
25
+ Story site#2321 / viewer Task #83 adds the typed `model-library/studies` subpath.
26
+ A pure function returns fresh copies of the same four layout definitions used by
27
+ the workshop. This keeps placement ownership here without coupling host apps to
28
+ the workshop UI, catalogue loading or its localhost gate. Hosts resolve their
29
+ own admitted sources and retain capability/rollout ownership. Shared inspection
30
+ still owns all rendering and resource limits. The local gate remains unchanged.
@@ -0,0 +1,30 @@
1
+ # Composite definitions for host applications
2
+
3
+ Tracked work: site Story #2321 and viewer Task #83.
4
+
5
+ Expose the four existing qualified arrangements through the typed package
6
+ subpath `@plasius/gpu-demo-viewer/model-library/studies`. A pure
7
+ `compositeStudyDefinitions()` function returns fresh definitions containing the
8
+ stable key, source keys, bottom-centre anchors, longest dimensions, yaw and review
9
+ copy. Extract the existing definitions without changing any value. The workshop
10
+ and website then share one owner for placement.
11
+
12
+ The module must import no renderer, DOM, acquisition helper or local-review
13
+ bootstrap, and perform no I/O. Return independent arrays so consumer edits do not
14
+ alter another call or the workshop. Hosts resolve keys against their own admitted
15
+ catalogue, translate display copy, retain every credit/integrity entry, and apply
16
+ their capability/feature controls before calling released shared scene inspection.
17
+ The definitions are layout data, not entitlement decisions or additional models.
18
+
19
+ Parent Feature site#1170 / Epic site#2271 and inherited flag
20
+ `gpu-demo.scene-fidelity.enabled` apply. The local review gate stays unchanged;
21
+ public access is governed by the website's existing studio capability and GPU
22
+ runtime. Rollback uses those stored rules or reverts the consuming package version.
23
+
24
+ Before implementation, require tests for the supported export, its type/file
25
+ contract, exact unchanged scene membership and placement, isolated return values,
26
+ and continued workshop composition. Keep existing rendering/credit tests. Update
27
+ consumer README, Unreleased changelog and ADR0006. Run all package validation and
28
+ coverage with changed-source LCOV, publish only through approved main/production
29
+ CD after CI, and compare npm contents to the attested release artifact before
30
+ the site consumes the new export.
@@ -0,0 +1,59 @@
1
+ # Relic collection and tool-chest studies
2
+
3
+ Tracked work: site Story #2316 and viewer Task #80.
4
+
5
+ Extend the local model workshop with two arrangements of qualified originals
6
+ from the 61-model catalogue. Reuse `gpu-shared` 1.2.0 `createSceneInspection`
7
+ and renderer 0.2.54; ADR 0006 continues to apply. No new renderer, material
8
+ substitution, asset acquisition or architecture boundary is required.
9
+
10
+ The relic collection brings Gothic Statue, Marble Bust, Chess Set, Kite Shield
11
+ and Antique Estoc into shared light to compare stone, carved detail and metal.
12
+ The tool-chest arrangement brings Metal Tool Chest, Hand Plane, Vintage Hand
13
+ Drill, Rusted Spade and Rusted Can together to compare painted metal, rust,
14
+ wood and small contact shadows. Chosen dimensions and placement are illustrative,
15
+ not surveyed physical dimensions. Both arrangements use the shared neutral floor.
16
+
17
+ Feature site#1170 and Epic site#2271 govern this work. Inherit the remotely
18
+ controlled `gpu-demo.scene-fidelity.enabled` flag and existing localhost-only
19
+ review override. No public-site navigation is introduced by these local studies.
20
+ Rollback is selection of an individual model, disabling the existing review
21
+ entry, or reverting this viewer release; source originals remain available.
22
+
23
+ Before implementation, test both exact source sets, complete integrity manifests,
24
+ source attribution, safe incomplete-catalogue exclusion, and continued existing
25
+ scene selection. Keep shared six-source, geometry and texture budgets unchanged.
26
+ Exercise the existing shared camera, sampling, denoising, cancellation and cleanup
27
+ through the viewer tests and real WebGPU review. Require fixed64, camera reset
28
+ and refinement, denoising off/on, native UHD1, and a 320px reflow check. Record
29
+ failures honestly; completed UHD1 is not optical or real-time qualification.
30
+
31
+ Update consumer README and Unreleased changelog, maintain >=80% coverage and
32
+ changed-source LCOV, and pass tests, types/lint, build, package and audit checks.
33
+ Publish only through main `cd.yml` with the production environment after CI.
34
+ Verify the exact npm artifact before closing tracked work. The separate site
35
+ 61-model deployment and original-model holds remain tracked independently.
36
+
37
+ ## Registry-based review, 21 October 2026
38
+
39
+ Both arrangements rendered with released shared 1.2.0 and renderer 0.2.54,
40
+ without source overrides. The relic collection has 140,669 triangles, 44 mesh
41
+ primitives and eight source materials; the tool scene has 44,876 triangles,
42
+ 16 primitives and five materials. Both totals include the shared ground.
43
+
44
+ Both completed fixed64 at 800 × 282, keyboard camera movement followed by
45
+ refinement, denoising off/on and native 3840 × 2160 at one sample. Both returned
46
+ to balanced resolution. At a 320px viewport each completed fixed64 at 800 × 601,
47
+ with all five originals visible and no horizontal document overflow, including
48
+ expanded source credits. The viewport was reset afterwards. Mouse orbit and
49
+ keyboard Home were also checked on the relic arrangement.
50
+
51
+ One DOM keyboard action immediately after viewport restoration exceeded the
52
+ automation input deadline; the page remained responsive, native Home input
53
+ restarted sampling and refinement completed. Quality changes still rebuild the
54
+ scene for several seconds. No renderer console warnings/errors were recorded.
55
+ These are functional static-scene checks, not reference optical fidelity,
56
+ animation playback, physical-touch or screen-reader-speech qualification.
57
+
58
+ All 59 viewer tests pass; line coverage and changed `scenes.js` coverage are
59
+ 100%. Types/lint, build, package validation and the full dependency audit pass.
@@ -1,31 +1,8 @@
1
1
  import { fixtureRequest } from './controller.js';
2
-
3
- const definitions = [
4
- { key: 'study-furnished-interior', name: 'Furnished interior',
5
- renderer_target: 'Compare woven fabric, silk, leather, wicker and aged wood in one arrangement.',
6
- preparation: 'Inspect relative scale, fabric response and contact shadows. Sizes are chosen scene units, not verified physical dimensions.',
7
- placements: [
8
- ['SheenWoodLeatherSofa', [0, 0, -.8], 2.4, 0],
9
- ['vintage_cabinet_01', [-2.15, 0, -.8], 1.7, 0],
10
- ['SpecularSilkPouf', [.55, 0, .85], .7, 0],
11
- ['wicker_basket_01', [1.6, 0, -.3], .6, 0],
12
- ] },
13
- { key: 'study-workshop', name: 'Workshop still life',
14
- renderer_target: 'Compare worked metal, rough timber and worn surfaces under shared light.',
15
- preparation: 'Inspect object contact and the contrast between brass, painted metal and timber. These are static review arrangements.',
16
- placements: [
17
- ['spinning_wheel_01', [-1.1, 0, -.65], 1.8, 0],
18
- ['wine_barrel_01', [1.15, 0, -.7], 1.25, 0],
19
- ['wooden_crate_02', [0, 0, .7], 1.2, 0],
20
- ['bench_vice_01', [-1.3, 0, 1.05], .55, .3],
21
- // Crate lid height from the original accessor bounds and lid translation,
22
- // uniformly scaled to its chosen 1.2-unit longest dimension.
23
- ['brass_blowtorch', [0, .47735, .7], .55, 0],
24
- ] },
25
- ];
2
+ import { compositeStudyDefinitions } from './studies.js';
26
3
 
27
4
  export function compositeStudies(assets) {
28
- return definitions.flatMap(({ placements, ...definition }) => {
5
+ return compositeStudyDefinitions().flatMap(({ placements, ...definition }) => {
29
6
  const models = placements.map(([key, anchor, size, yaw]) => ({
30
7
  asset: assets.find(a => a.key === key), anchor: [...anchor], size, yaw,
31
8
  }));
@@ -0,0 +1,10 @@
1
+ /** Layout data only. Host applications own assets, credits and access decisions. */
2
+ export interface CompositeStudyDefinition {
3
+ key: string;
4
+ name: string;
5
+ renderer_target: string;
6
+ preparation: string;
7
+ /** Source key, bottom-centre anchor, longest dimension in scene units, Y rotation in radians. */
8
+ placements: [string, [number, number, number], number, number][];
9
+ }
10
+ export function compositeStudyDefinitions(): CompositeStudyDefinition[];
@@ -0,0 +1,51 @@
1
+ const definitions = [
2
+ { key: 'study-furnished-interior', name: 'Furnished interior',
3
+ renderer_target: 'Compare woven fabric, silk, leather, wicker and aged wood in one arrangement.',
4
+ preparation: 'Inspect relative scale, fabric response and contact shadows. Sizes are chosen scene units, not verified physical dimensions.',
5
+ placements: [
6
+ ['SheenWoodLeatherSofa', [0, 0, -.8], 2.4, 0],
7
+ ['vintage_cabinet_01', [-2.15, 0, -.8], 1.7, 0],
8
+ ['SpecularSilkPouf', [.55, 0, .85], .7, 0],
9
+ ['wicker_basket_01', [1.6, 0, -.3], .6, 0],
10
+ ] },
11
+ { key: 'study-workshop', name: 'Workshop still life',
12
+ renderer_target: 'Compare worked metal, rough timber and worn surfaces under shared light.',
13
+ preparation: 'Inspect object contact and the contrast between brass, painted metal and timber. These are static review arrangements.',
14
+ placements: [
15
+ ['spinning_wheel_01', [-1.1, 0, -.65], 1.8, 0],
16
+ ['wine_barrel_01', [1.15, 0, -.7], 1.25, 0],
17
+ ['wooden_crate_02', [0, 0, .7], 1.2, 0],
18
+ ['bench_vice_01', [-1.3, 0, 1.05], .55, .3],
19
+ // Crate lid height from the original accessor bounds and lid translation,
20
+ // uniformly scaled to its chosen 1.2-unit longest dimension.
21
+ ['brass_blowtorch', [0, .47735, .7], .55, 0],
22
+ ] },
23
+ { key: 'study-relic-collection', name: 'Relic collection',
24
+ renderer_target: 'Compare carved stone, chess pieces and aged metal under shared light.',
25
+ preparation: 'Inspect silhouette, surface detail and contact shadows across five originals. Dimensions are illustrative scene units.',
26
+ placements: [
27
+ ['gothic_statue', [-1.2, 0, -.7], 1.8, .15],
28
+ ['marble_bust_01', [.65, 0, -.7], .85, -.25],
29
+ ['chess_set', [0, 0, .8], 1.15, .1],
30
+ ['kite_shield', [1.5, 0, .15], 1.15, -.4],
31
+ ['antique_estoc', [-1.5, 0, .8], 1.25, .25],
32
+ ] },
33
+ { key: 'study-tool-chest', name: 'Tool-chest arrangement',
34
+ renderer_target: 'Compare painted metal, rust and wooden handles in one working collection.',
35
+ preparation: 'Inspect relative scale, worn surfaces and small contact shadows. These are static originals placed on a shared inspection floor.',
36
+ placements: [
37
+ ['metal_tool_chest', [0, 0, -.8], 1.7, 0],
38
+ ['hand_plane_no4', [-.65, 0, .8], .5, -.25],
39
+ ['vintage_hand_drill', [.25, 0, .9], .55, .3],
40
+ ['rusted_spade_01', [1.25, 0, .05], 1.5, -.3],
41
+ ['can_rusted', [-1.25, 0, .2], .4, 0],
42
+ ] },
43
+ ];
44
+
45
+ /** Independent layout data; the host resolves sources and controls access. */
46
+ export function compositeStudyDefinitions() {
47
+ return definitions.map(({ placements, ...definition }) => ({
48
+ ...definition,
49
+ placements: placements.map(([key, anchor, size, yaw]) => [key, [...anchor], size, yaw]),
50
+ }));
51
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasius/gpu-demo-viewer",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Root validation viewer for Plasius gpu-* demos.",
6
6
  "license": "Apache-2.0",
@@ -19,7 +19,11 @@
19
19
  ".": "./viewer-manifest.js",
20
20
  "./viewer-manifest": "./viewer-manifest.js",
21
21
  "./package.json": "./package.json",
22
- "./model-library/acquire": "./model-library/acquire.js"
22
+ "./model-library/acquire": "./model-library/acquire.js",
23
+ "./model-library/studies": {
24
+ "types": "./model-library/studies.d.ts",
25
+ "default": "./model-library/studies.js"
26
+ }
23
27
  },
24
28
  "files": [
25
29
  "assets/",
@@ -47,7 +51,7 @@
47
51
  "lint": "npm run typecheck",
48
52
  "pack:check": "node scripts/verify-public-package.cjs",
49
53
  "prepublishOnly": "npm run build && npm run pack:check",
50
- "typecheck": "node --check index.js && node --check main.js && node --check viewer-manifest.js && node --check showcase/index.js && node --check showcase/main.js && node --check wavefront/main.js && node --check model-library/main.js && node --check model-library/controller.js && node --check model-library/scenes.js && node --check model-library/acquire.js && node --check model-library/rollout.js",
54
+ "typecheck": "node --check index.js && node --check main.js && node --check viewer-manifest.js && node --check showcase/index.js && node --check showcase/main.js && node --check wavefront/main.js && node --check model-library/main.js && node --check model-library/controller.js && node --check model-library/scenes.js && node --check model-library/acquire.js && node --check model-library/rollout.js && node --check model-library/studies.js",
51
55
  "test": "node --test",
52
56
  "models:download": "node scripts/acquire-model-library.mjs",
53
57
  "models:dev": "vite --config model-library/vite.config.js",