@vincentt-xr/sdk 2.0.0-alpha.15 → 2.0.0-alpha.16
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/GROUNDING.md
CHANGED
|
@@ -133,18 +133,20 @@ nothing to an app bundle.
|
|
|
133
133
|
- A `text` setting is words shown on screen: `maxLength` is the most code points
|
|
134
134
|
the editor accepts (at most 500), and `multiline: true` allows line breaks.
|
|
135
135
|
- An `asset` setting is a file reference; `accept` lists the kinds of file it
|
|
136
|
-
takes (
|
|
136
|
+
takes: `"image"`, `"model"` (a `.glb`) or `"audio"` (an `.mp3` or `.m4a`).
|
|
137
137
|
- `overriddenBy` lists other props of the component that, when written, make the
|
|
138
138
|
setting ignored at run time. The editor hides the setting on an element that
|
|
139
139
|
has one of them (`ScreenImage.src` is `overriddenBy: ["source"]`).
|
|
140
140
|
- `element` puts a component on the editor's **supported list** as one list kind
|
|
141
|
-
(`screenText`, `screenImage`, `screenShape`), and `supported: true` marks the
|
|
141
|
+
(`screenText`, `screenImage`, `screenShape`, `model`, `sound`), and `supported: true` marks the
|
|
142
142
|
settings the editor shows for it. The editor shows only supported settings on
|
|
143
143
|
listed components; a component without `element` is "made by code" there.
|
|
144
144
|
Declared settings without `supported` stay in the file for other tools.
|
|
145
145
|
|
|
146
146
|
Declared today: `ScreenText`, `TextLabel`, `ScreenSpaceUI` (`depth`),
|
|
147
|
-
`ScreenImage`, `ScreenShape`, `PersonCutout`,
|
|
147
|
+
`ScreenImage`, `ScreenShape`, `PersonCutout`, `MeshRenderer` (`value.assetUrl`,
|
|
148
|
+
a `model` asset: the editor swaps it only when it is a literal in the `value`
|
|
149
|
+
object) and `AudioPlayer` (`src`, a `sound` asset), and the instruction components'
|
|
148
150
|
text-style props, plus the `ScreenTransform2DSettings` fields under each
|
|
149
151
|
component's `screenTransform` / `transform`.
|
|
150
152
|
|
|
@@ -170,7 +172,7 @@ that reaches it.
|
|
|
170
172
|
|
|
171
173
|
`text` and `asset` are always named, on a string prop. `maxLength=` (a whole
|
|
172
174
|
number from 1 to 500) and `multiline=true|false` apply to `text`; `accept=`
|
|
173
|
-
(comma-separated, `image`) is required on `asset`; `overriddenBy=` takes
|
|
175
|
+
(comma-separated, `image`, `model` or `audio`) is required on `asset`; `overriddenBy=` takes
|
|
174
176
|
comma-separated top-level prop names of the component and applies to any type.
|
|
175
177
|
|
|
176
178
|
```ts
|
|
@@ -6,6 +6,7 @@ export interface AudioPlayerHandle {
|
|
|
6
6
|
readonly current: HTMLAudioElement | null;
|
|
7
7
|
}
|
|
8
8
|
export interface AudioPlayerProps {
|
|
9
|
+
/** @tweak asset accept=audio */
|
|
9
10
|
src: string;
|
|
10
11
|
playMode?: AudioPlayMode;
|
|
11
12
|
/** Total number of plays in `loop` mode. Values below 1 become 1. */
|
|
@@ -25,5 +26,6 @@ export interface AudioPlayerProps {
|
|
|
25
26
|
* Headless, declarative audio player with timeline-friendly playback
|
|
26
27
|
* properties. It renders only a hidden HTML audio element; build any visible
|
|
27
28
|
* controls with the imperative ref or application state.
|
|
29
|
+
* @editorElement sound src
|
|
28
30
|
*/
|
|
29
31
|
export declare const AudioPlayer: import('react').ForwardRefExoticComponent<AudioPlayerProps & import('react').RefAttributes<AudioPlayerHandle>>;
|
|
@@ -27,7 +27,10 @@ export type MeshRendererRenderState = {
|
|
|
27
27
|
export type MeshRendererSettings = {
|
|
28
28
|
enabled: boolean;
|
|
29
29
|
mesh: MeshRendererMesh;
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Optional GLTF/GLB asset URL. When set, renders the imported asset instead of a primitive.
|
|
32
|
+
* @tweak asset accept=model
|
|
33
|
+
*/
|
|
31
34
|
assetUrl?: string;
|
|
32
35
|
assetNodeName?: string;
|
|
33
36
|
assetAnimation?: ("all" & {}) | (string & {});
|
|
@@ -56,4 +59,7 @@ export declare const normalizeMeshRendererRenderState: (renderState?: MeshRender
|
|
|
56
59
|
export declare const getThreeDepthFunction: (depthFunc: MeshRendererDepthFunction) => DepthModes;
|
|
57
60
|
export declare const getThreeSide: (cullMode: MeshRendererCullMode) => Side;
|
|
58
61
|
export declare const getThreeBlending: (blendMode: MeshRendererBlendMode) => Blending;
|
|
62
|
+
/**
|
|
63
|
+
* @editorElement model value.assetUrl
|
|
64
|
+
*/
|
|
59
65
|
export declare const MeshRenderer: ({ renderOrder, value }: MeshRendererProps) => import("react/jsx-runtime").JSX.Element | null;
|
package/package.json
CHANGED
package/settings.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "vincentt.settings-decl/1",
|
|
3
3
|
"package": "@vincentt-xr/sdk",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.16",
|
|
5
5
|
"components": {
|
|
6
|
+
"AudioPlayer": {
|
|
7
|
+
"element": "sound",
|
|
8
|
+
"props": { "src": { "type": "asset", "accept": ["audio"], "supported": true } }
|
|
9
|
+
},
|
|
6
10
|
"BodyInstruction": {
|
|
7
11
|
"props": {
|
|
8
12
|
"nudgeTextStyle.bendPreset": {
|
|
@@ -1443,6 +1447,10 @@
|
|
|
1443
1447
|
}
|
|
1444
1448
|
}
|
|
1445
1449
|
},
|
|
1450
|
+
"MeshRenderer": {
|
|
1451
|
+
"element": "model",
|
|
1452
|
+
"props": { "value.assetUrl": { "type": "asset", "accept": ["model"], "supported": true } }
|
|
1453
|
+
},
|
|
1446
1454
|
"PersonCutout": {
|
|
1447
1455
|
"props": {
|
|
1448
1456
|
"anchors.bottom": {
|