@iwsdk/create 1.1.0-rc.0 → 1.1.0-rc.2

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.
Files changed (60) hide show
  1. package/dist/cli.js +8 -13
  2. package/dist/guidance/agents/.agents/skills/iwsdk-compose-scene/SKILL.md +16 -2
  3. package/dist/guidance/agents/.agents/skills/iwsdk-compose-scene/references/environment-recipes.md +234 -0
  4. package/dist/guidance/agents/.agents/skills/iwsdk-compose-scene/references/scene-format.md +6 -0
  5. package/dist/guidance/agents/.agents/skills/iwsdk-dev/references/api-reference.md +56 -33
  6. package/dist/guidance/agents/.agents/skills/iwsdk-dev/references/iterate.md +24 -5
  7. package/dist/guidance/agents/.agents/skills/iwsdk-glasses-test/SKILL.md +281 -0
  8. package/dist/guidance/agents/.agents/skills/iwsdk-grab/SKILL.md +24 -1
  9. package/dist/guidance/agents/.agents/skills/iwsdk-ray/SKILL.md +3 -1
  10. package/dist/guidance/agents/.agents/skills/iwsdk-ui/SKILL.md +25 -2
  11. package/dist/guidance/claude/.claude/agents/iwsdk-project-code-reviewer.md +73 -6
  12. package/dist/guidance/claude/.claude/rules/assets-and-manifest.md +2 -0
  13. package/dist/guidance/claude/.claude/rules/ecs-api.md +1 -1
  14. package/dist/guidance/claude/.claude/rules/scene-json.md +3 -1
  15. package/dist/guidance/claude/.claude/rules/uikitml.md +5 -0
  16. package/dist/guidance/claude/.claude/settings.json +1 -0
  17. package/dist/guidance/claude/.claude/skills/iwsdk-compose-scene/SKILL.md +16 -2
  18. package/dist/guidance/claude/.claude/skills/iwsdk-compose-scene/references/environment-recipes.md +234 -0
  19. package/dist/guidance/claude/.claude/skills/iwsdk-compose-scene/references/scene-format.md +6 -0
  20. package/dist/guidance/claude/.claude/skills/iwsdk-dev/references/api-reference.md +56 -33
  21. package/dist/guidance/claude/.claude/skills/iwsdk-dev/references/iterate.md +24 -5
  22. package/dist/guidance/claude/.claude/skills/iwsdk-glasses-test/SKILL.md +281 -0
  23. package/dist/guidance/claude/.claude/skills/iwsdk-grab/SKILL.md +24 -1
  24. package/dist/guidance/claude/.claude/skills/iwsdk-ray/SKILL.md +3 -1
  25. package/dist/guidance/claude/.claude/skills/iwsdk-ui/SKILL.md +25 -2
  26. package/dist/guidance/common/AGENTS.md +25 -12
  27. package/dist/guidance/copilot/.github/instructions/assets-and-manifest.instructions.md +2 -0
  28. package/dist/guidance/copilot/.github/instructions/ecs-api.instructions.md +1 -1
  29. package/dist/guidance/copilot/.github/instructions/scene-json.instructions.md +3 -1
  30. package/dist/guidance/copilot/.github/instructions/uikitml.instructions.md +5 -0
  31. package/dist/guidance/cursor/.cursor/rules/assets-and-manifest.mdc +2 -0
  32. package/dist/guidance/cursor/.cursor/rules/ecs-api.mdc +1 -1
  33. package/dist/guidance/cursor/.cursor/rules/scene-json.mdc +3 -1
  34. package/dist/guidance/cursor/.cursor/rules/uikitml.mdc +5 -0
  35. package/dist/guidance/scoped-agents/public/scenes/AGENTS.md +3 -1
  36. package/dist/guidance/scoped-agents/public/ui/AGENTS.md +5 -0
  37. package/dist/guidance/scoped-agents/src/AGENTS.md +3 -1
  38. package/dist/template/common/README.md +19 -0
  39. package/dist/template/common/public/ui/label-grab.uikitml +57 -0
  40. package/dist/template/common/public/ui/label-select.uikitml +57 -0
  41. package/dist/template/common/public/ui/label-spin.uikitml +57 -0
  42. package/dist/template/common/public/ui/welcome.uikitml +33 -32
  43. package/dist/template/common/src/assets.ts +32 -23
  44. package/dist/template/common/src/scene-assets/decor.scene-asset.ts +781 -0
  45. package/dist/template/common/src/scene-assets/studio.scene-asset.ts +298 -0
  46. package/dist/template/common-js/README.md +19 -0
  47. package/dist/template/common-js/public/ui/label-grab.uikitml +57 -0
  48. package/dist/template/common-js/public/ui/label-select.uikitml +57 -0
  49. package/dist/template/common-js/public/ui/label-spin.uikitml +57 -0
  50. package/dist/template/common-js/public/ui/welcome.uikitml +33 -32
  51. package/dist/template/common-js/src/assets.js +20 -23
  52. package/dist/template/common-js/src/scene-assets/decor.scene-asset.js +554 -0
  53. package/dist/template/common-js/src/scene-assets/studio.scene-asset.js +236 -0
  54. package/dist/template/scenes/ar.iwsdk.scene.json +354 -58
  55. package/dist/template/scenes/immersive.iwsdk.scene.json +435 -54
  56. package/package.json +4 -4
  57. package/dist/template/common/public/gltf/webxr-banner/banner.gltf +0 -68
  58. package/dist/template/common/public/textures/webxr.png +0 -0
  59. package/dist/template/common-js/public/gltf/webxr-banner/banner.gltf +0 -68
  60. package/dist/template/common-js/public/textures/webxr.png +0 -0
