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