babylonjs-editor-tools 0.0.8 → 0.0.9

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.
Files changed (73) hide show
  1. package/build/index.node.js +1318 -0
  2. package/build/src/cinematic/events/apply-impulse.js +12 -0
  3. package/build/src/cinematic/events/set-enabled.js +5 -0
  4. package/build/src/cinematic/generate.js +134 -0
  5. package/build/src/cinematic/parse.js +99 -0
  6. package/build/src/cinematic/tools.js +66 -0
  7. package/build/src/cinematic/typings.js +2 -0
  8. package/build/src/decorators/apply.js +71 -0
  9. package/build/{decorators → src/decorators}/gui.js +1 -5
  10. package/build/src/decorators/inspector.js +131 -0
  11. package/build/src/decorators/particle-systems.js +15 -0
  12. package/build/{decorators → src/decorators}/scene.js +16 -7
  13. package/build/{decorators → src/decorators}/sound.js +1 -5
  14. package/build/src/index.js +17 -0
  15. package/build/src/loading/loader.js +55 -0
  16. package/build/src/loading/physics.js +28 -0
  17. package/build/src/loading/rendering.js +30 -0
  18. package/build/src/loading/script.js +35 -0
  19. package/build/src/loading/sound.js +14 -0
  20. package/build/{texture.js → src/loading/texture.js} +9 -11
  21. package/build/{rendering → src/rendering}/default-pipeline.js +40 -15
  22. package/build/src/rendering/motion-blur.js +42 -0
  23. package/build/{rendering → src/rendering}/ssao.js +11 -15
  24. package/build/{rendering → src/rendering}/ssr.js +11 -15
  25. package/build/src/rendering/tools.js +51 -0
  26. package/build/src/rendering/vls.js +57 -0
  27. package/build/src/script.js +2 -0
  28. package/build/{guards.js → src/tools/guards.js} +3 -9
  29. package/build/src/tools/light.js +25 -0
  30. package/build/src/tools/scalar.js +8 -0
  31. package/build/src/tools/sound.js +19 -0
  32. package/build/src/tools/texture.js +16 -0
  33. package/package.json +24 -6
  34. package/build/decorators/apply.js +0 -42
  35. package/build/decorators/apply.js.map +0 -1
  36. package/build/decorators/gui.js.map +0 -1
  37. package/build/decorators/scene.js.map +0 -1
  38. package/build/decorators/sound.js.map +0 -1
  39. package/build/guards.js.map +0 -1
  40. package/build/index.js +0 -26
  41. package/build/index.js.map +0 -1
  42. package/build/light.js +0 -30
  43. package/build/light.js.map +0 -1
  44. package/build/loader.js +0 -87
  45. package/build/loader.js.map +0 -1
  46. package/build/physics.js +0 -33
  47. package/build/physics.js.map +0 -1
  48. package/build/rendering/default-pipeline.js.map +0 -1
  49. package/build/rendering/motion-blur.js +0 -46
  50. package/build/rendering/motion-blur.js.map +0 -1
  51. package/build/rendering/ssao.js.map +0 -1
  52. package/build/rendering/ssr.js.map +0 -1
  53. package/build/script.js +0 -3
  54. package/build/script.js.map +0 -1
  55. package/build/texture.js.map +0 -1
  56. package/build/tools/scalar.js +0 -12
  57. package/build/tools/scalar.js.map +0 -1
  58. package/declaration/decorators/apply.d.ts +0 -23
  59. package/declaration/decorators/gui.d.ts +0 -12
  60. package/declaration/decorators/scene.d.ts +0 -17
  61. package/declaration/decorators/sound.d.ts +0 -8
  62. package/declaration/guards.d.ts +0 -18
  63. package/declaration/index.d.ts +0 -9
  64. package/declaration/light.d.ts +0 -3
  65. package/declaration/loader.d.ts +0 -31
  66. package/declaration/physics.d.ts +0 -6
  67. package/declaration/rendering/default-pipeline.d.ts +0 -11
  68. package/declaration/rendering/motion-blur.d.ts +0 -8
  69. package/declaration/rendering/ssao.d.ts +0 -8
  70. package/declaration/rendering/ssr.d.ts +0 -8
  71. package/declaration/script.d.ts +0 -13
  72. package/declaration/texture.d.ts +0 -1
  73. package/declaration/tools/scalar.d.ts +0 -1
