@plasius/gpu-shared 0.1.19 → 1.0.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 +41 -1
- package/README.md +26 -13
- package/assets/shoreline.gltf +532 -0
- package/dist/{chunk-EZHA3MH7.js → chunk-DBTWE2EF.js} +6 -2
- package/dist/chunk-DBTWE2EF.js.map +1 -0
- package/dist/{chunk-UKCJ2AWJ.js → chunk-KGKLNL4X.js} +3 -2
- package/dist/chunk-KGKLNL4X.js.map +1 -0
- package/dist/{gltf-loader-FMRC3OEV.js → gltf-loader-44ILCO7V.js} +2 -2
- package/dist/index.cjs +421 -152
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/{product-studio-runtime-3KANG3JE.js → product-studio-runtime-H7S5WN64.js} +5 -3
- package/dist/{showcase-runtime-OH3H6ZW2.js → showcase-runtime-INRAPCXW.js} +414 -152
- package/dist/showcase-runtime-INRAPCXW.js.map +1 -0
- package/package.json +2 -1
- package/src/asset-url.js +1 -0
- package/src/index.d.ts +10 -1
- package/src/index.js +1 -0
- package/src/product-studio-runtime.js +4 -0
- package/src/showcase-runtime.js +430 -151
- package/dist/chunk-EZHA3MH7.js.map +0 -1
- package/dist/chunk-UKCJ2AWJ.js.map +0 -1
- package/dist/showcase-runtime-OH3H6ZW2.js.map +0 -1
- /package/dist/{gltf-loader-FMRC3OEV.js.map → gltf-loader-44ILCO7V.js.map} +0 -0
- /package/dist/{product-studio-runtime-3KANG3JE.js.map → product-studio-runtime-H7S5WN64.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasius/gpu-shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Shared browser-safe demo runtime and asset helpers for the Plasius gpu-* package family.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"./assets/cutter.gltf": "./assets/cutter.gltf",
|
|
27
27
|
"./assets/lighthouse.gltf": "./assets/lighthouse.gltf",
|
|
28
28
|
"./assets/harbor-dock.gltf": "./assets/harbor-dock.gltf",
|
|
29
|
+
"./assets/shoreline.gltf": "./assets/shoreline.gltf",
|
|
29
30
|
"./package.json": "./package.json"
|
|
30
31
|
},
|
|
31
32
|
"scripts": {
|
package/src/asset-url.js
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -93,7 +93,8 @@ export type ShowcaseAssetName =
|
|
|
93
93
|
| "brigantine"
|
|
94
94
|
| "cutter"
|
|
95
95
|
| "lighthouse"
|
|
96
|
-
| "harbor-dock"
|
|
96
|
+
| "harbor-dock"
|
|
97
|
+
| "shoreline";
|
|
97
98
|
|
|
98
99
|
export type ShowcaseFocusMode =
|
|
99
100
|
| "integrated"
|
|
@@ -318,6 +319,14 @@ export function createProductStudioMeshes(
|
|
|
318
319
|
}
|
|
319
320
|
): readonly ProductStudioMesh[];
|
|
320
321
|
|
|
322
|
+
export function buildProductStudioSceneObjects(
|
|
323
|
+
model: GltfModel,
|
|
324
|
+
options?: {
|
|
325
|
+
targetCenter?: readonly number[];
|
|
326
|
+
targetSize?: number;
|
|
327
|
+
}
|
|
328
|
+
): readonly ProductStudioMesh[];
|
|
329
|
+
|
|
321
330
|
export function mountGpuProductStudio(
|
|
322
331
|
options?: MountGpuShowcaseOptions
|
|
323
332
|
): Promise<MountGpuProductStudioResult>;
|
package/src/index.js
CHANGED
|
@@ -315,6 +315,10 @@ export function createProductStudioMeshes(model, options = {}) {
|
|
|
315
315
|
return Object.freeze([...createProductStudioEnvironmentMeshes(), ...modelMeshes]);
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
+
export function buildProductStudioSceneObjects(model, options = {}) {
|
|
319
|
+
return createProductStudioMeshes(model, options);
|
|
320
|
+
}
|
|
321
|
+
|
|
318
322
|
function ensureStyles(documentRef) {
|
|
319
323
|
if (documentRef.getElementById?.(STYLE_ID)) {
|
|
320
324
|
return;
|