@@ -0,0 +1,298 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import {
9
+ createSceneMaterial,
10
+ createScenePrimitiveObject,
11
+ DataTexture,
12
+ Group,
13
+ IcosahedronGeometry,
14
+ LinearFilter,
15
+ LinearMipmapLinearFilter,
16
+ Mesh,
17
+ MeshStandardMaterial,
18
+ RepeatWrapping,
19
+ RGBAFormat,
20
+ SRGBColorSpace,
21
+ TorusKnotGeometry,
22
+ UnsignedByteType,
23
+ } from '@iwsdk/core';
24
+
25
+ /**
26
+ * Starter-only studio set, built in code so the starter downloads no extra
27
+ * models: floor, stage, plinths and the graphite pieces you interact with.
28
+ * Each one is registered in src/assets.ts and placed by the scene; it is safe
29
+ * to delete them together with those asset entries and scene nodes.
30
+ *
31
+ * The rest of the look is authored in the scene with built-in components: the
32
+ * sky is the level root's DomeGradient, the floor fades into it with the
33
+ * floor node's DomeFade, and the soft blobs and the AR shadow floor are
34
+ * ContactShadow and ShadowCatcher nodes.
35
+ */
36
+
37
+ const clayMaterial = createSceneMaterial({
38
+ id: 'studio-clay',
39
+ model: 'standard',
40
+ baseColor: '#EEE9E0',
41
+ roughness: 0.9,
42
+ });
43
+
44
+ const stoneMaterial = createSceneMaterial({
45
+ id: 'studio-stone',
46
+ model: 'standard',
47
+ roughness: 0.7,
48
+ textures: {
49
+ albedo: {
50
+ type: 'procedural',
51
+ algorithm: 'periodic-fbm-v1',
52
+ resolution: [256, 256],
53
+ seed: 7,
54
+ bands: [
55
+ { frequency: [110, 110], amplitude: 0.7 },
56
+ { frequency: [240, 240], amplitude: 0.3 },
57
+ ],
58
+ ramp: [
59
+ { at: 0, color: '#A59E93' },
60
+ { at: 1, color: '#B0A99E' },
61
+ ],
62
+ // Tiled twice: a quarter of the pixels to generate, same grain size.
63
+ sampler: { repeat: [2, 2] },
64
+ },
65
+ roughness: {
66
+ type: 'procedural',
67
+ algorithm: 'periodic-fbm-v1',
68
+ resolution: [256, 256],
69
+ seed: 8,
70
+ bands: [{ frequency: [30, 30], amplitude: 1 }],
71
+ range: [0.72, 0.8],
72
+ },
73
+ },
74
+ });
75
+
76
+ // Dark, glossy graphite marks everything you can interact with.
77
+ const graphiteMaterial = createSceneMaterial({
78
+ id: 'studio-graphite',
79
+ model: 'physical',
80
+ baseColor: '#464950',
81
+ roughness: 0.38,
82
+ metalness: 0,
83
+ clearcoat: 0.6,
84
+ clearcoatRoughness: 0.15,
85
+ envMapIntensity: 2.6,
86
+ textures: {
87
+ roughness: {
88
+ type: 'procedural',
89
+ algorithm: 'periodic-fbm-v1',
90
+ resolution: [256, 256],
91
+ seed: 3,
92
+ bands: [
93
+ { frequency: [12, 12], amplitude: 0.6 },
94
+ { frequency: [48, 48], amplitude: 0.4 },
95
+ ],
96
+ range: [0.26, 0.52],
97
+ },
98
+ bump: {
99
+ type: 'procedural',
100
+ algorithm: 'periodic-fbm-v1',
101
+ resolution: [256, 256],
102
+ seed: 43,
103
+ bands: [
104
+ { frequency: [32, 32], amplitude: 0.6 },
105
+ { frequency: [96, 96], amplitude: 0.4 },
106
+ ],
107
+ scale: 0.04,
108
+ sampler: { repeat: [3, 3] },
109
+ },
110
+ },
111
+ });
112
+
113
+ /** Opaque sRGB texture from RGBA pixels, filtered like an image texture. */
114
+ function pixelTexture(size: number, pixels: Uint8Array): DataTexture {
115
+ const texture = new DataTexture(
116
+ pixels,
117
+ size,
118
+ size,
119
+ RGBAFormat,
120
+ UnsignedByteType,
121
+ );
122
+ texture.colorSpace = SRGBColorSpace;
123
+ texture.magFilter = LinearFilter;
124
+ texture.minFilter = LinearMipmapLinearFilter;
125
+ texture.generateMipmaps = true;
126
+ texture.anisotropy = 8;
127
+ texture.needsUpdate = true;
128
+ return texture;
129
+ }
130
+
131
+ /**
132
+ * One tile of the floor lattice: a faint diamond through the middle of each
133
+ * edge on warm clay. Each texel takes its distance to the diamond and covers
134
+ * a 2.5 px line, so it needs no DOM.
135
+ */
136
+ function createLatticeTexture(size = 512): DataTexture {
137
+ const clay = [0xea, 0xe6, 0xdf];
138
+ const line = [151, 155, 166];
139
+ const half = size / 2;
140
+ const pixels = new Uint8Array(size * size * 4);
141
+ for (let y = 0; y < size; y += 1) {
142
+ for (let x = 0; x < size; x += 1) {
143
+ const distance =
144
+ Math.abs(Math.abs(x + 0.5 - half) + Math.abs(y + 0.5 - half) - half) /
145
+ Math.SQRT2;
146
+ const alpha = 0.26 * Math.min(1, Math.max(0, 1.25 + 0.5 - distance));
147
+ const index = (y * size + x) * 4;
148
+ for (let channel = 0; channel < 3; channel += 1) {
149
+ pixels[index + channel] = Math.round(
150
+ clay[channel] + (line[channel] - clay[channel]) * alpha,
151
+ );
152
+ }
153
+ pixels[index + 3] = 255;
154
+ }
155
+ }
156
+ return pixelTexture(size, pixels);
157
+ }
158
+
159
+ /**
160
+ * Square clay floor with a faint diamond lattice. The scene's DomeFade on
161
+ * this node blends it into the sky with distance, so it has no visible edge.
162
+ */
163
+ export function createStudioFloor(size = 36): Group {
164
+ const lattice = createLatticeTexture();
165
+ lattice.wrapS = lattice.wrapT = RepeatWrapping;
166
+ // 1.2 m x 1.92 m diamonds: 1.6x longer in depth than across.
167
+ lattice.repeat.set(size / (0.6 * 2), size / (0.6 * 3.2));
168
+ const floor = createScenePrimitiveObject(
169
+ { geometry: { type: 'plane', size: [size, size] } },
170
+ new MeshStandardMaterial({ map: lattice, roughness: 0.95 }),
171
+ );
172
+ floor.rotation.x = -Math.PI / 2;
173
+ const root = new Group();
174
+ root.add(floor);
175
+ return root;
176
+ }
177
+
178
+ /** Low turned stage with an inset stone ring. */
179
+ export function createStage(radius = 1.85): Group {
180
+ const height = 0.035;
181
+ const disc = createScenePrimitiveObject(
182
+ {
183
+ geometry: {
184
+ type: 'lathe',
185
+ profile: [
186
+ [0.001, 0],
187
+ [radius, 0],
188
+ [radius + 0.004, height * 0.5],
189
+ [radius - 0.012, height],
190
+ [0.001, height],
191
+ ],
192
+ segments: 128,
193
+ },
194
+ },
195
+ clayMaterial,
196
+ );
197
+ const inlay = createScenePrimitiveObject(
198
+ {
199
+ geometry: {
200
+ type: 'torus',
201
+ radius: radius - 0.16,
202
+ tube: 0.012,
203
+ radialSegments: 8,
204
+ tubularSegments: 192,
205
+ },
206
+ },
207
+ stoneMaterial,
208
+ );
209
+ inlay.rotation.x = -Math.PI / 2;
210
+ inlay.scale.z = 0.3;
211
+ inlay.position.y = height;
212
+ const stage = new Group();
213
+ stage.add(disc, inlay);
214
+ return stage;
215
+ }
216
+
217
+ /** Pedestal: a warm stone slab on a tapered clay pillar with a turned foot. */
218
+ export function createPlinth(height = 0.92, width = 0.8): Group {
219
+ const pillar = createScenePrimitiveObject(
220
+ {
221
+ geometry: {
222
+ type: 'lathe',
223
+ profile: [
224
+ [0.001, 0],
225
+ [0.16, 0],
226
+ [0.17, 0.018],
227
+ [0.16, 0.04],
228
+ [0.09, 0.085],
229
+ [0.066, 0.3],
230
+ [0.06, height - 0.12],
231
+ [0.11, height - 0.06],
232
+ [0.001, height - 0.055],
233
+ ],
234
+ segments: 64,
235
+ },
236
+ },
237
+ clayMaterial,
238
+ );
239
+ const top = createScenePrimitiveObject(
240
+ {
241
+ geometry: {
242
+ type: 'roundedBox',
243
+ size: [width, 0.055, width * 0.72],
244
+ radius: 0.022,
245
+ segments: 4,
246
+ },
247
+ },
248
+ stoneMaterial,
249
+ );
250
+ top.position.y = height - 0.0275;
251
+ const plinth = new Group();
252
+ plinth.add(pillar, top);
253
+ return plinth;
254
+ }
255
+
256
+ /** Rounded graphite cube with its origin at the center. */
257
+ export function createGraphiteCube(size = 0.13): Mesh {
258
+ return createScenePrimitiveObject(
259
+ {
260
+ geometry: {
261
+ type: 'roundedBox',
262
+ size: [size, size, size],
263
+ radius: size * 0.12,
264
+ segments: 5,
265
+ },
266
+ },
267
+ graphiteMaterial,
268
+ );
269
+ }
270
+
271
+ /** Faceted graphite gem. */
272
+ export function createGraphiteGem(radius = 0.085): Mesh {
273
+ return new Mesh(new IcosahedronGeometry(radius, 0), graphiteMaterial);
274
+ }
275
+
276
+ /** Graphite trefoil knot. */
277
+ export function createGraphiteKnot(): Mesh {
278
+ return new Mesh(
279
+ new TorusKnotGeometry(0.1, 0.032, 200, 24, 2, 3),
280
+ graphiteMaterial,
281
+ );
282
+ }
283
+
284
+ /** Upright graphite ring. */
285
+ export function createGraphiteRing(radius = 0.2): Mesh {
286
+ return createScenePrimitiveObject(
287
+ {
288
+ geometry: {
289
+ type: 'torus',
290
+ radius,
291
+ tube: 0.035,
292
+ radialSegments: 24,
293
+ tubularSegments: 96,
294
+ },
295
+ },
296
+ graphiteMaterial,
297
+ );
298
+ }
@@ -22,5 +22,24 @@ from `src/components.ts` or `src/components.js`; you can then delete the unused
22
22
  robot component and system files. To remove the welcome panel, delete its scene