@@ -0,0 +1,1318 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ animationGroupFromScene: () => animationGroupFromScene,
24
+ configureEngineToUseCompressedTextures: () => configureEngineToUseCompressedTextures,
25
+ createDefaultRenderingPipeline: () => createDefaultRenderingPipeline,
26
+ createMotionBlurPostProcess: () => createMotionBlurPostProcess,
27
+ createSSAO2RenderingPipeline: () => createSSAO2RenderingPipeline,
28
+ createSSRRenderingPipeline: () => createSSRRenderingPipeline,
29
+ createVLSPostProcess: () => createVLSPostProcess,
30
+ defaultPipelineCameraConfigurations: () => defaultPipelineCameraConfigurations,
31
+ disposeDefaultRenderingPipeline: () => disposeDefaultRenderingPipeline,
32
+ disposeMotionBlurPostProcess: () => disposeMotionBlurPostProcess,
33
+ disposeSSAO2RenderingPipeline: () => disposeSSAO2RenderingPipeline,
34
+ disposeSSRRenderingPipeline: () => disposeSSRRenderingPipeline,
35
+ disposeVLSPostProcess: () => disposeVLSPostProcess,
36
+ generateCinematicAnimationGroup: () => generateCinematicAnimationGroup,
37
+ getDefaultRenderingPipeline: () => getDefaultRenderingPipeline,
38
+ getMotionBlurPostProcess: () => getMotionBlurPostProcess,
39
+ getSSAO2RenderingPipeline: () => getSSAO2RenderingPipeline,
40
+ getSSRRenderingPipeline: () => getSSRRenderingPipeline,
41
+ getVLSPostProcess: () => getVLSPostProcess,
42
+ guiFromAsset: () => guiFromAsset,
43
+ loadScene: () => loadScene,
44
+ motionBlurPostProcessCameraConfigurations: () => motionBlurPostProcessCameraConfigurations,
45
+ nodeFromDescendants: () => nodeFromDescendants,
46
+ nodeFromScene: () => nodeFromScene,
47
+ parseCinematic: () => parseCinematic,
48
+ parseCinematicKeyValue: () => parseCinematicKeyValue,
49
+ parseDefaultRenderingPipeline: () => parseDefaultRenderingPipeline,
50
+ parseMotionBlurPostProcess: () => parseMotionBlurPostProcess,
51
+ parseSSAO2RenderingPipeline: () => parseSSAO2RenderingPipeline,
52
+ parseSSRRenderingPipeline: () => parseSSRRenderingPipeline,
53
+ parseVLSPostProcess: () => parseVLSPostProcess,
54
+ particleSystemFromScene: () => particleSystemFromScene,
55
+ serializeDefaultRenderingPipeline: () => serializeDefaultRenderingPipeline,
56
+ serializeMotionBlurPostProcess: () => serializeMotionBlurPostProcess,
57
+ serializeSSAO2RenderingPipeline: () => serializeSSAO2RenderingPipeline,
58
+ serializeSSRRenderingPipeline: () => serializeSSRRenderingPipeline,
59
+ serializeVLSPostProcess: () => serializeVLSPostProcess,
60
+ soundFromScene: () => soundFromScene,
61
+ ssaoRenderingPipelineCameraConfigurations: () => ssaoRenderingPipelineCameraConfigurations,
62
+ ssrRenderingPipelineCameraConfigurations: () => ssrRenderingPipelineCameraConfigurations,
63
+ visibleAsBoolean: () => visibleAsBoolean,
64
+ visibleAsColor3: () => visibleAsColor3,
65
+ visibleAsColor4: () => visibleAsColor4,
66
+ visibleAsNumber: () => visibleAsNumber,
67
+ visibleAsVector2: () => visibleAsVector2,
68
+ visibleAsVector3: () => visibleAsVector3,
69
+ vlsPostProcessCameraConfigurations: () => vlsPostProcessCameraConfigurations
70
+ });
71
+ module.exports = __toCommonJS(index_exports);
72
+
73
+ // src/tools/guards.ts
74
+ function isMesh(object) {
75
+ switch (object.getClassName?.()) {
76
+ case "Mesh":
77
+ case "GroundMesh":
78
+ return true;
79
+ }
80
+ return false;
81
+ }
82
+ __name(isMesh, "isMesh");
83
+ function isGroundMesh(object) {
84
+ return object.getClassName?.() === "GroundMesh";
85
+ }
86
+ __name(isGroundMesh, "isGroundMesh");
87
+ function isTexture(object) {
88
+ return object?.getClassName?.() === "Texture";
89
+ }
90
+ __name(isTexture, "isTexture");
91
+
92
+ // src/decorators/apply.ts
93
+ var import_babylonjs6 = require("babylonjs");
94
+ var import_babylonjs_gui = require("babylonjs-gui");
95
+ function applyDecorators(scene, object, script, instance, rootUrl) {
96
+ const ctor = instance.constructor;
97
+ if (!ctor) {
98
+ return;
99
+ }
100
+ ctor._NodesFromScene?.forEach((params) => {
101
+ instance[params.propertyKey.toString()] = scene.getNodeByName(params.nodeName);
102
+ });
103
+ ctor._NodesFromDescendants?.forEach((params) => {
104
+ const descendant = object.getDescendants?.(params.directDescendantsOnly, (node) => node.name === params.nodeName)[0];
105
+ instance[params.propertyKey.toString()] = descendant ?? null;
106
+ });
107
+ ctor._AnimationGroups?.forEach((params) => {
108
+ instance[params.propertyKey.toString()] = scene.getAnimationGroupByName(params.animationGroupName);
109
+ });
110
+ ctor._SoundsFromScene?.forEach((params) => {
111
+ const sound = scene.getSoundByName?.(params.soundName);
112
+ instance[params.propertyKey.toString()] = sound ?? null;
113
+ });
114
+ ctor._GuiFromAsset?.forEach(async (params) => {
115
+ const guiUrl = `${rootUrl}assets/${params.pathInAssets}`;
116
+ try {
117
+ const response = await fetch(guiUrl);
118
+ const data = await response.json();
119
+ const gui = import_babylonjs_gui.AdvancedDynamicTexture.CreateFullscreenUI(data.name, true, scene);
120
+ gui.parseSerializedObject(data.content, false);
121
+ instance[params.propertyKey.toString()] = gui;
122
+ params.onGuiCreated?.(instance, gui);
123
+ } catch (e) {
124
+ console.error(`Failed to load GUI from asset: ${guiUrl}`);
125
+ throw e;
126
+ }
127
+ });
128
+ ctor._ParticleSystemsFromScene?.forEach((params) => {
129
+ const particleSystem = scene.particleSystems?.find((particleSystem2) => {
130
+ return particleSystem2.name === params.particleSystemName;
131
+ });
132
+ instance[params.propertyKey.toString()] = particleSystem;
133
+ });
134
+ ctor._VisibleInInspector?.forEach((params) => {
135
+ const propertyKey = params.propertyKey.toString();
136
+ const attachedScripts = script.values;
137
+ if (attachedScripts.hasOwnProperty(propertyKey) && attachedScripts[propertyKey].hasOwnProperty("value")) {
138
+ const value = attachedScripts[propertyKey].value;
139
+ switch (params.configuration.type) {
140
+ case "number":
141
+ case "boolean":
142
+ instance[propertyKey] = value;
143
+ break;
144
+ case "vector2":
145
+ instance[propertyKey] = import_babylonjs6.Vector2.FromArray(value);
146
+ break;
147
+ case "vector3":
148
+ instance[propertyKey] = import_babylonjs6.Vector3.FromArray(value);
149
+ break;
150
+ }
151
+ }
152
+ });
153
+ }
154
+ __name(applyDecorators, "applyDecorators");
155
+
156
+ // src/loading/script.ts
157
+ function applyScriptForObject(scene, object, scriptsMap, rootUrl) {
158
+ if (!object.metadata) {
159
+ return;
160
+ }
161
+ object.metadata.scripts?.forEach((script) => {
162
+ if (!script.enabled) {
163
+ return;
164
+ }
165
+ const exports2 = scriptsMap[script.key];
166
+ if (!exports2) {
167
+ return;
168
+ }
169
+ if (exports2.default) {
170
+ const instance = new exports2.default(object);
171
+ applyDecorators(scene, object, script, instance, rootUrl);
172
+ if (instance.onStart) {
173
+ scene.onBeforeRenderObservable.addOnce(() => instance.onStart());
174
+ }
175
+ if (instance.onUpdate) {
176
+ scene.onBeforeRenderObservable.add(() => instance.onUpdate());
177
+ }
178
+ } else {
179
+ if (exports2.onStart) {
180
+ scene.onBeforeRenderObservable.addOnce(() => exports2.onStart(object));
181
+ }
182
+ if (exports2.onUpdate) {
183
+ scene.onBeforeRenderObservable.add(() => exports2.onUpdate(object));
184
+ }
185
+ }
186
+ });
187
+ object.metadata.scripts = void 0;
188
+ }
189
+ __name(applyScriptForObject, "applyScriptForObject");
190
+
191
+ // src/loading/physics.ts
192
+ var import_babylonjs9 = require("babylonjs");
193
+ var import_babylonjs10 = require("babylonjs");
194
+ function configurePhysicsAggregate(mesh) {
195
+ const data = mesh.metadata?.physicsAggregate;
196
+ if (!data) {
197
+ return;
198
+ }
199
+ const aggregate = new import_babylonjs10.PhysicsAggregate(mesh, data.shape.type, {
200
+ mass: data.massProperties.mass,
201
+ mesh: isMesh(mesh) ? mesh : void 0
202
+ });
203
+ aggregate.body.setMassProperties({
204
+ mass: data.massProperties.mass,
205
+ inertia: data.massProperties.inertia ? import_babylonjs9.Vector3.FromArray(data.massProperties.inertia) : void 0,
206
+ centerOfMass: data.massProperties.centerOfMass ? import_babylonjs9.Vector3.FromArray(data.massProperties.centerOfMass) : void 0,
207
+ inertiaOrientation: data.massProperties.inertiaOrientation ? import_babylonjs9.Quaternion.FromArray(data.massProperties.inertiaOrientation) : void 0
208
+ });
209
+ aggregate.shape.density = data.shape.density;
210
+ aggregate.body.setMotionType(data.body.motionType);
211
+ aggregate.shape.material = data.material;
212
+ mesh.metadata.physicsAggregate = void 0;
213
+ }
214
+ __name(configurePhysicsAggregate, "configurePhysicsAggregate");
215
+
216
+ // src/rendering/vls.ts
217
+ var import_babylonjs14 = require("babylonjs");
218
+ var import_babylonjs15 = require("babylonjs");
219
+ var import_babylonjs16 = require("babylonjs");
220
+ var vlsPostProcess = null;
221
+ var vlsPostProcessCameraConfigurations = /* @__PURE__ */ new Map();
222
+ function getVLSPostProcess() {
223
+ return vlsPostProcess;
224
+ }
225
+ __name(getVLSPostProcess, "getVLSPostProcess");
226
+ function disposeVLSPostProcess(scene) {
227
+ if (vlsPostProcess && scene.activeCamera) {
228
+ vlsPostProcess.dispose(scene.activeCamera);
229
+ vlsPostProcess = null;
230
+ }
231
+ }
232
+ __name(disposeVLSPostProcess, "disposeVLSPostProcess");
233
+ function createVLSPostProcess(scene, mesh) {
234
+ mesh ??= scene.meshes.find((mesh2) => isMesh(mesh2));
235
+ vlsPostProcess = new import_babylonjs16.VolumetricLightScatteringPostProcess("VolumetricLightScatteringPostProcess", 1, scene.activeCamera, mesh, 100, import_babylonjs15.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false);
236
+ return vlsPostProcess;
237
+ }
238
+ __name(createVLSPostProcess, "createVLSPostProcess");
239
+ function serializeVLSPostProcess() {
240
+ if (!vlsPostProcess) {
241
+ return null;
242
+ }
243
+ return {
244
+ meshId: vlsPostProcess.mesh?.id,
245
+ exposure: vlsPostProcess.exposure,
246
+ decay: vlsPostProcess.decay,
247
+ weight: vlsPostProcess.weight,
248
+ density: vlsPostProcess.density,
249
+ invert: vlsPostProcess.invert,
250
+ useCustomMeshPosition: vlsPostProcess.useCustomMeshPosition,
251
+ customMeshPosition: vlsPostProcess.customMeshPosition.asArray()
252
+ };
253
+ }
254
+ __name(serializeVLSPostProcess, "serializeVLSPostProcess");
255
+ function parseVLSPostProcess(scene, data) {
256
+ let mesh = null;
257
+ if (data.meshId) {
258
+ const result = scene.getMeshById(data.meshId);
259
+ if (result && isMesh(result)) {
260
+ mesh = result;
261
+ }
262
+ }
263
+ const vlsPostProcess2 = createVLSPostProcess(scene, mesh);
264
+ vlsPostProcess2.exposure = data.exposure;
265
+ vlsPostProcess2.decay = data.decay;
266
+ vlsPostProcess2.weight = data.weight;
267
+ vlsPostProcess2.density = data.density;
268
+ vlsPostProcess2.invert = data.invert;
269
+ vlsPostProcess2.useCustomMeshPosition = data.useCustomMeshPosition;
270
+ vlsPostProcess2.customMeshPosition.copyFrom(import_babylonjs14.Vector3.FromArray(data.customMeshPosition));
271
+ return vlsPostProcess2;
272
+ }
273
+ __name(parseVLSPostProcess, "parseVLSPostProcess");
274
+
275
+ // src/rendering/ssr.ts
276
+ var import_babylonjs19 = require("babylonjs");
277
+ var ssrRenderingPipeline = null;
278
+ var ssrRenderingPipelineCameraConfigurations = /* @__PURE__ */ new Map();
279
+ function getSSRRenderingPipeline() {
280
+ return ssrRenderingPipeline;
281
+ }
282
+ __name(getSSRRenderingPipeline, "getSSRRenderingPipeline");
283
+ function disposeSSRRenderingPipeline() {
284
+ if (ssrRenderingPipeline) {
285
+ ssrRenderingPipeline.dispose();
286
+ ssrRenderingPipeline = null;
287
+ }
288
+ }
289
+ __name(disposeSSRRenderingPipeline, "disposeSSRRenderingPipeline");
290
+ function createSSRRenderingPipeline(scene, camera) {
291
+ ssrRenderingPipeline = new import_babylonjs19.SSRRenderingPipeline("SSRRenderingPipeline", scene, [camera]);
292
+ ssrRenderingPipeline.samples = 4;
293
+ return ssrRenderingPipeline;
294
+ }
295
+ __name(createSSRRenderingPipeline, "createSSRRenderingPipeline");
296
+ function serializeSSRRenderingPipeline() {
297
+ if (!ssrRenderingPipeline) {
298
+ return null;
299
+ }
300
+ return {
301
+ samples: ssrRenderingPipeline.samples,
302
+ step: ssrRenderingPipeline.step,
303
+ thickness: ssrRenderingPipeline.thickness,
304
+ strength: ssrRenderingPipeline.strength,
305
+ reflectionSpecularFalloffExponent: ssrRenderingPipeline.reflectionSpecularFalloffExponent,
306
+ maxSteps: ssrRenderingPipeline.maxSteps,
307
+ maxDistance: ssrRenderingPipeline.maxDistance,
308
+ roughnessFactor: ssrRenderingPipeline.roughnessFactor,
309
+ reflectivityThreshold: ssrRenderingPipeline.reflectivityThreshold,
310
+ blurDispersionStrehgth: ssrRenderingPipeline.blurDispersionStrength,
311
+ clipToFrustum: ssrRenderingPipeline.clipToFrustum,
312
+ enableSmoothReflections: ssrRenderingPipeline.enableSmoothReflections,
313
+ enableAutomaticThicknessComputation: ssrRenderingPipeline.enableAutomaticThicknessComputation,
314
+ attenuateFacingCamera: ssrRenderingPipeline.attenuateFacingCamera,
315
+ attenuateScreenBorders: ssrRenderingPipeline.attenuateScreenBorders,
316
+ attenuateIntersectionDistance: ssrRenderingPipeline.attenuateIntersectionDistance,
317
+ attenuateBackfaceReflection: ssrRenderingPipeline.attenuateBackfaceReflection,
318
+ blurDownsample: ssrRenderingPipeline.blurDownsample,
319
+ selfCollisionNumSkip: ssrRenderingPipeline.selfCollisionNumSkip,
320
+ ssrDownsample: ssrRenderingPipeline.ssrDownsample,
321
+ backfaceDepthTextureDownsample: ssrRenderingPipeline.backfaceDepthTextureDownsample
322
+ };
323
+ }
324
+ __name(serializeSSRRenderingPipeline, "serializeSSRRenderingPipeline");
325
+ function parseSSRRenderingPipeline(scene, camera, data) {
326
+ if (ssrRenderingPipeline) {
327
+ return ssrRenderingPipeline;
328
+ }
329
+ const pipeline = createSSRRenderingPipeline(scene, camera);
330
+ pipeline.samples = data.samples;
331
+ pipeline.step = data.step;
332
+ pipeline.thickness = data.thickness;
333
+ pipeline.strength = data.strength;
334
+ pipeline.reflectionSpecularFalloffExponent = data.reflectionSpecularFalloffExponent;
335
+ pipeline.maxSteps = data.maxSteps;
336
+ pipeline.maxDistance = data.maxDistance;
337
+ pipeline.roughnessFactor = data.roughnessFactor;
338
+ pipeline.reflectivityThreshold = data.reflectivityThreshold;
339
+ pipeline.blurDispersionStrength = data.blurDispersionStrehgth;
340
+ pipeline.clipToFrustum = data.clipToFrustum;
341
+ pipeline.enableSmoothReflections = data.enableSmoothReflections;
342
+ pipeline.enableAutomaticThicknessComputation = data.enableAutomaticThicknessComputation;
343
+ pipeline.attenuateFacingCamera = data.attenuateFacingCamera;
344
+ pipeline.attenuateScreenBorders = data.attenuateScreenBorders;
345
+ pipeline.attenuateIntersectionDistance = data.attenuateIntersectionDistance;
346
+ pipeline.attenuateBackfaceReflection = data.attenuateBackfaceReflection;
347
+ pipeline.blurDownsample = data.blurDownsample;
348
+ pipeline.selfCollisionNumSkip = data.selfCollisionNumSkip;
349
+ pipeline.ssrDownsample = data.ssrDownsample;
350
+ pipeline.backfaceDepthTextureDownsample = data.backfaceDepthTextureDownsample;
351
+ return pipeline;
352
+ }
353
+ __name(parseSSRRenderingPipeline, "parseSSRRenderingPipeline");
354
+
355
+ // src/rendering/ssao.ts
356
+ var import_babylonjs22 = require("babylonjs");
357
+ var ssaoRenderingPipeline = null;
358
+ var ssaoRenderingPipelineCameraConfigurations = /* @__PURE__ */ new Map();
359
+ function getSSAO2RenderingPipeline() {
360
+ return ssaoRenderingPipeline;
361
+ }
362
+ __name(getSSAO2RenderingPipeline, "getSSAO2RenderingPipeline");
363
+ function disposeSSAO2RenderingPipeline() {
364
+ if (ssaoRenderingPipeline) {
365
+ ssaoRenderingPipeline.dispose();
366
+ ssaoRenderingPipeline = null;
367
+ }
368
+ }
369
+ __name(disposeSSAO2RenderingPipeline, "disposeSSAO2RenderingPipeline");
370
+ function createSSAO2RenderingPipeline(scene, camera) {
371
+ ssaoRenderingPipeline = new import_babylonjs22.SSAO2RenderingPipeline("SSAO2RenderingPipeline", scene, 1, [camera]);
372
+ ssaoRenderingPipeline.samples = 4;
373
+ return ssaoRenderingPipeline;
374
+ }
375
+ __name(createSSAO2RenderingPipeline, "createSSAO2RenderingPipeline");
376
+ function serializeSSAO2RenderingPipeline() {
377
+ if (!ssaoRenderingPipeline) {
378
+ return null;
379
+ }
380
+ return {
381
+ radius: ssaoRenderingPipeline.radius,
382
+ totalStrength: ssaoRenderingPipeline.totalStrength,
383
+ samples: ssaoRenderingPipeline.samples,
384
+ maxZ: ssaoRenderingPipeline.maxZ,
385
+ minZAspect: ssaoRenderingPipeline.minZAspect,
386
+ epsilon: ssaoRenderingPipeline.epsilon,
387
+ textureSamples: ssaoRenderingPipeline.textureSamples,
388
+ bypassBlur: ssaoRenderingPipeline.bypassBlur,
389
+ bilateralSamples: ssaoRenderingPipeline.bilateralSamples,
390
+ bilateralSoften: ssaoRenderingPipeline.bilateralSoften,
391
+ bilateralTolerance: ssaoRenderingPipeline.bilateralTolerance,
392
+ expensiveBlur: ssaoRenderingPipeline.expensiveBlur
393
+ };
394
+ }
395
+ __name(serializeSSAO2RenderingPipeline, "serializeSSAO2RenderingPipeline");
396
+ function parseSSAO2RenderingPipeline(scene, camera, data) {
397
+ if (ssaoRenderingPipeline) {
398
+ return ssaoRenderingPipeline;
399
+ }
400
+ const pipeline = createSSAO2RenderingPipeline(scene, camera);
401
+ pipeline.radius = data.radius;
402
+ pipeline.totalStrength = data.totalStrength;
403
+ pipeline.samples = data.samples;
404
+ pipeline.maxZ = data.maxZ;
405
+ pipeline.minZAspect = data.minZAspect;
406
+ pipeline.epsilon = data.epsilon;
407
+ pipeline.textureSamples = data.textureSamples;
408
+ pipeline.bypassBlur = data.bypassBlur;
409
+ pipeline.bilateralSamples = data.bilateralSamples;
410
+ pipeline.bilateralSoften = data.bilateralSoften;
411
+ pipeline.bilateralTolerance = data.bilateralTolerance;
412
+ pipeline.expensiveBlur = data.expensiveBlur;
413
+ return pipeline;
414
+ }
415
+ __name(parseSSAO2RenderingPipeline, "parseSSAO2RenderingPipeline");
416
+
417
+ // src/rendering/motion-blur.ts
418
+ var import_babylonjs25 = require("babylonjs");
419
+ var motionBlurPostProcess = null;
420
+ var motionBlurPostProcessCameraConfigurations = /* @__PURE__ */ new Map();
421
+ function getMotionBlurPostProcess() {
422
+ return motionBlurPostProcess;
423
+ }
424
+ __name(getMotionBlurPostProcess, "getMotionBlurPostProcess");
425
+ function disposeMotionBlurPostProcess() {
426
+ if (motionBlurPostProcess) {
427
+ motionBlurPostProcess.dispose();
428
+ motionBlurPostProcess = null;
429
+ }
430
+ }
431
+ __name(disposeMotionBlurPostProcess, "disposeMotionBlurPostProcess");
432
+ function createMotionBlurPostProcess(scene, camera) {
433
+ motionBlurPostProcess = new import_babylonjs25.MotionBlurPostProcess("MotionBlurPostProcess", scene, 1, camera);
434
+ motionBlurPostProcess.motionStrength = 1;
435
+ motionBlurPostProcess.isObjectBased = true;
436
+ return motionBlurPostProcess;
437
+ }
438
+ __name(createMotionBlurPostProcess, "createMotionBlurPostProcess");
439
+ function serializeMotionBlurPostProcess() {
440
+ if (!motionBlurPostProcess) {
441
+ return null;
442
+ }
443
+ return {
444
+ isObjectBased: motionBlurPostProcess.isObjectBased,
445
+ motionStrength: motionBlurPostProcess.motionStrength,
446
+ motionBlurSamples: motionBlurPostProcess.motionBlurSamples
447
+ };
448
+ }
449
+ __name(serializeMotionBlurPostProcess, "serializeMotionBlurPostProcess");
450
+ function parseMotionBlurPostProcess(scene, camera, data) {
451
+ if (motionBlurPostProcess) {
452
+ return motionBlurPostProcess;
453
+ }
454
+ const postProcess = createMotionBlurPostProcess(scene, camera);
455
+ postProcess.isObjectBased = data.isObjectBased;
456
+ postProcess.motionStrength = data.motionStrength;
457
+ postProcess.motionBlurSamples = data.motionBlurSamples;
458
+ return postProcess;
459
+ }
460
+ __name(parseMotionBlurPostProcess, "parseMotionBlurPostProcess");
461
+
462
+ // src/rendering/default-pipeline.ts
463
+ var import_babylonjs28 = require("babylonjs");
464
+ var import_babylonjs29 = require("babylonjs");
465
+ var import_babylonjs30 = require("babylonjs");
466
+ var defaultRenderingPipeline = null;
467
+ var defaultPipelineCameraConfigurations = /* @__PURE__ */ new Map();
468
+ function getDefaultRenderingPipeline() {
469
+ return defaultRenderingPipeline;
470
+ }
471
+ __name(getDefaultRenderingPipeline, "getDefaultRenderingPipeline");
472
+ function disposeDefaultRenderingPipeline() {
473
+ if (defaultRenderingPipeline) {
474
+ defaultRenderingPipeline.dispose();
475
+ defaultRenderingPipeline = null;
476
+ }
477
+ }
478
+ __name(disposeDefaultRenderingPipeline, "disposeDefaultRenderingPipeline");
479
+ function createDefaultRenderingPipeline(scene, camera) {
480
+ defaultRenderingPipeline = new import_babylonjs30.DefaultRenderingPipeline("DefaultRenderingPipeline", true, scene, [camera]);
481
+ defaultRenderingPipeline.samples = 4;
482
+ defaultRenderingPipeline.depthOfField.lensSize = 512;
483
+ defaultRenderingPipeline.depthOfField.fStop = 0.25;
484
+ defaultRenderingPipeline.depthOfField.focusDistance = 55e3;
485
+ return defaultRenderingPipeline;
486
+ }
487
+ __name(createDefaultRenderingPipeline, "createDefaultRenderingPipeline");
488
+ function serializeDefaultRenderingPipeline() {
489
+ if (!defaultRenderingPipeline) {
490
+ return null;
491
+ }
492
+ return {
493
+ samples: defaultRenderingPipeline.samples,
494
+ fxaaEnabled: defaultRenderingPipeline.fxaaEnabled,
495
+ imageProcessingEnabled: defaultRenderingPipeline.imageProcessingEnabled,
496
+ exposure: defaultRenderingPipeline.imageProcessing?.exposure,
497
+ contrast: defaultRenderingPipeline.imageProcessing?.contrast,
498
+ fromLinearSpace: defaultRenderingPipeline.imageProcessing?.fromLinearSpace,
499
+ toneMappingEnabled: defaultRenderingPipeline.imageProcessing?.toneMappingEnabled,
500
+ toneMappingType: defaultRenderingPipeline.imageProcessing?.toneMappingType,
501
+ ditheringEnabled: defaultRenderingPipeline.imageProcessing?.ditheringEnabled,
502
+ ditheringIntensity: defaultRenderingPipeline.imageProcessing?.ditheringIntensity,
503
+ bloomEnabled: defaultRenderingPipeline.bloomEnabled,
504
+ bloomThreshold: defaultRenderingPipeline.bloomThreshold,
505
+ bloomWeight: defaultRenderingPipeline.bloomWeight,
506
+ bloomScale: defaultRenderingPipeline.bloomScale,
507
+ bloomKernel: defaultRenderingPipeline.bloomKernel,
508
+ sharpenEnabled: defaultRenderingPipeline.sharpenEnabled,
509
+ sharpenEdgeAmount: defaultRenderingPipeline.sharpen.edgeAmount,
510
+ sharpenColorAmount: defaultRenderingPipeline.sharpen.colorAmount,
511
+ grainEnabled: defaultRenderingPipeline.grainEnabled,
512
+ grainIntensity: defaultRenderingPipeline.grain.intensity,
513
+ grainAnimated: defaultRenderingPipeline.grain.animated,
514
+ depthOfFieldEnabled: defaultRenderingPipeline.depthOfFieldEnabled,
515
+ depthOfFieldBlurLevel: defaultRenderingPipeline.depthOfFieldBlurLevel,
516
+ lensSize: defaultRenderingPipeline.depthOfField.lensSize,
517
+ fStop: defaultRenderingPipeline.depthOfField.fStop,
518
+ focusDistance: defaultRenderingPipeline.depthOfField.focusDistance,
519
+ focalLength: defaultRenderingPipeline.depthOfField.focalLength,
520
+ // Since v5.0.0-alpha.9
521
+ vignetteEnabled: defaultRenderingPipeline.imageProcessing?.vignetteEnabled,
522
+ vignetteColor: defaultRenderingPipeline.imageProcessing?.vignetteColor.asArray(),
523
+ vignetteWeight: defaultRenderingPipeline.imageProcessing?.vignetteWeight,
524
+ chromaticAberrationEnabled: defaultRenderingPipeline.chromaticAberrationEnabled,
525
+ aberrationAmount: defaultRenderingPipeline.chromaticAberration.aberrationAmount,
526
+ radialIntensity: defaultRenderingPipeline.chromaticAberration.radialIntensity,
527
+ direction: defaultRenderingPipeline.chromaticAberration.direction.asArray(),
528
+ centerPosition: defaultRenderingPipeline.chromaticAberration.centerPosition.asArray(),
529
+ glowLayerEnabled: defaultRenderingPipeline.glowLayerEnabled,
530
+ glowLayerIntensity: defaultRenderingPipeline.glowLayer?.intensity,
531
+ glowLayerBlurKernelSize: defaultRenderingPipeline.glowLayer?.blurKernelSize
532
+ };
533
+ }
534
+ __name(serializeDefaultRenderingPipeline, "serializeDefaultRenderingPipeline");
535
+ function parseDefaultRenderingPipeline(scene, camera, data) {
536
+ if (defaultRenderingPipeline) {
537
+ return defaultRenderingPipeline;
538
+ }
539
+ const pipeline = createDefaultRenderingPipeline(scene, camera);
540
+ pipeline.samples = data.samples;
541
+ pipeline.fxaaEnabled = data.fxaaEnabled;
542
+ pipeline.imageProcessingEnabled = data.imageProcessingEnabled;
543
+ if (pipeline.imageProcessing) {
544
+ pipeline.imageProcessing.exposure = data.exposure;
545
+ pipeline.imageProcessing.contrast = data.contrast;
546
+ pipeline.imageProcessing.fromLinearSpace = data.fromLinearSpace;
547
+ pipeline.imageProcessing.toneMappingEnabled = data.toneMappingEnabled;
548
+ pipeline.imageProcessing.toneMappingType = data.toneMappingType;
549
+ pipeline.imageProcessing.ditheringEnabled = data.ditheringEnabled;
550
+ pipeline.imageProcessing.ditheringIntensity = data.ditheringIntensity;
551
+ pipeline.imageProcessing.vignetteEnabled = data.vignetteEnabled ?? false;
552
+ pipeline.imageProcessing.vignetteColor = import_babylonjs28.Color4.FromArray(data.vignetteColor ?? [0, 0, 0]);
553
+ pipeline.imageProcessing.vignetteWeight = data.vignetteWeight ?? 0.3;
554
+ }
555
+ pipeline.bloomEnabled = data.bloomEnabled;
556
+ pipeline.bloomThreshold = data.bloomThreshold;
557
+ pipeline.bloomWeight = data.bloomWeight;
558
+ pipeline.bloomScale = data.bloomScale;
559
+ pipeline.bloomKernel = data.bloomKernel;
560
+ pipeline.sharpenEnabled = data.sharpenEnabled;
561
+ pipeline.sharpen.edgeAmount = data.sharpenEdgeAmount;
562
+ pipeline.sharpen.colorAmount = data.sharpenColorAmount;
563
+ pipeline.grainEnabled = data.grainEnabled;
564
+ pipeline.grain.intensity = data.grainIntensity;
565
+ pipeline.grain.animated = data.grainAnimated;
566
+ pipeline.depthOfFieldEnabled = data.depthOfFieldEnabled;
567
+ pipeline.depthOfFieldBlurLevel = data.depthOfFieldBlurLevel;
568
+ pipeline.depthOfField.lensSize = data.lensSize;
569
+ pipeline.depthOfField.fStop = data.fStop;
570
+ pipeline.depthOfField.focusDistance = data.focusDistance;
571
+ pipeline.depthOfField.focalLength = data.focalLength;
572
+ pipeline.chromaticAberrationEnabled = data.chromaticAberrationEnabled ?? false;
573
+ pipeline.chromaticAberration.aberrationAmount = data.aberrationAmount ?? 10;
574
+ pipeline.chromaticAberration.radialIntensity = data.radialIntensity ?? 1;
575
+ pipeline.chromaticAberration.direction = import_babylonjs29.Vector2.FromArray(data.direction ?? [0, 0]);
576
+ pipeline.chromaticAberration.centerPosition = import_babylonjs29.Vector2.FromArray(data.centerPosition ?? [0, 0]);
577
+ pipeline.glowLayerEnabled = data.glowLayerEnabled ?? false;
578
+ if (pipeline.glowLayer) {
579
+ pipeline.glowLayer.intensity = data.glowLayerIntensity ?? 1;
580
+ pipeline.glowLayer.blurKernelSize = data.glowLayerBlurKernelSize ?? 32;
581
+ }
582
+ return pipeline;
583
+ }
584
+ __name(parseDefaultRenderingPipeline, "parseDefaultRenderingPipeline");
585
+
586
+ // src/loading/rendering.ts
587
+ function applyRenderingConfigurations(scene, rendering) {
588
+ const postProcessConfigurations = Array.isArray(rendering) ? rendering : [];
589
+ postProcessConfigurations.forEach((configuration) => {
590
+ const camera = scene.getCameraById(configuration.cameraId);
591
+ if (!camera) {
592
+ return;
593
+ }
594
+ if (configuration.ssao2RenderingPipeline) {
595
+ ssaoRenderingPipelineCameraConfigurations.set(camera, configuration.ssao2RenderingPipeline);
596
+ }
597
+ if (configuration.vlsPostProcess) {
598
+ vlsPostProcessCameraConfigurations.set(camera, configuration.vlsPostProcess);
599
+ }
600
+ if (configuration.ssrRenderingPipeline) {
601
+ ssrRenderingPipelineCameraConfigurations.set(camera, configuration.ssrRenderingPipeline);
602
+ }
603
+ if (configuration.motionBlurPostProcess) {
604
+ motionBlurPostProcessCameraConfigurations.set(camera, configuration.motionBlurPostProcess);
605
+ }
606
+ if (configuration.defaultRenderingPipeline) {
607
+ defaultPipelineCameraConfigurations.set(camera, configuration.defaultRenderingPipeline);
608
+ }
609
+ });
610
+ }
611
+ __name(applyRenderingConfigurations, "applyRenderingConfigurations");
612
+
613
+ // src/rendering/tools.ts
614
+ function saveRenderingConfigurationForCamera(camera) {
615
+ ssaoRenderingPipelineCameraConfigurations.set(camera, serializeSSAO2RenderingPipeline());
616
+ vlsPostProcessCameraConfigurations.set(camera, serializeVLSPostProcess());
617
+ ssrRenderingPipelineCameraConfigurations.set(camera, serializeSSRRenderingPipeline());
618
+ motionBlurPostProcessCameraConfigurations.set(camera, serializeMotionBlurPostProcess());
619
+ defaultPipelineCameraConfigurations.set(camera, serializeDefaultRenderingPipeline());
620
+ }
621
+ __name(saveRenderingConfigurationForCamera, "saveRenderingConfigurationForCamera");
622
+ function applyRenderingConfigurationForCamera(camera) {
623
+ disposeSSAO2RenderingPipeline();
624
+ disposeVLSPostProcess(camera.getScene());
625
+ disposeSSRRenderingPipeline();
626
+ disposeMotionBlurPostProcess();
627
+ disposeDefaultRenderingPipeline();
628
+ const ssao2RenderingPipeline = ssaoRenderingPipelineCameraConfigurations.get(camera);
629
+ if (ssao2RenderingPipeline) {
630
+ parseSSAO2RenderingPipeline(camera.getScene(), camera, ssao2RenderingPipeline);
631
+ }
632
+ const vlsPostProcess2 = vlsPostProcessCameraConfigurations.get(camera);
633
+ if (vlsPostProcess2) {
634
+ parseVLSPostProcess(camera.getScene(), vlsPostProcess2);
635
+ }
636
+ const ssrRenderingPipeline2 = ssrRenderingPipelineCameraConfigurations.get(camera);
637
+ if (ssrRenderingPipeline2) {
638
+ parseSSRRenderingPipeline(camera.getScene(), camera, ssrRenderingPipeline2);
639
+ }
640
+ const motionBlurPostProcess2 = motionBlurPostProcessCameraConfigurations.get(camera);
641
+ if (motionBlurPostProcess2) {
642
+ parseMotionBlurPostProcess(camera.getScene(), camera, motionBlurPostProcess2);
643
+ }
644
+ const defaultRenderingPipeline2 = defaultPipelineCameraConfigurations.get(camera);
645
+ if (defaultRenderingPipeline2) {
646
+ parseDefaultRenderingPipeline(camera.getScene(), camera, defaultRenderingPipeline2);
647
+ }
648
+ }
649
+ __name(applyRenderingConfigurationForCamera, "applyRenderingConfigurationForCamera");
650
+
651
+ // src/tools/light.ts
652
+ var import_babylonjs34 = require("babylonjs");
653
+ var import_babylonjs35 = require("babylonjs");
654
+ function configureShadowMapRenderListPredicate(scene) {
655
+ scene.lights.forEach((light) => {
656
+ const shadowMap = light.getShadowGenerator()?.getShadowMap();
657
+ if (!shadowMap) {
658
+ return;
659
+ }
660
+ shadowMap.renderListPredicate = (mesh) => {
661
+ const distance = import_babylonjs34.Vector3.Distance(mesh.getAbsolutePosition(), light.getAbsolutePosition());
662
+ return distance <= light.range;
663
+ };
664
+ });
665
+ }
666
+ __name(configureShadowMapRenderListPredicate, "configureShadowMapRenderListPredicate");
667
+ async function configureShadowMapRefreshRate(scene) {
668
+ scene.executeWhenReady(() => {
669
+ scene.lights.forEach((light) => {
670
+ const shadowMap = light.getShadowGenerator()?.getShadowMap();
671
+ if (shadowMap) {
672
+ shadowMap.refreshRate = light.metadata?.refreshRate ?? import_babylonjs35.RenderTargetTexture.REFRESHRATE_RENDER_ONEVERYFRAME;
673
+ }
674
+ });
675
+ });
676
+ }
677
+ __name(configureShadowMapRefreshRate, "configureShadowMapRefreshRate");
678
+
679
+ // src/loading/sound.ts
680
+ var import_babylonjs38 = require("babylonjs");
681
+ var import_babylonjs39 = require("babylonjs");
682
+ var audioParser = (0, import_babylonjs39.GetParser)(import_babylonjs38.SceneComponentConstants.NAME_AUDIO);
683
+ (0, import_babylonjs39.AddParser)(import_babylonjs38.SceneComponentConstants.NAME_AUDIO, (parsedData, scene, container, rootUrl) => {
684
+ audioParser?.(parsedData, scene, container, rootUrl);
685
+ parsedData.sounds?.forEach((sound) => {
686
+ const instance = container.sounds?.find((s) => s.name === sound.name);
687
+ if (instance) {
688
+ instance.id = sound.id;
689
+ instance.uniqueId = sound.uniqueId;
690
+ }
691
+ });
692
+ });
693
+
694
+ // src/tools/scalar.ts
695
+ function getPowerOfTwoUntil(limit) {
696
+ let size = 1;
697
+ while (size <= limit) {
698
+ size <<= 1;
699
+ }
700
+ return size >> 1;
701
+ }
702
+ __name(getPowerOfTwoUntil, "getPowerOfTwoUntil");
703
+
704
+ // src/loading/texture.ts
705
+ var import_babylonjs43 = require("babylonjs");
706
+ var textureParser = import_babylonjs43.SerializationHelper._TextureParser;
707
+ import_babylonjs43.SerializationHelper._TextureParser = (sourceProperty, scene, rootUrl) => {
708
+ if (scene.loadingQuality === "high" || !sourceProperty.metadata?.baseSize) {
709
+ return textureParser(sourceProperty, scene, rootUrl);
710
+ }
711
+ const width = sourceProperty.metadata.baseSize.width;
712
+ const height = sourceProperty.metadata.baseSize.height;
713
+ const isPowerOfTwo = width === getPowerOfTwoUntil(width) || height === getPowerOfTwoUntil(height);
714
+ let suffix = "";
715
+ switch (scene.loadingQuality) {
716
+ case "medium":
717
+ let midWidth = width * 0.66 >> 0;
718
+ let midHeight = height * 0.66 >> 0;
719
+ if (isPowerOfTwo) {
720
+ midWidth = getPowerOfTwoUntil(midWidth);
721
+ midHeight = getPowerOfTwoUntil(midHeight);
722
+ }
723
+ suffix = `_${midWidth}_${midHeight}`;
724
+ break;
725
+ case "low":
726
+ let lowWidth = width * 0.33 >> 0;
727
+ let lowHeight = height * 0.33 >> 0;
728
+ if (isPowerOfTwo) {
729
+ lowWidth = getPowerOfTwoUntil(lowWidth);
730
+ lowHeight = getPowerOfTwoUntil(lowHeight);
731
+ }
732
+ suffix = `_${lowWidth}_${lowHeight}`;
733
+ break;
734
+ }
735
+ const name = sourceProperty.name;
736
+ if (!name || !suffix) {
737
+ return textureParser(sourceProperty, scene, rootUrl);
738
+ }
739
+ const finalUrl = name.split("/");
740
+ const filename = finalUrl.pop();
741
+ if (!filename) {
742
+ return textureParser(sourceProperty, scene, rootUrl);
743
+ }
744
+ const extension = filename.split(".").pop();
745
+ const baseFilename = filename.replace(`.${extension}`, "");
746
+ const newFilename = `${baseFilename}${suffix}.${extension}`;
747
+ finalUrl.push(newFilename);
748
+ sourceProperty.name = finalUrl.join("/");
749
+ return textureParser(sourceProperty, scene, rootUrl);
750
+ };
751
+
752
+ // src/loading/loader.ts
753
+ var import_babylonjs45 = require("babylonjs");
754
+ var import_babylonjs46 = require("babylonjs");
755
+ async function loadScene(rootUrl, sceneFilename, scene, scriptsMap, options) {
756
+ scene.loadingQuality = options?.quality ?? "high";
757
+ await (0, import_babylonjs45.AppendSceneAsync)(`${rootUrl}${sceneFilename}`, scene, {
758
+ pluginExtension: ".babylon",
759
+ onProgress: /* @__PURE__ */ __name((event) => {
760
+ const progress = Math.min(event.loaded / event.total * 0.5);
761
+ options?.onProgress?.(progress);
762
+ }, "onProgress")
763
+ });
764
+ if (import_babylonjs46.SceneLoaderFlags.ForceFullSceneLoadingForIncremental) {
765
+ scene.meshes.forEach((m) => isMesh(m) && m._checkDelayState());
766
+ }
767
+ const waitingItemsCount = scene.getWaitingItemsCount();
768
+ while (!scene.isReady() || scene.getWaitingItemsCount() > 0) {
769
+ await new Promise((resolve) => setTimeout(resolve, 150));
770
+ const loadedItemsCount = waitingItemsCount - scene.getWaitingItemsCount();
771
+ options?.onProgress?.(
772
+ 0.5 + loadedItemsCount / waitingItemsCount * 0.5
773
+ );
774
+ }
775
+ options?.onProgress?.(1);
776
+ configureShadowMapRenderListPredicate(scene);
777
+ configureShadowMapRefreshRate(scene);
778
+ if (scene.metadata?.rendering) {
779
+ applyRenderingConfigurations(scene, scene.metadata.rendering);
780
+ if (scene.activeCamera) {
781
+ applyRenderingConfigurationForCamera(scene.activeCamera);
782
+ }
783
+ }
784
+ applyScriptForObject(scene, scene, scriptsMap, rootUrl);
785
+ scene.transformNodes.forEach((transformNode) => {
786
+ applyScriptForObject(scene, transformNode, scriptsMap, rootUrl);
787
+ });
788
+ scene.meshes.forEach((mesh) => {
789
+ configurePhysicsAggregate(mesh);
790
+ applyScriptForObject(scene, mesh, scriptsMap, rootUrl);
791
+ });
792
+ scene.lights.forEach((light) => {
793
+ applyScriptForObject(scene, light, scriptsMap, rootUrl);
794
+ });
795
+ scene.cameras.forEach((camera) => {
796
+ applyScriptForObject(scene, camera, scriptsMap, rootUrl);
797
+ });
798
+ }
799
+ __name(loadScene, "loadScene");
800
+
801
+ // src/tools/texture.ts
802
+ function configureEngineToUseCompressedTextures(engine) {
803
+ engine.setTextureFormatToUse([
804
+ "-dxt.ktx",
805
+ "-astc.ktx",
806
+ "-pvrtc.ktx",
807
+ "-etc1.ktx",
808
+ "-etc2.ktx"
809
+ ]);
810
+ }
811
+ __name(configureEngineToUseCompressedTextures, "configureEngineToUseCompressedTextures");
812
+
813
+ // src/decorators/scene.ts
814
+ function nodeFromScene(nodeName) {
815
+ return function(target, propertyKey) {
816
+ const ctor = target.constructor;
817
+ ctor._NodesFromScene ??= [];
818
+ ctor._NodesFromScene.push({ propertyKey, nodeName });
819
+ };
820
+ }
821
+ __name(nodeFromScene, "nodeFromScene");
822
+ function nodeFromDescendants(nodeName, directDescendantsOnly = false) {
823
+ return function(target, propertyKey) {
824
+ const ctor = target.constructor;
825
+ ctor._NodesFromDescendants ??= [];
826
+ ctor._NodesFromDescendants.push({ propertyKey, nodeName, directDescendantsOnly });
827
+ };
828
+ }
829
+ __name(nodeFromDescendants, "nodeFromDescendants");
830
+ function animationGroupFromScene(animationGroupName) {
831
+ return function(target, propertyKey) {
832
+ const ctor = target.constructor;
833
+ ctor._AnimationGroups ??= [];
834
+ ctor._AnimationGroups.push({ animationGroupName, propertyKey });
835
+ };
836
+ }
837
+ __name(animationGroupFromScene, "animationGroupFromScene");
838
+
839
+ // src/decorators/gui.ts
840
+ function guiFromAsset(pathInAssets, onGuiCreated) {
841
+ return function(target, propertyKey) {
842
+ const ctor = target.constructor;
843
+ ctor._GuiFromAsset ??= [];
844
+ ctor._GuiFromAsset.push({ propertyKey, pathInAssets, onGuiCreated });
845
+ };
846
+ }
847
+ __name(guiFromAsset, "guiFromAsset");
848
+
849
+ // src/decorators/sound.ts
850
+ function soundFromScene(soundName) {
851
+ return function(target, propertyKey) {
852
+ const ctor = target.constructor;
853
+ ctor._SoundsFromScene ??= [];
854
+ ctor._SoundsFromScene.push({ propertyKey, soundName });
855
+ };
856
+ }
857
+ __name(soundFromScene, "soundFromScene");
858
+
859
+ // src/decorators/particle-systems.ts
860
+ function particleSystemFromScene(particleSystemName) {
861
+ return function(target, propertyKey) {
862
+ const ctor = target.constructor;
863
+ ctor._ParticleSystemsFromScene ??= [];
864
+ ctor._ParticleSystemsFromScene.push({ propertyKey, particleSystemName });
865
+ };
866
+ }
867
+ __name(particleSystemFromScene, "particleSystemFromScene");
868
+
869
+ // src/decorators/inspector.ts
870
+ function visibleAsBoolean(label) {
871
+ return function(target, propertyKey) {
872
+ const ctor = target.constructor;
873
+ ctor._VisibleInInspector ??= [];
874
+ ctor._VisibleInInspector.push({
875
+ label,
876
+ propertyKey,
877
+ configuration: {
878
+ type: "boolean"
879
+ }
880
+ });
881
+ };
882
+ }
883
+ __name(visibleAsBoolean, "visibleAsBoolean");
884
+ function visibleAsNumber(label, configuration) {
885
+ return function(target, propertyKey) {
886
+ const ctor = target.constructor;
887
+ ctor._VisibleInInspector ??= [];
888
+ ctor._VisibleInInspector.push({
889
+ label,
890
+ propertyKey,
891
+ configuration: {
892
+ ...configuration,
893
+ type: "number"
894
+ }
895
+ });
896
+ };
897
+ }
898
+ __name(visibleAsNumber, "visibleAsNumber");
899
+ function visibleAsVector2(label, configuration) {
900
+ return function(target, propertyKey) {
901
+ const ctor = target.constructor;
902
+ ctor._VisibleInInspector ??= [];
903
+ ctor._VisibleInInspector.push({
904
+ label,
905
+ propertyKey,
906
+ configuration: {
907
+ ...configuration,
908
+ type: "vector2"
909
+ }
910
+ });
911
+ };
912
+ }
913
+ __name(visibleAsVector2, "visibleAsVector2");
914
+ function visibleAsVector3(label, configuration) {
915
+ return function(target, propertyKey) {
916
+ const ctor = target.constructor;
917
+ ctor._VisibleInInspector ??= [];
918
+ ctor._VisibleInInspector.push({
919
+ label,
920
+ propertyKey,
921
+ configuration: {
922
+ ...configuration,
923
+ type: "vector3"
924
+ }
925
+ });
926
+ };
927
+ }
928
+ __name(visibleAsVector3, "visibleAsVector3");
929
+ function visibleAsColor3(label, configuration) {
930
+ return function(target, propertyKey) {
931
+ const ctor = target.constructor;
932
+ ctor._VisibleInInspector ??= [];
933
+ ctor._VisibleInInspector.push({
934
+ label,
935
+ propertyKey,
936
+ configuration: {
937
+ ...configuration,
938
+ type: "color3"
939
+ }
940
+ });
941
+ };
942
+ }
943
+ __name(visibleAsColor3, "visibleAsColor3");
944
+ function visibleAsColor4(label, configuration) {
945
+ return function(target, propertyKey) {
946
+ const ctor = target.constructor;
947
+ ctor._VisibleInInspector ??= [];
948
+ ctor._VisibleInInspector.push({
949
+ label,
950
+ propertyKey,
951
+ configuration: {
952
+ ...configuration,
953
+ type: "color4"
954
+ }
955
+ });
956
+ };
957
+ }
958
+ __name(visibleAsColor4, "visibleAsColor4");
959
+
960
+ // src/tools/sound.ts
961
+ function getSoundById(id, scene) {
962
+ const soundTracks = scene.soundTracks ?? [];
963
+ if (!soundTracks.length) {
964
+ soundTracks.push(scene.mainSoundTrack);
965
+ }
966
+ for (let i = 0, len = soundTracks.length; i < len; i++) {
967
+ const sound = soundTracks[i].soundCollection.find((s) => s.id === id);
968
+ if (sound) {
969
+ return sound;
970
+ }
971
+ }
972
+ return null;
973
+ }
974
+ __name(getSoundById, "getSoundById");
975
+
976
+ // src/cinematic/tools.ts
977
+ var import_babylonjs49 = require("babylonjs");
978
+ var import_babylonjs50 = require("babylonjs");
979
+ var import_babylonjs51 = require("babylonjs");
980
+ var import_babylonjs53 = require("babylonjs");
981
+ function cloneKey(dataType, key) {
982
+ let value;
983
+ switch (dataType) {
984
+ case import_babylonjs50.Animation.ANIMATIONTYPE_FLOAT:
985
+ value = key.value;
986
+ break;
987
+ default:
988
+ value = key.value.clone();
989
+ break;
990
+ }
991
+ return {
992
+ value,
993
+ frame: key.frame,
994
+ interpolation: key.interpolation,
995
+ inTangent: dataType === import_babylonjs50.Animation.ANIMATIONTYPE_FLOAT ? key.inTangent : key.inTangent?.clone(),
996
+ outTangent: dataType === import_babylonjs50.Animation.ANIMATIONTYPE_FLOAT ? key.outTangent : key.outTangent?.clone()
997
+ };
998
+ }
999
+ __name(cloneKey, "cloneKey");
1000
+ function getAnimationTypeForObject(effectiveProperty) {
1001
+ if (!isNaN(parseFloat(effectiveProperty)) && isFinite(effectiveProperty)) {
1002
+ return import_babylonjs50.Animation.ANIMATIONTYPE_FLOAT;
1003
+ } else if (effectiveProperty instanceof import_babylonjs53.Quaternion) {
1004
+ return import_babylonjs50.Animation.ANIMATIONTYPE_QUATERNION;
1005
+ } else if (effectiveProperty instanceof import_babylonjs53.Vector3) {
1006
+ return import_babylonjs50.Animation.ANIMATIONTYPE_VECTOR3;
1007
+ } else if (effectiveProperty instanceof import_babylonjs53.Vector2) {
1008
+ return import_babylonjs50.Animation.ANIMATIONTYPE_VECTOR2;
1009
+ } else if (effectiveProperty instanceof import_babylonjs51.Color3) {
1010
+ return import_babylonjs50.Animation.ANIMATIONTYPE_COLOR3;
1011
+ } else if (effectiveProperty instanceof import_babylonjs51.Color4) {
1012
+ return import_babylonjs50.Animation.ANIMATIONTYPE_COLOR4;
1013
+ } else if (effectiveProperty instanceof import_babylonjs49.Size) {
1014
+ return import_babylonjs50.Animation.ANIMATIONTYPE_SIZE;
1015
+ }
1016
+ return null;
1017
+ }
1018
+ __name(getAnimationTypeForObject, "getAnimationTypeForObject");
1019
+ function getPropertyValue(object, property) {
1020
+ const parts = property.split(".");
1021
+ let value = object;
1022
+ for (let i = 0; i < parts.length; ++i) {
1023
+ value = value[parts[i]];
1024
+ }
1025
+ return value;
1026
+ }
1027
+ __name(getPropertyValue, "getPropertyValue");
1028
+
1029
+ // src/cinematic/parse.ts
1030
+ var import_babylonjs56 = require("babylonjs");
1031
+ var import_babylonjs57 = require("babylonjs");
1032
+ var import_babylonjs58 = require("babylonjs");
1033
+ function parseCinematic(data, scene) {
1034
+ return {
1035
+ name: data.name,
1036
+ framesPerSecond: data.framesPerSecond,
1037
+ outputFramesPerSecond: data.outputFramesPerSecond,
1038
+ tracks: data.tracks.map((track) => {
1039
+ let node = null;
1040
+ let animationType = null;
1041
+ if (track.node) {
1042
+ node = scene.getNodeById(track.node);
1043
+ } else if (track.defaultRenderingPipeline) {
1044
+ node = getDefaultRenderingPipeline();
1045
+ }
1046
+ if (track.propertyPath) {
1047
+ const value = getPropertyValue(node, track.propertyPath);
1048
+ animationType = getAnimationTypeForObject(value);
1049
+ }
1050
+ let sound = null;
1051
+ if (track.sound) {
1052
+ sound = getSoundById(track.sound, scene);
1053
+ }
1054
+ return {
1055
+ node,
1056
+ sound,
1057
+ propertyPath: track.propertyPath,
1058
+ defaultRenderingPipeline: track.defaultRenderingPipeline,
1059
+ animationGroup: track.animationGroup ? scene.getAnimationGroupByName(track.animationGroup) : null,
1060
+ animationGroups: track.animationGroups,
1061
+ sounds: track.sounds,
1062
+ keyFrameEvents: track.keyFrameEvents,
1063
+ keyFrameAnimations: node && animationType !== null && track.keyFrameAnimations?.map((keyFrame) => {
1064
+ const animationKey = keyFrame.type === "key" ? keyFrame : null;
1065
+ if (animationKey) {
1066
+ return {
1067
+ ...animationKey,
1068
+ value: parseCinematicKeyValue(animationKey.value, animationType),
1069
+ inTangent: parseCinematicKeyValue(animationKey.inTangent, animationType),
1070
+ outTangent: parseCinematicKeyValue(animationKey.outTangent, animationType)
1071
+ };
1072
+ }
1073
+ const animationKeyCut = keyFrame.type === "cut" ? keyFrame : null;
1074
+ if (animationKeyCut) {
1075
+ return {
1076
+ ...animationKeyCut,
1077
+ key1: {
1078
+ ...animationKeyCut.key1,
1079
+ value: parseCinematicKeyValue(animationKeyCut.key1.value, animationType),
1080
+ inTangent: parseCinematicKeyValue(animationKeyCut.key1.inTangent, animationType),
1081
+ outTangent: parseCinematicKeyValue(animationKeyCut.key1.outTangent, animationType)
1082
+ },
1083
+ key2: {
1084
+ ...animationKeyCut.key2,
1085
+ value: parseCinematicKeyValue(animationKeyCut.key2.value, animationType),
1086
+ inTangent: parseCinematicKeyValue(animationKeyCut.key2.inTangent, animationType),
1087
+ outTangent: parseCinematicKeyValue(animationKeyCut.key2.outTangent, animationType)
1088
+ }
1089
+ };
1090
+ }
1091
+ })
1092
+ };
1093
+ })
1094
+ };
1095
+ }
1096
+ __name(parseCinematic, "parseCinematic");
1097
+ function parseCinematicKeyValue(value, type) {
1098
+ if (value === null) {
1099
+ return null;
1100
+ }
1101
+ if (value === void 0) {
1102
+ return void 0;
1103
+ }
1104
+ switch (type) {
1105
+ case import_babylonjs56.Animation.ANIMATIONTYPE_FLOAT:
1106
+ return value;
1107
+ case import_babylonjs56.Animation.ANIMATIONTYPE_VECTOR2:
1108
+ return import_babylonjs58.Vector2.FromArray(value);
1109
+ case import_babylonjs56.Animation.ANIMATIONTYPE_VECTOR3:
1110
+ return import_babylonjs58.Vector3.FromArray(value);
1111
+ case import_babylonjs56.Animation.ANIMATIONTYPE_QUATERNION:
1112
+ return import_babylonjs58.Quaternion.FromArray(value);
1113
+ case import_babylonjs56.Animation.ANIMATIONTYPE_COLOR3:
1114
+ return import_babylonjs57.Color3.FromArray(value);
1115
+ case import_babylonjs56.Animation.ANIMATIONTYPE_COLOR4:
1116
+ return import_babylonjs57.Color4.FromArray(value);
1117
+ case import_babylonjs56.Animation.ANIMATIONTYPE_MATRIX:
1118
+ return import_babylonjs58.Matrix.FromArray(value);
1119
+ }
1120
+ }
1121
+ __name(parseCinematicKeyValue, "parseCinematicKeyValue");
1122
+
1123
+ // src/cinematic/events/set-enabled.ts
1124
+ function handleSetEnabledEvent(scene, config) {
1125
+ const node = scene.getNodeById(config.node);
1126
+ node?.setEnabled(config.value);
1127
+ }
1128
+ __name(handleSetEnabledEvent, "handleSetEnabledEvent");
1129
+
1130
+ // src/cinematic/events/apply-impulse.ts
1131
+ var import_babylonjs61 = require("babylonjs");
1132
+ function handleApplyImpulseEvent(scene, config) {
1133
+ const meshes = config.mesh ? [scene.getNodeById(config.mesh)] : scene.meshes;
1134
+ meshes.forEach((mesh) => {
1135
+ if (mesh.physicsAggregate?.body) {
1136
+ mesh.physicsAggregate.body.applyImpulse(
1137
+ import_babylonjs61.Vector3.FromArray(config.force),
1138
+ import_babylonjs61.Vector3.FromArray(config.contactPoint)
1139
+ );
1140
+ }
1141
+ });
1142
+ }
1143
+ __name(handleApplyImpulseEvent, "handleApplyImpulseEvent");
1144
+
1145
+ // src/cinematic/generate.ts
1146
+ var import_babylonjs65 = require("babylonjs");
1147
+ var import_babylonjs67 = require("babylonjs");
1148
+ var import_babylonjs69 = require("babylonjs");
1149
+ var import_babylonjs70 = require("babylonjs");
1150
+ function generateCinematicAnimationGroup(cinematic, scene) {
1151
+ const result = new import_babylonjs70.AnimationGroup(cinematic.name, scene);
1152
+ cinematic.tracks.forEach((track) => {
1153
+ const animationGroup = track.animationGroup;
1154
+ if (animationGroup) {
1155
+ track.animationGroups?.forEach((configuration) => {
1156
+ animationGroup.targetedAnimations.forEach((targetedAnimation) => {
1157
+ let animation2 = null;
1158
+ defer: {
1159
+ const existingTargetedAnimations = result.targetedAnimations.filter((ta2) => ta2.target === targetedAnimation.target);
1160
+ if (existingTargetedAnimations.length) {
1161
+ const existingTargetedAnimationsPair = existingTargetedAnimations.find((et) => et.animation.targetProperty === targetedAnimation.animation.targetProperty);
1162
+ if (existingTargetedAnimationsPair) {
1163
+ animation2 = existingTargetedAnimationsPair.animation;
1164
+ break defer;
1165
+ }
1166
+ }
1167
+ animation2 = targetedAnimation.animation.clone();
1168
+ animation2.setKeys([]);
1169
+ animation2.name = import_babylonjs65.Tools.RandomId();
1170
+ animation2.framePerSecond = cinematic.framesPerSecond;
1171
+ }
1172
+ const keys2 = animation2.getKeys();
1173
+ const sourceKeys = targetedAnimation.animation.getKeys();
1174
+ const speed = configuration.speed;
1175
+ const normalizedFps = cinematic.framesPerSecond / targetedAnimation.animation.framePerSecond / speed;
1176
+ sourceKeys.forEach((k) => {
1177
+ if (k.frame >= configuration.startFrame && k.frame <= configuration.endFrame) {
1178
+ keys2.push({
1179
+ ...cloneKey(targetedAnimation.animation.dataType, k),
1180
+ frame: configuration.frame + k.frame * normalizedFps
1181
+ });
1182
+ }
1183
+ });
1184
+ animation2.setKeys(keys2);
1185
+ result.addTargetedAnimation(animation2, targetedAnimation.target);
1186
+ });
1187
+ });
1188
+ }
1189
+ const sound = track.sound;
1190
+ const soundBuffer = sound?.getAudioBuffer();
1191
+ if (sound && soundBuffer && track.sounds?.length) {
1192
+ const dummyObject = {
1193
+ dummy: 0
1194
+ };
1195
+ const soundAnimation = new import_babylonjs67.Animation(sound.name, "dummy", 60, import_babylonjs67.Animation.ANIMATIONTYPE_FLOAT, import_babylonjs67.Animation.ANIMATIONLOOPMODE_CYCLE, false);
1196
+ let maxFrame = 0;
1197
+ track.sounds?.forEach((configuration) => {
1198
+ const duration = configuration.endFrame - configuration.startFrame;
1199
+ maxFrame = Math.max(maxFrame, configuration.frame + duration);
1200
+ soundAnimation.addEvent(new import_babylonjs69.AnimationEvent(configuration.frame, (currentFrame) => {
1201
+ const frameDiff = currentFrame - configuration.frame;
1202
+ const offset = (frameDiff + configuration.startFrame) / cinematic.framesPerSecond;
1203
+ sound.play(0, offset);
1204
+ }, false));
1205
+ soundAnimation.addEvent(new import_babylonjs69.AnimationEvent(configuration.frame + duration, () => {
1206
+ sound.stop();
1207
+ }));
1208
+ });
1209
+ soundAnimation.setKeys([
1210
+ { frame: 0, value: 0 },
1211
+ { frame: maxFrame, value: maxFrame }
1212
+ ]);
1213
+ result.addTargetedAnimation(soundAnimation, dummyObject);
1214
+ }
1215
+ if (track.keyFrameEvents) {
1216
+ const dummyObject = {
1217
+ dummy: 0
1218
+ };
1219
+ const eventsAnimation = new import_babylonjs67.Animation("events", "dummy", 60, import_babylonjs67.Animation.ANIMATIONTYPE_FLOAT, import_babylonjs67.Animation.ANIMATIONLOOPMODE_CYCLE, false);
1220
+ let maxFrame = 0;
1221
+ track.keyFrameEvents?.forEach((configuration) => {
1222
+ maxFrame = Math.max(maxFrame, configuration.frame);
1223
+ eventsAnimation.addEvent(new import_babylonjs69.AnimationEvent(configuration.frame, () => {
1224
+ switch (configuration.data?.type) {
1225
+ case "set-enabled":
1226
+ handleSetEnabledEvent(scene, configuration.data);
1227
+ break;
1228
+ case "apply-impulse":
1229
+ handleApplyImpulseEvent(scene, configuration.data);
1230
+ break;
1231
+ }
1232
+ }));
1233
+ });
1234
+ eventsAnimation.setKeys([
1235
+ { frame: 0, value: 0 },
1236
+ { frame: maxFrame, value: maxFrame }
1237
+ ]);
1238
+ result.addTargetedAnimation(eventsAnimation, dummyObject);
1239
+ }
1240
+ const node = track.defaultRenderingPipeline ? getDefaultRenderingPipeline() : track.node;
1241
+ if (!node || !track.propertyPath || !track.keyFrameAnimations) {
1242
+ return;
1243
+ }
1244
+ const value = getPropertyValue(node, track.propertyPath);
1245
+ const animationType = getAnimationTypeForObject(value);
1246
+ if (animationType === null) {
1247
+ return;
1248
+ }
1249
+ const animation = new import_babylonjs67.Animation(track.propertyPath, track.propertyPath, 60, animationType, import_babylonjs67.Animation.ANIMATIONLOOPMODE_CYCLE, false);
1250
+ const keys = [];
1251
+ track.keyFrameAnimations?.forEach((keyFrame) => {
1252
+ const animationKey = keyFrame.type === "key" ? keyFrame : null;
1253
+ if (animationKey) {
1254
+ return keys.push(animationKey);
1255
+ }
1256
+ const animationKeyCut = keyFrame.type === "cut" ? keyFrame : null;
1257
+ if (animationKeyCut) {
1258
+ keys.push(animationKeyCut.key1);
1259
+ keys.push(animationKeyCut.key2);
1260
+ }
1261
+ });
1262
+ animation.setKeys(keys);
1263
+ result.addTargetedAnimation(animation, node);
1264
+ });
1265
+ result.normalize();
1266
+ return result;
1267
+ }
1268
+ __name(generateCinematicAnimationGroup, "generateCinematicAnimationGroup");
1269
+ // Annotate the CommonJS export names for ESM import in node:
1270
+ 0 && (module.exports = {
1271
+ animationGroupFromScene,
1272
+ configureEngineToUseCompressedTextures,
1273
+ createDefaultRenderingPipeline,
1274
+ createMotionBlurPostProcess,
1275
+ createSSAO2RenderingPipeline,
1276
+ createSSRRenderingPipeline,
1277
+ createVLSPostProcess,
1278
+ defaultPipelineCameraConfigurations,
1279
+ disposeDefaultRenderingPipeline,
1280
+ disposeMotionBlurPostProcess,
1281
+ disposeSSAO2RenderingPipeline,
1282
+ disposeSSRRenderingPipeline,
1283
+ disposeVLSPostProcess,
1284
+ generateCinematicAnimationGroup,
1285
+ getDefaultRenderingPipeline,
1286
+ getMotionBlurPostProcess,
1287
+ getSSAO2RenderingPipeline,
1288
+ getSSRRenderingPipeline,
1289
+ getVLSPostProcess,
1290
+ guiFromAsset,
1291
+ loadScene,
1292
+ motionBlurPostProcessCameraConfigurations,
1293
+ nodeFromDescendants,
1294
+ nodeFromScene,
1295
+ parseCinematic,
1296
+ parseCinematicKeyValue,
1297
+ parseDefaultRenderingPipeline,
1298
+ parseMotionBlurPostProcess,
1299
+ parseSSAO2RenderingPipeline,
1300
+ parseSSRRenderingPipeline,
1301
+ parseVLSPostProcess,
1302
+ particleSystemFromScene,
1303
+ serializeDefaultRenderingPipeline,
1304
+ serializeMotionBlurPostProcess,
1305
+ serializeSSAO2RenderingPipeline,
1306
+ serializeSSRRenderingPipeline,
1307
+ serializeVLSPostProcess,
1308
+ soundFromScene,
1309
+ ssaoRenderingPipelineCameraConfigurations,
1310
+ ssrRenderingPipelineCameraConfigurations,
1311
+ visibleAsBoolean,
1312
+ visibleAsColor3,
1313
+ visibleAsColor4,
1314
+ visibleAsNumber,
1315
+ visibleAsVector2,
1316
+ visibleAsVector3,
1317
+ vlsPostProcessCameraConfigurations
1318
+ });