next-flow-interface 0.19.12 → 0.19.13

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/dist/index.d.ts CHANGED
@@ -1,3 +1,657 @@
1
+ import { AbstractMesh } from '@babylonjs/core';
2
+ import { Animation as Animation_2 } from '@babylonjs/core';
3
+ import { AnimationGroup } from '@babylonjs/core/Animations/animationGroup';
4
+ import { AnimationGroup as AnimationGroup_2 } from '@babylonjs/core';
5
+ import { ArcRotateCamera } from '@babylonjs/core';
6
+ import { Attributes } from 'react';
7
+ import { BaseTexture } from '@babylonjs/core';
8
+ import { Color } from 'antd/es/color-picker';
9
+ import { Color3 } from '@babylonjs/core';
10
+ import { Color4 } from '@babylonjs/core';
11
+ import { ColorPickerProps } from 'antd/es/color-picker';
12
+ import { CubeTexture } from '@babylonjs/core';
13
+ import { default as default_2 } from 'react';
14
+ import { DefaultOptionType } from 'antd/es/select';
15
+ import { DetailedHTMLProps } from 'react';
16
+ import { DynamicTexture } from '@babylonjs/core';
17
+ import { EmptyProps } from 'antd';
18
+ import { Engine } from '@babylonjs/core';
19
+ import { FunctionComponent } from 'react';
20
+ import { HTMLAttributes } from 'react';
21
+ import { InputNumberProps } from 'antd';
22
+ import { Light } from '@babylonjs/core';
23
+ import { Material } from '@babylonjs/core';
24
+ import { MouseEvent as MouseEvent_2 } from 'react';
25
+ import { MouseEventHandler } from 'react';
26
+ import { Node as Node_2 } from '@babylonjs/core';
27
+ import { NodeMaterial } from '@babylonjs/core';
28
+ import { NodeMaterialBlock } from '@babylonjs/core';
29
+ import { NodeMaterialBlockConnectionPointTypes } from '@babylonjs/core';
30
+ import { PBRMaterial } from '@babylonjs/core';
31
+ import { ReactNode } from 'react';
32
+ import { RecursiveArray } from 'rhine-var';
33
+ import { RecursiveMap } from 'rhine-var';
34
+ import { RecursiveObject } from 'rhine-var';
35
+ import { RhineVarArray } from 'rhine-var';
36
+ import { RhineVarMap } from 'rhine-var';
37
+ import { Root } from 'react-dom/client';
38
+ import { RvPath } from 'rhine-var';
39
+ import { Scene } from '@babylonjs/core';
40
+ import { SelectProps } from 'antd';
41
+ import { ShadowGenerator } from '@babylonjs/core';
42
+ import { StoredRhineVar } from 'rhine-var';
43
+ import { SwitchProps } from 'antd';
44
+ import { Texture } from '@babylonjs/core';
45
+ import { TransformNode } from '@babylonjs/core';
46
+ import { TransformNode as TransformNode_2 } from '@babylonjs/core/Meshes/transformNode';
47
+ import { Vector3 } from '@babylonjs/core';
48
+ import { WebGPUEngine } from '@babylonjs/core';
49
+ import { WebXRDefaultExperience } from '@babylonjs/core';
50
+
51
+ declare interface AddLocalDataOptionInterface extends Omit<LocalData, 'status' | 'progress'> {
52
+ status?: LocalDataStatus;
53
+ progress?: number;
54
+ }
55
+
56
+ export declare let Anchor: FunctionComponent<AnchorProps>;
57
+
58
+ declare interface AnchorProps extends DivProps {
59
+ list: string[];
60
+ value: number;
61
+ onSelectChange: (value: number) => void;
62
+ middle?: boolean;
63
+ }
64
+
65
+ export declare let AntCheckbox: FunctionComponent<AntCheckboxProps>;
66
+
67
+ declare interface AntCheckboxProps extends SwitchProps {
68
+ value: boolean;
69
+ onChange: (value: boolean) => void;
70
+ className?: string | undefined;
71
+ label?: string;
72
+ }
73
+
74
+ export declare let AntColor: FunctionComponent<AntColorProps>;
75
+
76
+ declare interface AntColorProps extends ColorPickerProps {
77
+ value: Color | string | null;
78
+ onColorChange: (value: string) => void;
79
+ className?: string;
80
+ classNameInner?: string;
81
+ theme?: string;
82
+ }
83
+
84
+ export declare let AntEmpty: FunctionComponent<AntEmptyProps>;
85
+
86
+ declare interface AntEmptyProps extends EmptyProps {
87
+ className?: string;
88
+ classNameInner?: string;
89
+ image?: ReactNode;
90
+ description?: ReactNode;
91
+ children?: ReactNode;
92
+ }
93
+
94
+ export declare let AntNumber: FunctionComponent<AntNumberProps>;
95
+
96
+ declare interface AntNumberProps extends Omit<InputNumberProps, 'onChange'> {
97
+ value: number | null;
98
+ onChange: (value: number | null) => void;
99
+ placeholder?: string;
100
+ className?: string;
101
+ classNameInner?: string;
102
+ theme?: string;
103
+ }
104
+
105
+ export declare let AntSelect: FunctionComponent<AntSelectProps<unknown>>;
106
+
107
+ declare interface AntSelectProps<ValueType> extends SelectProps<ValueType> {
108
+ value?: ValueType;
109
+ onChange?: (value: ValueType, option?: DefaultOptionType | DefaultOptionType[]) => void;
110
+ showSearch?: boolean;
111
+ onClick?: MouseEventHandler<HTMLDivElement>;
112
+ className?: string;
113
+ classNameInner?: string;
114
+ placeholder?: string;
115
+ optionFilterProp?: string;
116
+ size?: 'small' | 'middle' | 'large' | undefined;
117
+ options?: DefaultOptionType[];
118
+ }
119
+
120
+ export declare let AntSwitch: FunctionComponent<AntSwitchProps>;
121
+
122
+ declare interface AntSwitchProps extends SwitchProps {
123
+ value: boolean;
124
+ onChange: (value: boolean) => void;
125
+ className?: string | undefined;
126
+ }
127
+
128
+ declare interface AwarenessChanges {
129
+ added: number[];
130
+ updated: number[];
131
+ removed: number[];
132
+ }
133
+
134
+ declare type AwarenessChangeSubscriber = (changeStates: Map<number, RvAwareness>, changes: AwarenessChanges) => void;
135
+
136
+ export declare let awarenessService: AwarenessServiceApi;
137
+
138
+ declare interface AwarenessServiceApi {
139
+ subscribeChange: (subscriber: AwarenessChangeSubscriber) => () => void;
140
+ unsubscribeChange: (subscriber: AwarenessChangeSubscriber) => void;
141
+ states: Map<number, RvAwareness>;
142
+ getCurrentRvAwareness(): RvAwareness;
143
+ }
144
+
145
+ declare interface BasePlugin {
146
+ id: string;
147
+ version: string;
148
+ namespace: string;
149
+ name: string;
150
+ description: string;
151
+ type: PluginType;
152
+ theme: ThemeColor;
153
+ data?: Record<string, unknown>;
154
+ messages?: Record<Locale, Record<string, any>> | string;
155
+ onInstall?: () => Promise<void>;
156
+ onEnable?: () => Promise<void>;
157
+ onDisable?: () => Promise<void>;
158
+ onUninstall?: () => Promise<void>;
159
+ }
160
+
161
+ export declare let cameraConfigurationAnimation: CameraConfigurationAnimationApi;
162
+
163
+ declare interface CameraConfigurationAnimationApi {
164
+ play(data: {
165
+ distanceMin?: number;
166
+ distanceMax?: number;
167
+ fov?: number;
168
+ }, duration?: number, quickMode?: boolean): void;
169
+ distanceMin(value: number, duration?: number, quickMode?: boolean): void;
170
+ distanceMax(value: number, duration?: number, quickMode?: boolean): void;
171
+ fov(value: number, duration?: number, quickMode?: boolean): void;
172
+ }
173
+
174
+ export declare let cameraLocationAnimation: CameraLocationAnimationApi;
175
+
176
+ declare interface CameraLocationAnimationApi {
177
+ cameraAnimation: AnimationGroup | null;
178
+ play(data: RvCameraLocation, duration?: number, enableNear?: boolean): void;
179
+ playEasy(data: RvCameraLocation, duration?: number): void;
180
+ makeCameraAnimationsEase(data: RvCameraLocation, duration?: number): Animation_2[];
181
+ }
182
+
183
+ declare class ContextMenu {
184
+ options: ContextMenuCreateOptions;
185
+ id: string;
186
+ lines: MenuLine[];
187
+ showIcon: boolean;
188
+ x: number;
189
+ y: number;
190
+ closeOnOutsideClick: boolean;
191
+ theme?: ThemeColor | undefined;
192
+ controller: ContextMenuController | null;
193
+ createTime: Date;
194
+ constructor(options: ContextMenuCreateOptions, id: string, lines?: MenuLine[], showIcon?: boolean, x?: number, y?: number, closeOnOutsideClick?: boolean, theme?: ThemeColor | undefined, controller?: ContextMenuController | null, createTime?: Date);
195
+ static fromOptions(id: string, options: ContextMenuCreateOptions, menuLines?: MenuLine[]): ContextMenu;
196
+ }
197
+
198
+ declare interface ContextMenuController {
199
+ contextMenu: ContextMenu;
200
+ show(): void;
201
+ destroy(): void;
202
+ }
203
+
204
+ declare interface ContextMenuCreateOptions {
205
+ id?: string;
206
+ lines?: MenuLineCreateOptions[];
207
+ showIcon?: boolean;
208
+ x?: number;
209
+ y?: number;
210
+ closeOnOutsideClick?: boolean;
211
+ theme?: ThemeColor;
212
+ onClose?: () => void;
213
+ }
214
+
215
+ export declare let contextMenuService: ContextMenuServiceApi;
216
+
217
+ declare interface ContextMenuServiceApi {
218
+ /**
219
+ * 当前所有右键菜单
220
+ */
221
+ contextMenus: ContextMenu[];
222
+ /**
223
+ * 创建右键菜单
224
+ *
225
+ * @param options 创建右键菜单的选项对象 具体选项见 ContextMenuCreateOptions
226
+ *
227
+ * @returns 返回所创建的右键菜单的控制器
228
+ */
229
+ create(options: ContextMenuCreateOptions): ContextMenuController;
230
+ /**
231
+ * 获取右键菜单
232
+ *
233
+ * @param id 右键菜单的 id
234
+ *
235
+ * @returns 返回对应 id 的右键菜单 如果没有则返回 undefined
236
+ */
237
+ get(id: string): ContextMenu | undefined;
238
+ /**
239
+ * 关闭右键菜单
240
+ *
241
+ * @param contextMenu 右键菜单控制器
242
+ */
243
+ close(contextMenu: string | ContextMenu): Promise<boolean>;
244
+ /**
245
+ * 关闭所有右键菜单
246
+ */
247
+ closeAll(): Promise<number>;
248
+ }
249
+
250
+ declare class Dialog {
251
+ options: DialogCreateOptions;
252
+ id: string;
253
+ title: string;
254
+ titleIcon: FunctionComponent | string | undefined;
255
+ content: string;
256
+ contentAlign: DialogContentAlign;
257
+ contentView: FunctionComponent | string | undefined;
258
+ icon: FunctionComponent | string | undefined;
259
+ view: FunctionComponent | string | undefined;
260
+ theme: ThemeColor;
261
+ leftMode: boolean;
262
+ className: string;
263
+ style: object;
264
+ confirmText: string;
265
+ cancelText: string;
266
+ enableInput: boolean;
267
+ defaultValue: string;
268
+ inputPlaceholder: string;
269
+ autoFocus: boolean;
270
+ allowEmpty: boolean;
271
+ onChange: (value: string) => void;
272
+ onCheck: (value: string) => boolean;
273
+ enableCloseButton: boolean;
274
+ onConfirm: (value: string) => void;
275
+ onCancel: () => void;
276
+ onClose: () => void;
277
+ onConfirmButtonClick: () => void;
278
+ onCancelButtonClick: () => void;
279
+ onOutsideClick: () => void;
280
+ onCloseButtonClick: () => void;
281
+ onRender: () => void;
282
+ onEffect: () => () => void;
283
+ closeOnConfirm: boolean;
284
+ closeOnCancel: boolean;
285
+ closeOnOutsideClick: boolean;
286
+ closeOnCloseButtonClick: boolean;
287
+ alignButton: boolean;
288
+ inputValue: string;
289
+ createTime: Date;
290
+ focusInput: () => void;
291
+ elements: Map<string, HTMLElement>;
292
+ constructor(options: DialogCreateOptions, id: string, title?: string, titleIcon?: FunctionComponent | string | undefined, content?: string, contentAlign?: DialogContentAlign, contentView?: FunctionComponent | string | undefined, icon?: FunctionComponent | string | undefined, view?: FunctionComponent | string | undefined, theme?: ThemeColor, leftMode?: boolean, className?: string, style?: object, confirmText?: string, cancelText?: string, enableInput?: boolean, defaultValue?: string, inputPlaceholder?: string, autoFocus?: boolean, allowEmpty?: boolean, onChange?: (value: string) => void, onCheck?: (value: string) => boolean, enableCloseButton?: boolean, onConfirm?: (value: string) => void, onCancel?: () => void, onClose?: () => void, onConfirmButtonClick?: () => void, onCancelButtonClick?: () => void, onOutsideClick?: () => void, onCloseButtonClick?: () => void, onRender?: () => void, onEffect?: () => () => void, closeOnConfirm?: boolean, closeOnCancel?: boolean, closeOnOutsideClick?: boolean, closeOnCloseButtonClick?: boolean, alignButton?: boolean, inputValue?: string, createTime?: Date, focusInput?: () => void, elements?: Map<string, HTMLElement>);
293
+ static fromOptions(id: string, options: DialogCreateOptions): Dialog;
294
+ setHide: (value: boolean) => void;
295
+ }
296
+
297
+ declare enum DialogContentAlign {
298
+ LEFT = "LEFT",
299
+ CENTER = "CENTER",
300
+ RIGHT = "RIGHT"
301
+ }
302
+
303
+ declare interface DialogCreateOptions {
304
+ id?: string;
305
+ title?: string;
306
+ titleIcon?: FunctionComponent | string;
307
+ content?: string;
308
+ contentAlign?: DialogContentAlign;
309
+ contentView?: FunctionComponent | string;
310
+ icon?: FunctionComponent | string;
311
+ view?: FunctionComponent | string;
312
+ theme?: ThemeColor;
313
+ leftMode?: boolean;
314
+ className?: string;
315
+ style?: object;
316
+ confirmText?: string;
317
+ cancelText?: string;
318
+ enableCloseButton?: boolean;
319
+ enableInput?: boolean;
320
+ defaultValue?: string;
321
+ inputPlaceholder?: string;
322
+ autoFocus?: boolean;
323
+ allowEmpty?: boolean;
324
+ onChange?: (value: string) => void;
325
+ onCheck?: (value: string) => boolean;
326
+ onConfirm?: (value: string) => void;
327
+ onCancel?: () => void;
328
+ onClose?: () => void;
329
+ onConfirmButtonClick?: () => void;
330
+ onCancelButtonClick?: () => void;
331
+ onOutsideClick?: () => void;
332
+ onCloseButtonClick?: () => void;
333
+ onRender?: () => void;
334
+ onEffect?: () => () => void;
335
+ closeOnConfirm?: boolean;
336
+ closeOnCancel?: boolean;
337
+ closeOnOutsideClick?: boolean;
338
+ closeOnCloseButtonClick?: boolean;
339
+ alignButton?: boolean;
340
+ }
341
+
342
+ export declare let dialogService: DialogServiceApi;
343
+
344
+ declare interface DialogServiceApi {
345
+ dialogs: Dialog[];
346
+ /**
347
+ * 创建对话框 最全面的对话框创建方法
348
+ *
349
+ * @param options 创建对话框的选项对象 具体选项见 DialogCreateOptions
350
+ * @param show 是否直接展示弹窗
351
+ *
352
+ * @returns 返回所创建的对话框的控制器
353
+ */
354
+ create(options: DialogCreateOptions, show?: boolean): Promise<Dialog>;
355
+ /**
356
+ * 弹出提示信息或询问是或否的对话框
357
+ *
358
+ * @param options 创建对话框的选项对象 具体选项如下
359
+ * @param show 是否直接展示弹窗
360
+ *
361
+ * @returns 关闭后返回用户是否点击了确认按钮
362
+ */
363
+ confirm(options: {
364
+ title: string;
365
+ titleIcon: FunctionComponent;
366
+ content?: string;
367
+ contentView?: FunctionComponent;
368
+ icon?: FunctionComponent;
369
+ confirmText?: string;
370
+ cancelText?: string;
371
+ theme?: ThemeColor;
372
+ background?: ThemeBackground;
373
+ leftMode?: boolean;
374
+ className?: string;
375
+ style?: object;
376
+ onConfirm?: () => void;
377
+ onCancel?: () => void;
378
+ onClose?: () => void;
379
+ closeOnOutsideClick?: boolean;
380
+ }, show?: boolean): Promise<boolean>;
381
+ /**
382
+ * 弹出获取用户文本输入的对话框
383
+ *
384
+ * @param options 创建对话框的选项对象 具体选项如下
385
+ * @param show 是否直接展示弹窗
386
+ *
387
+ * @returns 关闭后返回用户输入的文本 如果用户不是点击确认按钮关闭的对话框 则返回 undefined
388
+ */
389
+ input(options: {
390
+ title: string;
391
+ titleIcon: FunctionComponent;
392
+ content?: string;
393
+ contentView?: FunctionComponent;
394
+ icon?: FunctionComponent;
395
+ theme?: ThemeColor;
396
+ leftMode?: boolean;
397
+ className?: string;
398
+ style?: object;
399
+ confirmText?: string;
400
+ cancelText?: string;
401
+ defaultValue?: string;
402
+ inputPlaceholder?: string;
403
+ autoFocus?: boolean;
404
+ allowEmpty?: boolean;
405
+ onChange?: (value: string) => void;
406
+ onCheck?: (value: string) => boolean;
407
+ onConfirm?: (value: string) => void;
408
+ onCancel?: () => void;
409
+ onClose?: () => void;
410
+ closeOnOutsideClick?: boolean;
411
+ }, show?: boolean): Promise<string | undefined>;
412
+ /**
413
+ * 获取对话框
414
+ *
415
+ * @param id 对话框的 id
416
+ *
417
+ * @returns 返回对应 id 的对话框 如果没有则返回 undefined
418
+ */
419
+ get(id: string): Dialog | undefined;
420
+ /**
421
+ * 打开对话框
422
+ *
423
+ * @param dialog 对话框实例或对话框ID
424
+ */
425
+ open(dialog: string | Dialog): Promise<boolean>;
426
+ /**
427
+ * 关闭对话框
428
+ *
429
+ * @param dialog 对话框实例或对话框ID
430
+ */
431
+ close(dialog: string | Dialog): Promise<boolean>;
432
+ /**
433
+ * 关闭所有对话框
434
+ */
435
+ closeAll(): Promise<number>;
436
+ }
437
+
438
+ declare type DivProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
439
+
440
+ declare type DivPropsSimple = Omit<DivProps, 'onChange' | 'defaultValue'>;
441
+
442
+ export declare let DrawerLoading: FunctionComponent<SpanProps>;
443
+
444
+ export declare let easyPropertyAnimation: EasyPropertyAnimationApi;
445
+
446
+ declare interface EasyPropertyAnimationApi {
447
+ animationMap: Map<string, {
448
+ animationGroup?: AnimationGroup_2;
449
+ timeout?: ReturnType<typeof setTimeout>;
450
+ }>;
451
+ play(id: string, type: number, node: SupportAnimationTarget, keys: string[], to: unknown, duration?: number, quickMode?: boolean, from?: unknown, ease?: boolean): void;
452
+ playSplit(id: string, callback: () => void, duration?: number): void;
453
+ stop(id: string): void;
454
+ }
455
+
456
+ declare enum EnableLevel {
457
+ NONE = "NONE",
458
+ INSTALL = "INSTALL",
459
+ ENABLE = "ENABLE",
460
+ OPEN = "OPEN"
461
+ }
462
+
463
+ declare interface FileData {
464
+ fid: string;
465
+ status: LocalDataStatus;
466
+ name: string;
467
+ progress: number;
468
+ mime: string;
469
+ filename?: string;
470
+ extension?: string;
471
+ description?: string;
472
+ size?: string;
473
+ preview?: string;
474
+ }
475
+
476
+ export declare let FileProgressBar: FunctionComponent<FileProgressBarProps>;
477
+
478
+ declare interface FileProgressBarProps extends DivProps {
479
+ size: string;
480
+ value: number;
481
+ className?: string;
482
+ theme?: string;
483
+ }
484
+
485
+ export declare let firstLoadModelService: FirstLoadModelServiceApi;
486
+
487
+ declare interface FirstLoadModelServiceApi {
488
+ status: FirstLoadModelServiceStatus;
489
+ rsModelList: RsModel[];
490
+ loadingNumber: number;
491
+ loadedNumber: number;
492
+ errorNumber: number;
493
+ canceledNumber: number;
494
+ totalSize: number;
495
+ loadedSize: number;
496
+ startTime: number;
497
+ start(): void;
498
+ subscribe(subscriber: FirstLoadModelServiceSubscriber): () => void;
499
+ unsubscribe(subscriber: FirstLoadModelServiceSubscriber): void;
500
+ }
501
+
502
+ declare enum FirstLoadModelServiceEventType {
503
+ START = "START",
504
+ PROGRESS = "PROGRESS",
505
+ LOADED = "LOADED",
506
+ ERROR = "ERROR",
507
+ CANCELED = "CANCELED"
508
+ }
509
+
510
+ declare enum FirstLoadModelServiceStatus {
511
+ WAITING = "WAITING",
512
+ LOADING = "LOADING",
513
+ LOADED = "LOADED",
514
+ ERROR = "ERROR",
515
+ CANCELED = "CANCELED"
516
+ }
517
+
518
+ declare type FirstLoadModelServiceSubscriber = (type: FirstLoadModelServiceEventType) => void;
519
+
520
+ export declare let firstLoadService: FirstLoadServiceApi;
521
+
522
+ declare interface FirstLoadServiceApi {
523
+ status: FirstLoadServiceStatus;
524
+ localDataList: LocalData[];
525
+ loadingNumber: number;
526
+ loadedNumber: number;
527
+ errorNumber: number;
528
+ canceledNumber: number;
529
+ totalSize: number;
530
+ loadedSize: number;
531
+ startTime: number;
532
+ start(): void;
533
+ subscribe(subscriber: FirstLoadServiceSubscriber): () => void;
534
+ unsubscribe(subscriber: FirstLoadServiceSubscriber): void;
535
+ }
536
+
537
+ declare enum FirstLoadServiceEventType {
538
+ START = "START",
539
+ PROGRESS = "PROGRESS",
540
+ LOADED = "LOADED",
541
+ ERROR = "ERROR",
542
+ CANCELED = "CANCELED"
543
+ }
544
+
545
+ declare enum FirstLoadServiceStatus {
546
+ WAITING = "WAITING",
547
+ LOADING = "LOADING",
548
+ LOADED = "LOADED",
549
+ ERROR = "ERROR",
550
+ CANCELED = "CANCELED"
551
+ }
552
+
553
+ declare type FirstLoadServiceSubscriber = (type: FirstLoadServiceEventType) => void;
554
+
555
+ export declare let FlexGrow: FunctionComponent<FlexGrowProps>;
556
+
557
+ declare interface FlexGrowProps {
558
+ value?: number;
559
+ }
560
+
561
+ declare enum FocusMode {
562
+ DEFAULT = "DEFAULT",
563
+ DESCRIPTION = "DESCRIPTION"
564
+ }
565
+
566
+ export declare let fogAnimation: FogAnimationApi;
567
+
568
+ declare interface FogAnimationApi {
569
+ play(data: RvEnvironment['fog'], duration?: number, quickMode?: boolean): void;
570
+ enableAndDensity(enable: boolean, value: number, duration?: number, quickMode?: boolean): void;
571
+ color(color: Color3 | string, duration?: number, quickMode?: boolean): void;
572
+ }
573
+
574
+ export declare let groundAnimation: GroundAnimationApi;
575
+
576
+ declare interface GroundAnimationApi {
577
+ play(data: RvEnvironment['ground'], duration?: number, quickMode?: boolean): void;
578
+ opacityRate(value: number, duration?: number, quickMode?: boolean): void;
579
+ baseColor(color: Color3 | string, duration?: number, quickMode?: boolean): void;
580
+ enableOnViewerMode(value: boolean, duration: number, quickMode: boolean): void;
581
+ enableOnEditorMode(value: boolean, duration: number, quickMode: boolean): void;
582
+ }
583
+
584
+ declare interface HighLightInfo {
585
+ uid: number;
586
+ color: string;
587
+ }
588
+
589
+ export declare let historyService: HistoryServiceApi;
590
+
591
+ declare interface HistoryServiceApi {
592
+ operate: string;
593
+ undo(): void;
594
+ redo(): void;
595
+ canUndo(): boolean;
596
+ canRedo(): boolean;
597
+ pushState(state: unknown): void;
598
+ check(operate: string, forceStop?: boolean): void;
599
+ stop(): void;
600
+ clear(): void;
601
+ clearUndoStack(): void;
602
+ clearRedoStack(): void;
603
+ removeFirst(operate?: string): boolean;
604
+ removeLast(operate?: string): boolean;
605
+ subscribe(subscriber: HistoryServiceSubscriber): () => void;
606
+ unsubscribe(subscriber: HistoryServiceSubscriber): void;
607
+ subscribeState(subscriber: HistoryServiceStateSubscriber): () => void;
608
+ unsubscribeState(subscriber: HistoryServiceStateSubscriber): void;
609
+ }
610
+
611
+ declare enum HistoryServiceEventType {
612
+ 'UNDO' = "UNDO",
613
+ 'REDO' = "REDO"
614
+ }
615
+
616
+ declare type HistoryServiceStateSubscriber = (state: unknown) => void;
617
+
618
+ declare type HistoryServiceSubscriber = (type: HistoryServiceEventType, operate: string) => void;
619
+
620
+ declare interface IconPlugin extends BasePlugin {
621
+ position: IconPluginPosition;
622
+ group: string;
623
+ label: string;
624
+ color: ThemeColor;
625
+ open: boolean;
626
+ icon: MixView<IconViewProps>;
627
+ onEnabledChange?: (value: boolean, e: MouseEvent) => void;
628
+ onIconClick?: (e: MouseEvent) => void;
629
+ onIconClickRouter?: (e: MouseEvent) => string;
630
+ onIconContextMenu?: (e: MouseEvent) => void;
631
+ }
632
+
633
+ declare enum IconPluginPosition {
634
+ TOP = 0,
635
+ RIGHT = 1,
636
+ BOTTOM = 2,
637
+ LEFT = 3,
638
+ TOP_LEFT = 4,
639
+ BOTTOM_LEFT = 5,
640
+ TOP_RIGHT = 6,
641
+ BOTTOM_RIGHT = 7,
642
+ UNKNOWN = 8
643
+ }
644
+
645
+ declare interface IconViewProps extends DivProps {
646
+ plugin: IconPlugin;
647
+ }
648
+
649
+ export declare let InternationalizationProvider: FunctionComponent<InternationalizationProviderProps>;
650
+
651
+ declare interface InternationalizationProviderProps {
652
+ children?: ReactNode;
653
+ }
654
+
1
655
  export declare let internationalizationService: InternationalizationServiceApi;