23
23
  node and its `PanelSystem` registration from the application entry point.
24
24
 
25
+ The robot stands on the second of three numbered stations. The first holds dark
26
+ pieces you can grab and move, and the third holds a ring you can spin in place.
27
+ The studio props (the plinths and the dark pieces, plus the floor and stage in VR
28
+ and Desktop 3D) are built in code in `src/scene-assets/studio.scene-asset.ts` or
29
+ `.js`. The VR and Desktop 3D background furniture is built the same way in
30
+ `src/scene-assets/decor.scene-asset.ts` or `.js`, so the starter downloads no
31
+ extra models. To remove any of them, delete their scene nodes and their entries
32
+ in `src/assets.ts` or `src/assets.js`, then delete the files you no longer use.
33
+ The station labels are `public/ui/label-*.uikitml`.
34
+
35
+ The rest of the look is built-in components in the scene, which you can edit in
36
+ the editor without code. The soft light on every object is the scene root's
37
+ `IBLGradient` (select the Level Root to edit it), and the soft shadows under
38
+ each object are `ContactShadow` nodes. In VR and Desktop 3D, the sky is the
39
+ scene root's `DomeGradient` (its colors, tilt and dither are also on the Level
40
+ Root), and the floor fades into it through the `DomeFade` on the floor node. AR
41
+ projects have no sky or floor, so passthrough stays visible, and a
42
+ `ShadowCatcher` node grounds the stations.
43
+
25
44
  - Minimal scene walkthrough: https://iwsdk.dev/guides/01b-minimal-scene.html
