oomi-ai 0.2.38 → 0.2.40
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 +24 -14
- package/agent_instructions.md +9 -0
- package/bin/oomi-ai.js +1 -1
- package/lib/openclawPaths.js +27 -18
- package/lib/personaRuntimeManager.js +181 -61
- package/lib/personaRuntimeProcess.js +392 -49
- package/lib/personaRuntimeSupervisor.js +20 -7
- package/lib/scaffold.js +14 -14
- package/openclaw.plugin.json +1 -1
- package/package.json +10 -8
- package/templates/persona-app/package.json +6 -4
- package/templates/persona-app/src/App.css +564 -79
- package/templates/persona-app/src/App.tsx +2 -2
- package/templates/persona-app/src/main.tsx +13 -0
- package/templates/persona-app/src/pages/HomePage.tsx +120 -39
- package/templates/persona-app/src/pages/ScenePage.tsx +2 -15
- package/templates/persona-app/src/persona/notes.ts +3 -1
- package/templates/persona-app/src/spatial.ts +82 -0
- package/templates/persona-app/template.json +1 -1
- package/templates/persona-app/vendor/webspatial/FORK.md +6 -0
- package/templates/persona-app/vendor/webspatial/core-sdk/LICENSE +21 -0
- package/templates/persona-app/vendor/webspatial/core-sdk/dist/iife/index.d.ts +906 -0
- package/templates/persona-app/vendor/webspatial/core-sdk/dist/iife/index.global.js +75 -0
- package/templates/persona-app/vendor/webspatial/core-sdk/dist/iife/index.global.js.map +1 -0
- package/templates/persona-app/vendor/webspatial/core-sdk/dist/index.d.ts +906 -0
- package/templates/persona-app/vendor/webspatial/core-sdk/dist/index.js +3131 -0
- package/templates/persona-app/vendor/webspatial/core-sdk/dist/index.js.map +1 -0
- package/templates/persona-app/vendor/webspatial/core-sdk/package.json +45 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/LICENSE +21 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/default/index.d.ts +365 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/default/index.js +4296 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/default/index.js.map +1 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-dev-runtime.d.ts +82 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-dev-runtime.js +66 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-dev-runtime.js.map +1 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-dev-runtime.web.d.ts +2 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-dev-runtime.web.js +18 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-dev-runtime.web.js.map +1 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-runtime.d.ts +5 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-runtime.js +66 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-runtime.js.map +1 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-runtime.web.d.ts +1 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-runtime.web.js +18 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/jsx/jsx-runtime.web.js.map +1 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/web/index.d.ts +365 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/web/index.js +4336 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/dist/web/index.js.map +1 -0
- package/templates/persona-app/vendor/webspatial/react-sdk/package.json +94 -0
- package/templates/persona-app/vite.config.ts +13 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import * as _webspatial_core_sdk from '@webspatial/core-sdk';
|
|
2
|
+
import { SpatialSceneCreationOptions, SpatialSceneType, SpatialTapEvent as SpatialTapEvent$1, SpatialDragStartEvent as SpatialDragStartEvent$1, SpatialDragEvent as SpatialDragEvent$1, SpatialDragEndEvent as SpatialDragEndEvent$1, SpatialRotateEvent as SpatialRotateEvent$1, SpatialRotateEndEvent as SpatialRotateEndEvent$1, SpatialMagnifyEvent as SpatialMagnifyEvent$1, SpatialMagnifyEndEvent as SpatialMagnifyEndEvent$1, SpatializedElement, Point3D, SpatialObject, SpatialSession, SpatializedDynamic3DElement, Vec3, SpatialEntity, Quaternion, SpatialBoxGeometryOptions, SpatialUnlitMaterialOptions, SpatialSphereGeometryOptions, SpatialConeGeometryOptions, SpatialCylinderGeometryOptions, SpatialPlaneGeometryOptions } from '@webspatial/core-sdk';
|
|
3
|
+
export { Point3D, Vec3 } from '@webspatial/core-sdk';
|
|
4
|
+
import * as React$1 from 'react';
|
|
5
|
+
import React__default, { ElementType, ForwardedRef } from 'react';
|
|
6
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
declare function enableDebugTool(): void;
|
|
9
|
+
|
|
10
|
+
declare function initScene(name: string, callback: (pre: SpatialSceneCreationOptions) => SpatialSceneCreationOptions, options?: {
|
|
11
|
+
type: SpatialSceneType;
|
|
12
|
+
}): void | undefined;
|
|
13
|
+
|
|
14
|
+
declare const SpatialID = "data-spatial-id";
|
|
15
|
+
|
|
16
|
+
type SpatialEventProps<T extends SpatializedElementRef> = {
|
|
17
|
+
onSpatialTap?: (event: SpatialTapEvent<T>) => void;
|
|
18
|
+
onSpatialDragStart?: (event: SpatialDragStartEvent<T>) => void;
|
|
19
|
+
onSpatialDrag?: (event: SpatialDragEvent<T>) => void;
|
|
20
|
+
onSpatialDragEnd?: (event: SpatialDragEndEvent<T>) => void;
|
|
21
|
+
onSpatialRotate?: (event: SpatialRotateEvent<T>) => void;
|
|
22
|
+
onSpatialRotateEnd?: (event: SpatialRotateEndEvent<T>) => void;
|
|
23
|
+
onSpatialMagnify?: (event: SpatialMagnifyEvent<T>) => void;
|
|
24
|
+
onSpatialMagnifyEnd?: (event: SpatialMagnifyEndEvent<T>) => void;
|
|
25
|
+
};
|
|
26
|
+
interface StandardSpatializedContainerProps extends React__default.ComponentPropsWithoutRef<'div'> {
|
|
27
|
+
component: ElementType;
|
|
28
|
+
inStandardSpatializedContainer?: boolean;
|
|
29
|
+
[SpatialID]: string;
|
|
30
|
+
}
|
|
31
|
+
type RealityForbiddenSpatialEventProps = {
|
|
32
|
+
onSpatialTap?: never;
|
|
33
|
+
onSpatialDragStart?: never;
|
|
34
|
+
onSpatialDrag?: never;
|
|
35
|
+
onSpatialDragEnd?: never;
|
|
36
|
+
onSpatialRotate?: never;
|
|
37
|
+
onSpatialRotateEnd?: never;
|
|
38
|
+
onSpatialMagnify?: never;
|
|
39
|
+
onSpatialMagnifyEnd?: never;
|
|
40
|
+
};
|
|
41
|
+
type RealityProps = React__default.ComponentPropsWithRef<'div'> & RealityForbiddenSpatialEventProps;
|
|
42
|
+
type PortalSpatializedContainerProps<T extends SpatializedElementRef> = SpatialEventProps<T> & React__default.ComponentPropsWithoutRef<'div'> & {
|
|
43
|
+
component: ElementType;
|
|
44
|
+
spatializedContent: ElementType;
|
|
45
|
+
createSpatializedElement: () => Promise<SpatializedElement>;
|
|
46
|
+
getExtraSpatializedElementProperties?: (computedStyle: CSSStyleDeclaration) => Record<string, any>;
|
|
47
|
+
[SpatialID]: string;
|
|
48
|
+
};
|
|
49
|
+
type SpatializedContainerProps<T extends SpatializedElementRef> = Omit<StandardSpatializedContainerProps & PortalSpatializedContainerProps<T>, typeof SpatialID | 'onLoad' | 'onError'> & {
|
|
50
|
+
extraRefProps?: (domProxy: T) => Record<string, unknown>;
|
|
51
|
+
};
|
|
52
|
+
type Spatialized2DElementContainerProps<P extends ElementType> = SpatialEventProps<SpatializedElementRef> & React__default.ComponentPropsWithRef<'div'> & {
|
|
53
|
+
component: P;
|
|
54
|
+
};
|
|
55
|
+
type SpatializedStatic3DContainerProps = SpatialEventProps<SpatializedStatic3DElementRef> & Omit<React__default.ComponentPropsWithoutRef<'div'>, 'onLoad' | 'onError'> & {
|
|
56
|
+
src?: string;
|
|
57
|
+
onLoad?: (event: ModelLoadEvent) => void;
|
|
58
|
+
onError?: (event: ModelLoadEvent) => void;
|
|
59
|
+
};
|
|
60
|
+
type SpatializedElementRef<T extends HTMLElement = HTMLElement> = T;
|
|
61
|
+
type SpatializedDivElementRef = SpatializedElementRef<HTMLDivElement>;
|
|
62
|
+
type SpatializedStatic3DElementRef = SpatializedDivElementRef & {
|
|
63
|
+
currentSrc: string;
|
|
64
|
+
ready: Promise<ModelLoadEvent>;
|
|
65
|
+
entityTransform: DOMMatrixReadOnly;
|
|
66
|
+
};
|
|
67
|
+
type CurrentTarget<T extends SpatializedElementRef> = {
|
|
68
|
+
currentTarget: T;
|
|
69
|
+
};
|
|
70
|
+
type SpatialTapEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialTapEvent$1 & CurrentTarget<T> & {
|
|
71
|
+
readonly offsetX: number;
|
|
72
|
+
readonly offsetY: number;
|
|
73
|
+
readonly offsetZ: number;
|
|
74
|
+
readonly clientX: number;
|
|
75
|
+
readonly clientY: number;
|
|
76
|
+
readonly clientZ: number;
|
|
77
|
+
};
|
|
78
|
+
type SpatialDragStartEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialDragStartEvent$1 & CurrentTarget<T> & {
|
|
79
|
+
readonly offsetX: number;
|
|
80
|
+
readonly offsetY: number;
|
|
81
|
+
readonly offsetZ: number;
|
|
82
|
+
readonly clientX: number;
|
|
83
|
+
readonly clientY: number;
|
|
84
|
+
readonly clientZ: number;
|
|
85
|
+
};
|
|
86
|
+
type SpatialDragEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialDragEvent$1 & CurrentTarget<T> & {
|
|
87
|
+
readonly translationX: number;
|
|
88
|
+
readonly translationY: number;
|
|
89
|
+
readonly translationZ: number;
|
|
90
|
+
};
|
|
91
|
+
type SpatialDragEndEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialDragEndEvent$1 & CurrentTarget<T>;
|
|
92
|
+
type SpatialRotateEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialRotateEvent$1 & CurrentTarget<T> & {
|
|
93
|
+
readonly quaternion: _webspatial_core_sdk.Quaternion;
|
|
94
|
+
};
|
|
95
|
+
type SpatialRotateEndEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialRotateEndEvent$1 & CurrentTarget<T>;
|
|
96
|
+
type SpatialMagnifyEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialMagnifyEvent$1 & CurrentTarget<T> & {
|
|
97
|
+
readonly magnification: number;
|
|
98
|
+
};
|
|
99
|
+
type SpatialMagnifyEndEvent<T extends SpatializedElementRef = SpatializedElementRef> = SpatialMagnifyEndEvent$1 & CurrentTarget<T>;
|
|
100
|
+
type ModelSpatialTapEvent = SpatialTapEvent<SpatializedStatic3DElementRef>;
|
|
101
|
+
type ModelSpatialDragStartEvent = SpatialDragStartEvent<SpatializedStatic3DElementRef>;
|
|
102
|
+
type ModelSpatialDragEvent = SpatialDragEvent<SpatializedStatic3DElementRef>;
|
|
103
|
+
type ModelSpatialDragEndEvent = SpatialDragEndEvent<SpatializedStatic3DElementRef>;
|
|
104
|
+
type ModelSpatialRotateEvent = SpatialRotateEvent<SpatializedStatic3DElementRef>;
|
|
105
|
+
type ModelSpatialRotateEndEvent = SpatialRotateEndEvent<SpatializedStatic3DElementRef>;
|
|
106
|
+
type ModelSpatialMagnifyEvent = SpatialMagnifyEvent<SpatializedStatic3DElementRef>;
|
|
107
|
+
type ModelSpatialMagnifyEndEvent = SpatialMagnifyEndEvent<SpatializedStatic3DElementRef>;
|
|
108
|
+
type ModelLoadEvent = CustomEvent & {
|
|
109
|
+
target: SpatializedStatic3DElementRef;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
declare const SpatializedContainer: <T extends SpatializedElementRef>(props: SpatializedContainerProps<T> & {
|
|
113
|
+
ref?: ForwardedRef<SpatializedElementRef<T>>;
|
|
114
|
+
}) => React.ReactElement | null;
|
|
115
|
+
|
|
116
|
+
declare const Spatialized2DElementContainer: <P extends ElementType>(props: Spatialized2DElementContainerProps<P> & {
|
|
117
|
+
ref: ForwardedRef<SpatializedElementRef>;
|
|
118
|
+
}) => React__default.ReactElement | null;
|
|
119
|
+
|
|
120
|
+
declare const SpatializedStatic3DElementContainer: React$1.ForwardRefExoticComponent<{
|
|
121
|
+
onSpatialTap?: ((event: SpatialTapEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
122
|
+
onSpatialDragStart?: ((event: SpatialDragStartEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
123
|
+
onSpatialDrag?: ((event: SpatialDragEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
124
|
+
onSpatialDragEnd?: ((event: SpatialDragEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
125
|
+
onSpatialRotate?: ((event: SpatialRotateEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
126
|
+
onSpatialRotateEnd?: ((event: SpatialRotateEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
127
|
+
onSpatialMagnify?: ((event: SpatialMagnifyEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
128
|
+
onSpatialMagnifyEnd?: ((event: SpatialMagnifyEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
129
|
+
} & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onLoad" | "onError"> & {
|
|
130
|
+
src?: string;
|
|
131
|
+
onLoad?: (event: ModelLoadEvent) => void;
|
|
132
|
+
onError?: (event: ModelLoadEvent) => void;
|
|
133
|
+
} & React$1.RefAttributes<SpatializedStatic3DElementRef>>;
|
|
134
|
+
|
|
135
|
+
declare function withSpatialized2DElementContainer<P extends ElementType>(Component: P): P | React$1.ForwardRefExoticComponent<Omit<Spatialized2DElementContainerProps<P>, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
136
|
+
|
|
137
|
+
declare function toSceneSpatial(point: Point3D, spatializedElement: SpatializedElementRef): DOMPoint;
|
|
138
|
+
declare function toLocalSpace(point: Point3D, spatializedElement: SpatializedElementRef): DOMPoint;
|
|
139
|
+
|
|
140
|
+
declare function initPolyfill(): void;
|
|
141
|
+
|
|
142
|
+
declare function withSpatialMonitor(El: React__default.ElementType): any;
|
|
143
|
+
|
|
144
|
+
type SpatialMonitorProps = {
|
|
145
|
+
El?: ElementType;
|
|
146
|
+
};
|
|
147
|
+
declare const SpatialMonitor: React$1.ForwardRefExoticComponent<SpatialMonitorProps & React$1.RefAttributes<HTMLElement>>;
|
|
148
|
+
|
|
149
|
+
declare class ResourceRegistry {
|
|
150
|
+
private resources;
|
|
151
|
+
add<T extends SpatialObject>(id: string, resource: Promise<T>): void;
|
|
152
|
+
remove(id: string): void;
|
|
153
|
+
removeAndDestroy(id: string): void;
|
|
154
|
+
get<T extends SpatialObject>(id: string): Promise<T>;
|
|
155
|
+
destroy(): void;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
type ContainersChangeCallback = (containers: HTMLElement[]) => void;
|
|
159
|
+
declare class AttachmentRegistry {
|
|
160
|
+
private containers;
|
|
161
|
+
private listeners;
|
|
162
|
+
addContainer(name: string, instanceId: string, container: HTMLElement): void;
|
|
163
|
+
removeContainer(name: string, instanceId: string): void;
|
|
164
|
+
getContainers(name: string): HTMLElement[];
|
|
165
|
+
onContainersChange(name: string, cb: ContainersChangeCallback): () => void;
|
|
166
|
+
private notifyListeners;
|
|
167
|
+
destroy(): void;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
type RealityContextValue = {
|
|
171
|
+
session: SpatialSession;
|
|
172
|
+
reality: SpatializedDynamic3DElement;
|
|
173
|
+
resourceRegistry: ResourceRegistry;
|
|
174
|
+
attachmentRegistry: AttachmentRegistry;
|
|
175
|
+
} | null;
|
|
176
|
+
|
|
177
|
+
interface EntityRefShape {
|
|
178
|
+
convertFromEntityToEntity: (fromEntityId: string, toEntityId: string, position: Vec3) => Promise<Vec3>;
|
|
179
|
+
convertFromEntityToReality: (entityId: string, position: Vec3) => Promise<Vec3>;
|
|
180
|
+
convertFromRealityToEntity: (entityId: string, position: Vec3) => Promise<Vec3>;
|
|
181
|
+
id: string | undefined;
|
|
182
|
+
name: string | undefined;
|
|
183
|
+
entity: SpatialEntity | null;
|
|
184
|
+
}
|
|
185
|
+
declare class EntityRef implements EntityRefShape {
|
|
186
|
+
private _entity;
|
|
187
|
+
private _ctx;
|
|
188
|
+
constructor(entity?: SpatialEntity | null, ctx?: RealityContextValue | null);
|
|
189
|
+
updateEntity(entity?: SpatialEntity | null): void;
|
|
190
|
+
updateCtx(ctx?: RealityContextValue | null): void;
|
|
191
|
+
destroy(): void;
|
|
192
|
+
get entity(): SpatialEntity | null;
|
|
193
|
+
get id(): string | undefined;
|
|
194
|
+
get name(): string | undefined;
|
|
195
|
+
convertFromEntityToEntity(fromEntityId: string, toEntityId: string, position: Vec3): Promise<Vec3>;
|
|
196
|
+
convertFromEntityToReality(entityId: string, position: Vec3): Promise<Vec3>;
|
|
197
|
+
convertFromRealityToEntity(entityId: string, position: Vec3): Promise<Vec3>;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
type EntityProps = {
|
|
201
|
+
id?: string;
|
|
202
|
+
name?: string;
|
|
203
|
+
position?: Vec3;
|
|
204
|
+
rotation?: Vec3;
|
|
205
|
+
scale?: Vec3;
|
|
206
|
+
};
|
|
207
|
+
type allTarget<T extends EntityRefShape> = {
|
|
208
|
+
target: T;
|
|
209
|
+
currentTarget: T;
|
|
210
|
+
};
|
|
211
|
+
type SpatialTapEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialTapEvent$1 & allTarget<T> & {
|
|
212
|
+
readonly offsetX: number;
|
|
213
|
+
readonly offsetY: number;
|
|
214
|
+
readonly offsetZ: number;
|
|
215
|
+
readonly clientX: number;
|
|
216
|
+
readonly clientY: number;
|
|
217
|
+
readonly clientZ: number;
|
|
218
|
+
};
|
|
219
|
+
type SpatialDragStartEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialDragStartEvent$1 & allTarget<T> & {
|
|
220
|
+
readonly offsetX: number;
|
|
221
|
+
readonly offsetY: number;
|
|
222
|
+
readonly offsetZ: number;
|
|
223
|
+
readonly clientX: number;
|
|
224
|
+
readonly clientY: number;
|
|
225
|
+
readonly clientZ: number;
|
|
226
|
+
};
|
|
227
|
+
type SpatialDragEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialDragEvent$1 & allTarget<T> & {
|
|
228
|
+
readonly translationX: number;
|
|
229
|
+
readonly translationY: number;
|
|
230
|
+
readonly translationZ: number;
|
|
231
|
+
};
|
|
232
|
+
type SpatialDragEndEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialDragEndEvent$1 & allTarget<T>;
|
|
233
|
+
type SpatialRotateEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialRotateEvent$1 & allTarget<T> & {
|
|
234
|
+
readonly quaternion: Quaternion;
|
|
235
|
+
};
|
|
236
|
+
type SpatialRotateEndEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialRotateEndEvent$1 & allTarget<T>;
|
|
237
|
+
type SpatialMagnifyEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialMagnifyEvent$1 & allTarget<T> & {
|
|
238
|
+
readonly magnification: number;
|
|
239
|
+
};
|
|
240
|
+
type SpatialMagnifyEndEntityEvent<T extends EntityRefShape = EntityRefShape> = SpatialMagnifyEndEvent$1 & allTarget<T>;
|
|
241
|
+
type EntityEventHandler = {
|
|
242
|
+
onSpatialTap?: (event: SpatialTapEntityEvent) => void;
|
|
243
|
+
onSpatialDragStart?: (event: SpatialDragStartEntityEvent) => void;
|
|
244
|
+
onSpatialDrag?: (event: SpatialDragEntityEvent) => void;
|
|
245
|
+
onSpatialDragEnd?: (event: SpatialDragEndEntityEvent) => void;
|
|
246
|
+
onSpatialRotate?: (event: SpatialRotateEntityEvent) => void;
|
|
247
|
+
onSpatialRotateEnd?: (event: SpatialRotateEndEntityEvent) => void;
|
|
248
|
+
onSpatialMagnify?: (event: SpatialMagnifyEntityEvent) => void;
|
|
249
|
+
onSpatialMagnifyEnd?: (event: SpatialMagnifyEndEntityEvent) => void;
|
|
250
|
+
};
|
|
251
|
+
declare const eventMap: {
|
|
252
|
+
readonly onSpatialTap: "spatialtap";
|
|
253
|
+
readonly onSpatialDragStart: "spatialdragstart";
|
|
254
|
+
readonly onSpatialDrag: "spatialdrag";
|
|
255
|
+
readonly onSpatialDragEnd: "spatialdragend";
|
|
256
|
+
readonly onSpatialRotateStart: "spatialrotatestart";
|
|
257
|
+
readonly onSpatialRotate: "spatialrotate";
|
|
258
|
+
readonly onSpatialRotateEnd: "spatialrotateend";
|
|
259
|
+
readonly onSpatialMagnifyStart: "spatialmagnifystart";
|
|
260
|
+
readonly onSpatialMagnify: "spatialmagnify";
|
|
261
|
+
readonly onSpatialMagnifyEnd: "spatialmagnifyend";
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
declare const Entity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
|
|
265
|
+
children?: React__default.ReactNode;
|
|
266
|
+
} & React__default.RefAttributes<EntityRefShape>>;
|
|
267
|
+
|
|
268
|
+
declare const BoxEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
|
|
269
|
+
children?: React__default.ReactNode;
|
|
270
|
+
materials?: string[];
|
|
271
|
+
} & SpatialBoxGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
|
|
272
|
+
|
|
273
|
+
type Props$2 = {
|
|
274
|
+
children?: React__default.ReactNode;
|
|
275
|
+
id: string;
|
|
276
|
+
} & SpatialUnlitMaterialOptions;
|
|
277
|
+
declare const UnlitMaterial: React__default.FC<Props$2>;
|
|
278
|
+
|
|
279
|
+
declare const SphereEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
|
|
280
|
+
children?: React__default.ReactNode;
|
|
281
|
+
materials?: string[];
|
|
282
|
+
} & SpatialSphereGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
|
|
283
|
+
|
|
284
|
+
declare const ConeEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
|
|
285
|
+
children?: React__default.ReactNode;
|
|
286
|
+
materials?: string[];
|
|
287
|
+
} & SpatialConeGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
|
|
288
|
+
|
|
289
|
+
declare const CylinderEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
|
|
290
|
+
children?: React__default.ReactNode;
|
|
291
|
+
materials?: string[];
|
|
292
|
+
} & SpatialCylinderGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
|
|
293
|
+
|
|
294
|
+
declare const PlaneEntity: React__default.ForwardRefExoticComponent<EntityProps & EntityEventHandler & {
|
|
295
|
+
children?: React__default.ReactNode;
|
|
296
|
+
materials?: string[];
|
|
297
|
+
} & SpatialPlaneGeometryOptions & React__default.RefAttributes<EntityRefShape>>;
|
|
298
|
+
|
|
299
|
+
type Props$1 = {
|
|
300
|
+
children?: React__default.ReactNode;
|
|
301
|
+
};
|
|
302
|
+
declare const SceneGraph: React__default.FC<Props$1>;
|
|
303
|
+
|
|
304
|
+
type Props = {
|
|
305
|
+
children?: React__default.ReactNode;
|
|
306
|
+
id: string;
|
|
307
|
+
src: string;
|
|
308
|
+
onLoad?: () => void;
|
|
309
|
+
onError?: (error: any) => void;
|
|
310
|
+
};
|
|
311
|
+
declare const ModelAsset: React__default.FC<Props>;
|
|
312
|
+
|
|
313
|
+
declare const ModelEntity: React__default.ForwardRefExoticComponent<EntityProps & {
|
|
314
|
+
model: string;
|
|
315
|
+
} & EntityEventHandler & {
|
|
316
|
+
children?: React__default.ReactNode;
|
|
317
|
+
} & React__default.RefAttributes<EntityRefShape>>;
|
|
318
|
+
|
|
319
|
+
declare const Reality: React__default.ForwardRefExoticComponent<Omit<RealityProps, "ref"> & React__default.RefAttributes<HTMLElement>>;
|
|
320
|
+
|
|
321
|
+
type AttachmentAssetProps = {
|
|
322
|
+
name: string;
|
|
323
|
+
children?: React__default.ReactNode;
|
|
324
|
+
};
|
|
325
|
+
declare const AttachmentAsset: React__default.FC<AttachmentAssetProps>;
|
|
326
|
+
|
|
327
|
+
interface AttachmentEntityProps {
|
|
328
|
+
attachment: string;
|
|
329
|
+
position?: [number, number, number];
|
|
330
|
+
size: {
|
|
331
|
+
width: number;
|
|
332
|
+
height: number;
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
declare const AttachmentEntity: React__default.FC<AttachmentEntityProps>;
|
|
336
|
+
|
|
337
|
+
type ModelProps = SpatializedStatic3DContainerProps & {
|
|
338
|
+
'enable-xr'?: boolean;
|
|
339
|
+
};
|
|
340
|
+
type ModelRef = SpatializedStatic3DElementRef;
|
|
341
|
+
declare const Model: React$1.ForwardRefExoticComponent<Omit<{
|
|
342
|
+
onSpatialTap?: ((event: SpatialTapEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
343
|
+
onSpatialDragStart?: ((event: SpatialDragStartEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
344
|
+
onSpatialDrag?: ((event: SpatialDragEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
345
|
+
onSpatialDragEnd?: ((event: SpatialDragEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
346
|
+
onSpatialRotate?: ((event: SpatialRotateEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
347
|
+
onSpatialRotateEnd?: ((event: SpatialRotateEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
348
|
+
onSpatialMagnify?: ((event: SpatialMagnifyEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
349
|
+
onSpatialMagnifyEnd?: ((event: SpatialMagnifyEndEvent<SpatializedStatic3DElementRef>) => void) | undefined;
|
|
350
|
+
} & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onLoad" | "onError"> & {
|
|
351
|
+
src?: string;
|
|
352
|
+
onLoad?: (event: ModelLoadEvent) => void;
|
|
353
|
+
onError?: (event: ModelLoadEvent) => void;
|
|
354
|
+
} & {
|
|
355
|
+
'enable-xr'?: boolean;
|
|
356
|
+
} & React$1.RefAttributes<SpatializedStatic3DElementRef>, "ref"> & React$1.RefAttributes<any>>;
|
|
357
|
+
|
|
358
|
+
declare const SSRProvider: ({ isSSR: initialIsSSR, children, }: {
|
|
359
|
+
isSSR?: boolean;
|
|
360
|
+
children: React__default.ReactNode;
|
|
361
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
362
|
+
|
|
363
|
+
declare const version: string;
|
|
364
|
+
|
|
365
|
+
export { AttachmentAsset, AttachmentEntity, BoxEntity, ConeEntity, CylinderEntity, Entity, type EntityEventHandler, type EntityProps, EntityRef, Model, ModelAsset, ModelEntity, type ModelLoadEvent, type ModelProps, type ModelRef, type ModelSpatialDragEndEvent, type ModelSpatialDragEvent, type ModelSpatialDragStartEvent, type ModelSpatialMagnifyEndEvent, type ModelSpatialMagnifyEvent, type ModelSpatialRotateEndEvent, type ModelSpatialRotateEvent, type ModelSpatialTapEvent, PlaneEntity, Reality, SSRProvider, SceneGraph, type SpatialDragEndEntityEvent, type SpatialDragEndEvent, type SpatialDragEntityEvent, type SpatialDragEvent, type SpatialDragStartEntityEvent, type SpatialDragStartEvent, type SpatialMagnifyEndEntityEvent, type SpatialMagnifyEndEvent, type SpatialMagnifyEntityEvent, type SpatialMagnifyEvent, SpatialMonitor, type SpatialRotateEndEntityEvent, type SpatialRotateEndEvent, type SpatialRotateEntityEvent, type SpatialRotateEvent, type SpatialTapEntityEvent, type SpatialTapEvent, Spatialized2DElementContainer, type Spatialized2DElementContainerProps, SpatializedContainer, type SpatializedElementRef, type SpatializedStatic3DContainerProps, SpatializedStatic3DElementContainer, type SpatializedStatic3DElementRef, SphereEntity, UnlitMaterial, enableDebugTool, eventMap, initPolyfill, initScene, toLocalSpace, toSceneSpatial, version, withSpatialMonitor, withSpatialized2DElementContainer };
|