@fps-games/editor 0.1.4-beta.4 → 0.1.5-beta.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/build-info.json +45 -0
- package/dist/local-editor-harness.d.ts +25 -5
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +518 -90
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-performance-stats.d.ts +12 -0
- package/dist/local-editor-performance-stats.d.ts.map +1 -0
- package/dist/local-editor-performance-stats.js +46 -0
- package/dist/local-editor-performance-stats.js.map +1 -0
- package/dist/playable-babylon-facade.d.ts +4 -4
- package/dist/playable-babylon-facade.d.ts.map +1 -1
- package/dist/playable-babylon-facade.js +2 -2
- package/dist/playable-babylon-facade.js.map +1 -1
- package/dist/playable-babylon-rendering.d.ts +66 -9
- package/dist/playable-babylon-rendering.d.ts.map +1 -1
- package/dist/playable-babylon-rendering.js +567 -13
- package/dist/playable-babylon-rendering.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +12 -9
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-sdk-vite.d.ts +2 -0
- package/dist/playable-sdk-vite.d.ts.map +1 -0
- package/dist/playable-sdk-vite.js +2 -0
- package/dist/playable-sdk-vite.js.map +1 -0
- package/dist/playable-sdk.d.ts +6 -4
- package/dist/playable-sdk.d.ts.map +1 -1
- package/dist/playable-sdk.js +3 -2
- package/dist/playable-sdk.js.map +1 -1
- package/dist/static-shadow-cpu-worker.d.ts +7 -0
- package/dist/static-shadow-cpu-worker.d.ts.map +1 -0
- package/dist/static-shadow-cpu-worker.js +221 -0
- package/dist/static-shadow-cpu-worker.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/index.d.ts +5 -0
- package/node_modules/@fps-games/babylon-renderer/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/index.js +5 -0
- package/node_modules/@fps-games/babylon-renderer/dist/index.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-shaders.d.ts +5 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-shaders.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-shaders.js +46 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-shaders.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-system.d.ts +5 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-system.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-system.js +398 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/blob-shadow-system.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.d.ts +4 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.js +584 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.d.ts +61 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.js +382 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.d.ts +47 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.js +285 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.d.ts +88 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.js +813 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.d.ts +27 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.js +220 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.d.ts +38 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.js +173 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.d.ts +286 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.js +82 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/index.d.ts +3 -0
- package/node_modules/@fps-games/editor-babylon/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/index.js +3 -0
- package/node_modules/@fps-games/editor-babylon/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.d.ts +34 -0
- package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.js +272 -0
- package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-asset-container-importer.d.ts +49 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-asset-container-importer.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-asset-container-importer.js +141 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection-asset-container-importer.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +11 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +137 -6
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/rendering.d.ts +19 -0
- package/node_modules/@fps-games/editor-babylon/dist/rendering.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/rendering.js +66 -0
- package/node_modules/@fps-games/editor-babylon/dist/rendering.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.d.ts +17 -3
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.js +256 -8
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +19 -2
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +5 -5
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.d.ts +8 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.js +14 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.js +10 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +17 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +494 -43
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +72 -5
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +595 -5
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +3 -3
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +14 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.js +34 -10
- package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/inspector.d.ts +2 -1
- package/node_modules/@fps-games/editor-core/dist/inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/inspector.js +11 -1
- package/node_modules/@fps-games/editor-core/dist/inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/serialized-object.d.ts +7 -0
- package/node_modules/@fps-games/editor-core/dist/serialized-object.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/serialized-object.js +1 -0
- package/node_modules/@fps-games/editor-core/dist/serialized-object.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +2 -2
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.js +10 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.js +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts +4 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +29 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/types.d.ts +12 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.js +5 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/validators.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/validators.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/validators.js +8 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/validators.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.d.ts +34 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.js +272 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +0 -4
- package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.d.ts +12 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.js +161 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.d.ts +4 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.js +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.js +4 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.d.ts +19 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.js +57 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/types.d.ts +7 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js +1003 -7
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.d.ts +12 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.js +521 -6
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts +217 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.js +26 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/types.d.ts +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.d.ts +9 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.js +12 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.js +75 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.d.ts +17 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.js +262 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/object.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/object.js +7 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/object.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.d.ts +6 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.js +31 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.js +21 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.d.ts +151 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.js +445 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.js +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +37 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts +15 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/build-info-core.d.ts +36 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/build-info-core.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/build-info-core.js +65 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/build-info-core.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/build-info-node.d.ts +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/build-info-node.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/build-info-node.js +87 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/build-info-node.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +5 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts +8 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js +226 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts +64 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/package.json +7 -3
- package/node_modules/@fps-games/editor-protocol/package.json +1 -1
- package/package.json +12 -8
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
const EMPTY_PERFORMANCE_SNAPSHOT = {
|
|
2
|
+
drawCalls: null,
|
|
3
|
+
meshes: null,
|
|
4
|
+
activeMeshes: null,
|
|
5
|
+
meshClassCounts: null,
|
|
6
|
+
activeMeshClassCounts: null,
|
|
7
|
+
meshCategoryCounts: null,
|
|
8
|
+
activeMeshCategoryCounts: null,
|
|
9
|
+
materials: null,
|
|
10
|
+
textures: null,
|
|
11
|
+
lights: null,
|
|
12
|
+
cameras: null,
|
|
13
|
+
};
|
|
14
|
+
export function createBabylonEditorPerformanceMonitor(scene) {
|
|
15
|
+
let disposed = false;
|
|
16
|
+
let latestDrawCalls = null;
|
|
17
|
+
const cleanupCallbacks = [];
|
|
18
|
+
const sceneLike = isRecord(scene) ? scene : null;
|
|
19
|
+
if (sceneLike) {
|
|
20
|
+
addSceneObserver(cleanupCallbacks, sceneLike.onBeforeAnimationsObservable, () => {
|
|
21
|
+
readDrawCallsCounter(sceneLike)?.fetchNewFrame?.();
|
|
22
|
+
});
|
|
23
|
+
addSceneObserver(cleanupCallbacks, sceneLike.onAfterRenderObservable, () => {
|
|
24
|
+
latestDrawCalls = readFiniteNumber(readDrawCallsCounter(sceneLike)?.current);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
readSnapshot() {
|
|
29
|
+
if (disposed || !sceneLike)
|
|
30
|
+
return cloneBabylonPerformanceSnapshot(EMPTY_PERFORMANCE_SNAPSHOT);
|
|
31
|
+
const meshCensus = readMeshCensus(sceneLike);
|
|
32
|
+
return {
|
|
33
|
+
drawCalls: latestDrawCalls,
|
|
34
|
+
meshes: meshCensus?.meshCount ?? readCollectionCount(sceneLike.meshes),
|
|
35
|
+
activeMeshes: meshCensus?.activeMeshCount ?? readActiveMeshesCount(sceneLike),
|
|
36
|
+
meshClassCounts: cloneBabylonMeshClassCounts(meshCensus?.meshClassCounts ?? null),
|
|
37
|
+
activeMeshClassCounts: cloneBabylonMeshClassCounts(meshCensus?.activeMeshClassCounts ?? null),
|
|
38
|
+
meshCategoryCounts: cloneBabylonMeshCategoryCounts(meshCensus?.meshCategoryCounts ?? null),
|
|
39
|
+
activeMeshCategoryCounts: cloneBabylonMeshCategoryCounts(meshCensus?.activeMeshCategoryCounts ?? null),
|
|
40
|
+
materials: readCollectionCount(sceneLike.materials),
|
|
41
|
+
textures: readCollectionCount(sceneLike.textures),
|
|
42
|
+
lights: readCollectionCount(sceneLike.lights),
|
|
43
|
+
cameras: readCollectionCount(sceneLike.cameras),
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
dispose() {
|
|
47
|
+
if (disposed)
|
|
48
|
+
return;
|
|
49
|
+
disposed = true;
|
|
50
|
+
for (const cleanup of cleanupCallbacks.splice(0))
|
|
51
|
+
cleanup();
|
|
52
|
+
latestDrawCalls = null;
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export function cloneBabylonPerformanceSnapshot(snapshot) {
|
|
57
|
+
return {
|
|
58
|
+
...snapshot,
|
|
59
|
+
meshClassCounts: cloneBabylonMeshClassCounts(snapshot.meshClassCounts),
|
|
60
|
+
activeMeshClassCounts: cloneBabylonMeshClassCounts(snapshot.activeMeshClassCounts),
|
|
61
|
+
meshCategoryCounts: cloneBabylonMeshCategoryCounts(snapshot.meshCategoryCounts),
|
|
62
|
+
activeMeshCategoryCounts: cloneBabylonMeshCategoryCounts(snapshot.activeMeshCategoryCounts),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function addSceneObserver(cleanupCallbacks, observable, callback) {
|
|
66
|
+
if (!isBabylonObservableLike(observable))
|
|
67
|
+
return;
|
|
68
|
+
const observer = observable.add(callback);
|
|
69
|
+
cleanupCallbacks.push(() => observable.remove(observer));
|
|
70
|
+
}
|
|
71
|
+
function isBabylonObservableLike(value) {
|
|
72
|
+
return !!value
|
|
73
|
+
&& typeof value === 'object'
|
|
74
|
+
&& typeof value.add === 'function'
|
|
75
|
+
&& typeof value.remove === 'function';
|
|
76
|
+
}
|
|
77
|
+
function isRecord(value) {
|
|
78
|
+
return !!value && typeof value === 'object';
|
|
79
|
+
}
|
|
80
|
+
function readDrawCallsCounter(scene) {
|
|
81
|
+
const engine = typeof scene?.getEngine === 'function' ? scene.getEngine() : null;
|
|
82
|
+
const counter = engine?._drawCalls;
|
|
83
|
+
return counter && typeof counter === 'object' ? counter : null;
|
|
84
|
+
}
|
|
85
|
+
function readActiveMeshesCount(scene) {
|
|
86
|
+
if (typeof scene?.getActiveMeshes !== 'function')
|
|
87
|
+
return null;
|
|
88
|
+
try {
|
|
89
|
+
return readCollectionCount(scene.getActiveMeshes());
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function readMeshCensus(scene) {
|
|
96
|
+
const meshes = readCollectionItems(scene.meshes);
|
|
97
|
+
if (!meshes)
|
|
98
|
+
return null;
|
|
99
|
+
const activeMeshes = readActiveMeshItems(scene);
|
|
100
|
+
const activeMeshSet = activeMeshes ? new Set(activeMeshes) : null;
|
|
101
|
+
const meshClassCounts = createEmptyMeshClassCounts();
|
|
102
|
+
const meshCategoryCounts = createEmptyMeshCategoryCounts();
|
|
103
|
+
const activeMeshClassCounts = activeMeshSet ? createEmptyMeshClassCounts() : null;
|
|
104
|
+
const activeMeshCategoryCounts = activeMeshSet ? createEmptyMeshCategoryCounts() : null;
|
|
105
|
+
for (const mesh of meshes) {
|
|
106
|
+
const classKey = classifyMeshClass(mesh);
|
|
107
|
+
const categoryKey = classifyMeshCategory(mesh);
|
|
108
|
+
meshClassCounts[classKey] += 1;
|
|
109
|
+
meshCategoryCounts[categoryKey] += 1;
|
|
110
|
+
if (activeMeshSet?.has(mesh)) {
|
|
111
|
+
activeMeshClassCounts[classKey] += 1;
|
|
112
|
+
activeMeshCategoryCounts[categoryKey] += 1;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
meshCount: meshes.length,
|
|
117
|
+
activeMeshCount: activeMeshes?.length ?? null,
|
|
118
|
+
meshClassCounts,
|
|
119
|
+
activeMeshClassCounts,
|
|
120
|
+
meshCategoryCounts,
|
|
121
|
+
activeMeshCategoryCounts,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function readActiveMeshItems(scene) {
|
|
125
|
+
if (typeof scene?.getActiveMeshes !== 'function')
|
|
126
|
+
return null;
|
|
127
|
+
try {
|
|
128
|
+
return readCollectionItems(scene.getActiveMeshes());
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function readCollectionItems(value) {
|
|
135
|
+
if (Array.isArray(value))
|
|
136
|
+
return value;
|
|
137
|
+
if (!value || typeof value !== 'object')
|
|
138
|
+
return null;
|
|
139
|
+
const data = value.data;
|
|
140
|
+
const length = readFiniteNumber(value.length);
|
|
141
|
+
if (Array.isArray(data) && length != null)
|
|
142
|
+
return data.slice(0, Math.max(0, Math.floor(length)));
|
|
143
|
+
if (length == null)
|
|
144
|
+
return null;
|
|
145
|
+
const items = [];
|
|
146
|
+
const indexed = value;
|
|
147
|
+
for (let index = 0; index < length; index += 1) {
|
|
148
|
+
if (!(index in indexed))
|
|
149
|
+
return null;
|
|
150
|
+
items.push(indexed[index]);
|
|
151
|
+
}
|
|
152
|
+
return items;
|
|
153
|
+
}
|
|
154
|
+
function readCollectionCount(value) {
|
|
155
|
+
if (!value || typeof value !== 'object')
|
|
156
|
+
return null;
|
|
157
|
+
const length = value.length;
|
|
158
|
+
return readFiniteNumber(length);
|
|
159
|
+
}
|
|
160
|
+
function readFiniteNumber(value) {
|
|
161
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : null;
|
|
162
|
+
}
|
|
163
|
+
function createEmptyMeshClassCounts() {
|
|
164
|
+
return {
|
|
165
|
+
mesh: 0,
|
|
166
|
+
instancedMesh: 0,
|
|
167
|
+
linesMesh: 0,
|
|
168
|
+
groundMesh: 0,
|
|
169
|
+
other: 0,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function createEmptyMeshCategoryCounts() {
|
|
173
|
+
return {
|
|
174
|
+
assetMesh: 0,
|
|
175
|
+
primitiveMesh: 0,
|
|
176
|
+
staticProjectedShadow: 0,
|
|
177
|
+
editorHelper: 0,
|
|
178
|
+
uncategorized: 0,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function cloneBabylonMeshClassCounts(counts) {
|
|
182
|
+
return counts ? { ...counts } : null;
|
|
183
|
+
}
|
|
184
|
+
function cloneBabylonMeshCategoryCounts(counts) {
|
|
185
|
+
return counts ? { ...counts } : null;
|
|
186
|
+
}
|
|
187
|
+
function classifyMeshClass(mesh) {
|
|
188
|
+
const className = readMeshClassName(mesh);
|
|
189
|
+
if (className === 'InstancedMesh')
|
|
190
|
+
return 'instancedMesh';
|
|
191
|
+
if (className === 'LinesMesh')
|
|
192
|
+
return 'linesMesh';
|
|
193
|
+
if (className === 'GroundMesh')
|
|
194
|
+
return 'groundMesh';
|
|
195
|
+
if (className === 'Mesh')
|
|
196
|
+
return 'mesh';
|
|
197
|
+
return 'other';
|
|
198
|
+
}
|
|
199
|
+
function readMeshClassName(mesh) {
|
|
200
|
+
if (!isRecord(mesh))
|
|
201
|
+
return '';
|
|
202
|
+
const getClassName = mesh.getClassName;
|
|
203
|
+
if (typeof getClassName === 'function') {
|
|
204
|
+
try {
|
|
205
|
+
const className = getClassName.call(mesh);
|
|
206
|
+
return typeof className === 'string' ? className : '';
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
return '';
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const constructorName = mesh.constructor?.name;
|
|
213
|
+
return typeof constructorName === 'string' ? constructorName : '';
|
|
214
|
+
}
|
|
215
|
+
function classifyMeshCategory(mesh) {
|
|
216
|
+
const projection = readEditorProjectionMetadata(mesh);
|
|
217
|
+
const runtimeKind = typeof projection?.runtimeKind === 'string' ? projection.runtimeKind : '';
|
|
218
|
+
if (isStaticProjectedShadowMesh(mesh))
|
|
219
|
+
return 'staticProjectedShadow';
|
|
220
|
+
if (runtimeKind === 'camera' || runtimeKind === 'light' || projection?.helper != null || isEditorHelperMesh(mesh)) {
|
|
221
|
+
return 'editorHelper';
|
|
222
|
+
}
|
|
223
|
+
if (runtimeKind === 'assetMesh')
|
|
224
|
+
return 'assetMesh';
|
|
225
|
+
if (runtimeKind === 'primitive' || projection?.primitiveShape != null)
|
|
226
|
+
return 'primitiveMesh';
|
|
227
|
+
return 'uncategorized';
|
|
228
|
+
}
|
|
229
|
+
function readEditorProjectionMetadata(mesh) {
|
|
230
|
+
if (!isRecord(mesh))
|
|
231
|
+
return null;
|
|
232
|
+
const metadata = isRecord(mesh.metadata) ? mesh.metadata : null;
|
|
233
|
+
const projection = metadata && isRecord(metadata.editorProjection) ? metadata.editorProjection : null;
|
|
234
|
+
return projection;
|
|
235
|
+
}
|
|
236
|
+
function isStaticProjectedShadowMesh(mesh) {
|
|
237
|
+
if (!isRecord(mesh))
|
|
238
|
+
return false;
|
|
239
|
+
const metadata = isRecord(mesh.metadata) ? mesh.metadata : null;
|
|
240
|
+
if (metadata?.staticProjectedShadowInternal === true)
|
|
241
|
+
return true;
|
|
242
|
+
const material = isRecord(mesh.material) ? mesh.material : null;
|
|
243
|
+
return hasPerformanceNameFragment(mesh, 'staticProjected')
|
|
244
|
+
|| hasPerformanceNameFragment(material, 'staticProjected');
|
|
245
|
+
}
|
|
246
|
+
function isEditorHelperMesh(mesh) {
|
|
247
|
+
if (!isRecord(mesh))
|
|
248
|
+
return false;
|
|
249
|
+
const metadata = isRecord(mesh.metadata) ? mesh.metadata : null;
|
|
250
|
+
if (metadata?.editorProjectionHelper === true)
|
|
251
|
+
return true;
|
|
252
|
+
const material = isRecord(mesh.material) ? mesh.material : null;
|
|
253
|
+
return hasPerformanceNameFragment(mesh, 'editor.world.sky')
|
|
254
|
+
|| hasPerformanceNameFragment(mesh, 'editor-grid')
|
|
255
|
+
|| hasPerformanceNameFragment(mesh, 'editorGrid')
|
|
256
|
+
|| hasPerformanceNameFragment(mesh, 'grid-screen-layer')
|
|
257
|
+
|| hasPerformanceNameFragment(material, 'editor.world.sky')
|
|
258
|
+
|| hasPerformanceNameFragment(material, 'editor-grid')
|
|
259
|
+
|| hasPerformanceNameFragment(material, 'editorGrid')
|
|
260
|
+
|| hasPerformanceNameFragment(material, 'grid-screen-layer');
|
|
261
|
+
}
|
|
262
|
+
function hasPerformanceNameFragment(value, fragment) {
|
|
263
|
+
if (!isRecord(value))
|
|
264
|
+
return false;
|
|
265
|
+
return readPerformanceNameCandidates(value)
|
|
266
|
+
.some(candidate => candidate.includes(fragment));
|
|
267
|
+
}
|
|
268
|
+
function readPerformanceNameCandidates(value) {
|
|
269
|
+
return [value.name, value.id]
|
|
270
|
+
.filter((candidate) => typeof candidate === 'string');
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=performance-monitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance-monitor.js","sourceRoot":"","sources":["../src/performance-monitor.ts"],"names":[],"mappings":"AA0CA,MAAM,0BAA0B,GAAqC;IACnE,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,IAAI;IACrB,qBAAqB,EAAE,IAAI;IAC3B,kBAAkB,EAAE,IAAI;IACxB,wBAAwB,EAAE,IAAI;IAC9B,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,MAAM,UAAU,qCAAqC,CACnD,KAAqB;IAErB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,eAAe,GAAkB,IAAI,CAAC;IAC1C,MAAM,gBAAgB,GAAsB,EAAE,CAAC;IAC/C,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAEjD,IAAI,SAAS,EAAE,CAAC;QACd,gBAAgB,CAAC,gBAAgB,EAAE,SAAS,CAAC,4BAA4B,EAAE,GAAG,EAAE;YAC9E,oBAAoB,CAAC,SAAS,C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C,OAAO,6BAA6B,CAAC,KAAK,CAAC;SACxC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,6BAA6B,CAAC,KAA0B;IAC/D,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,SAAS,EAAuB,EAAE,CAAC,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { BabylonEditorProjectionImportContext, BabylonEditorProjectionImporter } from './projection';
|
|
2
|
+
export interface BabylonAssetContainerProjectionContainer {
|
|
3
|
+
materials?: unknown[];
|
|
4
|
+
textures?: unknown[];
|
|
5
|
+
skeletons?: unknown[];
|
|
6
|
+
instantiateModelsToScene?: (nameFunction?: (sourceName: string) => string, cloneMaterials?: boolean, options?: {
|
|
7
|
+
doNotInstantiate?: boolean;
|
|
8
|
+
}) => BabylonAssetContainerProjectionInstantiatedEntries;
|
|
9
|
+
}
|
|
10
|
+
export interface BabylonAssetContainerProjectionInstantiatedEntries {
|
|
11
|
+
rootNodes?: unknown[];
|
|
12
|
+
animationGroups?: unknown[];
|
|
13
|
+
}
|
|
14
|
+
export type BabylonAssetContainerProjectionImportEvent = {
|
|
15
|
+
type: 'container-load-start';
|
|
16
|
+
cacheKey: string;
|
|
17
|
+
context: BabylonEditorProjectionImportContext;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'container-load-success';
|
|
20
|
+
cacheKey: string;
|
|
21
|
+
context: BabylonEditorProjectionImportContext;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'container-load-failure';
|
|
24
|
+
cacheKey: string;
|
|
25
|
+
context: BabylonEditorProjectionImportContext;
|
|
26
|
+
error: unknown;
|
|
27
|
+
} | {
|
|
28
|
+
type: 'container-cache-hit';
|
|
29
|
+
cacheKey: string;
|
|
30
|
+
context: BabylonEditorProjectionImportContext;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'instantiate';
|
|
33
|
+
cacheKey: string;
|
|
34
|
+
context: BabylonEditorProjectionImportContext;
|
|
35
|
+
doNotInstantiate: boolean;
|
|
36
|
+
};
|
|
37
|
+
export interface BabylonAssetContainerProjectionImporterOptions {
|
|
38
|
+
loadContainer(context: BabylonEditorProjectionImportContext): Promise<BabylonAssetContainerProjectionContainer>;
|
|
39
|
+
resolveCacheKey?(context: BabylonEditorProjectionImportContext): string | Promise<string | null | undefined> | null | undefined;
|
|
40
|
+
shouldCloneMeshes?(context: BabylonEditorProjectionImportContext): boolean;
|
|
41
|
+
createInstanceName?(input: {
|
|
42
|
+
sourceName: string;
|
|
43
|
+
cacheKey: string;
|
|
44
|
+
context: BabylonEditorProjectionImportContext;
|
|
45
|
+
}): string;
|
|
46
|
+
onEvent?(event: BabylonAssetContainerProjectionImportEvent): void;
|
|
47
|
+
}
|
|
48
|
+
export declare function createBabylonAssetContainerProjectionImporter(options: BabylonAssetContainerProjectionImporterOptions): BabylonEditorProjectionImporter;
|
|
49
|
+
//# sourceMappingURL=projection-asset-container-importer.d.ts.map
|
package/node_modules/@fps-games/editor-babylon/dist/projection-asset-container-importer.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection-asset-container-importer.d.ts","sourceRoot":"","sources":["../src/projection-asset-container-importer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oCAAoC,EACpC,+BAA+B,EAEhC,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,wCAAwC;IACvD,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IACtB,wBAAwB,CAAC,EAAE,CACzB,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,EAC7C,cA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AE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,oCAAoC,CAAC;KAC/C,GAAG,MAAM,CAAC;IACX,OAAO,CAAC,CAAC,KAAK,EAAE,0CAA0C,GAAG,IAAI,CAAC;CACnE;AAID,wBAAgB,6CAA6C,CAC3D,OAAO,EAAE,8CAA8C,GACtD,+BAA+B,CAwBjC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
export function createBabylonAssetContainerProjectionImporter(options) {
|
|
2
|
+
const sceneCaches = new WeakMap();
|
|
3
|
+
return async (context) => {
|
|
4
|
+
const cacheKey = await resolveProjectionContainerCacheKey(options, context);
|
|
5
|
+
const sceneCache = getProjectionContainerSceneCache(sceneCaches, context.scene);
|
|
6
|
+
const cached = sceneCache.get(cacheKey);
|
|
7
|
+
const containerPromise = cached ?? loadProjectionContainer(options, sceneCache, cacheKey, context);
|
|
8
|
+
if (cached) {
|
|
9
|
+
options.onEvent?.({ type: 'container-cache-hit', cacheKey, context });
|
|
10
|
+
}
|
|
11
|
+
const container = await containerPromise;
|
|
12
|
+
ensureProjectionContainerResourcesInScene(container, context.scene);
|
|
13
|
+
const doNotInstantiate = options.shouldCloneMeshes?.(context)
|
|
14
|
+
?? hasProjectionSlotMaterialProfiles(context);
|
|
15
|
+
options.onEvent?.({ type: 'instantiate', cacheKey, context, doNotInstantiate });
|
|
16
|
+
const entries = container.instantiateModelsToScene?.(sourceName => options.createInstanceName?.({ sourceName, cacheKey, context })
|
|
17
|
+
?? `${context.node.id}.projectionAsset.${sourceName}`, false, { doNotInstantiate });
|
|
18
|
+
return entries ? collectProjectionImportResult(entries) : null;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function getProjectionContainerSceneCache(sceneCaches, scene) {
|
|
22
|
+
let sceneCache = sceneCaches.get(scene);
|
|
23
|
+
if (!sceneCache) {
|
|
24
|
+
sceneCache = new Map();
|
|
25
|
+
sceneCaches.set(scene, sceneCache);
|
|
26
|
+
}
|
|
27
|
+
return sceneCache;
|
|
28
|
+
}
|
|
29
|
+
function loadProjectionContainer(options, sceneCache, cacheKey, context) {
|
|
30
|
+
options.onEvent?.({ type: 'container-load-start', cacheKey, context });
|
|
31
|
+
const promise = options.loadContainer(context)
|
|
32
|
+
.then(container => {
|
|
33
|
+
options.onEvent?.({ type: 'container-load-success', cacheKey, context });
|
|
34
|
+
return container;
|
|
35
|
+
})
|
|
36
|
+
.catch(error => {
|
|
37
|
+
if (sceneCache.get(cacheKey) === promise)
|
|
38
|
+
sceneCache.delete(cacheKey);
|
|
39
|
+
options.onEvent?.({ type: 'container-load-failure', cacheKey, context, error });
|
|
40
|
+
throw error;
|
|
41
|
+
});
|
|
42
|
+
sceneCache.set(cacheKey, promise);
|
|
43
|
+
return promise;
|
|
44
|
+
}
|
|
45
|
+
async function resolveProjectionContainerCacheKey(options, context) {
|
|
46
|
+
const resolved = await options.resolveCacheKey?.(context);
|
|
47
|
+
const baseKey = resolved && resolved.trim()
|
|
48
|
+
? resolved.trim()
|
|
49
|
+
: createDefaultProjectionContainerCacheKey(context);
|
|
50
|
+
return `${baseKey}|profiles:${stableProjectionCacheStringify({
|
|
51
|
+
artistMaterialKind: context.node.artistMaterialKind,
|
|
52
|
+
artistMaterialProfile: context.node.artistMaterialProfile,
|
|
53
|
+
artistMaterialSlotProfiles: context.node.artistMaterialSlotProfiles,
|
|
54
|
+
})}`;
|
|
55
|
+
}
|
|
56
|
+
function createDefaultProjectionContainerCacheKey(context) {
|
|
57
|
+
const asset = context.asset;
|
|
58
|
+
return stableProjectionCacheStringify({
|
|
59
|
+
assetId: asset.id,
|
|
60
|
+
sourceId: asset.sourceId,
|
|
61
|
+
url: readProjectionAssetUrlCandidate(asset.metadata),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function readProjectionAssetUrlCandidate(metadata) {
|
|
65
|
+
if (!metadata)
|
|
66
|
+
return undefined;
|
|
67
|
+
return metadata.url ?? metadata.sourceUrl ?? metadata.src ?? metadata.path;
|
|
68
|
+
}
|
|
69
|
+
function hasProjectionSlotMaterialProfiles(context) {
|
|
70
|
+
return Object.keys(context.node.artistMaterialSlotProfiles ?? {}).length > 0;
|
|
71
|
+
}
|
|
72
|
+
function ensureProjectionContainerResourcesInScene(container, scene) {
|
|
73
|
+
addUniqueSceneResources(scene, scene.materials, container.materials, scene.addMaterial);
|
|
74
|
+
addUniqueSceneResources(scene, scene.textures, container.textures, scene.addTexture);
|
|
75
|
+
addUniqueSceneResources(scene, scene.skeletons, container.skeletons, scene.addSkeleton);
|
|
76
|
+
}
|
|
77
|
+
function addUniqueSceneResources(scene, existing, resources, addResource) {
|
|
78
|
+
if (!Array.isArray(resources) || resources.length === 0 || typeof addResource !== 'function')
|
|
79
|
+
return;
|
|
80
|
+
for (const resource of resources) {
|
|
81
|
+
if (Array.isArray(existing) && existing.includes(resource))
|
|
82
|
+
continue;
|
|
83
|
+
addResource.call(scene, resource);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function collectProjectionImportResult(entries) {
|
|
87
|
+
const meshes = [];
|
|
88
|
+
const transformNodes = [];
|
|
89
|
+
const seen = new Set();
|
|
90
|
+
for (const rootNode of entries.rootNodes ?? []) {
|
|
91
|
+
collectProjectionNode(rootNode, seen, meshes, transformNodes);
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
meshes,
|
|
95
|
+
transformNodes,
|
|
96
|
+
animationGroups: entries.animationGroups ?? [],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function collectProjectionNode(node, seen, meshes, transformNodes) {
|
|
100
|
+
if (!node || seen.has(node))
|
|
101
|
+
return;
|
|
102
|
+
seen.add(node);
|
|
103
|
+
if (isProjectionMeshLike(node)) {
|
|
104
|
+
meshes.push(node);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
transformNodes.push(node);
|
|
108
|
+
}
|
|
109
|
+
for (const child of readProjectionNodeChildren(node)) {
|
|
110
|
+
collectProjectionNode(child, seen, meshes, transformNodes);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function readProjectionNodeChildren(node) {
|
|
114
|
+
const getChildren = node?.getChildren;
|
|
115
|
+
if (typeof getChildren !== 'function')
|
|
116
|
+
return [];
|
|
117
|
+
const children = getChildren.call(node);
|
|
118
|
+
return Array.isArray(children) ? children : [];
|
|
119
|
+
}
|
|
120
|
+
function isProjectionMeshLike(node) {
|
|
121
|
+
return typeof node?.getTotalVertices === 'function';
|
|
122
|
+
}
|
|
123
|
+
function stableProjectionCacheStringify(value) {
|
|
124
|
+
return JSON.stringify(sortProjectionCacheValue(value));
|
|
125
|
+
}
|
|
126
|
+
function sortProjectionCacheValue(value) {
|
|
127
|
+
if (Array.isArray(value))
|
|
128
|
+
return value.map(sortProjectionCacheValue);
|
|
129
|
+
if (!value || typeof value !== 'object')
|
|
130
|
+
return value;
|
|
131
|
+
const record = value;
|
|
132
|
+
const sorted = {};
|
|
133
|
+
for (const key of Object.keys(record).sort()) {
|
|
134
|
+
const item = record[key];
|
|
135
|
+
if (typeof item === 'undefined' || typeof item === 'function')
|
|
136
|
+
continue;
|
|
137
|
+
sorted[key] = sortProjectionCacheValue(item);
|
|
138
|
+
}
|
|
139
|
+
return sorted;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=projection-asset-container-importer.js.map
|
package/node_modules/@fps-games/editor-babylon/dist/projection-asset-container-importer.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection-asset-container-importer.js","sourceRoot":"","sources":["../src/projection-asset-container-importer.ts"],"names":[],"mappings":"AAiEA,MAAM,UAAU,6CAA6C,CAC3D,OAAuD;IAEvD,MAAM,WAAW,GAAG,IAAI,OAAO,EAAsB,CAAC;IAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,QAAQ,GAAG,MAAM,kCAAkC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5E,MAAM,UAAU,GAA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C7C,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QACzB,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,OAAO,IAAI,KAAK,UAAU;YAAE,SAAS;QACxE,MAAM,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -73,6 +73,11 @@ export interface BabylonEditorProjectionHemisphericLightSettings {
|
|
|
73
73
|
groundColor?: BabylonEditorProjectionColorRGB;
|
|
74
74
|
}
|
|
75
75
|
export type BabylonEditorProjectionLightSettings = BabylonEditorProjectionDirectionalLightSettings | BabylonEditorProjectionHemisphericLightSettings;
|
|
76
|
+
export type BabylonEditorProjectionShadowMode = 'default' | 'none' | 'blob' | 'static' | 'planar' | 'dynamic';
|
|
77
|
+
export interface BabylonEditorProjectionRendering {
|
|
78
|
+
renderingGroupId?: number;
|
|
79
|
+
alphaIndex?: number;
|
|
80
|
+
}
|
|
76
81
|
export interface BabylonEditorProjectionNode {
|
|
77
82
|
id: string;
|
|
78
83
|
name?: string;
|
|
@@ -83,6 +88,8 @@ export interface BabylonEditorProjectionNode {
|
|
|
83
88
|
primitive?: BabylonEditorProjectionPrimitive | null;
|
|
84
89
|
helperKind?: 'root';
|
|
85
90
|
runtimeKind?: 'camera' | 'light';
|
|
91
|
+
shadowMode?: BabylonEditorProjectionShadowMode;
|
|
92
|
+
rendering?: BabylonEditorProjectionRendering;
|
|
86
93
|
camera?: BabylonEditorProjectionCameraSettings;
|
|
87
94
|
light?: BabylonEditorProjectionLightSettings;
|
|
88
95
|
outline?: BabylonEditorProjectionOutline | null;
|
|
@@ -108,10 +115,12 @@ export interface BabylonEditorProjectionOptions {
|
|
|
108
115
|
scene: RuntimeScene;
|
|
109
116
|
importModel?: BabylonEditorProjectionImporter;
|
|
110
117
|
resolveTextureUrl?: (texture: ArtistMaterialTextureRef) => string | null | undefined;
|
|
118
|
+
selectionEdgesPrewarm?: BabylonEditorProjectionSelectionEdgesPrewarm;
|
|
111
119
|
logger?: Pick<Console, 'warn'>;
|
|
112
120
|
onProjectionReady?: (event: BabylonEditorProjectionReadyEvent) => void;
|
|
113
121
|
onProjectionBatchSettled?: (event: BabylonEditorProjectionBatchSettledEvent) => void;
|
|
114
122
|
}
|
|
123
|
+
export type BabylonEditorProjectionSelectionEdgesPrewarm = 'eager' | 'lazy' | 'idle';
|
|
115
124
|
export interface BabylonEditorProjectionReadyEvent {
|
|
116
125
|
nodeId: string;
|
|
117
126
|
async: boolean;
|
|
@@ -149,6 +158,7 @@ export interface ProjectedBabylonEditorNode {
|
|
|
149
158
|
animationGroups: any[];
|
|
150
159
|
runtimeObjects: any[];
|
|
151
160
|
loadPromise?: Promise<void>;
|
|
161
|
+
selectionEdgesPrewarmCancel?: (() => void) | null;
|
|
152
162
|
}
|
|
153
163
|
export interface BabylonEditorProjection {
|
|
154
164
|
projectNodes(nodes: BabylonEditorProjectionNode[]): BabylonEditorProjectionBatchHandle;
|
|
@@ -166,6 +176,7 @@ export interface BabylonEditorProjection {
|
|
|
166
176
|
getSelectionBounds(nodeIds: string[]): BabylonEditorProjectionBounds | null;
|
|
167
177
|
getSelectionPivot(nodeIds: string[]): EditorTransformPivot | null;
|
|
168
178
|
syncNodeTransform(node: BabylonEditorProjectionNode): void;
|
|
179
|
+
syncNodeMetadata(node: BabylonEditorProjectionNode): void;
|
|
169
180
|
syncSelection(selection: EditorSelectionState): void;
|
|
170
181
|
resolveProjectionNodeId(target: unknown): string | null;
|
|
171
182
|
resolvePickSelectionNodeId(target: unknown): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../src/projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EAAE,qBA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