26
45
  - XR-enabled projects — IWER emulator controls: https://iwsdk.dev/guides/02-testing-experience.html#iwer-controls
@@ -0,0 +1,57 @@
1
+ <!--
2
+ Station label. Plain divs keep these colors in both color schemes.
3
+ -->
4
+ <style>
5
+ .label {
6
+ flex-direction: row;
7
+ align-items: center;
8
+ gap: 18px;
9
+ padding-top: 14px;
10
+ padding-bottom: 14px;
11
+ padding-left: 16px;
12
+ padding-right: 30px;
13
+ border-radius: 26px;
14
+ border-width: 1px;
15
+ border-color: #3a3b40;
16
+ background-color: #232427;
17
+ }
18
+
19
+ .number {
20
+ width: 46px;
21
+ height: 46px;
22
+ flex-shrink: 0;
23
+ align-items: center;
24
+ justify-content: center;
25
+ border-radius: 23px;
26
+ background-color: #f1ece3;
27
+ }
28
+
29
+ .digit {
30
+ color: #1d1e22;
31
+ font-size: 24px;
32
+ font-weight: 700;
33
+ }
34
+
35
+ .text {
36
+ flex-direction: column;
37
+ gap: 4px;
38
+ }
39
+
40
+ .title {
41
+ color: #fafaf7;
42
+ font-size: 28px;
43
+ font-weight: 700;
44
+ }
45
+
46
+ .how {
47
+ color: #eeeff2;
48
+ font-size: 27px;
49
+ }
50
+ </style>
51
+ <div class="label">
52
+ <div class="number"><span class="digit">1</span></div>
53
+ <div class="text">
54
+ <span class="title">Grab</span>
55
+ <span class="how">Point, then hold to move it</span>
56
+ </div>
57
+ </div>
@@ -0,0 +1,57 @@
1
+ <!--
2
+ Station label. Plain divs keep these colors in both color schemes.
3
+ -->
4
+ <style>
5
+ .label {
6
+ flex-direction: row;
7
+ align-items: center;
8
+ gap: 18px;
9
+ padding-top: 14px;
10
+ padding-bottom: 14px;
11
+ padding-left: 16px;
12
+ padding-right: 30px;
13
+ border-radius: 26px;
14
+ border-width: 1px;
15
+ border-color: #3a3b40;
16
+ background-color: #232427;
17
+ }
18
+
19
+ .number {
20
+ width: 46px;
21
+ height: 46px;
22
+ flex-shrink: 0;
23
+ align-items: center;
24
+ justify-content: center;
25
+ border-radius: 23px;
26
+ background-color: #f1ece3;
27
+ }
28
+
29
+ .digit {
30
+ color: #1d1e22;
31
+ font-size: 24px;
32
+ font-weight: 700;
33
+ }
34
+
35
+ .text {
36
+ flex-direction: column;
37
+ gap: 4px;
38
+ }
39
+
40
+ .title {
41
+ color: #fafaf7;
42
+ font-size: 28px;
43
+ font-weight: 700;
44
+ }
45
+
46
+ .how {
47
+ color: #eeeff2;
48
+ font-size: 27px;
49
+ }
50
+ </style>
51
+ <div class="label">
52
+ <div class="number"><span class="digit">2</span></div>
53
+ <div class="text">
54
+ <span class="title">Select</span>
55
+ <span class="how">Point at the robot, then select</span>
56
+ </div>
57
+ </div>
@@ -0,0 +1,57 @@
1
+ <!--
2
+ Station label. Plain divs keep these colors in both color schemes.
3
+ -->
4
+ <style>
5
+ .label {
6
+ flex-direction: row;
7
+ align-items: center;
8
+ gap: 18px;
9
+ padding-top: 14px;
10
+ padding-bottom: 14px;
11
+ padding-left: 16px;
12
+ padding-right: 30px;
13
+ border-radius: 26px;
14
+ border-width: 1px;
15
+ border-color: #3a3b40;
16
+ background-color: #232427;
17
+ }
18
+
19
+ .number {
20
+ width: 46px;
21
+ height: 46px;
22
+ flex-shrink: 0;
23
+ align-items: center;
24
+ justify-content: center;
25
+ border-radius: 23px;
26
+ background-color: #f1ece3;
27
+ }
28
+
29
+ .digit {
30
+ color: #1d1e22;
31
+ font-size: 24px;
32
+ font-weight: 700;
33
+ }
34
+
35
+ .text {
36
+ flex-direction: column;
37
+ gap: 4px;
38
+ }
39
+
40
+ .title {
41
+ color: #fafaf7;
42
+ font-size: 28px;
43
+ font-weight: 700;
44
+ }
45
+
46
+ .how {
47
+ color: #eeeff2;
48
+ font-size: 27px;
49
+ }
50
+ </style>
51
+ <div class="label">
52
+ <div class="number"><span class="digit">3</span></div>
53
+ <div class="text">
54
+ <span class="title">Spin</span>
55
+ <span class="how">Point, then hold to turn it</span>
56
+ </div>
57
+ </div>
@@ -1,54 +1,57 @@
1
1
  <!--
