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