@wonderlandengine/editor-api 1.2.3-dev.2 → 1.3.1

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/data.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export declare let data: EditorData;
1
2
  /** Object reference */
2
3
  export type ObjectReference = string | null;
3
4
  /** Mesh reference */
@@ -25,23 +26,39 @@ export declare enum ProjectType {
25
26
  Website = "website",
26
27
  Game = "game"
27
28
  }
29
+ export declare function toValue(value: any): any;
30
+ export declare class Access {
31
+ exists?: (key: string) => boolean;
32
+ keys(): string[];
33
+ values(): any[];
34
+ entries(): [string, any][];
35
+ toValue(): Object;
36
+ toJSON(): Object;
37
+ [Symbol.iterator](): IterableIterator<[string, any]>;
38
+ }
28
39
  /** Project settings */
29
- export declare class ProjectSettings {
40
+ export declare class ProjectSettings extends Access {
30
41
  name: string;
31
42
  description: string;
32
43
  type: ProjectType;
33
44
  customIndexHtml: boolean;
34
45
  extraFilesFolder: string;
35
- packageForStreaming: boolean;
46
+ prefab: boolean;
36
47
  version: number[];
48
+ maxTexturesBinSize: number;
49
+ }
50
+ /** Workspace settings */
51
+ export interface WorkspaceSettings extends Access {
52
+ main: string | null;
53
+ files: string[];
37
54
  }
38
55
  /** Sky settings */
39
- export declare class SkySettings {
56
+ export declare class SkySettings extends Access {
40
57
  enabled: boolean;
41
58
  material: MaterialReference;
42
59
  }
43
60
  /** Bloom settings */
44
- export declare class BloomSettings {
61
+ export declare class BloomSettings extends Access {
45
62
  enabled: boolean;
46
63
  passes: number;
47
64
  threshold: number;
@@ -64,12 +81,12 @@ export declare enum TonemappingMode {
64
81
  Exponential = "exponential"
65
82
  }
66
83
  /** HDR settings */
67
- export declare class HdrSettings {
84
+ export declare class HdrSettings extends Access {
68
85
  exposure: number;
69
86
  tonemapping: TonemappingMode;
70
87
  }
71
88
  /** Texture streaming settings */
72
- export declare class TextureStreamingSettings {
89
+ export declare class TextureStreamingSettings extends Access {
73
90
  maxCacheSize: number;
74
91
  maxUploadPerFrame: number;
75
92
  }
@@ -80,7 +97,7 @@ export declare enum EnvironmentMode {
80
97
  SphericalHarmonic2 = "spherical-harmonic-2"
81
98
  }
82
99
  /** Environment settings */
83
- export declare class EnvironmentSettings {
100
+ export declare class EnvironmentSettings extends Access {
84
101
  enabled: boolean;
85
102
  image: ImageReference;
86
103
  mode: EnvironmentMode;
@@ -90,7 +107,7 @@ export declare class EnvironmentSettings {
90
107
  maxSpecularEnvironmentSize: number;
91
108
  }
92
109
  /** Rendering settings */
93
- export declare class RenderingSettings {
110
+ export declare class RenderingSettings extends Access {
94
111
  api: 'webgl2' | 'webgpu-or-webgl2';
95
112
  textureAtlasSize: number[];
96
113
  compressedTextureAtlasSize: number[];
@@ -99,6 +116,7 @@ export declare class RenderingSettings {
99
116
  usePreZ: boolean;
100
117
  useMultiDraw: boolean;
101
118
  useFrustumCulling: boolean;
119
+ useTextureStreaming: boolean;
102
120
  sky: SkySettings;
103
121
  bloom: BloomSettings;
104
122
  hdr: HdrSettings;
@@ -107,46 +125,29 @@ export declare class RenderingSettings {
107
125
  maxTextures: number;
108
126
  }
109
127
  /** Camera settings */
110
- export declare class CameraSettings {
128
+ export declare class CameraSettings extends Access {
111
129
  near: number;
112
130
  far: number;
113
131
  }
114
132
  /** Editor settings */
115
- export declare class EditorSettings {
133
+ export declare class EditorSettings extends Access {
116
134
  serverPort: number;
117
135
  serverCOEP: string;
118
136
  camera: CameraSettings;
119
137
  ids: string;
138
+ pluginsPaths: string[];
120
139
  package: {
121
140
  packageUnusedMeshes: boolean;
141
+ packageUnusedAnimations: boolean;
122
142
  supercompressionLevel: number;
123
143
  };
144
+ importPhysicalAsPhongMaterials: boolean;
124
145
  }
125
146
  /** Plugins settings */
126
- export declare class PluginsSettings {
127
- }
128
- /** WebXR feature flags */
129
- export interface WebXRFeatureFlags {
130
- local: boolean;
131
- 'local-floor': boolean;
132
- 'bounded-floor': boolean;
133
- unbounded: boolean;
134
- 'hand-tracking': boolean;
135
- 'hit-test': boolean;
136
- 'plane-detection': boolean;
137
- 'light-estimation': boolean;
138
- anchors: boolean;
139
- occlusion: boolean;
140
- 'marker-tracking': boolean;
141
- extraFeatures: string;
142
- }
143
- /** WebXR settings */
144
- export declare class WebXRSettings {
145
- optionalFeatures: WebXRFeatureFlags;
146
- requiredFeatures: WebXRFeatureFlags;
147
+ export declare class PluginsSettings extends Access {
147
148
  }
148
149
  /** PWA settings */
149
- export declare class PWASettings {
150
+ export declare class PWASettings extends Access {
150
151
  enable: boolean;
151
152
  customServiceWorker: boolean;
152
153
  customManifest: boolean;
@@ -155,7 +156,7 @@ export declare class PWASettings {
155
156
  appIcon: ImageReference;
156
157
  }
157
158
  /** Runtime settings */
158
- export declare class RuntimeSettings {
159
+ export declare class RuntimeSettings extends Access {
159
160
  visualizeColliders: boolean;
160
161
  visualizePhysX: boolean;
161
162
  visualizeOverdraw: boolean;
@@ -163,7 +164,6 @@ export declare class RuntimeSettings {
163
164
  googleAnalyticsSecondary: string;
164
165
  enableRuntimeGltf: boolean;
165
166
  viewObject: ObjectReference;
166
- webxr: WebXRSettings;
167
167
  xrButtonColor: string;
168
168
  pwa: PWASettings;
169
169
  }
@@ -174,24 +174,66 @@ export declare enum BundlingType {
174
174
  Npm = "npm"
175
175
  }
176
176
  /** Scripting settings */
177
- export declare class ScriptingSettings {
177
+ export declare class ScriptingSettings extends Access {
178
178
  sourcePaths: never[];
179
179
  libraryPaths: never[];
180
- bundlingType: BundlingType;
181
- npmScript: string;
182
- esbuildFlags: string;
183
- esbuildFlagsEditor: string;
184
- entryPoint: string;
180
+ materialDefinitions: string | null;
181
+ components: {
182
+ bundling: string;
183
+ npmScript: string;
184
+ esbuildFlags: string;
185
+ entryPoint: string;
186
+ output: string | null;
187
+ };
188
+ application: {
189
+ bundling: string;
190
+ npmScript: string;
191
+ esbuildFlags: string;
192
+ entryPoint: string;
193
+ output: string | null;
194
+ };
185
195
  }
186
196
  /** VR settings */
187
- export declare class VRSettings {
197
+ export declare class VRSettings extends Access {
188
198
  enable: boolean;
189
- rightEyeObject: ObjectReference;
190
- leftEyeObject: ObjectReference;
199
+ }
200
+ /** AR settings */
201
+ export declare class ARSettings extends Access {
202
+ enable: boolean;
203
+ }
204
+ /** WebXR feature flags */
205
+ export interface WebXRFeatureFlags {
206
+ 'local': boolean;
207
+ 'local-floor': boolean;
208
+ 'bounded-floor': boolean;
209
+ 'unbounded': boolean;
210
+ 'hand-tracking': boolean;
211
+ 'hit-test': boolean;
212
+ 'plane-detection': boolean;
213
+ 'light-estimation': boolean;
214
+ 'anchors': boolean;
215
+ 'occlusion': boolean;
216
+ 'marker-tracking': boolean;
217
+ }
218
+ /** WebXR settings */
219
+ export declare class WebXRSettings extends Access {
191
220
  framebufferScaleFactor: number;
221
+ offerSession: boolean;
222
+ optionalFeatures: WebXRFeatureFlags;
223
+ optionalFeaturesExtra: string;
224
+ requiredFeatures: WebXRFeatureFlags;
225
+ requiredFeaturesExtra: string;
226
+ }
227
+ /** XR settings */
228
+ export declare class XRSettings extends Access {
229
+ vr: VRSettings;
230
+ ar: ARSettings;
231
+ webxr: WebXRSettings;
232
+ leftEyeObject: ObjectReference;
233
+ rightEyeObject: ObjectReference;
192
234
  }
193
235
  /** Physics settings */
194
- export declare class PhysXSettings {
236
+ export declare class PhysXSettings extends Access {
195
237
  enable: boolean;
196
238
  maxTimestep: number;
197
239
  contactOffset: number;
@@ -210,27 +252,23 @@ export declare class PhysXSettings {
210
252
  lengthToleranceScale: number;
211
253
  speedToleranceScale: number;
212
254
  }
213
- /** AR settings */
214
- export declare class ARSettings {
215
- enable: boolean;
216
- }
217
255
  /** Localization settings */
218
- export declare class LocalizationSettings {
256
+ export declare class LocalizationSettings extends Access {
219
257
  enableZipCompression: boolean;
220
258
  format: 'i18next';
221
259
  languagesFolder: string;
222
260
  defaultLanguage: string;
223
261
  }
224
262
  /** Settings for the currently open project */
225
- export declare class Settings {
263
+ export interface Settings extends Access {
226
264
  project: ProjectSettings;
265
+ workspace: WorkspaceSettings;
227
266
  rendering: RenderingSettings;
228
267
  editor: EditorSettings;
229
268
  runtime: RuntimeSettings;
230
269
  scripting: ScriptingSettings;
231
270
  plugins: PluginsSettings;
232
- vr: VRSettings;
233
- ar: ARSettings;
271
+ xr: XRSettings;
234
272
  physx: PhysXSettings;
235
273
  localization: LocalizationSettings;
236
274
  }
@@ -240,18 +278,25 @@ export declare enum ImageCompressionType {
240
278
  ETC1s = "etc1s",
241
279
  UASTC = "uastc"
242
280
  }
281
+ export declare class Link extends Access {
282
+ name: string;
283
+ file: string;
284
+ }
285
+ export declare class Resource extends Access {
286
+ name: string;
287
+ link: Link | null;
288
+ packageAlways: boolean;
289
+ }
243
290
  /** Image resource */
244
- export declare class ImageResource {
291
+ export declare class ImageResource extends Resource {
245
292
  name: string;
246
293
  maxSize: number[];
247
294
  compression: ImageCompressionType;
248
295
  stream: boolean;
249
- isProbe: boolean;
250
- isSpecularProbe: boolean;
251
296
  hdr: boolean;
252
297
  }
253
298
  /** Texture resource */
254
- export declare class TextureResource {
299
+ export declare class TextureResource extends Resource {
255
300
  name: string;
256
301
  image: ImageReference;
257
302
  type: number;
@@ -271,14 +316,14 @@ export declare enum ShaderType {
271
316
  Fullscreen = "fullscreen"
272
317
  }
273
318
  /** Shader resource */
274
- export declare class ShaderResource {
319
+ export declare class ShaderResource extends Resource {
275
320
  name: string;
276
321
  stage: ShaderStage;
277
322
  type: ShaderType;
278
323
  packageUnused: boolean;
279
324
  }
280
325
  /** Mesh resource */
281
- export declare class MeshResource {
326
+ export declare class MeshResource extends Resource {
282
327
  name: string;
283
328
  simplify: boolean;
284
329
  simplifyTarget: number;
@@ -287,7 +332,7 @@ export declare class MeshResource {
287
332
  hasMorphTargets: boolean;
288
333
  }
289
334
  /** Material properties for the default Phong pipeline */
290
- export declare class PhongMaterial {
335
+ export declare class PhongMaterial extends Access {
291
336
  ambientColor: number[];
292
337
  diffuseTexture: TextureReference;
293
338
  diffuseColor: number[];
@@ -303,13 +348,15 @@ export declare class PhongMaterial {
303
348
  alphaMaskTexture: TextureReference;
304
349
  }
305
350
  /** Material properties for the default Phong pipeline */
306
- export declare class PhysicalMaterial {
351
+ export declare class PhysicalMaterial extends Access {
307
352
  albedoColor: number[];
308
353
  emissiveTexture: TextureReference;
309
354
  emissiveColor: number[];
355
+ fogColor: number[];
310
356
  albedoTexture: TextureReference;
311
357
  metallicFactor: number;
312
358
  roughnessFactor: number;
359
+ occlusionRoughnessMetallicTexture: TextureReference;
313
360
  roughnessMetallicTexture: TextureReference;
314
361
  specularProbeTexture: TextureReference;
315
362
  irradianceProbeTexture: TextureReference;
@@ -320,19 +367,19 @@ export declare class PhysicalMaterial {
320
367
  alphaMaskTexture: TextureReference;
321
368
  }
322
369
  /** Material properties for the default MeshVisualizer pipeline */
323
- export declare class MeshVisualizerMaterial {
370
+ export declare class MeshVisualizerMaterial extends Access {
324
371
  color: number[];
325
372
  wireframeColor: number[];
326
373
  }
327
374
  /** Material properties for the default Flat pipeline */
328
- export declare class FlatMaterial {
375
+ export declare class FlatMaterial extends Access {
329
376
  color: number[];
330
377
  flatTexture: TextureReference;
331
378
  alphaMaskThreshold: number;
332
379
  alphaMaskTexture: TextureReference;
333
380
  }
334
381
  /** Material properties for the default Particle pipeline */
335
- export declare class ParticleMaterial {
382
+ export declare class ParticleMaterial extends Access {
336
383
  color: number[];
337
384
  mainTexture: TextureReference;
338
385
  noiseTexture: TextureReference;
@@ -340,7 +387,7 @@ export declare class ParticleMaterial {
340
387
  offsetY: number;
341
388
  }
342
389
  /** Material properties for the default DistanceFieldVector pipeline */
343
- export declare class DistanceFieldVectorMaterial {
390
+ export declare class DistanceFieldVectorMaterial extends Access {
344
391
  color: number[];
345
392
  outlineColor: number[];
346
393
  outlineRange: number[];
@@ -348,21 +395,26 @@ export declare class DistanceFieldVectorMaterial {
348
395
  smoothness: number;
349
396
  }
350
397
  /** Material properties for the default Text pipeline */
351
- export declare class TextMaterial {
398
+ export declare class TextMaterial extends Access {
352
399
  color: number[];
353
400
  effectColor: number[];
354
401
  font: FontReference;
355
402
  }
356
403
  /** Material properties for the default Sky pipeline */
357
- export declare class SkyMaterial {
404
+ export declare class SkyMaterial extends Access {
358
405
  colorStop0: number[];
359
406
  colorStop1: number[];
360
407
  colorStop2: number[];
361
408
  colorStop3: number[];
362
409
  texture: TextureReference;
363
410
  }
411
+ /** Material properties for the default Sky pipeline */
412
+ export declare class AtmosphericSkyMaterial extends Access {
413
+ direction: number[];
414
+ exposure: number;
415
+ }
364
416
  /** Material properties for the default Background pipeline */
365
- export declare class BackgroundMaterial {
417
+ export declare class BackgroundMaterial extends Access {
366
418
  colorStop0: number[];
367
419
  colorStop1: number[];
368
420
  colorStop2: number[];
@@ -370,7 +422,7 @@ export declare class BackgroundMaterial {
370
422
  texture: TextureReference;
371
423
  }
372
424
  /** Material properties for the default Particle pipeline */
373
- export declare class MaterialResource {
425
+ export declare class MaterialResource extends Resource {
374
426
  pipeline: PipelineReference;
375
427
  name: string;
376
428
  Phong?: PhongMaterial;
@@ -381,6 +433,7 @@ export declare class MaterialResource {
381
433
  DistanceFieldVector?: DistanceFieldVectorMaterial;
382
434
  Text?: TextMaterial;
383
435
  Sky?: SkyMaterial;
436
+ AtmosphericSky?: AtmosphericSkyMaterial;
384
437
  Background?: BackgroundMaterial;
385
438
  }
386
439
  /** Animation blending type */
@@ -394,8 +447,8 @@ export declare enum RootMotionMode {
394
447
  ApplyToOwner = "applyToOwner",
395
448
  ScriptEvent = "scriptEvent"
396
449
  }
397
- /** 'animation' component configuration */
398
- export declare class AnimationComponent {
450
+ /** 'animation' component */
451
+ export declare class AnimationComponent extends Access {
399
452
  preview: boolean;
400
453
  retarget: boolean;
401
454
  autoplay: boolean;
@@ -420,8 +473,8 @@ export declare enum LightType {
420
473
  /** Sun light type */
421
474
  Sun = "sun"
422
475
  }
423
- /** 'light' component configuration */
424
- export declare class LightComponent {
476
+ /** 'light' component */
477
+ export declare class LightComponent extends Access {
425
478
  type: LightType;
426
479
  color: number[];
427
480
  intensity: number;
@@ -441,34 +494,34 @@ export declare enum ProjectionType {
441
494
  /** Orthographic projection */
442
495
  Orthographic = "orthographic"
443
496
  }
444
- /** 'view' component configuration */
445
- export declare class ViewComponent {
497
+ /** 'view' component */
498
+ export declare class ViewComponent extends Access {
446
499
  projectionType: ProjectionType;
447
500
  fov: number;
448
501
  extent: number;
449
502
  near: number;
450
503
  far: number;
451
504
  }
452
- /** Settings for a sphere physics shape */
453
- export declare class PhysXSphereConfig {
505
+ /** Sphere physics shape */
506
+ export declare class PhysXSphere extends Access {
454
507
  radius: number;
455
508
  }
456
- /** Settings for a box physics shape */
457
- export declare class PhysXBoxConfig {
509
+ /** Box physics shape */
510
+ export declare class PhysXBox extends Access {
458
511
  extents: number[];
459
512
  }
460
- /** Settings for a capsule physics shape */
461
- export declare class PhysXCapsuleConfig {
513
+ /** Capsule physics shape */
514
+ export declare class PhysXCapsule extends Access {
462
515
  radius: number;
463
516
  halfHeight: number;
464
517
  }
465
- /** Settings for a triangle mesh physics shape */
466
- export declare class PhysXTriangleMeshConfig {
518
+ /** Triangle mesh physics shape */
519
+ export declare class PhysXTriangleMesh extends Access {
467
520
  mesh: MeshReference;
468
521
  scaling: number[];
469
522
  }
470
- /** Settings for a convex mesh physics shape */
471
- export declare class PhysXConvexMeshConfig {
523
+ /** Convex mesh physics shape */
524
+ export declare class PhysXConvexMesh extends Access {
472
525
  mesh: MeshReference;
473
526
  scaling: number[];
474
527
  }
@@ -480,8 +533,8 @@ export declare enum PhysXShapeType {
480
533
  TriangleMesh = "triangleMesh",
481
534
  ConvexMesh = "convexMesh"
482
535
  }
483
- /** 'physx' component configuration */
484
- export declare class PhysXComponent {
536
+ /** 'physx' component */
537
+ export declare class PhysXComponent extends Access {
485
538
  static: boolean;
486
539
  kinematic: boolean;
487
540
  simulate: boolean;
@@ -489,11 +542,11 @@ export declare class PhysXComponent {
489
542
  allowSimulation: boolean;
490
543
  mass: number;
491
544
  shape: PhysXShapeType;
492
- sphere?: PhysXSphereConfig;
493
- box?: PhysXBoxConfig;
494
- capsule?: PhysXCapsuleConfig;
495
- triangleMesh?: PhysXTriangleMeshConfig;
496
- convexMesh?: PhysXConvexMeshConfig;
545
+ sphere?: PhysXSphere;
546
+ box?: PhysXBox;
547
+ capsule?: PhysXCapsule;
548
+ triangleMesh?: PhysXTriangleMesh;
549
+ convexMesh?: PhysXConvexMesh;
497
550
  linearDamping: number;
498
551
  angularDamping: number;
499
552
  staticFriction: number;
@@ -510,8 +563,8 @@ export declare class PhysXComponent {
510
563
  solverPositionIterations: number;
511
564
  solverVelocityIterations: number;
512
565
  }
513
- /** 'mesh' component configuration */
514
- export declare class MeshComponent {
566
+ /** 'mesh' component */
567
+ export declare class MeshComponent extends Access {
515
568
  material: MaterialReference;
516
569
  mesh: MeshReference;
517
570
  skin: SkinReference;
@@ -521,7 +574,8 @@ export declare class MeshComponent {
521
574
  /** Text effect type enum */
522
575
  export declare enum TextEffectType {
523
576
  None = "none",
524
- Outline = "outline"
577
+ Outline = "outline",
578
+ Shadow = "shadow"
525
579
  }
526
580
  /** Text wrap mode */
527
581
  export declare enum TextWrapMode {
@@ -530,36 +584,38 @@ export declare enum TextWrapMode {
530
584
  Hard = "hard",
531
585
  Clip = "clip"
532
586
  }
533
- /** 'text' component configuration */
534
- export declare class TextComponent {
587
+ /** 'text' component */
588
+ export declare class TextComponent extends Access {
535
589
  alignment: string;
536
590
  verticalAlignment: string;
591
+ justified: boolean;
537
592
  characterSpacing: number;
538
593
  lineSpacing: number;
539
594
  effect: TextEffectType;
595
+ effectOffset: number[];
540
596
  text: string;
541
597
  material: MaterialReference;
542
598
  wrapMode: TextWrapMode;
543
599
  wrapWidth: number;
544
600
  }
545
- /** Settings for a sphere collider */
546
- export declare class SphereConfig {
601
+ /** Sphere collider */
602
+ export declare class Sphere extends Access {
547
603
  radius: number;
548
604
  }
549
- /** Settings for a AxisAlignedBoundingBox collider */
550
- export declare class AABBConfig {
605
+ /** AxisAlignedBoundingBox collider */
606
+ export declare class AABB extends Access {
551
607
  extents: number[];
552
608
  }
553
- /** Settings for a box collider */
554
- export declare class BoxConfig {
609
+ /** Box collider */
610
+ export declare class Box extends Access {
555
611
  extents: number[];
556
612
  }
557
- /** 'collision' component configuration */
558
- export declare class CollisionComponent {
613
+ /** 'collision' component */
614
+ export declare class CollisionComponent extends Access {
559
615
  collider: 'sphere' | 'aabb' | 'box';
560
- sphere?: SphereConfig;
561
- aabb?: AABBConfig;
562
- box?: BoxConfig;
616
+ sphere?: Sphere;
617
+ aabb?: AABB;
618
+ box?: Box;
563
619
  groups: number;
564
620
  }
565
621
  /** Input type enum */
@@ -572,21 +628,21 @@ export declare enum InputType {
572
628
  RayLeft = "ray left",
573
629
  RayRight = "ray right"
574
630
  }
575
- /** 'input' component configuration */
576
- export declare class InputComponent {
631
+ /** 'input' component */
632
+ export declare class InputComponent extends Access {
577
633
  type: InputType;
578
634
  }
579
- export declare class AnimationEvent {
635
+ export declare class AnimationEvent extends Access {
580
636
  time: number;
581
637
  name: string;
582
638
  }
583
- export declare class RootMotion {
639
+ export declare class RootMotion extends Access {
584
640
  target: ObjectReference;
585
641
  translationAxis: number;
586
642
  rotationAxis: number;
587
643
  }
588
644
  /** Animation resource */
589
- export declare class AnimationResource {
645
+ export declare class AnimationResource extends Resource {
590
646
  /** Name of the animation */
591
647
  name: string;
592
648
  /** Whether to compress the animation */
@@ -597,31 +653,31 @@ export declare class AnimationResource {
597
653
  events: AnimationEvent[];
598
654
  rootMotion?: RootMotion;
599
655
  }
600
- /** Component configuration */
601
- export declare class ComponentConfig {
656
+ /** Component */
657
+ export declare class ObjectComponent extends Access {
602
658
  /** Component type */
603
659
  type: string | null;
604
660
  /** Whether the component is active */
605
661
  active: boolean;
606
- /** Configuration for animation components */
662
+ /** Animation component */
607
663
  animation?: AnimationComponent;
608
- /** Configuration for collision components */
664
+ /** Collision component */
609
665
  collision?: CollisionComponent;
610
- /** Configuration for input components */
666
+ /** Input component */
611
667
  input?: InputComponent;
612
- /** Configuration for light components */
668
+ /** Light component */
613
669
  light?: LightComponent;
614
- /** Configuration for mesh components */
670
+ /** Mesh component */
615
671
  mesh?: MeshComponent;
616
- /** Configuration for physx components */
672
+ /** Physx component */
617
673
  physx?: PhysXComponent;
618
- /** Configuration for text components */
674
+ /** Text component */
619
675
  text?: TextComponent;
620
- /** Configuration for view components */
676
+ /** View component */
621
677
  view?: ViewComponent;
622
678
  }
623
679
  /** Object resource */
624
- export declare class ObjectResource {
680
+ export declare class ObjectResource extends Resource {
625
681
  /** Name of the object */
626
682
  name: string;
627
683
  /** Translation vector */
@@ -635,10 +691,10 @@ export declare class ObjectResource {
635
691
  /** Skin this object is part of, or `null`, if not a joint. */
636
692
  skin: SkinReference;
637
693
  /** List of components on this object */
638
- components: ComponentConfig[];
694
+ components: ObjectComponent[];
639
695
  }
640
696
  /** Skin resource */
641
- export declare class SkinResource {
697
+ export declare class SkinResource extends Resource {
642
698
  /** Name of the skin */
643
699
  name: string;
644
700
  /** List of objects that make up the joints of this skin */
@@ -685,7 +741,7 @@ export declare enum MeshSorting {
685
741
  MeshIndex = "mesh-index"
686
742
  }
687
743
  /** Pipeline resource */
688
- export declare class PipelineResource {
744
+ export declare class PipelineResource extends Resource {
689
745
  name: string;
690
746
  doubleSided: boolean;
691
747
  castShadows: boolean;
@@ -708,7 +764,7 @@ export declare class PipelineResource {
708
764
  depthFunction: DepthFunction;
709
765
  }
710
766
  /** Font resource */
711
- export declare class FontResource {
767
+ export declare class FontResource extends Resource {
712
768
  /** Name of the font */
713
769
  name: string;
714
770
  /** Which characters need to be renderable with this font */
@@ -719,18 +775,21 @@ export declare class FontResource {
719
775
  outlineSize: number;
720
776
  }
721
777
  /** Language resource */
722
- export declare class LanguageResource {
778
+ export declare class LanguageResource extends Resource {
723
779
  /** Name of the language */
724
780
  name: string;
725
781
  /** Whether this is the default language */
726
782
  isDefault: boolean;
727
783
  }
728
784
  /** File resource */
729
- export declare class FileResource {
785
+ export declare class FileResource extends Resource {
730
786
  fileName: string;
731
787
  importerName: string;
732
788
  importPhysicalAsPhongMaterials: boolean;
733
789
  }
790
+ export declare class ResourceSection<T> {
791
+ [key: string]: T;
792
+ }
734
793
  /**
735
794
  * Access to Wonderland Editor's data.
736
795
  *
@@ -748,32 +807,31 @@ export declare class FileResource {
748
807
  * WL.data.objects[123].components[0].text.text
749
808
  * ```
750
809
  */
751
- export declare class EditorData {
810
+ export interface EditorData {
752
811
  /** Project settings */
753
812
  settings: Settings;
754
813
  /** List of scene file paths */
755
- files: FileResource[];
814
+ files: ResourceSection<FileResource>;
756
815
  /** Animation resources */
757
- animations: AnimationResource[];
816
+ animations: ResourceSection<AnimationResource>;
758
817
  /** Object resources */
759
- objects: ObjectResource[];
818
+ objects: ResourceSection<ObjectResource>;
760
819
  /** Skin resources */
761
- skins: SkinResource[];
820
+ skins: ResourceSection<SkinResource>;
762
821
  /** Image resources */
763
- images: ImageResource[];
822
+ images: ResourceSection<ImageResource>;
764
823
  /** Shader resources */
765
- shaders: ShaderResource[];
824
+ shaders: ResourceSection<ShaderResource>;
766
825
  /** Mesh resources */
767
- meshes: MeshResource[];
826
+ meshes: ResourceSection<MeshResource>;
768
827
  /** Texture resources */
769
- textures: TextureResource[];
828
+ textures: ResourceSection<TextureResource>;
770
829
  /** Material resources */
771
- materials: MaterialResource[];
830
+ materials: ResourceSection<MaterialResource>;
772
831
  /** Font resources */
773
- fonts: FontResource[];
832
+ fonts: ResourceSection<FontResource>;
774
833
  /** Pipeline resources */
775
- pipelines: PipelineResource[];
834
+ pipelines: ResourceSection<PipelineResource>;
776
835
  /** Language resources */
777
- languages: LanguageResource[];
836
+ languages: ResourceSection<LanguageResource>;
778
837
  }
779
- export declare let data: EditorData;