2
- Panel, Divider, Button, ButtonIcon, and ButtonLabel come from the bundled
3
- Horizon kit. RectangleGoggles and LogIn are bundled Lucide icon components.
2
+ Panel, Button, ButtonIcon, and ButtonLabel come from the bundled Horizon kit.
3
+ RectangleGoggles and LogIn are bundled Lucide icon components. The :dark
4
+ styles apply because iwsdk.config.json prefers the dark color scheme.
4
5
  -->
5
6
  <style>
6
7
  .panel-root {
7
8
  flex-direction: column;
8
- width: 344px;
9
+ width: 420px;
9
10
  }
10
11
 
11
12
  .panel-content {
12
- align-items: center;
13
13
  flex-direction: column;
14
- padding-top: 16px;
15
- padding-left: 24px;
16
- padding-right: 24px;
14
+ gap: 7px;
15
+ padding: 22px;
16
+ }
17
+
18
+ .eyebrow {
19
+ color: #6b5a00;
20
+ font-size: 14px;
21
+ font-weight: 700;
22
+ letter-spacing: 1.4px;
23
+ }
24
+
25
+ .eyebrow:dark {
26
+ color: #f5d90a;
17
27
  }
18
28
 
19
29
  .heading {
20
- height: 48px;
21
- text-align: center;
22
- font-size: 24px;
30
+ color: #1c1d20;
31
+ font-size: 30px;
23
32
  font-weight: 700;
24
- line-height: 24px;
25
- letter-spacing: -0.5px;
26
- color: #272727;
33
+ line-height: 36px;
27
34
  }
