@vizij/runtime-react 0.0.14 → 0.1.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/README.md +9 -1
- package/dist/{index.mjs → index.cjs} +661 -195
- package/dist/{index.d.mts → index.d.cts} +32 -3
- package/dist/index.d.ts +32 -3
- package/dist/index.js +659 -199
- package/package.json +12 -10
|
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, PropsWithChildren } from 'react';
|
|
4
4
|
import { GraphRegistrationConfig, GraphSubscriptions, AnimationSetup, ValueJSON, CreateOrchOptions, MergeStrategyOptions, ShapeJSON } from '@vizij/orchestrator-react';
|
|
5
|
+
import { IrGraph } from '@vizij/node-graph-authoring';
|
|
5
6
|
import { AnimatableValue, RawValue } from '@vizij/utils';
|
|
6
7
|
import { World, VizijBundleExtension, VizijProps } from '@vizij/render';
|
|
7
8
|
|
|
@@ -9,6 +10,7 @@ type PoseDefinition = {
|
|
|
9
10
|
id: string;
|
|
10
11
|
name?: string;
|
|
11
12
|
description?: string;
|
|
13
|
+
group?: string | null;
|
|
12
14
|
values: Record<string, number | undefined>;
|
|
13
15
|
};
|
|
14
16
|
type PoseRigConfig = {
|
|
@@ -49,8 +51,23 @@ type VizijGlbAsset = {
|
|
|
49
51
|
};
|
|
50
52
|
type VizijGraphAsset = {
|
|
51
53
|
id: string;
|
|
52
|
-
spec
|
|
54
|
+
spec?: GraphRegistrationConfig["spec"];
|
|
55
|
+
ir?: IrGraph | null;
|
|
53
56
|
subscriptions?: Partial<GraphSubscriptions>;
|
|
57
|
+
inputMetadata?: VizijInputMetadata[];
|
|
58
|
+
};
|
|
59
|
+
type VizijInputMetadata = {
|
|
60
|
+
id?: string;
|
|
61
|
+
path: string;
|
|
62
|
+
label?: string;
|
|
63
|
+
source?: string;
|
|
64
|
+
root?: string;
|
|
65
|
+
defaultValue?: number;
|
|
66
|
+
range?: {
|
|
67
|
+
min?: number;
|
|
68
|
+
max?: number;
|
|
69
|
+
};
|
|
70
|
+
[key: string]: unknown;
|
|
54
71
|
};
|
|
55
72
|
type AnimationKeyframeLike = {
|
|
56
73
|
time?: number;
|
|
@@ -102,7 +119,10 @@ type VizijRuntimeStatus = {
|
|
|
102
119
|
namespace: string;
|
|
103
120
|
faceId?: string;
|
|
104
121
|
rootId?: string | null;
|
|
122
|
+
/** Namespaced output signal paths emitted by registered graphs. */
|
|
105
123
|
outputPaths: string[];
|
|
124
|
+
/** Approximate current stepping rate in Hz (smoothed). */
|
|
125
|
+
stepHz?: number;
|
|
106
126
|
controllers: {
|
|
107
127
|
graphs: string[];
|
|
108
128
|
anims: string[];
|
|
@@ -144,8 +164,15 @@ type VizijRuntimeContextValue = VizijRuntimeStatus & {
|
|
|
144
164
|
registerInputDriver: (id: string, factory: InputDriverFactory) => InputDriverLifecycle;
|
|
145
165
|
playAnimation: (id: string, options?: PlayAnimationOptions) => Promise<void>;
|
|
146
166
|
stopAnimation: (id: string) => void;
|
|
147
|
-
step: (dt: number
|
|
167
|
+
step: (dt: number, opts?: {
|
|
168
|
+
forceRuntime?: boolean;
|
|
169
|
+
}) => void;
|
|
148
170
|
advanceAnimations: (dt: number) => void;
|
|
171
|
+
inputConstraints: Record<string, {
|
|
172
|
+
min?: number;
|
|
173
|
+
max?: number;
|
|
174
|
+
defaultValue?: number;
|
|
175
|
+
}>;
|
|
149
176
|
};
|
|
150
177
|
type VizijRuntimeProviderProps = {
|
|
151
178
|
assetBundle: VizijAssetBundle;
|
|
@@ -155,16 +182,18 @@ type VizijRuntimeProviderProps = {
|
|
|
155
182
|
autoCreate?: boolean;
|
|
156
183
|
createOptions?: CreateOrchOptions;
|
|
157
184
|
autostart?: boolean;
|
|
185
|
+
driveOrchestrator?: boolean;
|
|
158
186
|
mergeStrategy?: MergeStrategyOptions;
|
|
159
187
|
onRegisterControllers?: (ids: {
|
|
160
188
|
graphs: string[];
|
|
161
189
|
anims: string[];
|
|
162
190
|
}) => void;
|
|
163
191
|
onStatusChange?: (status: VizijRuntimeStatus) => void;
|
|
192
|
+
orchestratorScope?: "auto" | "shared" | "isolated";
|
|
164
193
|
};
|
|
165
194
|
|
|
166
195
|
type ProviderProps = PropsWithChildren<VizijRuntimeProviderProps>;
|
|
167
|
-
declare function VizijRuntimeProvider({ assetBundle, children, namespace: namespaceProp, faceId: faceIdProp, autoCreate, createOptions, autostart, mergeStrategy, onRegisterControllers, onStatusChange, }: ProviderProps): react_jsx_runtime.JSX.Element;
|
|
196
|
+
declare function VizijRuntimeProvider({ assetBundle, children, namespace: namespaceProp, faceId: faceIdProp, autoCreate, createOptions, autostart, driveOrchestrator, mergeStrategy, onRegisterControllers, onStatusChange, orchestratorScope, }: ProviderProps): react_jsx_runtime.JSX.Element;
|
|
168
197
|
|
|
169
198
|
declare function VizijRuntimeFaceInner({ namespaceOverride, ...props }: VizijRuntimeFaceProps): react_jsx_runtime.JSX.Element | null;
|
|
170
199
|
declare const VizijRuntimeFace: react.MemoExoticComponent<typeof VizijRuntimeFaceInner>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, PropsWithChildren } from 'react';
|
|
4
4
|
import { GraphRegistrationConfig, GraphSubscriptions, AnimationSetup, ValueJSON, CreateOrchOptions, MergeStrategyOptions, ShapeJSON } from '@vizij/orchestrator-react';
|
|
5
|
+
import { IrGraph } from '@vizij/node-graph-authoring';
|
|
5
6
|
import { AnimatableValue, RawValue } from '@vizij/utils';
|
|
6
7
|
import { World, VizijBundleExtension, VizijProps } from '@vizij/render';
|
|
7
8
|
|
|
@@ -9,6 +10,7 @@ type PoseDefinition = {
|
|
|
9
10
|
id: string;
|
|
10
11
|
name?: string;
|
|
11
12
|
description?: string;
|
|
13
|
+
group?: string | null;
|
|
12
14
|
values: Record<string, number | undefined>;
|
|
13
15
|
};
|
|
14
16
|
type PoseRigConfig = {
|
|
@@ -49,8 +51,23 @@ type VizijGlbAsset = {
|
|
|
49
51
|
};
|
|
50
52
|
type VizijGraphAsset = {
|
|
51
53
|
id: string;
|
|
52
|
-
spec
|
|
54
|
+
spec?: GraphRegistrationConfig["spec"];
|
|
55
|
+
ir?: IrGraph | null;
|
|
53
56
|
subscriptions?: Partial<GraphSubscriptions>;
|
|
57
|
+
inputMetadata?: VizijInputMetadata[];
|
|
58
|
+
};
|
|
59
|
+
type VizijInputMetadata = {
|
|
60
|
+
id?: string;
|
|
61
|
+
path: string;
|
|
62
|
+
label?: string;
|
|
63
|
+
source?: string;
|
|
64
|
+
root?: string;
|
|
65
|
+
defaultValue?: number;
|
|
66
|
+
range?: {
|
|
67
|
+
min?: number;
|
|
68
|
+
max?: number;
|
|
69
|
+
};
|
|
70
|
+
[key: string]: unknown;
|
|
54
71
|
};
|
|
55
72
|
type AnimationKeyframeLike = {
|
|
56
73
|
time?: number;
|
|
@@ -102,7 +119,10 @@ type VizijRuntimeStatus = {
|
|
|
102
119
|
namespace: string;
|
|
103
120
|
faceId?: string;
|
|
104
121
|
rootId?: string | null;
|
|
122
|
+
/** Namespaced output signal paths emitted by registered graphs. */
|
|
105
123
|
outputPaths: string[];
|
|
124
|
+
/** Approximate current stepping rate in Hz (smoothed). */
|
|
125
|
+
stepHz?: number;
|
|
106
126
|
controllers: {
|
|
107
127
|
graphs: string[];
|
|
108
128
|
anims: string[];
|
|
@@ -144,8 +164,15 @@ type VizijRuntimeContextValue = VizijRuntimeStatus & {
|
|
|
144
164
|
registerInputDriver: (id: string, factory: InputDriverFactory) => InputDriverLifecycle;
|
|
145
165
|
playAnimation: (id: string, options?: PlayAnimationOptions) => Promise<void>;
|
|
146
166
|
stopAnimation: (id: string) => void;
|
|
147
|
-
step: (dt: number
|
|
167
|
+
step: (dt: number, opts?: {
|
|
168
|
+
forceRuntime?: boolean;
|
|
169
|
+
}) => void;
|
|
148
170
|
advanceAnimations: (dt: number) => void;
|
|
171
|
+
inputConstraints: Record<string, {
|
|
172
|
+
min?: number;
|
|
173
|
+
max?: number;
|
|
174
|
+
defaultValue?: number;
|
|
175
|
+
}>;
|
|
149
176
|
};
|
|
150
177
|
type VizijRuntimeProviderProps = {
|
|
151
178
|
assetBundle: VizijAssetBundle;
|
|
@@ -155,16 +182,18 @@ type VizijRuntimeProviderProps = {
|
|
|
155
182
|
autoCreate?: boolean;
|
|
156
183
|
createOptions?: CreateOrchOptions;
|
|
157
184
|
autostart?: boolean;
|
|
185
|
+
driveOrchestrator?: boolean;
|
|
158
186
|
mergeStrategy?: MergeStrategyOptions;
|
|
159
187
|
onRegisterControllers?: (ids: {
|
|
160
188
|
graphs: string[];
|
|
161
189
|
anims: string[];
|
|
162
190
|
}) => void;
|
|
163
191
|
onStatusChange?: (status: VizijRuntimeStatus) => void;
|
|
192
|
+
orchestratorScope?: "auto" | "shared" | "isolated";
|
|
164
193
|
};
|
|
165
194
|
|
|
166
195
|
type ProviderProps = PropsWithChildren<VizijRuntimeProviderProps>;
|
|
167
|
-
declare function VizijRuntimeProvider({ assetBundle, children, namespace: namespaceProp, faceId: faceIdProp, autoCreate, createOptions, autostart, mergeStrategy, onRegisterControllers, onStatusChange, }: ProviderProps): react_jsx_runtime.JSX.Element;
|
|
196
|
+
declare function VizijRuntimeProvider({ assetBundle, children, namespace: namespaceProp, faceId: faceIdProp, autoCreate, createOptions, autostart, driveOrchestrator, mergeStrategy, onRegisterControllers, onStatusChange, orchestratorScope, }: ProviderProps): react_jsx_runtime.JSX.Element;
|
|
168
197
|
|
|
169
198
|
declare function VizijRuntimeFaceInner({ namespaceOverride, ...props }: VizijRuntimeFaceProps): react_jsx_runtime.JSX.Element | null;
|
|
170
199
|
declare const VizijRuntimeFace: react.MemoExoticComponent<typeof VizijRuntimeFaceInner>;
|