2
656
 
3
657
  declare interface InternationalizationServiceApi {
@@ -13,19 +667,2183 @@ declare interface InternationalizationServiceApi {
13
667
  wait(namespace: string | string[]): Promise<void>;
14
668
  }
15
669
 
670
+ declare class LabelInfo {
671
+ nid: string;
672
+ node: TransformNode_2 | null;
673
+ text: string;
674
+ theme: LabelTheme;
675
+ x: number;
676
+ y: number;
677
+ parentElement: HTMLDivElement | null;
678
+ pointElement: HTMLDivElement | null;
679
+ lineElement: HTMLDivElement | null;
680
+ blockElement: HTMLDivElement | null;
681
+ textElement: HTMLDivElement | null;
682
+ validate: boolean;
683
+ always: boolean;
684
+ show: boolean;
685
+ lastClickTime: number;
686
+ lastSp: Vector3 | null;
687
+ constructor(nid: string, node?: TransformNode_2 | null, text?: string, theme?: LabelTheme, x?: number, y?: number);
688
+ }
689
+
690
+ declare enum LabelTheme {
691
+ Default = "Default"
692
+ }
693
+
694
+ declare type LastSubscriber = (value: RsSelectionNodeInfo | null) => void;
695
+
696
+ export declare let lightAnimation: LightAnimationApi;
697
+
698
+ declare interface LightAnimationApi {
699
+ play(data: {
700
+ intensity?: number;
701
+ diffuseColor?: string;
702
+ specularColor?: string;
703
+ }, duration?: number, quickMode?: boolean): void;
704
+ intensity(value: number, duration?: number, quickMode?: boolean): void;
705
+ diffuseColor(color: Color3 | string, duration?: number, quickMode?: boolean): void;
706
+ specularColor(color: Color3 | string, duration?: number, quickMode?: boolean): void;
707
+ }
708
+
709
+ declare interface LocalData {
710
+ fid: string;
711
+ type: LocalDataType;
712
+ mime: string;
713
+ status: LocalDataStatus;
714
+ progress: number;
715
+ url?: string;
716
+ blob?: Blob;
717
+ text?: string;
718
+ json?: unknown;
719
+ texture?: BaseTexture;
720
+ material?: Material;
721
+ uv?: unknown;
722
+ object?: unknown;
723
+ }
724
+
725
+ export declare let localDataService: LocalDataServiceApi;
726
+
727
+ declare interface LocalDataServiceApi {
728
+ files: Map<string, LocalData>;
729
+ get(fid: string): LocalData | undefined;
730
+ has(fid: string): boolean;
731
+ remove(fid: string): boolean;
732
+ add(localData: AddLocalDataOptionInterface): LocalData;
733
+ load(fid: string, url: string, mime?: string): Promise<LocalData>;
734
+ loadByFile(fid: string, file: File, mime?: string): Promise<LocalData>;
735
+ processAfterLoad(localData: LocalData): Promise<boolean>;
736
+ pause(fid: string): boolean;
737
+ resume(fid: string): boolean;
738
+ cancel(fid: string): boolean;
739
+ getLocalUrl(fid: string): string;
740
+ releaseLocalUrl(fid: string): boolean;
741
+ subscribe(subscriber: LocalDataServiceSubscriber): () => void;
742
+ unsubscribe(subscriber: LocalDataServiceSubscriber): void;
743
+ subscribeSingle(fid: string, subscriber: LocalDataServiceSubscriber): () => void;
744
+ unsubscribeSingle(fid: string, subscriber: LocalDataServiceSubscriber): void;
745
+ publish(fid: string, type: LocalDataServiceEventType, localData: LocalData): void;
746
+ afterLoaded(fid: string, subscriber: (localData: LocalData) => void): void;
747
+ waitLoaded(fid: string): Promise<LocalData>;
748
+ /**
749
+ * 是否已经载入完成
750
+ *
751
+ * @param fid 文件 fid
752
+ *
753
+ * @returns 返回文件是否载入完成 文件不存在则返回 undefined
754
+ */
755
+ isLoaded(fid: string): boolean | undefined;
756
+ }
757
+
758
+ declare enum LocalDataServiceEventType {
759
+ ADD = "ADD",
760
+ REMOVE = "REMOVE",
761
+ START = "START",
762
+ PROGRESS = "PROGRESS",
763
+ PAUSE = "PAUSE",
764
+ RESUME = "RESUME",
765
+ LOADED = "LOADED",
766
+ ERROR = "ERROR",
767
+ CANCELED = "CANCELED"
768
+ }
769
+
770
+ declare type LocalDataServiceSubscriber = (type: LocalDataServiceEventType, LocalData: LocalData) => void;
771
+
772
+ declare enum LocalDataStatus {
773
+ WAITING = "WAITING",
774
+ LOADING = "LOADING",
775
+ PAUSED = "PAUSED",
776
+ LOADED = "LOADED",
777
+ FAILED = "FAILED",
778
+ CANCELED = "CANCELED"
779
+ }
780
+
781
+ declare enum LocalDataType {
782
+ BLOB = "BLOB",
783
+ OBJECT = "OBJECT"
784
+ }
785
+
16
786
  declare enum Locale {
17
787
  ZH = "zh",
18
788
  EN = "en"
19
789
  }
20
790
 
791
+ export declare let MainPortal: FunctionComponent<MainPortalProps>;
792
+
793
+ declare interface MainPortalProps {
794
+ children: ReactNode;
795
+ }
796
+
797
+ export declare let MaterialSymbol: FunctionComponent<MaterialSymbolProps>;
798
+
799
+ export declare let materialSymbol: (icon: string, options?: MaterialSymbolOptions) => FunctionComponent;
800
+
801
+ declare interface MaterialSymbolOptions {
802
+ fill?: boolean;
803
+ size?: string;
804
+ color?: string;
805
+ className?: string;
806
+ style?: default_2.CSSProperties;
807
+ }
808
+
809
+ declare interface MaterialSymbolProps extends SpanProps {
810
+ size?: string;
811
+ color?: string;
812
+ className?: string;
813
+ fill?: boolean;
814
+ }
815
+
816
+ export declare let meetingService: MeetingServiceApi;
817
+
818
+ declare interface MeetingServiceApi {
819
+ state: MeetingState;
820
+ inMeeting(): boolean;
821
+ isPresenter(): boolean;
822
+ isVisitor(): boolean;
823
+ isFollowingVisitor(): boolean;
824
+ isUnfollowingVisitor(): boolean;
825
+ getInvitationLink(): string;
826
+ }
827
+
828
+ declare interface MeetingState {
829
+ meetingId: string;
830
+ presenterId: number;
831
+ status: MeetingStatus;
832
+ startTime: number;
833
+ peopleCount: number;
834
+ forceFollow: boolean;
835
+ clickShareMode: ShareMode;
836
+ cursorShareMode: ShareMode;
837
+ selfFollow: boolean;
838
+ }
839
+
840
+ declare enum MeetingStatus {
841
+ PENDING = "PENDING",
842
+ PROGRESSING = "PROGRESSING",
843
+ ENDED = "ENDED",
844
+ CANCELED = "CANCELED",
845
+ BANNED = "BANNED"
846
+ }
847
+
848
+ declare class MenuLine {
849
+ options: MenuLineCreateOptions;
850
+ id: string;
851
+ type: MenuLineType;
852
+ text: string;
853
+ tip: string;
854
+ icon: FunctionComponent | undefined;
855
+ view: FunctionComponent | undefined;
856
+ color: string;
857
+ disabled: boolean;
858
+ shortcut: string;
859
+ onClick: (e: MouseEvent_2) => void;
860
+ onMouseOver: (e: MouseEvent_2) => void;
861
+ onMouseOut: (e: MouseEvent_2) => void;
862
+ closeAllOnClick: boolean;
863
+ checkboxDefaultValue: boolean;
864
+ onCheckboxChange: (value: boolean) => void;
865
+ sub: ContextMenuCreateOptions | undefined;
866
+ createTime: Date;
867
+ constructor(options: MenuLineCreateOptions, id: string, type?: MenuLineType, text?: string, tip?: string, icon?: FunctionComponent | undefined, view?: FunctionComponent | undefined, color?: string, disabled?: boolean, shortcut?: string, onClick?: (e: MouseEvent_2) => void, onMouseOver?: (e: MouseEvent_2) => void, onMouseOut?: (e: MouseEvent_2) => void, closeAllOnClick?: boolean, checkboxDefaultValue?: boolean, onCheckboxChange?: (value: boolean) => void, sub?: ContextMenuCreateOptions | undefined, // 子菜单项
868
+ createTime?: Date);
869
+ static fromOptions(id: string, options: MenuLineCreateOptions): MenuLine;
870
+ }
871
+
872
+ declare interface MenuLineCreateOptions {
873
+ id?: string;
874
+ type?: MenuLineType;
875
+ text?: string;
876
+ tip?: string;
877
+ icon?: FunctionComponent;
878
+ view?: FunctionComponent;
879
+ color?: string;
880
+ disabled?: boolean;
881
+ shortcut?: string;
882
+ onClick?: (e: MouseEvent_2) => void;
883
+ onMouseOver?: (e: MouseEvent_2) => void;
884
+ onMouseOut?: (e: MouseEvent_2) => void;
885
+ closeAllOnClick?: boolean;
886
+ checkboxDefaultValue?: boolean;
887
+ onCheckboxChange?: (value: boolean) => void;
888
+ sub?: ContextMenuCreateOptions;
889
+ }
890
+
891
+ declare enum MenuLineType {
892
+ BUTTON = "BUTTON",// 单个点击用按钮
893
+ DIVIDER = "DIVIDER",// 分割线
894
+ CHECKBOX = "CHECKBOX",// 单个可选中复选框
895
+ SUB = "SUB",// 二级菜单
896
+ VIEW = "VIEW"
897
+ }
898
+
899
+ declare class Message {
900
+ text: string;
901
+ type: MessageType;
902
+ duration: number;
903
+ id: number;
904
+ show: boolean;
905
+ height: number;
906
+ opacity: number;
907
+ constructor(text: string, type: MessageType, duration: number, id: number);
908
+ }
909
+
21
910
  declare type MessageLeaf = string;
22
911
 
912
+ export declare let messageService: MessageServiceApi;
913
+
914
+ declare interface MessageServiceApi {
915
+ messages: Message[];
916
+ info: (text: string, translateNamespace?: string, duration?: number) => void;
917
+ success: (text: string, translateNamespace?: string, duration?: number) => void;
918
+ warning: (text: string, translateNamespace?: string, duration?: number) => void;
919
+ error: (text: string, translateNamespace?: string, duration?: number) => void;
920
+ showWithTranslate: (text: string, type: MessageType, translateNamespace: string, duration: number) => void;
921
+ show: (text: string, type: MessageType, duration?: number) => void;
922
+ }
923
+
23
924
  declare interface MessageTree {
24
925
  [key: string]: MessageTree | MessageLeaf;
25
926
  }
26
927
 
928
+ declare type MessageType = 'info' | 'warning' | 'error' | 'success';
929
+
930
+ declare type MixView<T extends Attributes | null = null> = string | FunctionComponent<T>;
931
+
27
932
  declare type NamespaceSubscriber = (namespaces: string[]) => void;
28
933
 
29
- declare type Translator = (strings: TemplateStringsArray, ...values: unknown[]) => string;
934
+ declare type NativeAnyEventSubscriber = (e: Event | null) => void;
935
+
936
+ declare type NativeDragEventSubscriber = (e: DragEvent) => void;
937
+
938
+ export declare let nativeEventService: NativeEventServiceApi;
939
+
940
+ declare interface NativeEventServiceApi {
941
+ subscribeClick(subscriber: NativeMouseEventSubscriber, option?: NativeEventSubscribeOption): () => void;
942
+ unsubscribeClick(subscriber: NativeMouseEventSubscriber): void;
943
+ subscribeContextMenu(subscriber: NativeMouseEventSubscriber, option?: NativeEventSubscribeOption): () => void;
944
+ unsubscribeContextMenu(subscriber: NativeMouseEventSubscriber): void;
945
+ subscribeDoubleClick(subscriber: NativeMouseEventSubscriber, option?: NativeEventSubscribeOption): () => void;
946
+ unsubscribeDoubleClick(subscriber: NativeMouseEventSubscriber): void;
947
+ subscribeDrag(subscriber: NativeDragEventSubscriber, option?: NativeEventSubscribeOption): () => void;
948
+ unsubscribeDrag(subscriber: NativeDragEventSubscriber): void;
949
+ subscribeDrop(subscriber: NativeDragEventSubscriber, option?: NativeEventSubscribeOption): () => void;
950
+ unsubscribeDrop(subscriber: NativeDragEventSubscriber): void;
951
+ subscribeWheel(subscriber: NativeWheelEventSubscriber, option?: NativeEventSubscribeOption): () => void;
952
+ unsubscribeWheel(subscriber: NativeWheelEventSubscriber): void;
953
+ subscribePointerDown(subscriber: NativePointerEventSubscriber, option?: NativeEventSubscribeOption): () => void;
954
+ unsubscribePointerDown(subscriber: NativePointerEventSubscriber): void;
955
+ subscribePointerMove(subscriber: NativePointerEventSubscriber, option?: NativeEventSubscribeOption): () => void;
956
+ unsubscribePointerMove(subscriber: NativePointerEventSubscriber): void;
957
+ subscribePointerUp(subscriber: NativePointerEventSubscriber, option?: NativeEventSubscribeOption): () => void;
958
+ unsubscribePointerUp(subscriber: NativePointerEventSubscriber): void;
959
+ subscribePointerCancel(subscriber: NativePointerEventSubscriber, option?: NativeEventSubscribeOption): () => void;
960
+ unsubscribePointerCancel(subscriber: NativePointerEventSubscriber): void;
961
+ subscribePointerEnter(subscriber: NativePointerEventSubscriber, option?: NativeEventSubscribeOption): () => void;
962
+ unsubscribePointerEnter(subscriber: NativePointerEventSubscriber): void;
963
+ subscribePointerLeave(subscriber: NativePointerEventSubscriber, option?: NativeEventSubscribeOption): () => void;
964
+ unsubscribePointerLeave(subscriber: NativePointerEventSubscriber): void;
965
+ subscribeKeyDown(subscriber: NativeKeyboardEventSubscriber, option?: NativeEventSubscribeOption): () => void;
966
+ unsubscribeKeyDown(subscriber: NativeKeyboardEventSubscriber): void;
967
+ subscribeKeyUp(subscriber: NativeKeyboardEventSubscriber, option?: NativeEventSubscribeOption): () => void;
968
+ unsubscribeKeyUp(subscriber: NativeKeyboardEventSubscriber): void;
969
+ subscribeKeyDownExceptInput(subscriber: NativeKeyboardEventSubscriber, option?: NativeEventSubscribeOption): () => void;
970
+ unsubscribeKeyDownExceptInput(subscriber: NativeKeyboardEventSubscriber): void;
971
+ subscribeKeyUpExceptInput(subscriber: NativeKeyboardEventSubscriber, option?: NativeEventSubscribeOption): () => void;
972
+ unsubscribeKeyUpExceptInput(subscriber: NativeKeyboardEventSubscriber): void;
973
+ subscribeFocus(subscriber: NativeFocusEventSubscriber, option?: NativeEventSubscribeOption): () => void;
974
+ unsubscribeFocus(subscriber: NativeFocusEventSubscriber): void;
975
+ subscribeBlur(subscriber: NativeFocusEventSubscriber, option?: NativeEventSubscribeOption): () => void;
976
+ unsubscribeBlur(subscriber: NativeFocusEventSubscriber): void;
977
+ subscribeScroll(subscriber: NativeUIEventSubscriber, option?: NativeEventSubscribeOption): () => void;
978
+ unsubscribeScroll(subscriber: NativeUIEventSubscriber): void;
979
+ subscribeResize(subscriber: NativeAnyEventSubscriber, option?: NativeEventSubscribeOption): () => void;
980
+ unsubscribeResize(subscriber: NativeAnyEventSubscriber): void;
981
+ }
982
+
983
+ declare interface NativeEventSubscribeOption {
984
+ self?: boolean;
985
+ once?: boolean;
986
+ capture?: boolean;
987
+ }
988
+
989
+ declare type NativeFocusEventSubscriber = (e: FocusEvent) => void;
990
+
991
+ declare type NativeKeyboardEventSubscriber = (e: KeyboardEvent) => void;
992
+
993
+ declare type NativeMouseEventSubscriber = (e: MouseEvent) => void;
994
+
995
+ declare type NativePointerEventSubscriber = (e: PointerEvent) => void;
996
+
997
+ declare type NativeUIEventSubscriber = (e: UIEvent) => void;
998
+
999
+ declare type NativeWheelEventSubscriber = (e: WheelEvent) => void;
1000
+
1001
+ declare interface NodeMaterialInfo {
1002
+ nid: string;
1003
+ fid: string;
1004
+ material: NodeMaterial;
1005
+ }
1006
+
1007
+ declare interface NodePair {
1008
+ nid: string;
1009
+ uniqueId: number;
1010
+ node: Node_2;
1011
+ }
1012
+
1013
+ declare interface OssUploadInstance {
1014
+ fid: string;
1015
+ file: File;
1016
+ status: OssUploadInstanceStatus;
1017
+ progress: number;
1018
+ data?: unknown;
1019
+ }
1020
+
1021
+ declare enum OssUploadInstanceStatus {
1022
+ WAITING = "WAITING",
1023
+ UPLOADING = "UPLOADING",
1024
+ PAUSED = "PAUSED",
1025
+ COMPLETED = "COMPLETED",
1026
+ FAILED = "FAILED",
1027
+ CANCELED = "CANCELED"
1028
+ }
1029
+
1030
+ export declare let ossUploadService: OssUploadServiceApi;
1031
+
1032
+ declare interface OssUploadServiceApi {
1033
+ instances: Map<string, OssUploadInstance>;
1034
+ upload(file: File, fid?: string, mime?: string, hash?: string): Promise<void>;
1035
+ pause(fid: string): boolean;
1036
+ resume(fid: string): boolean;
1037
+ cancel(fid: string): boolean;
1038
+ get(fid: string): OssUploadInstance | undefined;
1039
+ has(fid: string): boolean;
1040
+ hasFile(file: File): boolean;
1041
+ subscribe(subscriber: OssUploadServiceSubscriber): () => void;
1042
+ unsubscribe(subscriber: OssUploadServiceSubscriber): void;
1043
+ subscribeSingle(fid: string, subscriber: OssUploadServiceSubscriber): () => void;
1044
+ unsubscribeSingle(fid: string, subscriber: OssUploadServiceSubscriber): void;
1045
+ }
1046
+
1047
+ declare enum OssUploadServiceEventType {
1048
+ START = "START",
1049
+ PROGRESS = "PROGRESS",
1050
+ PAUSE = "PAUSE",
1051
+ RESUME = "RESUME",
1052
+ UPLOADED = "UPLOADED",
1053
+ FAILED = "FAILED",
1054
+ CANCELED = "CANCELED"
1055
+ }
1056
+
1057
+ declare type OssUploadServiceSubscriber = (type: OssUploadServiceEventType, ossUploadInstance: OssUploadInstance) => void;
1058
+
1059
+ declare interface Page {
1060
+ type: PageType;
1061
+ mode: PageMode;
1062
+ viewing: boolean;
1063
+ pid: string;
1064
+ sid: string;
1065
+ }
1066
+
1067
+ declare enum PageMode {
1068
+ DISPLAY = "DISPLAY",// 正常显示
1069
+ FULL = "FULL",// 3D 场景全屏 - 隐藏所有 UI 元素
1070
+ HP_BOX = "HP_BOX",// 全息投影盒 - 隐藏所有 UI 元素 - 且四摄像头渲染
1071
+ VR = "VR",// VR 模式
1072
+ MR = "MR"
1073
+ }
1074
+
1075
+ declare enum PageType {
1076
+ EDITOR = "EDITOR",
1077
+ VIEWER = "VIEWER",
1078
+ VISITOR = "VISITOR"
1079
+ }
1080
+
1081
+ declare interface PluginConfig {
1082
+ id: string;
1083
+ url: string;
1084
+ official?: boolean;
1085
+ necessary?: boolean;
1086
+ private?: boolean;
1087
+ css?: boolean;
1088
+ information: {
1089
+ name: string;
1090
+ icon?: FunctionComponent | string;
1091
+ version?: string;
1092
+ description?: string;
1093
+ };
1094
+ }
1095
+
1096
+ export declare let pluginContainerService: PluginContainerServiceApi;
1097
+
1098
+ declare interface PluginContainerServiceApi {
1099
+ plugins: Map<string, PluginInformation>;
1100
+ addPlugin(plugin: BasePlugin): void;
1101
+ removePlugin(plugin: BasePlugin): void;
1102
+ openPlugin(plugin: IconPlugin): Promise<boolean>;
1103
+ closePlugin(plugin: IconPlugin): Promise<boolean>;
1104
+ closeDrawerPluginByPosition(position: IconPluginPosition): Promise<boolean>;
1105
+ }
1106
+
1107
+ declare enum PluginEventType {
1108
+ ADD = "ADD",
1109
+ INSTALL = "INSTALL",
1110
+ ENABLE = "ENABLE",
1111
+ OPEN = "OPEN",
1112
+ CLOSE = "CLOSE",
1113
+ DISABLE = "DISABLE",
1114
+ UNINSTALL = "UNINSTALL",
1115
+ DEBUG = "DEBUG"
1116
+ }
1117
+
1118
+ declare interface PluginInformation {
1119
+ plugin: BasePlugin;
1120
+ root?: Root;
1121
+ iconButton?: HTMLSpanElement;
1122
+ }
1123
+
1124
+ export declare let pluginService: PluginServiceApi;
1125
+
1126
+ declare interface PluginServiceApi {
1127
+ /**
1128
+ * 是否为精简输出模式 不会针对每一个插件输出详细信息 (默认为 true)
1129
+ */
1130
+ DETAILED_LOG_MODE: boolean;
1131
+ /**
1132
+ * 所有已添加的插件状态
1133
+ */
1134
+ plugins: Map<string, PluginState>;
1135
+ createPreLoadedHook(id: string): void;
1136
+ completePreLoadedHook(id: string): void;
1137
+ createPreRenderedHook(id: string): void;
1138
+ completePreRenderedHook(id: string): void;
1139
+ /**
1140
+ * 获取插件状态
1141
+ *
1142
+ * @param id 插件 ID
1143
+ *
1144
+ * @returns 插件状态 没有找到则返回 undefined
1145
+ */
1146
+ get(id: string): PluginState | undefined;
1147
+ /**
1148
+ * 订阅插件服务事件 详情请见 {@link PluginServiceSubscriber}
1149
+ *
1150
+ * @param subscriber 订阅者
1151
+ *
1152
+ * @returns 取消订阅函数
1153
+ */
1154
+ subscribe(subscriber: PluginServiceSubscriber): () => void;
1155
+ /**
1156
+ * 取消订阅插件服务事件
1157
+ *
1158
+ * @param subscriber 订阅者
1159
+ */
1160
+ unsubscribe(subscriber: PluginServiceSubscriber): void;
1161
+ /**
1162
+ * 添加插件
1163
+ *
1164
+ * @param config 插件配置
1165
+ */
1166
+ add(config: PluginConfig): Promise<boolean>;
1167
+ /**
1168
+ * 安装插件
1169
+ *
1170
+ * @param plugin 插件实例
1171
+ */
1172
+ install(plugin: BasePlugin): Promise<void>;
1173
+ /**
1174
+ * 启用插件
1175
+ *
1176
+ * @param id 插件 ID
1177
+ */
1178
+ enable(id: string): Promise<void>;
1179
+ /**
1180
+ * 打开插件 (侧栏中的可开启项)
1181
+ *
1182
+ * @param id 插件 ID
1183
+ */
1184
+ open(id: string): Promise<void>;
1185
+ /**
1186
+ * 关闭插件
1187
+ *
1188
+ * @param id 插件 ID
1189
+ */
1190
+ close(id: string): Promise<void>;
1191
+ /**
1192
+ * 禁用插件
1193
+ *
1194
+ * @param id 插件 ID
1195
+ */
1196
+ disable(id: string): Promise<void>;
1197
+ /**
1198
+ * 卸载插件
1199
+ *
1200
+ * @param id 插件 ID
1201
+ */
1202
+ uninstall(id: string): Promise<void>;
1203
+ waitInstall(id: string): Promise<void>;
1204
+ waitEnable(id: string): Promise<void>;
1205
+ isOpenablePlugin(type: PluginType): boolean;
1206
+ isSideBarPlugin(type: PluginType): boolean;
1207
+ isViewPlugin(type: PluginType): boolean;
1208
+ }
1209
+
1210
+ /**
1211
+ * 插件服务订阅者
1212
+ *
1213
+ * @param id 插件id
1214
+ * @param type 事件类型
1215
+ */
1216
+ declare type PluginServiceSubscriber = (id: string, type: PluginEventType) => void;
1217
+
1218
+ declare interface PluginState {
1219
+ instance?: BasePlugin;
1220
+ element?: HTMLScriptElement;
1221
+ styleElement?: HTMLLinkElement;
1222
+ installed: boolean;
1223
+ enabled: boolean;
1224
+ debug?: boolean;
1225
+ }
1226
+
1227
+ declare enum PluginType {
1228
+ BUTTON = "BUTTON",
1229
+ SWITCH = "SWITCH",
1230
+ DRAWER = "DRAWER",
1231
+ DIALOG = "DIALOG",
1232
+ CONTENT = "CONTENT",
1233
+ WINDOW = "WINDOW",
1234
+ SERVICE = "SERVICE"
1235
+ }
1236
+
1237
+ export declare let ProgressBar: FunctionComponent<ProgressBarProps>;
1238
+
1239
+ declare interface ProgressBarProps extends default_2.HTMLAttributes<HTMLDivElement> {
1240
+ value?: number;
1241
+ indeterminate?: boolean;
1242
+ slowTransition?: boolean;
1243
+ innerClassName?: string;
1244
+ }
1245
+
1246
+ export declare let ResourcePreview: FunctionComponent<ResourcePreviewProps>;
1247
+
1248
+ declare interface ResourcePreviewProps extends DivProps {
1249
+ className?: string;
1250
+ mime?: string;
1251
+ preview?: string;
1252
+ }
1253
+
1254
+ export declare let resourceService: ResourceServiceApi;
1255
+
1256
+ declare interface ResourceServiceApi {
1257
+ PREVIEW_IMAGE_WIDTH: number;
1258
+ PREVIEW_IMAGE_HEIGHT: number;
1259
+ dragState: {
1260
+ fid: string;
1261
+ data: FileData | null;
1262
+ x: number;
1263
+ y: number;
1264
+ offsetX: number;
1265
+ offsetY: number;
1266
+ };
1267
+ upload(file: File, fid?: string): void;
1268
+ uploadMulti(fileList: FileList | File[] | File | null | undefined, check?: boolean, fidList?: string[]): void;
1269
+ addByOssUrl(ossUrl: string, name?: string, fid?: string, check?: boolean): Promise<string>;
1270
+ generateDescribeAndPreview(file: File): Promise<[string, File | null]>;
1271
+ generatePreviewFile(img: HTMLImageElement | HTMLVideoElement, name: string): Promise<File>;
1272
+ generateId(): string;
1273
+ }
1274
+
1275
+ export declare let rsAudioService: RsAudioServiceApi;
1276
+
1277
+ declare interface RsAudioServiceApi {
1278
+ processStepAudioMap(step: StoredRhineVar<RvStep>): void;
1279
+ fadeOutAndPauseAllAudio(): void;
1280
+ processAudioMap(audioMap: RvAudio | undefined, idKey: string): void;
1281
+ }
1282
+
1283
+ export declare let rsClick: RsClickApi;
1284
+
1285
+ declare interface RsClickApi {
1286
+ simplifyDoneList(delay: number): void;
1287
+ show(position: V3, color: string, timestamp: number, duration?: number, id?: string): void;
1288
+ }
1289
+
1290
+ export declare let RsdButton: FunctionComponent<RsdButtonProps>;
1291
+
1292
+ declare interface RsdButtonProps extends DivProps {
1293
+ onClick: MouseEventHandler<HTMLDivElement>;
1294
+ dashed?: boolean;
1295
+ text: string;
1296
+ tip?: string;
1297
+ icon?: string;
1298
+ iconSize?: number;
1299
+ single?: boolean;
1300
+ }
1301
+
1302
+ export declare let RsdCheckableButton: FunctionComponent<RsdCheckableButtonProps>;
1303
+
1304
+ declare interface RsdCheckableButtonProps extends DivPropsSimple {
1305
+ value: boolean;
1306
+ onChange: (value: boolean) => void;
1307
+ label: string;
1308
+ className?: string;
1309
+ theme?: string;
1310
+ children?: ReactNode;
1311
+ }
1312
+
1313
+ export declare let RsdCheckbox: FunctionComponent<RsdCheckboxProps>;
1314
+
1315
+ declare interface RsdCheckboxProps extends DivPropsSimple {
1316
+ value: boolean;
1317
+ onChange: (value: boolean) => void;
1318
+ label: string;
1319
+ className?: string;
1320
+ theme?: string;
1321
+ }
1322
+
1323
+ export declare let RsdColor: FunctionComponent<RsdColorProps>;
1324
+
1325
+ declare interface RsdColorProps extends DivPropsSimple {
1326
+ value: string;
1327
+ onChange: (value: string) => void;
1328
+ label: string;
1329
+ disableAlpha?: boolean;
1330
+ className?: string;
1331
+ theme?: string;
1332
+ }
1333
+
1334
+ export declare let RsdFileSelect: FunctionComponent<RsdFileSelectProps>;
1335
+
1336
+ export declare let RsdFileSelectButton: FunctionComponent<RsdFileSelectProps>;
1337
+
1338
+ declare interface RsdFileSelectProps extends DivPropsSimple {
1339
+ label: string;
1340
+ value: string;
1341
+ onChange: (value: string) => void;
1342
+ accept: string[];
1343
+ tip?: string;
1344
+ className?: string;
1345
+ theme?: ThemeColor;
1346
+ }
1347
+
1348
+ export declare let RsdInput: FunctionComponent<RsdInputProps>;
1349
+
1350
+ declare interface RsdInputProps extends DivPropsSimple {
1351
+ value: string;
1352
+ onChange: (value: string) => void;
1353
+ type?: 'text' | 'number' | 'password';
1354
+ placeholder?: string;
1355
+ className?: string;
1356
+ theme?: string;
1357
+ rows?: number;
1358
+ maxLength?: number;
1359
+ }
1360
+
1361
+ export declare let RsdMentions: FunctionComponent<RsdMentionsProps>;
1362
+
1363
+ declare interface RsdMentionsProps extends DivPropsSimple {
1364
+ value: string;
1365
+ onChange: (value: string) => void;
1366
+ type?: 'text' | 'number' | 'password';
1367
+ placeholder?: string;
1368
+ className?: string;
1369
+ theme?: string;
1370
+ rows?: number;
1371
+ }
1372
+
1373
+ export declare let RsdNone: FunctionComponent<RsdNoneProps>;
1374
+
1375
+ declare interface RsdNoneProps extends DivProps {
1376
+ label: string;
1377
+ className?: string;
1378
+ theme?: string;
1379
+ }
1380
+
1381
+ export declare let RsdNumber: FunctionComponent<RsdNumberProps>;
1382
+
1383
+ export declare let RsdNumberList: FunctionComponent<RsdNumberListProps>;
1384
+
1385
+ declare interface RsdNumberListProps extends DivProps {
1386
+ style?: React.CSSProperties;
1387
+ value: number[];
1388
+ keys: string[];
1389
+ onChangeIndex: (index: number, value: number | null) => void;
1390
+ min?: number;
1391
+ className?: string;
1392
+ theme?: string;
1393
+ shrink?: boolean;
1394
+ }
1395
+
1396
+ declare interface RsdNumberProps extends DivPropsSimple {
1397
+ value: number | null;
1398
+ onChange: (value: number | null) => void;
1399
+ label: string;
1400
+ placeholder?: string;
1401
+ className?: string;
1402
+ theme?: string;
1403
+ unit?: string;
1404
+ min?: number;
1405
+ max?: number;
1406
+ step?: number;
1407
+ }
1408
+
1409
+ export declare let RsdSelect: FunctionComponent<RsdSelectProps>;
1410
+
1411
+ declare interface RsdSelectProps<ValueType = string> extends DivPropsSimple {
1412
+ value: ValueType;
1413
+ defaultValue?: ValueType;
1414
+ options: {
1415
+ value: ValueType;
1416
+ label: string;
1417
+ }[];
1418
+ onChange: (value: ValueType) => void;
1419
+ label: string;
1420
+ className?: string;
1421
+ theme?: string;
1422
+ smallWidth?: boolean;
1423
+ }
1424
+
1425
+ export declare let RsdSwitch: FunctionComponent<RsdSwitchProps>;
1426
+
1427
+ declare interface RsdSwitchProps extends DivPropsSimple {
1428
+ value: boolean;
1429
+ onChange: (value: boolean) => void;
1430
+ label: string;
1431
+ className?: string;
1432
+ theme?: string;
1433
+ }
1434
+
1435
+ export declare let RsdTextarea: FunctionComponent<RsdInputProps>;
1436
+
1437
+ export declare let RsdTitle: FunctionComponent<RsdTitleProps>;
1438
+
1439
+ declare interface RsdTitleProps extends DivProps {
1440
+ title: string;
1441
+ className?: string;
1442
+ tip?: string;
1443
+ detail?: string;
1444
+ mt?: boolean;
1445
+ }
1446
+
1447
+ export declare let rsEnvironment: RsEnvironmentApi;
1448
+
1449
+ declare interface RsEnvironmentApi {
1450
+ mainCamera: ArcRotateCamera;
1451
+ rightCamera: ArcRotateCamera;
1452
+ backCamera: ArcRotateCamera;
1453
+ leftCamera: ArcRotateCamera;
1454
+ lights: Light[];
1455
+ shadow: ShadowGenerator;
1456
+ environmentTexture: CubeTexture;
1457
+ STANDARD_MODE: boolean;
1458
+ adjustCamera(models: AbstractMesh[] | AbstractMesh): void;
1459
+ getCameraInfo(): {
1460
+ target: {
1461
+ x: number;
1462
+ y: number;
1463
+ z: number;
1464
+ };
1465
+ alpha: number;
1466
+ beta: number;
1467
+ radius: number;
1468
+ };
1469
+ addShadows(meshes: AbstractMesh[] | AbstractMesh): void;
1470
+ initLight(): void;
1471
+ initFourCamera(camerasNode: TransformNode): void;
1472
+ setActiveCamera(isFour: boolean): void;
1473
+ normalizeCameraAngle(): void;
1474
+ setCameraDistance(distance: number): void;
1475
+ setBackgroundColor(color: Color3): void;
1476
+ getPositionToCameraDistance(p: V3 | Vector3): number;
1477
+ }
1478
+
1479
+ export declare let rsEnvironmentService: RsEnvironmentServiceApi;
1480
+
1481
+ declare interface RsEnvironmentServiceApi {
1482
+ updateEnvironment(path: RvPath, step: StoredRhineVar<RvStep>): void;
1483
+ getCurrentCameraLocation(): RvCameraLocation;
1484
+ }
1485
+
1486
+ export declare let rsLabelService: RsLabelServiceApi;
1487
+
1488
+ declare interface RsLabelServiceApi {
1489
+ labels: LabelInfo[];
1490
+ updateClick(nid: string | null | undefined): void;
1491
+ getLabel(nid: string): LabelInfo | null;
1492
+ ensureLabel(nid: string, node: TransformNode_2 | null): LabelInfo;
1493
+ removeLabel(nid: string): void;
1494
+ updateLabelWithNid(nid: string, rvLabel: RvLabel): void;
1495
+ }
1496
+
1497
+ export declare let rsLoopAnimationManager: RsLoopAnimationManagerApi;
1498
+
1499
+ declare interface RsLoopAnimationManagerApi {
1500
+ state: {
1501
+ enableInEditorMode: boolean;
1502
+ };
1503
+ restartAnimation(nid: string, resetLocation: boolean): void;
1504
+ startAllLoopAnimations(): void;
1505
+ startAnimationLoop(nid: string, node: TransformNode, data: RvLoop, locationData: RvLocation): void;
1506
+ stopAllLoopAnimations(resetLocation: boolean): void;
1507
+ stopAnimation(nid: string): void;
1508
+ makeTripAnimation(dis: number, speed: number, start: number, name: string, axis: string, fr: number): void;
1509
+ makeSpinAnimation(value: number, start: number, name: string, axis: string, fr: number): void;
1510
+ makeQuaternionAnimation(value: number, start: Vector3, name: string, axis: 'x' | 'y' | 'z', fr: number): void;
1511
+ }
1512
+
1513
+ export declare let rsMaterialService: RsMaterialServiceApi;
1514
+
1515
+ declare interface RsMaterialServiceApi {
1516
+ updateMaterial(nid: string, mesh: AbstractMesh, path: string[] | RvPath, value: unknown, rvMaterial: RvMaterial): void;
1517
+ updateGeneralMaterialSingle(mesh: AbstractMesh, path: RvPath, value: unknown): void;
1518
+ updatePBRMaterialSingle(mesh: AbstractMesh, material: PBRMaterial, path: RvPath, value: unknown): void;
1519
+ updateNodeMaterialSingle(material: NodeMaterial, path: RvPath, value: unknown, inputs: RvMaterialNodeInput[]): void;
1520
+ }
1521
+
1522
+ declare interface RsModel {
1523
+ mid: string;
1524
+ progress: number;
1525
+ status: RsModelStatus;
1526
+ node?: Node_2;
1527
+ }
1528
+
1529
+ export declare let rsModelService: RsModelServiceApi;
1530
+
1531
+ declare interface RsModelServiceApi {
1532
+ models: Map<string, RsModel>;
1533
+ get(mid: string): RsModel | undefined;
1534
+ has(mid: string): boolean;
1535
+ remove(mid: string): boolean;
1536
+ add(rsModel: RsModel): boolean;
1537
+ load(mid: string): Promise<void>;
1538
+ pause(mid: string): boolean;
1539
+ resume(mid: string): boolean;
1540
+ cancel(mid: string): boolean;
1541
+ subscribe(subscriber: RsModelServiceSubscriber): () => void;
1542
+ unsubscribe(subscriber: RsModelServiceSubscriber): void;
1543
+ subscribeSingle(mid: string, subscriber: RsModelServiceSubscriber): () => void;
1544
+ unsubscribeSingle(mid: string, subscriber: RsModelServiceSubscriber): void;
1545
+ publish(mid: string, type: RsModelServiceEventType, rsModel: RsModel): void;
1546
+ afterLoaded(mid: string, subscriber: (rsModel: RsModel) => void): void;
1547
+ waitLoaded(mid: string): Promise<RsModel>;
1548
+ /**
1549
+ * 是否已经载入完成
1550
+ *
1551
+ * @param mid 模型 mid
1552
+ *
1553
+ * @returns 返回模型是否载入完成 模型不存在则返回 undefined
1554
+ */
1555
+ isLoaded(mid: string): boolean | undefined;
1556
+ }
1557
+
1558
+ declare enum RsModelServiceEventType {
1559
+ ADD = "ADD",
1560
+ REMOVE = "REMOVE",
1561
+ START = "START",
1562
+ PROGRESS = "PROGRESS",
1563
+ PAUSE = "PAUSE",
1564
+ RESUME = "RESUME",
1565
+ LOADED = "LOADED",
1566
+ ERROR = "ERROR",
1567
+ CANCELED = "CANCELED"
1568
+ }
1569
+
1570
+ declare type RsModelServiceSubscriber = (type: RsModelServiceEventType, rsModel: RsModel) => void;
1571
+
1572
+ declare enum RsModelStatus {
1573
+ WAITING = "WAITING",
1574
+ LOADING = "LOADING",
1575
+ LOADED = "LOADED",
1576
+ ERROR = "ERROR",
1577
+ CANCELED = "CANCELED"
1578
+ }
1579
+
1580
+ export declare let rsNodeMaterialManager: RsNodeMaterialManagerApi;
1581
+
1582
+ declare interface RsNodeMaterialManagerApi {
1583
+ materials: NodeMaterialInfo[];
1584
+ has(nid: string): boolean;
1585
+ add(nid: string, fid: string, material: NodeMaterial): void;
1586
+ get(nid: string): NodeMaterialInfo | null;
1587
+ set(nid: string, fid: string, material: NodeMaterial): void;
1588
+ remove(nid: string): void;
1589
+ waitFid(nid: string, fid: string): Promise<void>;
1590
+ updateNodeMaterialTemplate(nid: string, fid: string, syncStateWhenCreate: boolean): Promise<boolean>;
1591
+ uploadNodeMaterialTemplate(nid: string, fid: string, material: NodeMaterial): void;
1592
+ nodeMaterialToFile(material: NodeMaterial): File;
1593
+ }
1594
+
1595
+ export declare let rsNodeService: RsNodeServiceApi;
1596
+
1597
+ declare interface RsNodeServiceApi {
1598
+ nodePairs: NodePair[];
1599
+ getInfoMapByNid(nid: string): NodePair | null;
1600
+ getInfoMapByUniqueId(uniqueId: number): NodePair | null;
1601
+ getNodeByNid(nid: string): Node_2 | null;
1602
+ getMidByNid(nid: string): string | null;
1603
+ getNidByUniqueId(uniqueId: number): string | null;
1604
+ getFidByMid(mid: string): string | null;
1605
+ getFidByNid(nid: string): string | null;
1606
+ subscribeNodePairs(subscriber: (pairs: NodePair[]) => void): () => void;
1607
+ unsubscribeNodePairs(subscriber: (pairs: NodePair[]) => void): void;
1608
+ }
1609
+
1610
+ export declare let rss: Record<string, string>;
1611
+
1612
+ export declare let rsSelection: RsSelectionApi;
1613
+
1614
+ declare interface RsSelectionApi {
1615
+ set(nid: string): void;
1616
+ add(nid: string): void;
1617
+ remove(nid: string): void;
1618
+ clear(): void;
1619
+ has(nid: string): boolean;
1620
+ get(nid: string): RsSelectionNodeInfo | null;
1621
+ }
1622
+
1623
+ declare interface RsSelectionMaterialInfo {
1624
+ allNumber: number;
1625
+ supportEditMaterialNumber: number;
1626
+ hasGeometryNumber: number;
1627
+ hasOtherMaterialNumber: number;
1628
+ hasChildrenNumber: number;
1629
+ isAbstractMeshNumber: number;
1630
+ }
1631
+
1632
+ declare interface RsSelectionNodeInfo {
1633
+ nid: string;
1634
+ nodeName: string;
1635
+ babylonNode: Node_2;
1636
+ uniqueId: number;
1637
+ mid: string;
1638
+ modelLoadName: string;
1639
+ rvModel: RvModel;
1640
+ isTransformNode: boolean;
1641
+ isAbstractMesh: boolean;
1642
+ isMesh: boolean;
1643
+ isCoordinateFlip: boolean;
1644
+ isCoordinateRotation: boolean;
1645
+ hasGeometry: boolean;
1646
+ isRoot: boolean;
1647
+ childrenNumber: number;
1648
+ supportQuaternion: boolean;
1649
+ animationNumber: number;
1650
+ skeletonNumber: number;
1651
+ hasMaterial: boolean;
1652
+ isSupportMaterial: boolean;
1653
+ supportEditMaterial: boolean;
1654
+ }
1655
+
1656
+ export declare let rsSelectionService: RsSelectionServiceApi;
1657
+
1658
+ declare interface RsSelectionServiceApi {
1659
+ state: RsSelectionState;
1660
+ changeBranchMode(value?: boolean, message?: boolean): void;
1661
+ click: (nid?: string, ctrl?: boolean) => void;
1662
+ set: (nid: string) => void;
1663
+ add: (nid: string) => void;
1664
+ remove: (nid: string) => void;
1665
+ clear: () => void;
1666
+ subscribe(subscriber: SelectedSubscriber): () => void;
1667
+ unsubscribe(subscriber: SelectedSubscriber): void;
1668
+ subscribeLast(subscriber: LastSubscriber): () => void;
1669
+ unsubscribeLast(subscriber: LastSubscriber): void;
1670
+ }
1671
+
1672
+ declare interface RsSelectionState {
1673
+ highlight: HighLightInfo[];
1674
+ selected: RsSelectionNodeInfo[];
1675
+ last: RsSelectionNodeInfo | null;
1676
+ branchMode: boolean;
1677
+ materialInfo: RsSelectionMaterialInfo;
1678
+ }
1679
+
1680
+ export declare let rsSeparateService: RsSeparateServiceApi;
1681
+
1682
+ declare interface RsSeparateServiceApi {
1683
+ get(nid: string, node?: Node_2): Promise<Material | null>;
1684
+ getWithEnsureType(nid: string, rvMaterial: RvMaterial, node?: Node_2): Promise<Material | null>;
1685
+ }
1686
+
1687
+ export declare let rsService: RsServiceApi;
1688
+
1689
+ declare interface RsServiceApi {
1690
+ canvas: HTMLCanvasElement | undefined;
1691
+ scene: Scene | undefined;
1692
+ engine: Engine | WebGPUEngine | undefined;
1693
+ experience: WebXRDefaultExperience | null;
1694
+ rendering: boolean;
1695
+ isSupportWebXR(): boolean;
1696
+ isWebXRInitialized(): boolean;
1697
+ enterVR(onInitialize: () => void): Promise<void>;
1698
+ }
1699
+
1700
+ export declare let rsTextureService: RsTextureServiceApi;
1701
+
1702
+ declare interface RsTextureServiceApi {
1703
+ get(fid: string): TextureInfo | null;
1704
+ getWhiteTexture(): DynamicTexture;
1705
+ getBlackTexture(): DynamicTexture;
1706
+ add(fid: string): Promise<TextureInfo | null>;
1707
+ getTexture(fid: string, without: number): Promise<Texture | null>;
1708
+ pushTexture(fid: string, texture: Texture, url: string): TextureInfo;
1709
+ remove(fid: string): void;
1710
+ }
1711
+
1712
+ declare interface RvAnimation {
1713
+ loop?: RvLoop;
1714
+ embedded?: RvNative;
1715
+ }
1716
+
1717
+ declare enum RvAttachType {
1718
+ TEXTURE = "TEXTURE",
1719
+ MATERIAL = "MATERIAL",
1720
+ UV = "UV"
1721
+ }
1722
+
1723
+ declare interface RvAttributes {
1724
+ location?: RvLocation;
1725
+ material?: RvMaterial;
1726
+ label?: RvLabel;
1727
+ animation?: RvAnimation;
1728
+ code?: RvCode;
1729
+ }
1730
+
1731
+ export declare let rvAttributesService: RvAttributesServiceApi;
1732
+
1733
+ declare interface RvAttributesServiceApi {
1734
+ forEach(callback: (attributes: RhineVarMap, sid: string) => void): void;
1735
+ forEachNode(nid: string, callback: (attributes: RhineVarMap, sid: string) => void): void;
1736
+ setToAllStep(nid: string, key: string, value: unknown): void;
1737
+ get(sid: string): RecursiveMap<RvAttributes> | undefined;
1738
+ getNode(sid: string, nid: string): StoredRhineVar<RvAttributes> | undefined;
1739
+ }
1740
+
1741
+ declare interface RvAudio {
1742
+ autoPlay: boolean;
1743
+ fid: string;
1744
+ loop: boolean;
1745
+ speed: number;
1746
+ volume: number;
1747
+ }
1748
+
1749
+ declare interface RvAwareness {
1750
+ clientId: number;
1751
+ user: RvAwarenessUser;
1752
+ device: RvAwarenessDevice;
1753
+ sid: string;
1754
+ meetingId: string;
1755
+ selected: string[];
1756
+ camera: RvCameraLocation;
1757
+ clicks: RvAwarenessClick[];
1758
+ window: RvAwarenessWindow;
1759
+ cursor: V3;
1760
+ openedDrawers: string[];
1761
+ }
1762
+
1763
+ declare interface RvAwarenessClick {
1764
+ position: V3;
1765
+ timestamp: number;
1766
+ }
1767
+
1768
+ declare interface RvAwarenessDevice {
1769
+ platform: string;
1770
+ }
1771
+
1772
+ declare interface RvAwarenessUser {
1773
+ name: string;
1774
+ color: string;
1775
+ avatar: string;
1776
+ uuid: string;
1777
+ }
1778
+
1779
+ declare interface RvAwarenessWindow {
1780
+ innerWidth: number;
1781
+ innerHeight: number;
1782
+ }
1783
+
1784
+ declare interface RvBase {
1785
+ global: RvGlobal;
1786
+ order: RhineVarArray<string>;
1787
+ steps: RhineVarMap<RvStep>;
1788
+ plugin: RvPlugin;
1789
+ files: RhineVarMap<RvFile>;
1790
+ resources: RhineVarMap<RvResource>;
1791
+ scene: RvSceneNode;
1792
+ models: RhineVarMap<RvModel>;
1793
+ separate: RvSeparate;
1794
+ history: RvHistory;
1795
+ meetings: RhineVarMap<RvMeeting>;
1796
+ version: RvVersion;
1797
+ }
1798
+
1799
+ declare interface RvBasicConfig {
1800
+ type: RvBasicType;
1801
+ args?: Record<string, number>;
1802
+ text?: string;
1803
+ }
1804
+
1805
+ declare enum RvBasicType {
1806
+ TEXT = "TEXT",
1807
+ CUBE = "CUBE",
1808
+ SPHERE = "SPHERE",
1809
+ CONE = "CONE",
1810
+ PRISM = "PRISM",
1811
+ POLYHEDRON = "POLYHEDRON",
1812
+ TORUS = "TORUS",
1813
+ CYLINDER = "CYLINDER",
1814
+ ICO_SPHERE = "ICO_SPHERE",
1815
+ CAPSULE = "CAPSULE",
1816
+ PLANE = "PLANE"
1817
+ }
1818
+
1819
+ declare interface RvCamera {
1820
+ enable: boolean;
1821
+ location: RvCameraLocation;
1822
+ config: {
1823
+ easy: boolean;
1824
+ distanceMin: number;
1825
+ distanceMax: number;
1826
+ fov: number;
1827
+ };
1828
+ }
1829
+
1830
+ declare interface RvCameraLocation {
1831
+ alpha: number;
1832
+ beta: number;
1833
+ radius: number;
1834
+ target: V3;
1835
+ }
1836
+
1837
+ declare interface RvCode {
1838
+ jumpTargetOnClick: string;
1839
+ }
1840
+
1841
+ export declare let rvCodeAttribute: RvCodeAttributeApi;
1842
+
1843
+ declare interface RvCodeAttributeApi {
1844
+ key: string;
1845
+ defaultValue: RvCode;
1846
+ generate(): RvCode;
1847
+ ensure(nid: string): boolean;
1848
+ }
1849
+
1850
+ declare interface RvConfiguration {
1851
+ information: {
1852
+ collapseDescription: boolean;
1853
+ description: string;
1854
+ favorite: boolean;
1855
+ group: string;
1856
+ };
1857
+ interval: {
1858
+ enable: boolean;
1859
+ enter: number;
1860
+ exit: number;
1861
+ };
1862
+ jump: {
1863
+ delay: number;
1864
+ onlyOnce: boolean;
1865
+ target: string;
1866
+ };
1867
+ ui: {
1868
+ theme: ThemeBackground;
1869
+ enableStepChangeButton: boolean;
1870
+ enableTopbar: boolean;
1871
+ hideStep: boolean;
1872
+ importantStep: boolean;
1873
+ };
1874
+ audio: RvAudio;
1875
+ secondAudio: RvAudio;
1876
+ }
1877
+
1878
+ declare interface RvEnvironment {
1879
+ skybox: {
1880
+ background: string;
1881
+ };
1882
+ light: {
1883
+ intensity: number;
1884
+ diffuseColor: string;
1885
+ specularColor: string;
1886
+ };
1887
+ ground: {
1888
+ opacityRate: number;
1889
+ baseColor: string;
1890
+ enableOnViewerMode: boolean;
1891
+ enableOnEditorMode: boolean;
1892
+ };
1893
+ shadow: {
1894
+ enable: boolean;
1895
+ darkness: number;
1896
+ blurOffset: number;
1897
+ blurScale: number;
1898
+ onlyOnGround: boolean;
1899
+ normalBias: number;
1900
+ };
1901
+ camera: RvCamera;
1902
+ fog: {
1903
+ enable: boolean;
1904
+ density: number;
1905
+ color: string;
1906
+ };
1907
+ }
1908
+
1909
+ declare interface RvFile {
1910
+ fid: string;
1911
+ type: RvFileType;
1912
+ name: string;
1913
+ size: number;
1914
+ mime: string;
1915
+ hash?: string;
1916
+ url: string;
1917
+ createdAt: number;
1918
+ updatedAt: number;
1919
+ uploading?: boolean;
1920
+ extra?: Record<string, unknown>;
1921
+ }
1922
+
1923
+ export declare let rvFileService: RvFileServiceApi;
1924
+
1925
+ declare interface RvFileServiceApi {
1926
+ /**
1927
+ * 存储所有文件的 RhineVar 对象
1928
+ */
1929
+ files: RecursiveMap<RvFile>;
1930
+ /**
1931
+ * 获取文件 不存在则返回 undefined
1932
+ *
1933
+ * @param fid 文件的 fid
1934
+ */
1935
+ get(fid: string): StoredRhineVar<RvFile> | undefined;
1936
+ /**
1937
+ * 通过 url 获取文件 不存在则返回 undefined
1938
+ *
1939
+ * @param url 文件的 url
1940
+ */
1941
+ getByUrl(url: string): StoredRhineVar<RvFile> | undefined;
1942
+ /**
1943
+ * 是否存在某个文件
1944
+ *
1945
+ * @param fid
1946
+ */
1947
+ has(fid: string): boolean;
1948
+ /**
1949
+ * 是否存在某个URL的文件
1950
+ *
1951
+ * @param url
1952
+ */
1953
+ hasUrl(url: string): boolean;
1954
+ /**
1955
+ * 添加一个文件
1956
+ *
1957
+ * @param file 文件内容
1958
+ */
1959
+ add(file: RvFile): Promise<StoredRhineVar<RvFile> | null>;
1960
+ /**
1961
+ * 通过url添加一个文件。
1962
+ *
1963
+ * 若该地址对应的文件已存在,则直接返回已存在的文件。
1964
+ *
1965
+ * @param url URL
1966
+ */
1967
+ addByUrl(url: string): Promise<StoredRhineVar<RvFile> | null>;
1968
+ /**
1969
+ * 移除一个文件
1970
+ *
1971
+ * @param fid 文件的 fid
1972
+ */
1973
+ remove(fid: string): boolean;
1974
+ /**
1975
+ * 订阅文件服务相关事件
1976
+ *
1977
+ * @param subscriber
1978
+ *
1979
+ * @returns 取消订阅函数
1980
+ */
1981
+ subscribe(subscriber: RvFileServiceSubscriber): () => void;
1982
+ /**
1983
+ * 移除订阅
1984
+ *
1985
+ * @param subscriber 订阅者
1986
+ */
1987
+ unsubscribe(subscriber: RvFileServiceSubscriber): void;
1988
+ /**
1989
+ * 订阅文件服务相关事件
1990
+ *
1991
+ * @param fid 文件的 fid
1992
+ * @param subscriber 订阅者
1993
+ *
1994
+ * @returns 取消订阅函数
1995
+ */
1996
+ subscribeSingle(fid: string, subscriber: RvFileServiceSubscriber): () => void;
1997
+ /**
1998
+ * 移除订阅
1999
+ *
2000
+ * @param fid 文件的 fid
2001
+ * @param subscriber 订阅者
2002
+ */
2003
+ unsubscribeSingle(fid: string, subscriber: RvFileServiceSubscriber): void;
2004
+ /**
2005
+ * 生成 Id
2006
+ */
2007
+ generateId(): string;
2008
+ /**
2009
+ * 查找相同文件
2010
+ *
2011
+ * @param file 文件
2012
+ *
2013
+ * @returns 返回相同文件的 fid 如果没有则返回 null
2014
+ */
2015
+ findSame(file: File): Promise<string | null>;
2016
+ }
2017
+
2018
+ declare enum RvFileServiceEventType {
2019
+ ADD = "ADD",
2020
+ REMOVE = "REMOVE"
2021
+ }
2022
+
2023
+ declare type RvFileServiceSubscriber = (type: RvFileServiceEventType, fid: string, rvFile?: RecursiveObject<RvFile>) => void;
2024
+
2025
+ declare enum RvFileType {
2026
+ OSS = "OSS",
2027
+ URL = "URL"
2028
+ }
2029
+
2030
+ declare interface RvGlobal {
2031
+ information: {
2032
+ title: string;
2033
+ description: string;
2034
+ tags: string;
2035
+ };
2036
+ ui: {
2037
+ theme: ThemeBackground;
2038
+ };
2039
+ playing: {
2040
+ auto: boolean;
2041
+ loop: boolean;
2042
+ interval: number;
2043
+ };
2044
+ support: {
2045
+ VR: boolean;
2046
+ AR: boolean;
2047
+ MR: boolean;
2048
+ HP: boolean;
2049
+ };
2050
+ }
2051
+
2052
+ export declare let rvGlobalService: RvGlobalServiceApi;
2053
+
2054
+ declare interface RvGlobalServiceApi {
2055
+ state: StoredRhineVar<RvGlobal>;
2056
+ }
2057
+
2058
+ declare interface RvHistory {
2059
+ white: number;
2060
+ }
2061
+
2062
+ declare interface RvLabel {
2063
+ enable: boolean;
2064
+ text: string;
2065
+ alwaysShow: boolean;
2066
+ }
2067
+
2068
+ export declare let rvLabelAttribute: RvLabelAttributeApi;
2069
+
2070
+ declare interface RvLabelAttributeApi {
2071
+ key: string;
2072
+ defaultValue: RvLabel;
2073
+ generate(): RvLabel;
2074
+ ensure(nid: string): boolean;
2075
+ get(sid: string, nid: string): RvLabel | undefined;
2076
+ }
2077
+
2078
+ declare interface RvLocation {
2079
+ position: V3;
2080
+ rotation?: V3;
2081
+ nearMode: boolean;
2082
+ scale: V3;
2083
+ rotationQuaternion?: V4;
2084
+ }
2085
+
2086
+ export declare let rvLocationAttribute: RvLocationAttributeApi;
2087
+
2088
+ declare interface RvLocationAttributeApi {
2089
+ key: string;
2090
+ defaultValue: RvLocation;
2091
+ generate(node: Node_2 | undefined | null): RvLocation;
2092
+ ensure(nid: string): boolean;
2093
+ }
2094
+
2095
+ declare interface RvLoop {
2096
+ rotationSpeed: V3;
2097
+ rotationPivot: V3;
2098
+ slideSpeed: V3;
2099
+ slideDistance: V3;
2100
+ }
2101
+
2102
+ export declare let rvLoopAttribute: RvLoopAttributeApi;
2103
+
2104
+ declare interface RvLoopAttributeApi {
2105
+ key: string;
2106
+ defaultValue: RvLoop;
2107
+ generate(): RvLoop;
2108
+ ensure(nid: string): boolean;
2109
+ }
2110
+
2111
+ declare interface RvMaterial {
2112
+ general: RvMaterialGeneral;
2113
+ preset: RvPresetType;
2114
+ pbr?: RvMaterialPBR;
2115
+ node?: RvMaterialNode;
2116
+ texture: RvMaterialTexture;
2117
+ }
2118
+
2119
+ export declare let rvMaterialAttribute: RvMaterialAttributeApi;
2120
+
2121
+ declare interface RvMaterialAttributeApi {
2122
+ key: string;
2123
+ defaultPBRValue: RvMaterialPBR;
2124
+ defaultNodeValue: RvMaterialNode;
2125
+ defaultTextureValue: RvMaterialTexture;
2126
+ defaultValue: RvMaterial;
2127
+ generateTexture(textureMap?: Map<string, BaseTexture>, material?: PBRMaterial | NodeMaterial): RvMaterialTexture;
2128
+ generatePBR(material?: PBRMaterial): RvMaterialPBR;
2129
+ generateNode(material?: NodeMaterial): RvMaterialNode;
2130
+ generate(nid: string): RvMaterial;
2131
+ ensure(nid: string): boolean;
2132
+ }
2133
+
2134
+ declare interface RvMaterialGeneral {
2135
+ type: RvMaterialType;
2136
+ isPickable: boolean;
2137
+ visibility: number;
2138
+ receiveShadows: boolean;
2139
+ isExtracted: boolean;
2140
+ }
2141
+
2142
+ declare interface RvMaterialNode {
2143
+ fid: string;
2144
+ inputs: RvMaterialNodeInput[];
2145
+ }
2146
+
2147
+ declare interface RvMaterialNodeInput {
2148
+ type: NodeMaterialBlockConnectionPointTypes;
2149
+ key: string;
2150
+ value: string | number;
2151
+ range?: [number, number];
2152
+ }
2153
+
2154
+ declare interface RvMaterialPBR {
2155
+ basic: {
2156
+ albedoColor: string;
2157
+ metallic: number;
2158
+ roughness: number;
2159
+ emissiveColor: string;
2160
+ alpha: number;
2161
+ };
2162
+ advance: {
2163
+ reflectivityColor: string;
2164
+ ambientColor: string;
2165
+ indexOfRefraction: number;
2166
+ metallicF0Factor: number;
2167
+ reflectionColor: string;
2168
+ };
2169
+ coat: {
2170
+ enable: boolean;
2171
+ intensity: number;
2172
+ roughness: number;
2173
+ indexOfRefraction: number;
2174
+ useRoughnessFromMainTexture: boolean;
2175
+ clearCoatTexture: string;
2176
+ roughnessTexture: string;
2177
+ bumpTexture: string;
2178
+ enableTint: boolean;
2179
+ tintColor: string;
2180
+ atDistance: number;
2181
+ tintThickness: number;
2182
+ };
2183
+ }
2184
+
2185
+ declare interface RvMaterialTexture {
2186
+ basic: {
2187
+ albedoTexture: string;
2188
+ metallicRoughnessTexture: string;
2189
+ bumpTexture: string;
2190
+ emissiveTexture: string;
2191
+ opacityTexture: string;
2192
+ ambientTexture: string;
2193
+ reflectionTexture: string;
2194
+ metallicReflectanceTexture: string;
2195
+ refractionTexture: string;
2196
+ reflectivityTexture: string;
2197
+ microSurfaceTexture: string;
2198
+ lightMapTexture: string;
2199
+ detailMapTexture: string;
2200
+ reflectanceTexture: string;
2201
+ tintTexture: string;
2202
+ };
2203
+ extra: {
2204
+ texture1: string;
2205
+ texture2: string;
2206
+ texture3: string;
2207
+ texture4: string;
2208
+ };
2209
+ }
2210
+
2211
+ declare enum RvMaterialType {
2212
+ NONE = "NONE",
2213
+ PBR = "PBR",
2214
+ STANDARD = "STANDARD",
2215
+ NODE = "NODE",
2216
+ OTHER = "OTHER",
2217
+ TERRAIN = "TERRAIN",
2218
+ FUR = "FUR",
2219
+ WATER = "WATER",
2220
+ LAVA = "LAVA",
2221
+ SKY = "SKY",
2222
+ BACKGROUND = "BACKGROUND",
2223
+ MULTI = "MULTI",
2224
+ SHADER = "SHADER"
2225
+ }
2226
+
2227
+ declare interface RvMeeting {
2228
+ meetingId: string;
2229
+ status: MeetingStatus;
2230
+ startTime: number;
2231
+ current: RvMeetingCurrent;
2232
+ statistic: RvMeetingStatistic;
2233
+ endTime?: number;
2234
+ }
2235
+
2236
+ declare interface RvMeetingCurrent {
2237
+ presenterId: number;
2238
+ state: {
2239
+ peopleCount: number;
2240
+ };
2241
+ config: {
2242
+ forceFollow: boolean;
2243
+ clickShareMode: ShareMode;
2244
+ cursorShareMode: ShareMode;
2245
+ };
2246
+ visitors: number[];
2247
+ }
2248
+
2249
+ declare interface RvMeetingStatistic {
2250
+ people: {
2251
+ total: number;
2252
+ };
2253
+ }
2254
+
2255
+ declare interface RvModel {
2256
+ mid: string;
2257
+ name: string;
2258
+ origin: RvModelOrigin;
2259
+ fid?: string;
2260
+ config?: RvBasicConfig | Record<string, unknown>;
2261
+ node?: string;
2262
+ }
2263
+
2264
+ declare enum RvModelOrigin {
2265
+ BASIC = "BASIC",
2266
+ PROVIDE = "PROVIDE",
2267
+ UPLOAD = "UPLOAD"
2268
+ }
2269
+
2270
+ export declare let rvModelService: RvModelServiceApi;
2271
+
2272
+ declare interface RvModelServiceApi {
2273
+ models: RecursiveMap<RvModel>;
2274
+ uploadMulti(fileList: FileList | File[] | File | null | undefined, check?: boolean): Promise<void>;
2275
+ addByFid(fid: string): string;
2276
+ get(mid: string): RecursiveObject<RvModel> | undefined;
2277
+ has(mid: string): boolean;
2278
+ hasFid(fid: string): boolean;
2279
+ add(model: RvModel): string;
2280
+ remove(mid: string): boolean;
2281
+ hasNode(mid: string): boolean;
2282
+ setNode(mid: string, node: string): boolean;
2283
+ generateId(): string;
2284
+ }
2285
+
2286
+ declare interface RvNative {
2287
+ enableAnimation: boolean;
2288
+ playTime: number;
2289
+ startFrame: number;
2290
+ endFrame: number;
2291
+ enableLoop: boolean;
2292
+ speedRatio: number;
2293
+ }
2294
+
2295
+ export declare let rvNativeAttribute: RvNativeAttributeApi;
2296
+
2297
+ declare interface RvNativeAttributeApi {
2298
+ key: string;
2299
+ defaultValue: RvNative;
2300
+ generate(nid: string): RvNative;
2301
+ ensure(nid: string): boolean;
2302
+ }
2303
+
2304
+ export declare let rvNodeMaterialAnalyzer: RvNodeMaterialAnalyzerApi;
2305
+
2306
+ declare interface RvNodeMaterialAnalyzerApi {
2307
+ /**
2308
+ * 确保当前材质的 RhineVar 对象包含节点材质信息 若没有则添加
2309
+ *
2310
+ * @param material {StoredRhineVar<RvMaterial>} 需操作的 RhineVar 材质数据对象
2311
+ * @Param nid {string}
2312
+ * @returns {Promise<boolean>} 是否添加了材质
2313
+ */
2314
+ ensure(material: StoredRhineVar<RvMaterial>, nid: string): Promise<boolean>;
2315
+ }
2316
+
2317
+ declare interface RvPlugin {
2318
+ config: RhineVarMap<RvPluginConfig>;
2319
+ debug: RhineVarMap<RvPluginDebug>;
2320
+ order: string[];
2321
+ }
2322
+
2323
+ declare interface RvPluginConfig {
2324
+ id: string;
2325
+ version: string | VersionPoint;
2326
+ enable: {
2327
+ viewer: EnableLevel;
2328
+ editor: EnableLevel;
2329
+ };
2330
+ }
2331
+
2332
+ declare interface RvPluginDebug {
2333
+ id: string;
2334
+ name: string;
2335
+ enable: boolean;
2336
+ url: string;
2337
+ hmr: string;
2338
+ css: boolean;
2339
+ }
2340
+
2341
+ declare enum RvPresetType {
2342
+ NONE = "NONE",
2343
+ METAL = "METAL",
2344
+ PLASTIC = "PLASTIC",
2345
+ GLASS = "GLASS",
2346
+ WOOD = "WOOD",
2347
+ MIRROR = "MIRROR",
2348
+ CRYSTAL = "CRYSTAL",
2349
+ PAINT = "PAINT",
2350
+ CLOTH = "CLOTH"
2351
+ }
2352
+
2353
+ declare interface RvResource {
2354
+ fid: string;
2355
+ name: string;
2356
+ type: RvResourceType;
2357
+ mime: string;
2358
+ preview?: string;
2359
+ description?: string;
2360
+ from?: {
2361
+ fid: string;
2362
+ type: RvAttachType;
2363
+ path: string;
2364
+ };
2365
+ createdAt: number;
2366
+ updatedAt: number;
2367
+ extra?: Record<string, unknown>;
2368
+ }
2369
+
2370
+ export declare let rvResourceService: RvResourceServiceApi;
2371
+
2372
+ declare interface RvResourceServiceApi {
2373
+ /**
2374
+ * 存储所有文件的 RhineVar 对象
2375
+ */
2376
+ resources: RecursiveMap<RvResource>;
2377
+ /**
2378
+ * 获取文件 不存在则返回 undefined
2379
+ *
2380
+ * @param fid 文件的 fid
2381
+ */
2382
+ get(fid: string): RecursiveObject<RvResource> | undefined;
2383
+ /**
2384
+ * 是否存在某个文件
2385
+ *
2386
+ * @param fid
2387
+ */
2388
+ has(fid: string): boolean;
2389
+ /**
2390
+ * 添加一个文件
2391
+ *
2392
+ * @param file 文件内容
2393
+ */
2394
+ add(file: RvResource): void;
2395
+ /**
2396
+ * 移除一个文件
2397
+ *
2398
+ * @param fid 文件的 fid
2399
+ */
2400
+ remove(fid: string): boolean;
2401
+ /**
2402
+ * 订阅文件服务相关事件
2403
+ *
2404
+ * @param subscriber
2405
+ *
2406
+ * @returns 取消订阅函数
2407
+ */
2408
+ subscribe(subscriber: RvResourceServiceSubscriber): () => void;
2409
+ /**
2410
+ * 移除订阅
2411
+ *
2412
+ * @param subscriber 订阅者
2413
+ */
2414
+ unsubscribe(subscriber: RvResourceServiceSubscriber): void;
2415
+ /**
2416
+ * 订阅文件服务相关事件
2417
+ *
2418
+ * @param fid 文件的 fid
2419
+ * @param subscriber 订阅者
2420
+ *
2421
+ * @returns 取消订阅函数
2422
+ */
2423
+ subscribeSingle(fid: string, subscriber: RvResourceServiceSubscriber): () => void;
2424
+ /**
2425
+ * 移除订阅
2426
+ *
2427
+ * @param fid 文件的 fid
2428
+ * @param subscriber 订阅者
2429
+ */
2430
+ unsubscribeSingle(fid: string, subscriber: RvResourceServiceSubscriber): void;
2431
+ /**
2432
+ * 生成 Id
2433
+ */
2434
+ generateId(): string;
2435
+ /**
2436
+ * 查找相同文件
2437
+ *
2438
+ * @param file 文件
2439
+ *
2440
+ * @returns 返回相同文件的 fid 如果没有则返回 null
2441
+ */
2442
+ findSame(file: File): Promise<string | null>;
2443
+ }
2444
+
2445
+ declare enum RvResourceServiceEventType {
2446
+ ADD = "ADD",
2447
+ REMOVE = "REMOVE"
2448
+ }
2449
+
2450
+ declare type RvResourceServiceSubscriber = (type: RvResourceServiceEventType, fid: string, rvResource?: RecursiveObject<RvResource>) => void;
2451
+
2452
+ declare enum RvResourceType {
2453
+ FILE = "FILE",
2454
+ ATTACH = "ATTACH"
2455
+ }
2456
+
2457
+ declare interface RvSceneNode {
2458
+ nid: string;
2459
+ children?: RvSceneNode[];
2460
+ }
2461
+
2462
+ declare interface RvSeparate {
2463
+ groups: RhineVarArray<RhineVarArray>;
2464
+ }
2465
+
2466
+ declare interface RvStep {
2467
+ name: string;
2468
+ sid: string;
2469
+ attributes: RhineVarMap;
2470
+ configuration: RvConfiguration;
2471
+ environment: RvEnvironment;
2472
+ }
2473
+
2474
+ export declare let rvStepService: RvStepServiceApi;
2475
+
2476
+ declare interface RvStepServiceApi {
2477
+ order: RecursiveArray<string>;
2478
+ steps: RecursiveMap<RvStep>;
2479
+ get(sid: string): RecursiveObject<RvStep> | undefined;
2480
+ add(from?: string, index?: number): string;
2481
+ move(sid: string, to: number): boolean;
2482
+ remove(sid: string): boolean;
2483
+ getStepOptions(withDisable?: boolean): StepOptions;
2484
+ getStepIndex(sid: string): number;
2485
+ getStepByIndex(index: number): StoredRhineVar<RvStep> | undefined;
2486
+ getCurrentStep(): StoredRhineVar<RvStep> | undefined;
2487
+ generateId(): string;
2488
+ }
2489
+
2490
+ declare interface RvVersion {
2491
+ code: number;
2492
+ label: string;
2493
+ }
2494
+
2495
+ export declare let sceneService: SceneServiceApi;
2496
+
2497
+ declare interface SceneServiceApi {
2498
+ dragState: {
2499
+ nid: string;
2500
+ x: number;
2501
+ y: number;
2502
+ offsetX: number;
2503
+ offsetY: number;
2504
+ };
2505
+ }
2506
+
2507
+ declare interface Screen_2 {
2508
+ size: ScreenSize;
2509
+ scale: number;
2510
+ shadowAround: boolean;
2511
+ focusMode: FocusMode;
2512
+ showBabylonConsole: boolean;
2513
+ }
2514
+
2515
+ declare enum ScreenSize {
2516
+ XS = "XS",
2517
+ SM = "SM",
2518
+ MD = "MD",
2519
+ LG = "LG",
2520
+ XL = "XL"
2521
+ }
2522
+
2523
+ export declare let ScrollBar: FunctionComponent<ScrollBarProps>;
2524
+
2525
+ declare interface ScrollBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
2526
+ children: ReactNode | undefined;
2527
+ className?: string;
2528
+ innerClassName?: string;
2529
+ barPaddingStart?: string;
2530
+ barPaddingEnd?: string;
2531
+ }
2532
+
2533
+ declare type SelectedSubscriber = (value: RsSelectionNodeInfo[]) => void;
2534
+
2535
+ export declare let shadowAnimation: ShadowAnimationApi;
2536
+
2537
+ declare interface ShadowAnimationApi {
2538
+ play(data: {
2539
+ enable?: boolean;
2540
+ darkness?: number;
2541
+ blurOffset?: number;
2542
+ blurScale?: number;
2543
+ onlyOnGround?: boolean;
2544
+ normalBias?: number;
2545
+ }, duration?: number, quickMode?: boolean): void;
2546
+ enable(value: boolean, duration?: number, quickMode?: boolean): void;
2547
+ darkness(value: number, duration?: number, quickMode?: boolean): void;
2548
+ blurOffset(value: number, duration?: number, quickMode?: boolean): void;
2549
+ blurScale(value: number, duration?: number, quickMode?: boolean): void;
2550
+ onlyOnGround(value: boolean, duration?: number, quickMode?: boolean): void;
2551
+ normalBias(value: number, duration?: number, quickMode?: boolean): void;
2552
+ }
2553
+
2554
+ declare enum ShareMode {
2555
+ NONE = "NONE",
2556
+ SELF = "SELF",
2557
+ ALL = "ALL"
2558
+ }
2559
+
2560
+ export declare let skyboxAnimation: SkyboxAnimationApi;
2561
+
2562
+ declare interface SkyboxAnimationApi {
2563
+ play(data: {
2564
+ background?: string;
2565
+ }, duration?: number, quickMode?: boolean): void;
2566
+ background(color: Color4 | Color3 | string, duration?: number, quickMode?: boolean): void;
2567
+ }
2568
+
2569
+ export declare let sleep: (time: number) => Promise<void>;
2570
+
2571
+ export declare let spaceService: SpaceServiceApi;
2572
+
2573
+ declare interface SpaceServiceApi {
2574
+ page: Page;
2575
+ screen: Screen_2;
2576
+ subscribeStepChange(subscriber: StepChangeSubscriber): void;
2577
+ unsubscribeStepChange(subscriber: StepChangeSubscriber): void;
2578
+ setScreenSize(size: ScreenSize): void;
2579
+ isEditorPage(type?: PageType): boolean;
2580
+ isBoxMode(mode?: PageMode): boolean;
2581
+ isFullMode(mode?: PageMode): boolean;
2582
+ }
2583
+
2584
+ declare type SpanProps = DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
2585
+
2586
+ declare interface Status {
2587
+ Authenticated: boolean;
2588
+ DataSynchronized: boolean;
2589
+ SyncInitialized: boolean;
2590
+ RsInitialized: boolean;
2591
+ AllInitialized: boolean;
2592
+ PluginEnabled: boolean;
2593
+ PluginPreLoaded: boolean;
2594
+ FileLoaded: boolean;
2595
+ ModelLoaded: boolean;
2596
+ PluginPreRendered: boolean;
2597
+ Rendered: boolean;
2598
+ Shown: boolean;
2599
+ }
2600
+
2601
+ declare type StatusChangeSubscriber = (value: boolean) => void;
2602
+
2603
+ export declare let statusService: StatusServiceApi;
2604
+
2605
+ declare interface StatusServiceApi {
2606
+ status: Status;
2607
+ subscribeAuthenticated(subscriber: StatusChangeSubscriber): () => void;
2608
+ unsubscribeAuthenticated(subscriber: StatusChangeSubscriber): void;
2609
+ afterAuthenticated(subscriber: StatusChangeSubscriber): void;
2610
+ waitAuthenticated(): Promise<boolean>;
2611
+ subscribeDataSynchronized(subscriber: StatusChangeSubscriber): () => void;
2612
+ unsubscribeDataSynchronized(subscriber: StatusChangeSubscriber): void;
2613
+ afterDataSynchronized(subscriber: StatusChangeSubscriber): void;
2614
+ waitDataSynchronized(): Promise<boolean>;
2615
+ subscribeSyncInitialized(subscriber: StatusChangeSubscriber): () => void;
2616
+ unsubscribeSyncInitialized(subscriber: StatusChangeSubscriber): void;
2617
+ afterSyncInitialized(subscriber: StatusChangeSubscriber): void;
2618
+ waitSyncInitialized(): Promise<boolean>;
2619
+ subscribeRsInitialized(subscriber: StatusChangeSubscriber): () => void;
2620
+ unsubscribeRsInitialized(subscriber: StatusChangeSubscriber): void;
2621
+ afterRsInitialized(subscriber: StatusChangeSubscriber): void;
2622
+ waitRsInitialized(): Promise<boolean>;
2623
+ subscribeAllInitialized(subscriber: StatusChangeSubscriber): () => void;
2624
+ unsubscribeAllInitialized(subscriber: StatusChangeSubscriber): void;
2625
+ afterAllInitialized(subscriber: StatusChangeSubscriber): void;
2626
+ waitAllInitialized(): Promise<boolean>;
2627
+ subscribePluginEnabled(subscriber: StatusChangeSubscriber): () => void;
2628
+ unsubscribePluginEnabled(subscriber: StatusChangeSubscriber): void;
2629
+ afterPluginEnabled(subscriber: StatusChangeSubscriber): void;
2630
+ waitPluginEnabled(): Promise<boolean>;
2631
+ subscribePluginPreLoaded(subscriber: StatusChangeSubscriber): () => void;
2632
+ unsubscribePluginPreLoaded(subscriber: StatusChangeSubscriber): void;
2633
+ afterPluginPreLoaded(subscriber: StatusChangeSubscriber): void;
2634
+ waitPluginPreLoaded(): Promise<boolean>;
2635
+ subscribeFileLoaded(subscriber: StatusChangeSubscriber): () => void;
2636
+ unsubscribeFileLoaded(subscriber: StatusChangeSubscriber): void;
2637
+ afterFileLoaded(subscriber: StatusChangeSubscriber): void;
2638
+ waitFileLoaded(): Promise<boolean>;
2639
+ subscribeModelLoaded(subscriber: StatusChangeSubscriber): () => void;
2640
+ unsubscribeModelLoaded(subscriber: StatusChangeSubscriber): void;
2641
+ afterModelLoaded(subscriber: StatusChangeSubscriber): void;
2642
+ waitModelLoaded(): Promise<boolean>;
2643
+ subscribePluginPreRendered(subscriber: StatusChangeSubscriber): () => void;
2644
+ unsubscribePluginPreRendered(subscriber: StatusChangeSubscriber): void;
2645
+ afterPluginPreRendered(subscriber: StatusChangeSubscriber): void;
2646
+ waitPluginPreRendered(): Promise<boolean>;
2647
+ subscribeRendered(subscriber: StatusChangeSubscriber): () => void;
2648
+ unsubscribeRendered(subscriber: StatusChangeSubscriber): void;
2649
+ afterRendered(subscriber: StatusChangeSubscriber): void;
2650
+ waitRendered(): Promise<boolean>;
2651
+ subscribeShown(subscriber: StatusChangeSubscriber): () => void;
2652
+ unsubscribeShown(subscriber: StatusChangeSubscriber): void;
2653
+ afterShown(subscriber: StatusChangeSubscriber): void;
2654
+ waitShown(): Promise<boolean>;
2655
+ }
2656
+
2657
+ declare type StepChangeSubscriber = (sid: string, step: StoredRhineVar<RvStep>, lastSid: string, lastStep: RvStep | undefined) => void;
2658
+
2659
+ declare type StepOptions = {
2660
+ label: string;
2661
+ value: string;
2662
+ }[];
2663
+
2664
+ declare type SupportAnimationTarget = Node_2 | Scene | Material | NodeMaterialBlock | ShadowGenerator;
2665
+
2666
+ export declare let syncService: SyncServiceApi;
2667
+
2668
+ declare interface SyncServiceApi {
2669
+ state: StoredRhineVar<RvBase>;
2670
+ clientId: number;
2671
+ generateId(prefix: string): string;
2672
+ reset(): boolean;
2673
+ }
2674
+
2675
+ export declare let tAttributesService: TAttributesServiceApi;
2676
+
2677
+ declare interface TAttributesServiceApi {
2678
+ sid: string;
2679
+ nid: string;
2680
+ state: StoredRhineVar<RvAttributes> | null;
2681
+ subscribe(subscriber: TAttributesSubscriber): () => void;
2682
+ unsubscribe(subscriber: TAttributesSubscriber): void;
2683
+ set<T>(path: string | RvPath, value: T): void;
2684
+ get<T>(path: string | RvPath): T | null;
2685
+ }
2686
+
2687
+ declare type TAttributesSubscriber = (type: TChangeType, path: RvPath, value: unknown, oldValue: unknown, sid: string, nid: string, nodeAttributes: StoredRhineVar<RvAttributes> | null) => void;
2688
+
2689
+ declare enum TChangeType {
2690
+ SYNC = "SYNC",
2691
+ STEP = "STEP",
2692
+ SELECT = "SELECT",
2693
+ ADD = "ADD",
2694
+ UPDATE = "UPDATE",
2695
+ DELETE = "DELETE"
2696
+ }
2697
+
2698
+ declare interface TextureInfo {
2699
+ fid: string;
2700
+ localUrl: string;
2701
+ texture: Texture;
2702
+ }
2703
+
2704
+ declare enum ThemeBackground {
2705
+ DEFAULT = "DEFAULT",
2706
+ BACKGROUND = "BACKGROUND",
2707
+ LIGHT = "LIGHT",
2708
+ DARK = "DARK"
2709
+ }
2710
+
2711
+ declare enum ThemeColor {
2712
+ GREEN = "GREEN",
2713
+ PURPLE = "PURPLE",
2714
+ BLUE = "BLUE",
2715
+ PINK = "PINK"
2716
+ }
2717
+
2718
+ export declare let ThemeProvider: FunctionComponent<ThemeProviderProps>;
2719
+
2720
+ declare interface ThemeProviderProps {
2721
+ children?: React.ReactNode;
2722
+ color?: ThemeColor;
2723
+ background?: ThemeBackground;
2724
+ }
2725
+
2726
+ export declare let themeService: ThemeServiceApi;
2727
+
2728
+ declare interface ThemeServiceApi {
2729
+ state: ThemeState;
2730
+ isDarkTheme(): boolean;
2731
+ updateBackground(): void;
2732
+ updateBackgroundByColor(color: string): void;
2733
+ }
2734
+
2735
+ declare enum ThemeShape {
2736
+ GENERAL = "GENERAL",
2737
+ RHINE = "RHINE"
2738
+ }
2739
+
2740
+ declare interface ThemeState {
2741
+ background: ThemeBackground;
2742
+ color: ThemeColor;
2743
+ shape: ThemeShape;
2744
+ }
2745
+
2746
+ declare type Translator = (strings: TemplateStringsArray, ...values: unknown[]) => string;
2747
+
2748
+ export declare let tStepService: TStepServiceApi;
2749
+
2750
+ declare interface TStepServiceApi {
2751
+ sid: string;
2752
+ state: StoredRhineVar<RvStep>;
2753
+ subscribe(subscriber: TSubscriber): () => void;
2754
+ unsubscribe(subscriber: TSubscriber): void;
2755
+ set(path: string | RvPath, value: unknown): void;
2756
+ get(path: string | RvPath): unknown;
2757
+ subscribeAttributes(subscriber: TAttributesSubscriber): () => void;
2758
+ unsubscribeAttributes(subscriber: TAttributesSubscriber): void;
2759
+ }
2760
+
2761
+ declare type TSubscriber = (type: TChangeType, path: RvPath, value: unknown, oldValue: unknown, sid: string) => void;
2762
+
2763
+ export declare let UploadButtonAndList: FunctionComponent<UploadButtonAndListProps>;
2764
+
2765
+ declare interface UploadButtonAndListProps {
2766
+ uploadText: string;
2767
+ accept: string[];
2768
+ modelMode?: boolean;
2769
+ }
2770
+
2771
+ declare type UseBase = <T = unknown>(path?: string) => {
2772
+ state: T;
2773
+ set: (key: string | RvPath, value: unknown) => void;
2774
+ check: (key: string | RvPath) => void;
2775
+ };
2776
+
2777
+ export declare let useBase: UseBase;
2778
+
2779
+ declare interface UserAuth {
2780
+ token: string;
2781
+ refreshToken: string;
2782
+ ip: string;
2783
+ timestamp: number;
2784
+ }
2785
+
2786
+ declare interface UserInfo {
2787
+ uid: string;
2788
+ name: string;
2789
+ phone: string;
2790
+ description: string;
2791
+ headIcon: string;
2792
+ permission: string;
2793
+ }
2794
+
2795
+ export declare let userService: UserServiceApi;
2796
+
2797
+ declare interface UserServiceApi {
2798
+ auth: UserAuth;
2799
+ info: UserInfo;
2800
+ clear(): void;
2801
+ }
2802
+
2803
+ declare type UseStepOptions = () => StepOptions;
2804
+
2805
+ export declare let useStepOptions: UseStepOptions;
2806
+
2807
+ declare type UseTAttributes = <T = unknown>(path?: string) => {
2808
+ sid: string;
2809
+ nid: string;
2810
+ state: T | null;
2811
+ set: (key: string | RvPath, value: unknown) => void;
2812
+ check: (key: string | RvPath) => void;
2813
+ };
2814
+
2815
+ export declare let useTAttributes: UseTAttributes;
2816
+
2817
+ declare type UseTranslations = (namespace: string) => (key: string) => string;
2818
+
2819
+ export declare let useTranslations: UseTranslations;
2820
+
2821
+ declare type UseTStep = <T = unknown>(path?: string) => {
2822
+ sid: string;
2823
+ state: T;
2824
+ set: (key: string | RvPath, value: unknown) => void;
2825
+ check: (key: string | RvPath) => void;
2826
+ };
2827
+
2828
+ export declare let useTStep: UseTStep;
2829
+
2830
+ declare interface V3 {
2831
+ x: number;
2832
+ y: number;
2833
+ z: number;
2834
+ }
2835
+
2836
+ declare interface V4 {
2837
+ x: number;
2838
+ y: number;
2839
+ z: number;
2840
+ w: number;
2841
+ }
2842
+
2843
+ declare enum VersionPoint {
2844
+ LATEST_STABLE = "LATEST_STABLE",
2845
+ LATEST_NIGHTLY = "LATEST_NIGHTLY",
2846
+ LATEST_CANARY = "LATEST_CANARY"
2847
+ }
30
2848
 
31
2849
  export { }