28
35
 
29
36
  .heading:dark {
30
- color: rgba(255, 255, 255, 0.9);
37
+ color: #fafaf7;
31
38
  }
32
39
 
33
- .sub-heading {
34
- color: #272727;
35
- font-size: 14px;
36
- font-weight: 500;
37
- line-height: 18px;
38
- width: 100%;
39
- margin-top: 10px;
40
+ .body {
41
+ color: #3a3b40;
42
+ font-size: 20px;
43
+ line-height: 27px;
40
44
  }
41
45
 
42
- .sub-heading:dark {
43
- color: rgba(255, 255, 255, 0.9);
46
+ .body:dark {
47
+ color: #dddfe3;
44
48
  }
45
49
 
46
50
  .button {
47
51
  justify-content: flex-start;
48
- margin-left: 24px;
49
- margin-right: 24px;
50
- margin-top: 16px;
51
- margin-bottom: 24px;
52
+ margin-left: 22px;
53
+ margin-right: 22px;
54
+ margin-bottom: 22px;
52
55
  }
53
56
 
54
57
  .button-label {
@@ -57,12 +60,10 @@
57
60
  </style>
58
61
  <Panel class="panel-root">
59
62
  <div class="panel-content">
63
+ <div class="eyebrow">IMMERSIVE WEB SDK</div>
60
64
  <div class="heading">Hello, Immersive Web!</div>
61
- <Divider></Divider>
62
- <div class="sub-heading">
63
- Build interactive browser, mixed-reality, and virtual-reality experiences
64
- with Immersive Web SDK.
65
- </div>
65
+ <div class="body">Try each station around you,</div>
66
+ <div class="body">then make this scene your own.</div>
66
67
  </div>
67
68
  <Button id="xr-button" class="button">
68
69
  <ButtonIcon>
@@ -5,6 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { AssetType, defineAssets } from '@iwsdk/core';
8
+ import { createGallerySet, createSideboardSet, } from './scene-assets/decor.scene-asset.js';
9
+ import { createGraphiteCube, createGraphiteGem, createGraphiteKnot, createGraphiteRing, createPlinth, createStage, createStudioFloor, } from './scene-assets/studio.scene-asset.js';
8
10
  const publicAssetUrl = (filePath) => `${import.meta.env.BASE_URL}${filePath.replace(/^\/+/u, '')}`;
9
11
  const DEFAULT_STOCK_ASSET_BASE = 'https://cdn.jsdelivr.net/npm/@iwsdk/example-assets@0.4.2/assets';
10
12
  const configuredStockAssetBase = import.meta.env.VITE_IWSDK_EXAMPLE_ASSET_BASE_URL?.trim();
@@ -12,34 +14,29 @@ const stockAssetBase = (configuredStockAssetBase || DEFAULT_STOCK_ASSET_BASE).re
12
14
  function stockAssetUrl(assetId, fileName) {
13
15
  return `${stockAssetBase}/${assetId}/${fileName}`;
14
16
  }
17
+ const uikitml = (fileName, name) => ({
18
+ url: publicAssetUrl(`ui/${fileName}`),
19
+ type: AssetType.UIKitML,
20
+ name,
21
+ });
15
22
  export default defineAssets({
16
- 'environment-desk': {
17
- url: stockAssetUrl('environment-desk', 'environmentDesk.gltf'),
18
- type: AssetType.GLTF,
19
- name: 'Environment Desk',
20
- priority: 'lazy',
21
- },
22
- 'plant-sansevieria': {
23
- url: stockAssetUrl('plant-sansevieria', 'plantSansevieria.gltf'),
24
- type: AssetType.GLTF,
25
- name: 'Plant Sansevieria',
26
- priority: 'lazy',
27
- },
23
+ 'studio-floor': createStudioFloor(),
24
+ stage: createStage(),
25
+ plinth: createPlinth(),
26
+ 'graphite-cube': createGraphiteCube(),
27
+ 'graphite-gem': createGraphiteGem(),
28
+ 'graphite-knot': createGraphiteKnot(),
29
+ 'graphite-ring': createGraphiteRing(),
30
+ 'gallery-set': createGallerySet(),
31
+ 'sideboard-set': createSideboardSet(),
28
32
  robot: {
29
33
  url: stockAssetUrl('robot', 'robot.gltf'),
30
34
  type: AssetType.GLTF,
31
35
  name: 'Robot',
32
36
  priority: 'lazy',
33
37
  },
34
- 'welcome-panel': {
35
- url: publicAssetUrl('ui/welcome.uikitml'),
36
- type: AssetType.UIKitML,
37
- name: 'Welcome Panel',
38
- },
39
- 'webxr-banner': {
40
- url: publicAssetUrl('gltf/webxr-banner/banner.gltf'),
41
- type: AssetType.GLTF,
42
- name: 'WebXR Banner',
43
- priority: 'lazy',
44
- },
38
+ 'welcome-panel': uikitml('welcome.uikitml', 'Welcome Panel'),
39
+ 'label-grab': uikitml('label-grab.uikitml', 'Grab Label'),
40
+ 'label-select': uikitml('label-select.uikitml', 'Select Label'),
41
+ 'label-spin': uikitml('label-spin.uikitml', 'Spin Label'),
45
42
  });