@fps-games/editor 0.2.1-beta.2 → 0.2.1-beta.3

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 (147) hide show
  1. package/dist/build-info.json +41 -41
  2. package/dist/local-editor-harness.d.ts.map +1 -1
  3. package/dist/local-editor-harness.js +16 -7
  4. package/dist/local-editor-harness.js.map +1 -1
  5. package/dist/playable-babylon-rendering.d.ts +8 -7
  6. package/dist/playable-babylon-rendering.d.ts.map +1 -1
  7. package/dist/playable-babylon-rendering.js +77 -32
  8. package/dist/playable-babylon-rendering.js.map +1 -1
  9. package/dist/playable-product-projection-preview.d.ts +2 -0
  10. package/dist/playable-product-projection-preview.d.ts.map +1 -1
  11. package/dist/playable-product-projection-preview.js +7 -4
  12. package/dist/playable-product-projection-preview.js.map +1 -1
  13. package/dist/playable-sdk.d.ts +1 -1
  14. package/dist/playable-sdk.d.ts.map +1 -1
  15. package/dist/playable-sdk.js +1 -1
  16. package/dist/playable-sdk.js.map +1 -1
  17. package/dist/playable-standard-project.d.ts +0 -1
  18. package/dist/playable-standard-project.d.ts.map +1 -1
  19. package/dist/playable-standard-project.js +13 -4
  20. package/dist/playable-standard-project.js.map +1 -1
  21. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts +4 -2
  22. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.d.ts.map +1 -1
  23. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js +301 -121
  24. package/node_modules/@fps-games/babylon-renderer/dist/environment/environment-texture-controller.js.map +1 -1
  25. package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js +5 -4
  26. package/node_modules/@fps-games/babylon-renderer/dist/environment/profile.js.map +1 -1
  27. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts +4 -4
  28. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.d.ts.map +1 -1
  29. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js +1 -1
  30. package/node_modules/@fps-games/babylon-renderer/dist/environment/types.js.map +1 -1
  31. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts +2 -0
  32. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.d.ts.map +1 -1
  33. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js +12 -1
  34. package/node_modules/@fps-games/babylon-renderer/dist/game-world-plugin-lifecycle.js.map +1 -1
  35. package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts +6 -3
  36. package/node_modules/@fps-games/babylon-renderer/dist/plugin.d.ts.map +1 -1
  37. package/node_modules/@fps-games/babylon-renderer/dist/plugin.js +100 -39
  38. package/node_modules/@fps-games/babylon-renderer/dist/plugin.js.map +1 -1
  39. package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts +1 -3
  40. package/node_modules/@fps-games/babylon-renderer/dist/reference.d.ts.map +1 -1
  41. package/node_modules/@fps-games/babylon-renderer/dist/reference.js.map +1 -1
  42. package/node_modules/@fps-games/babylon-renderer/package.json +11 -8
  43. package/node_modules/@fps-games/editor-babylon/package.json +6 -6
  44. package/node_modules/@fps-games/editor-browser/package.json +7 -7
  45. package/node_modules/@fps-games/editor-core/package.json +6 -6
  46. package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
  47. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.d.ts.map +1 -1
  48. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js +10 -3
  49. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/generated-module.js.map +1 -1
  50. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts +2 -1
  51. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.d.ts.map +1 -1
  52. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js +1 -1
  53. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-database/index.js.map +1 -1
  54. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts +1 -1
  55. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.d.ts.map +1 -1
  56. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js +4 -0
  57. package/node_modules/@fps-games/editor-playable-sdk/dist/package-resolution/aliases.js.map +1 -1
  58. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js +4 -4
  59. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js.map +1 -1
  60. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts +2 -1
  61. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts.map +1 -1
  62. package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.js.map +1 -1
  63. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js +1 -5
  64. package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/assets.js.map +1 -1
  65. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +53 -0
  66. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
  67. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts +2 -0
  68. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.d.ts.map +1 -1
  69. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/types.js.map +1 -1
  70. package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
  71. package/node_modules/@fps-games/editor-protocol/package.json +2 -2
  72. package/node_modules/@fps-games/editor-tooling/package.json +3 -3
  73. package/node_modules/@fps-games/editor-ui/package.json +1 -1
  74. package/node_modules/@fps-games/playable-assets/dist/identity.d.ts +1 -0
  75. package/node_modules/@fps-games/playable-assets/dist/identity.d.ts.map +1 -1
  76. package/node_modules/@fps-games/playable-assets/dist/identity.js +1 -1
  77. package/node_modules/@fps-games/playable-assets/dist/identity.js.map +1 -1
  78. package/node_modules/@fps-games/playable-assets/dist/index.d.ts +1 -0
  79. package/node_modules/@fps-games/playable-assets/dist/index.d.ts.map +1 -1
  80. package/node_modules/@fps-games/playable-assets/dist/index.js +1 -0
  81. package/node_modules/@fps-games/playable-assets/dist/index.js.map +1 -1
  82. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts +46 -0
  83. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.d.ts.map +1 -0
  84. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js +109 -0
  85. package/node_modules/@fps-games/playable-assets/dist/resource-resolver.js.map +1 -0
  86. package/node_modules/@fps-games/playable-assets/package.json +1 -1
  87. package/node_modules/@fps-games/playable-contracts/package.json +1 -1
  88. package/node_modules/@fps-games/playable-rendering/package.json +2 -2
  89. package/node_modules/@fps-games/playable-runtime/dist/runtime.d.ts.map +1 -1
  90. package/node_modules/@fps-games/playable-runtime/dist/runtime.js +5 -0
  91. package/node_modules/@fps-games/playable-runtime/dist/runtime.js.map +1 -1
  92. package/node_modules/@fps-games/playable-runtime/dist/types.d.ts +2 -0
  93. package/node_modules/@fps-games/playable-runtime/dist/types.d.ts.map +1 -1
  94. package/node_modules/@fps-games/playable-runtime/dist/types.js.map +1 -1
  95. package/node_modules/@fps-games/playable-runtime/package.json +12 -12
  96. package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
  97. package/node_modules/@fps-games/playable-scene/package.json +2 -2
  98. package/node_modules/@fps-games/plugin-api/package.json +1 -1
  99. package/node_modules/@fps-games/plugin-assets/dist/reference.d.ts.map +1 -1
  100. package/node_modules/@fps-games/plugin-assets/dist/reference.js +11 -4
  101. package/node_modules/@fps-games/plugin-assets/dist/reference.js.map +1 -1
  102. package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts +8 -0
  103. package/node_modules/@fps-games/plugin-assets/dist/renderer.d.ts.map +1 -0
  104. package/node_modules/@fps-games/plugin-assets/dist/renderer.js +13 -0
  105. package/node_modules/@fps-games/plugin-assets/dist/renderer.js.map +1 -0
  106. package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts +12 -0
  107. package/node_modules/@fps-games/plugin-assets/dist/resources.d.ts.map +1 -0
  108. package/node_modules/@fps-games/plugin-assets/dist/resources.js +8 -0
  109. package/node_modules/@fps-games/plugin-assets/dist/resources.js.map +1 -0
  110. package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts +2 -1
  111. package/node_modules/@fps-games/plugin-assets/dist/runtime.d.ts.map +1 -1
  112. package/node_modules/@fps-games/plugin-assets/dist/runtime.js +3 -0
  113. package/node_modules/@fps-games/plugin-assets/dist/runtime.js.map +1 -1
  114. package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
  115. package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
  116. package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
  117. package/node_modules/@fps-games/plugin-assets/package.json +32 -8
  118. package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
  119. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
  120. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
  121. package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
  122. package/node_modules/@fps-games/plugin-host/package.json +2 -2
  123. package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
  124. package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
  125. package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
  126. package/node_modules/@fps-games/plugin-markers/package.json +5 -5
  127. package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
  128. package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
  129. package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
  130. package/node_modules/@fps-games/plugin-materials/package.json +5 -5
  131. package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
  132. package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
  133. package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
  134. package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
  135. package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
  136. package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
  137. package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
  138. package/node_modules/@fps-games/plugin-scene/package.json +5 -5
  139. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
  140. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
  141. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
  142. package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
  143. package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
  144. package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
  145. package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
  146. package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
  147. package/package.json +24 -22
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mCAAmC,EACnC,qCAAqC,EACrC,oCAAoC,GAErC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,GAGtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAsB,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,yCAAyC,EAAE,MAAM,iDAAiD,CAAC;AAC5G,OAAO,EACL,8BAA8B,GAE/B,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EACL,iDAAiD,EACjD,sDAAsD,GACvD,MAAM,4CAA4C,CAAC;AAIpD,OAAO,EACL,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,UAAU,EAAE,cAAc;YAC5B,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,UAAU,CAAC,cAAc,EAAE,YAAY,CAAC,IAAI,YAAY,EAAE,GAAG,IAAI,IAAI;YACjG,CAAC,CAAC,IAAI,CAAC;WACN,MAAM,CAAC,kBAAkB;WACzB,IAAI,CAAC;IACV,MAAM,wBAAwB,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CACjD,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,mCAAmC,CAChE,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI;QACJ,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;YACzB,UAAU;YACV,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,YAAY;YAC3C,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS;SACzC,CAAC;QACF,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,uBAAuB,EAAE,wBAAwB;YAC/C,CAAC,CAAC,qCAAqC,CAAC,wBAAwB,CAAC,IAAI,CAAC;YACtE,CAAC,CAAC,IAAI;KACT,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { Camera } from '@babylonjs/core/Cameras/camera.js';\nimport type { Scene } from '@babylonjs/core/scene.js';\nimport type { FpsRuntimeAsset, FpsRuntimeData } from '@fps-games/playable-contracts';\nimport {\n createFpsRuntimeDataSnapshot,\n} from '@fps-games/playable-runtime-data';\nimport {\n FPS_SHADOW_MAP_EXPERIMENT_PLUGIN_ID,\n createShadowMapExperimentPlanSnapshot,\n normalizeEditorSceneRenderingProfile,\n type ShadowMapExperimentPlan,\n} from '@fps-games/playable-rendering/runtime';\nimport {\n defineFpsPluginEntry,\n defineFpsPluginManifest,\n defineFpsServiceToken,\n type FpsPluginEntry,\n type FpsPluginManifest,\n} from '@fps-games/plugin-api';\nimport { createFpsPluginHost, type FpsPluginHost } from '@fps-games/plugin-host';\nimport { createBabylonEnvironmentTextureController } from './environment/environment-texture-controller.js';\nimport {\n FPS_BABYLON_RENDERER_PLUGIN_ID,\n type FpsBabylonRendererPluginConfig,\n} from './reference.js';\nimport type {\n BabylonEnvironmentTextureController,\n BabylonEnvironmentTextureFactory,\n} from './environment/types.js';\nimport {\n createBabylonDefaultPostProcessPipelineController,\n readBabylonDefaultPostProcessPipelineControllerCleanup,\n} from './post-process/babylon-default-pipeline.js';\nimport type {\n BabylonDefaultPostProcessPipelineController,\n} from './post-process/types.js';\nimport {\n createBabylonShadowMapExperimentSystem,\n readBabylonShadowMapExperimentSystemCleanup,\n type BabylonRuntimeShadowObjectsOwner,\n type BabylonRuntimeShadowObjectsRegistration,\n type BabylonRuntimeShadowObjectsSnapshot,\n type BabylonShadowMapExperimentEvidence,\n type BabylonShadowMapExperimentSystem,\n} from './shadows/shadow-map-experiment-system.js';\nimport type {\n ShadowMapExperimentActivityKind,\n ShadowMapExperimentActivitySourceController,\n} from '@fps-games/playable-rendering/runtime';\n\nexport { FPS_BABYLON_RENDERER_PLUGIN_ID } from './reference.js';\n\nexport interface FpsBabylonRendererContext {\n readonly scene: Scene;\n readonly cameras: readonly Camera[];\n readonly resolveAssetUrl?: (\n assetId: string,\n asset: FpsRuntimeAsset | null,\n ) => string | null;\n readonly createEnvironmentTexture?: BabylonEnvironmentTextureFactory;\n}\n\nexport interface FpsBabylonRendererService {\n readonly shadows: FpsBabylonRendererShadowService;\n}\n\nexport interface FpsBabylonRendererHostController extends FpsBabylonRendererService {\n readonly environment: BabylonEnvironmentTextureController;\n readonly postProcess: BabylonDefaultPostProcessPipelineController;\n getRuntimeData(): FpsRuntimeData;\n update(data: FpsRuntimeData): Promise<void>;\n dispose(): Promise<void>;\n}\n\nexport interface FpsBabylonRendererShadowService {\n registerRuntimeShadowObjects(\n input: BabylonRuntimeShadowObjectsRegistration,\n ): BabylonRuntimeShadowObjectsOwner;\n registerActivitySource(input: {\n readonly entityId: string;\n readonly kind: ShadowMapExperimentActivityKind;\n readonly sourceId: string;\n }): ShadowMapExperimentActivitySourceController;\n getRuntimeSnapshot(): BabylonRuntimeShadowObjectsSnapshot;\n getEvidence(): BabylonShadowMapExperimentEvidence;\n}\n\nexport interface FpsBabylonRendererPlugin {\n readonly manifest: Readonly<FpsPluginManifest>;\n readonly renderer: Readonly<FpsPluginEntry>;\n}\n\nexport interface FpsBabylonRendererPluginOptions {\n readonly pluginVersion: string;\n}\n\nexport interface FpsBabylonRendererHostOptions extends FpsBabylonRendererPluginOptions {\n readonly data: FpsRuntimeData;\n readonly context: FpsBabylonRendererContext;\n readonly config?: FpsBabylonRendererPluginConfig;\n readonly report?: Parameters<typeof createFpsPluginHost>[0]['report'];\n}\n\nexport interface FpsBabylonRendererHost {\n readonly pluginId: typeof FPS_BABYLON_RENDERER_PLUGIN_ID;\n readonly host: FpsPluginHost;\n readonly renderer: FpsBabylonRendererHostController;\n dispose(): Promise<void>;\n}\n\nexport const FPS_BABYLON_RENDERER_CONTEXT = defineFpsServiceToken<FpsBabylonRendererContext>(\n 'fps.renderer.babylon.context',\n);\nexport const FPS_BABYLON_RENDERER_DATA = defineFpsServiceToken<FpsRuntimeData>(\n 'fps.renderer.babylon.runtime-data',\n);\nexport const FPS_BABYLON_RENDERER_SERVICE = defineFpsServiceToken<FpsBabylonRendererHostController>(\n 'fps.renderer.babylon.service',\n);\n\nconst fpsBabylonRendererSceneOwners = new WeakMap<Scene, object>();\n\nexport const pluginEntry = defineFpsPluginEntry({\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n environment: 'renderer',\n register(context) {\n const rendererContext = context.services.get(FPS_BABYLON_RENDERER_CONTEXT);\n const runtimeData = context.services.get(FPS_BABYLON_RENDERER_DATA);\n const releaseSceneOwnership = reserveFpsBabylonRendererScene(rendererContext.scene);\n let createdService: FpsBabylonRendererInternalService;\n try {\n createdService = createFpsBabylonRendererService(\n runtimeData,\n rendererContext,\n (context.config ?? {}) as FpsBabylonRendererPluginConfig,\n releaseSceneOwnership,\n );\n } catch (error) {\n const recoverConstruction = readFpsBabylonRendererConstructionCleanup(error)\n ?? readBabylonShadowMapExperimentSystemCleanup(error)\n ?? readBabylonDefaultPostProcessPipelineControllerCleanup(error);\n if (recoverConstruction) {\n context.add(() => {\n const cleanupErrors = [...recoverConstruction()];\n if (cleanupErrors.length > 0) {\n throw Object.assign(\n new Error('Babylon renderer construction cleanup failed.'),\n { cleanupErrors: Object.freeze(cleanupErrors) },\n );\n }\n releaseSceneOwnership();\n });\n } else {\n try { releaseSceneOwnership(); }\n catch (cleanupError) {\n const recoverRelease = createFpsBabylonRendererConstructionCleanup([releaseSceneOwnership]);\n context.add(() => throwCleanupResult(recoverRelease()));\n throw createFailureWithMetadata(\n error,\n 'Babylon renderer construction failed.',\n {\n cleanupErrors: Object.freeze([cleanupError]),\n fpsBabylonRendererConstructionCleanup: recoverRelease,\n },\n );\n }\n }\n throw error;\n }\n context.add(context.services.register(FPS_BABYLON_RENDERER_SERVICE, createdService));\n context.add(() => createdService.dispose());\n },\n async start(context) {\n await getFpsBabylonRendererInternalService(context).initialize();\n },\n async dispose(context) {\n await (context.services.getOptional(FPS_BABYLON_RENDERER_SERVICE) as FpsBabylonRendererInternalService | undefined)?.dispose();\n },\n});\n\nexport function createFpsBabylonRendererPlugin(\n options: FpsBabylonRendererPluginOptions,\n): FpsBabylonRendererPlugin {\n const manifest = defineFpsPluginManifest({\n id: FPS_BABYLON_RENDERER_PLUGIN_ID,\n version: options.pluginVersion,\n apiVersion: 1,\n requires: {},\n provides: { features: ['fps.renderer.babylon'] },\n entries: { renderer: './renderer' },\n environmentContracts: {\n renderer: {\n requires: {\n services: [\n FPS_BABYLON_RENDERER_CONTEXT.id,\n FPS_BABYLON_RENDERER_DATA.id,\n ],\n },\n provides: { services: [FPS_BABYLON_RENDERER_SERVICE.id] },\n scopes: ['application'],\n },\n },\n });\n return Object.freeze({ manifest, renderer: pluginEntry });\n}\n\nexport async function createFpsBabylonRendererHost(\n options: FpsBabylonRendererHostOptions,\n): Promise<FpsBabylonRendererHost> {\n const plugin = createFpsBabylonRendererPlugin(options);\n const host = createFpsPluginHost({\n environment: 'renderer',\n apiVersion: 1,\n manifests: [plugin.manifest],\n pluginConfigs: { [FPS_BABYLON_RENDERER_PLUGIN_ID]: options.config ?? {} },\n initialServices: [\n { token: FPS_BABYLON_RENDERER_CONTEXT, value: options.context },\n { token: FPS_BABYLON_RENDERER_DATA, value: options.data },\n ],\n loadEntry: async manifest => manifest.id === plugin.manifest.id ? plugin.renderer : null,\n report: options.report,\n });\n await host.start();\n const renderer = host.services.get(FPS_BABYLON_RENDERER_SERVICE);\n let hostDisposePromise: Promise<void> | null = null;\n return {\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n host,\n renderer,\n dispose: () => {\n if (!hostDisposePromise) {\n const operation = (async () => {\n const errors: unknown[] = [];\n try { await renderer.dispose(); } catch (error) { errors.push(error); }\n try { await host.dispose(); } catch (error) { errors.push(error); }\n if (errors.length === 1) throw errors[0];\n if (errors.length > 1) {\n throw Object.assign(new Error('Babylon renderer host disposal failed.'), { errors });\n }\n })();\n hostDisposePromise = operation.catch(error => {\n hostDisposePromise = null;\n throw error;\n });\n }\n return hostDisposePromise;\n },\n };\n}\n\ninterface FpsBabylonRendererInternalService extends FpsBabylonRendererHostController {\n readonly shadowMapExperimentSystem: BabylonShadowMapExperimentSystem;\n initialize(): Promise<void>;\n}\n\nfunction createFpsBabylonRendererService(\n initialData: FpsRuntimeData,\n context: FpsBabylonRendererContext,\n config: FpsBabylonRendererPluginConfig,\n releaseSceneOwnership: () => void,\n): FpsBabylonRendererInternalService {\n const initialPrepared = prepareFpsBabylonRendererUpdate(initialData, context, config);\n let data = initialPrepared.data;\n let disposed = false;\n let acceptingUpdates = true;\n let activeAbort: AbortController | null = null;\n let queue: Promise<void> = Promise.resolve();\n let disposePromise: Promise<void> | null = null;\n const originalEnvironmentTexture = context.scene.environmentTexture;\n const sceneWithIntensity = context.scene as unknown as { environmentIntensity?: number };\n const originalEnvironmentIntensity = sceneWithIntensity.environmentIntensity;\n const restoreOriginalSceneEnvironment = (): void => {\n context.scene.environmentTexture = originalEnvironmentTexture;\n if (originalEnvironmentIntensity === undefined) delete sceneWithIntensity.environmentIntensity;\n else sceneWithIntensity.environmentIntensity = originalEnvironmentIntensity;\n };\n const postProcess = createBabylonDefaultPostProcessPipelineController(\n context.scene,\n [...context.cameras],\n null,\n );\n let environment: BabylonEnvironmentTextureController;\n try {\n environment = createBabylonEnvironmentTextureController(context.scene, null, {\n createTexture: context.createEnvironmentTexture,\n });\n } catch (error) {\n throwFpsBabylonRendererConstructionFailure(error, [\n () => postProcess.dispose(),\n restoreOriginalSceneEnvironment,\n ]);\n }\n let shadowMapExperiment: BabylonShadowMapExperimentSystem;\n try {\n shadowMapExperiment = createBabylonShadowMapExperimentSystem(context.scene);\n } catch (error) {\n const shadowCleanup = readBabylonShadowMapExperimentSystemCleanup(error);\n throwFpsBabylonRendererConstructionFailure(error, [\n ...(shadowCleanup ? [() => throwCleanupResult(shadowCleanup())] : []),\n () => environment.dispose(),\n () => postProcess.dispose(),\n restoreOriginalSceneEnvironment,\n ]);\n }\n const assertAcceptingShadowOwnership = (): void => {\n if (!acceptingUpdates || disposed) {\n throw new Error('Babylon renderer service is disposed.');\n }\n };\n const shadows: FpsBabylonRendererShadowService = Object.freeze({\n registerRuntimeShadowObjects: (input: BabylonRuntimeShadowObjectsRegistration) => {\n assertAcceptingShadowOwnership();\n return shadowMapExperiment.registerRuntimeShadowObjects(input);\n },\n registerActivitySource: (input: {\n readonly entityId: string;\n readonly kind: ShadowMapExperimentActivityKind;\n readonly sourceId: string;\n }) => {\n assertAcceptingShadowOwnership();\n return shadowMapExperiment.registerCasterActivitySource(input);\n },\n getRuntimeSnapshot: () => shadowMapExperiment.getEvidence().runtime,\n getEvidence: () => shadowMapExperiment.getEvidence(),\n });\n\n const cleanup = (): void => {\n const cleanupErrors: unknown[] = [];\n try { shadowMapExperiment.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { environment.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { postProcess.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { restoreOriginalSceneEnvironment(); } catch (error) { cleanupErrors.push(error); }\n if (cleanupErrors.length === 0) {\n try { releaseSceneOwnership(); } catch (error) { cleanupErrors.push(error); }\n }\n if (cleanupErrors.length > 0) {\n const error = new Error('Babylon renderer cleanup failed.');\n Object.assign(error, { cleanupErrors });\n throw error;\n }\n };\n\n const commit = async (\n prepared: FpsBabylonRendererPreparedUpdate,\n signal: AbortSignal,\n ): Promise<void> => {\n const previousEnvironment = environment.getProfile();\n const previousControllerTexture = environment.getTexture();\n const previousSceneTexture = context.scene.environmentTexture;\n const previousSceneIntensity = sceneWithIntensity.environmentIntensity;\n const previousPostProcess = postProcess.getProfile();\n const previousShadowMapExperimentPlan = shadowMapExperiment.getPlan();\n try {\n shadowMapExperiment.setPlan(prepared.shadowMapExperimentPlan);\n postProcess.setProfile(prepared.postProcess);\n await environment.setProfileAsync(prepared.environment, signal);\n if (signal.aborted) throw createFpsBabylonRendererAbortError();\n data = prepared.data;\n } catch (error) {\n const rollbackErrors: unknown[] = [];\n try { await environment.setProfileAsync(previousEnvironment); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n try {\n if (previousSceneTexture !== previousControllerTexture) {\n context.scene.environmentTexture = previousSceneTexture;\n }\n if (previousSceneIntensity === undefined) delete sceneWithIntensity.environmentIntensity;\n else sceneWithIntensity.environmentIntensity = previousSceneIntensity;\n } catch (rollbackError) {\n rollbackErrors.push(rollbackError);\n }\n try { postProcess.setProfile(previousPostProcess); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n try { shadowMapExperiment.setPlan(previousShadowMapExperimentPlan); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n if (rollbackErrors.length > 0) {\n throw createFailureWithMetadata(\n error,\n 'Babylon renderer update failed.',\n { rollbackErrors: Object.freeze(rollbackErrors) },\n );\n }\n throw error;\n }\n };\n\n const enqueue = (prepared: FpsBabylonRendererPreparedUpdate): Promise<void> => {\n const operation = queue.then(async () => {\n if (!acceptingUpdates || disposed) throw new Error('Babylon renderer service is disposed.');\n const abort = new AbortController();\n activeAbort = abort;\n try {\n await commit(prepared, abort.signal);\n } finally {\n if (activeAbort === abort) activeAbort = null;\n }\n });\n queue = operation.then(() => undefined, () => undefined);\n return operation;\n };\n\n const service: FpsBabylonRendererInternalService = {\n environment,\n postProcess,\n shadows,\n shadowMapExperimentSystem: shadowMapExperiment,\n getRuntimeData: () => data,\n initialize: () => enqueue(initialPrepared),\n async update(nextData) {\n if (!acceptingUpdates || disposed) throw new Error('Babylon renderer service is disposed.');\n await enqueue(prepareFpsBabylonRendererUpdate(nextData, context, config));\n },\n async dispose() {\n if (disposePromise) return disposePromise;\n acceptingUpdates = false;\n activeAbort?.abort();\n const operation = (async () => {\n await queue;\n if (disposed) return;\n cleanup();\n disposed = true;\n })();\n disposePromise = operation.catch(error => {\n disposePromise = null;\n throw error;\n });\n return disposePromise;\n },\n };\n return service;\n}\n\ntype FpsBabylonRendererConstructionCleanup = () => readonly unknown[];\n\nfunction throwFpsBabylonRendererConstructionFailure(\n failure: unknown,\n operations: readonly (() => void)[],\n): never {\n const cleanup = createFpsBabylonRendererConstructionCleanup(operations);\n const cleanupErrors = cleanup();\n if (cleanupErrors.length === 0) throw failure;\n throw createFailureWithMetadata(\n failure,\n 'Babylon renderer construction failed.',\n {\n cleanupErrors,\n fpsBabylonRendererConstructionCleanup: cleanup,\n },\n );\n}\n\nfunction createFpsBabylonRendererConstructionCleanup(\n operations: readonly (() => void)[],\n): FpsBabylonRendererConstructionCleanup {\n let pending = [...operations];\n return () => {\n const cleanupErrors: unknown[] = [];\n const retry: (() => void)[] = [];\n for (const operation of pending) {\n try { operation(); }\n catch (error) {\n cleanupErrors.push(error);\n retry.push(operation);\n }\n }\n pending = retry;\n return Object.freeze(cleanupErrors);\n };\n}\n\nfunction readFpsBabylonRendererConstructionCleanup(\n error: unknown,\n): FpsBabylonRendererConstructionCleanup | null {\n if (!error || (typeof error !== 'object' && typeof error !== 'function')) return null;\n const cleanup = (error as { fpsBabylonRendererConstructionCleanup?: unknown })\n .fpsBabylonRendererConstructionCleanup;\n return typeof cleanup === 'function' ? cleanup as FpsBabylonRendererConstructionCleanup : null;\n}\n\nfunction throwCleanupResult(cleanupErrors: readonly unknown[]): void {\n if (cleanupErrors.length === 0) return;\n if (cleanupErrors.length === 1) throw cleanupErrors[0];\n throw Object.assign(new Error('Babylon renderer construction cleanup failed.'), {\n cleanupErrors: Object.freeze([...cleanupErrors]),\n });\n}\n\nfunction createFailureWithMetadata(\n failure: unknown,\n fallbackMessage: string,\n metadata: Readonly<Record<string, unknown>>,\n): object {\n if (failure && (typeof failure === 'object' || typeof failure === 'function')) {\n try {\n Object.assign(failure, metadata);\n if (Object.entries(metadata).every(([key, value]) => (\n (failure as Record<string, unknown>)[key] === value\n ))) return failure;\n } catch {\n // A non-extensible primary error is wrapped so recovery metadata remains reachable.\n }\n }\n return Object.assign(\n new Error(failure instanceof Error ? failure.message : fallbackMessage),\n { cause: failure, ...metadata },\n );\n}\n\nfunction reserveFpsBabylonRendererScene(scene: Scene): () => void {\n if (fpsBabylonRendererSceneOwners.has(scene)) {\n throw new Error('Babylon renderer Scene already has an active owner.');\n }\n const owner = Object.freeze({});\n fpsBabylonRendererSceneOwners.set(scene, owner);\n let released = false;\n return () => {\n if (released) return;\n if (fpsBabylonRendererSceneOwners.get(scene) !== owner) {\n throw new Error('Babylon renderer Scene ownership was replaced before cleanup completed.');\n }\n fpsBabylonRendererSceneOwners.delete(scene);\n released = true;\n };\n}\n\nfunction getFpsBabylonRendererInternalService(\n context: Parameters<NonNullable<FpsPluginEntry['start']>>[0],\n): FpsBabylonRendererInternalService {\n return context.services.get(FPS_BABYLON_RENDERER_SERVICE) as FpsBabylonRendererInternalService;\n}\n\nfunction createFpsBabylonRendererAbortError(): Error {\n return Object.assign(new Error('Babylon renderer update aborted.'), { name: 'AbortError' });\n}\n\ninterface FpsBabylonRendererPreparedUpdate {\n readonly data: FpsRuntimeData;\n readonly environment: {\n readonly textureUrl: string | null;\n readonly intensity: number;\n readonly rotationY: number;\n };\n readonly postProcess: ReturnType<typeof normalizeEditorSceneRenderingProfile>['postProcess'];\n readonly shadowMapExperimentPlan: ShadowMapExperimentPlan | null;\n}\n\nfunction prepareFpsBabylonRendererUpdate(\n input: FpsRuntimeData,\n context: FpsBabylonRendererContext,\n config: FpsBabylonRendererPluginConfig,\n): FpsBabylonRendererPreparedUpdate {\n const data = createFpsRuntimeDataSnapshot(input);\n const profile = normalizeEditorSceneRenderingProfile(data.rendering);\n const textureRef = profile.environment.texture;\n const textureAsset = textureRef?.textureAssetId\n ? data.assets.find(asset => asset.id === textureRef.textureAssetId) ?? null\n : null;\n const textureUrl = textureRef?.url\n ?? (textureRef?.textureAssetId\n ? context.resolveAssetUrl?.(textureRef.textureAssetId, textureAsset) ?? textureAsset?.url ?? null\n : null)\n ?? config.environmentTexture\n ?? null;\n const shadowMapExperimentEntry = data.plugins?.find(\n entry => entry.pluginId === FPS_SHADOW_MAP_EXPERIMENT_PLUGIN_ID,\n );\n return Object.freeze({\n data,\n environment: Object.freeze({\n textureUrl,\n intensity: profile.environment.iblIntensity,\n rotationY: profile.environment.rotationY,\n }),\n postProcess: profile.postProcess,\n shadowMapExperimentPlan: shadowMapExperimentEntry\n ? createShadowMapExperimentPlanSnapshot(shadowMapExperimentEntry.data)\n : null,\n });\n}\n"]}
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mCAAmC,EACnC,qCAAqC,EACrC,oCAAoC,GAErC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,GAItB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAs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OAAO,CAAC,WAAW;QAChC,uBAAuB,EAAE,wBAAwB;YAC/C,CAAC,CAAC,qCAAqC,CAAC,wBAAwB,CAAC,IAAI,CAAC;YACtE,CAAC,CAAC,IAAI;KACT,CAAC,CAAC;AACL,CAAC;AAED,SAAS,oCAAoC,CAC3C,UAAqD;IAErD,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAC5F,IAAI,UAAU,CAAC,IAAI,KAAK,0BAA0B,EAAE,CAAC;QACnD,OAAO,sBAAsB,QAAQ,gDAAgD,CAAC;IACxF,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,KAAK,+BAA+B,EAAE,CAAC;QACxD,OAAO,sBAAsB,QAAQ,mCAAmC,CAAC;IAC3E,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,KAAK,mCAAmC,EAAE,CAAC;QAC5D,OAAO,sBAAsB,QAAQ,4BAA4B,UAAU,CAAC,MAAM,IAAI,WAAW,GAAG,CAAC;IACvG,CAAC;IACD,OAAO,sBAAsB,QAAQ,wBAAwB,CAAC;AAChE,CAAC","sourcesContent":["import type { Camera } from '@babylonjs/core/Cameras/camera.js';\nimport type { Scene } from '@babylonjs/core/scene.js';\nimport type { FpsRuntimeData } from '@fps-games/playable-contracts';\nimport type {\n PlayableAssetResourceResolutionDiagnostic,\n PlayableAssetResourceResolver,\n PlayableResolvedAssetResource,\n} from '@fps-games/playable-assets';\nimport {\n createFpsRuntimeDataSnapshot,\n} from '@fps-games/playable-runtime-data';\nimport {\n FPS_SHADOW_MAP_EXPERIMENT_PLUGIN_ID,\n createShadowMapExperimentPlanSnapshot,\n normalizeEditorSceneRenderingProfile,\n type ShadowMapExperimentPlan,\n} from '@fps-games/playable-rendering/runtime';\nimport {\n defineFpsPluginEntry,\n defineFpsPluginManifest,\n defineFpsServiceToken,\n type FpsPluginEntry,\n type FpsDiagnostic,\n type FpsPluginManifest,\n} from '@fps-games/plugin-api';\nimport { createFpsPluginHost, type FpsPluginHost } from '@fps-games/plugin-host';\nimport {\n FPS_ASSETS_PLUGIN_ID,\n createFpsAssetsPluginManifest,\n} from '@fps-games/plugin-assets';\nimport { pluginEntry as assetsRendererPluginEntry } from '@fps-games/plugin-assets/renderer';\nimport {\n FPS_ASSET_CATALOG_SOURCE,\n FPS_ASSET_RESOURCE_RESOLVER,\n type FpsAssetCatalogSource,\n} from '@fps-games/plugin-assets/resources';\nimport { createBabylonEnvironmentTextureController } from './environment/environment-texture-controller.js';\nimport {\n FPS_BABYLON_RENDERER_PLUGIN_ID,\n type FpsBabylonRendererPluginConfig,\n} from './reference.js';\nimport type {\n BabylonEnvironmentTextureController,\n BabylonEnvironmentTextureFactory,\n} from './environment/types.js';\nimport {\n createBabylonDefaultPostProcessPipelineController,\n readBabylonDefaultPostProcessPipelineControllerCleanup,\n} from './post-process/babylon-default-pipeline.js';\nimport type {\n BabylonDefaultPostProcessPipelineController,\n} from './post-process/types.js';\nimport {\n createBabylonShadowMapExperimentSystem,\n readBabylonShadowMapExperimentSystemCleanup,\n type BabylonRuntimeShadowObjectsOwner,\n type BabylonRuntimeShadowObjectsRegistration,\n type BabylonRuntimeShadowObjectsSnapshot,\n type BabylonShadowMapExperimentEvidence,\n type BabylonShadowMapExperimentSystem,\n} from './shadows/shadow-map-experiment-system.js';\nimport type {\n ShadowMapExperimentActivityKind,\n ShadowMapExperimentActivitySourceController,\n} from '@fps-games/playable-rendering/runtime';\n\nexport { FPS_BABYLON_RENDERER_PLUGIN_ID } from './reference.js';\n\nexport interface FpsBabylonRendererContext {\n readonly scene: Scene;\n readonly cameras: readonly Camera[];\n readonly createEnvironmentTexture?: BabylonEnvironmentTextureFactory;\n}\n\nexport interface FpsBabylonRendererService {\n readonly shadows: FpsBabylonRendererShadowService;\n}\n\nexport interface FpsBabylonRendererHostController extends FpsBabylonRendererService {\n readonly environment: BabylonEnvironmentTextureController;\n readonly postProcess: BabylonDefaultPostProcessPipelineController;\n getRuntimeData(): FpsRuntimeData;\n update(data: FpsRuntimeData): Promise<void>;\n dispose(): Promise<void>;\n}\n\nexport interface FpsBabylonRendererShadowService {\n registerRuntimeShadowObjects(\n input: BabylonRuntimeShadowObjectsRegistration,\n ): BabylonRuntimeShadowObjectsOwner;\n registerActivitySource(input: {\n readonly entityId: string;\n readonly kind: ShadowMapExperimentActivityKind;\n readonly sourceId: string;\n }): ShadowMapExperimentActivitySourceController;\n getRuntimeSnapshot(): BabylonRuntimeShadowObjectsSnapshot;\n getEvidence(): BabylonShadowMapExperimentEvidence;\n}\n\nexport interface FpsBabylonRendererPlugin {\n readonly manifest: Readonly<FpsPluginManifest>;\n readonly renderer: Readonly<FpsPluginEntry>;\n}\n\nexport interface FpsBabylonRendererPluginOptions {\n readonly pluginVersion: string;\n}\n\nexport interface FpsBabylonRendererHostOptions extends FpsBabylonRendererPluginOptions {\n readonly data: FpsRuntimeData;\n readonly assetCatalog: FpsAssetCatalogSource['catalog'];\n readonly context: FpsBabylonRendererContext;\n readonly config?: FpsBabylonRendererPluginConfig;\n readonly report?: Parameters<typeof createFpsPluginHost>[0]['report'];\n}\n\nexport interface FpsBabylonRendererHost {\n readonly pluginId: typeof FPS_BABYLON_RENDERER_PLUGIN_ID;\n readonly host: FpsPluginHost;\n readonly renderer: FpsBabylonRendererHostController;\n dispose(): Promise<void>;\n}\n\nexport const FPS_BABYLON_RENDERER_CONTEXT = defineFpsServiceToken<FpsBabylonRendererContext>(\n 'fps.renderer.babylon.context',\n);\nexport const FPS_BABYLON_RENDERER_DATA = defineFpsServiceToken<FpsRuntimeData>(\n 'fps.renderer.babylon.runtime-data',\n);\nexport const FPS_BABYLON_RENDERER_SERVICE = defineFpsServiceToken<FpsBabylonRendererHostController>(\n 'fps.renderer.babylon.service',\n);\n\nexport type FpsBabylonRendererHostCleanup = () => Promise<void>;\n\nexport function readFpsBabylonRendererHostCleanup(\n error: unknown,\n): FpsBabylonRendererHostCleanup | null {\n if (!error || (typeof error !== 'object' && typeof error !== 'function')) return null;\n const cleanup = (error as { fpsBabylonRendererHostCleanup?: unknown })\n .fpsBabylonRendererHostCleanup;\n return typeof cleanup === 'function' ? cleanup as FpsBabylonRendererHostCleanup : null;\n}\n\nconst fpsBabylonRendererSceneOwners = new WeakMap<Scene, object>();\n\nexport const pluginEntry = defineFpsPluginEntry({\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n environment: 'renderer',\n register(context) {\n const rendererContext = context.services.get(FPS_BABYLON_RENDERER_CONTEXT);\n const runtimeData = context.services.get(FPS_BABYLON_RENDERER_DATA);\n const assetResources = context.services.get(FPS_ASSET_RESOURCE_RESOLVER);\n const releaseSceneOwnership = reserveFpsBabylonRendererScene(rendererContext.scene);\n let createdService: FpsBabylonRendererInternalService;\n try {\n createdService = createFpsBabylonRendererService(\n runtimeData,\n rendererContext,\n assetResources,\n diagnostic => context.report(diagnostic),\n releaseSceneOwnership,\n );\n } catch (error) {\n const recoverConstruction = readFpsBabylonRendererConstructionCleanup(error)\n ?? readBabylonShadowMapExperimentSystemCleanup(error)\n ?? readBabylonDefaultPostProcessPipelineControllerCleanup(error);\n if (recoverConstruction) {\n context.add(() => {\n const cleanupErrors = [...recoverConstruction()];\n if (cleanupErrors.length > 0) {\n throw Object.assign(\n new Error('Babylon renderer construction cleanup failed.'),\n { cleanupErrors: Object.freeze(cleanupErrors) },\n );\n }\n releaseSceneOwnership();\n });\n } else {\n try { releaseSceneOwnership(); }\n catch (cleanupError) {\n const recoverRelease = createFpsBabylonRendererConstructionCleanup([releaseSceneOwnership]);\n context.add(() => throwCleanupResult(recoverRelease()));\n throw createFailureWithMetadata(\n error,\n 'Babylon renderer construction failed.',\n {\n cleanupErrors: Object.freeze([cleanupError]),\n fpsBabylonRendererConstructionCleanup: recoverRelease,\n },\n );\n }\n }\n throw error;\n }\n context.add(context.services.register(FPS_BABYLON_RENDERER_SERVICE, createdService));\n context.add(() => createdService.dispose());\n },\n async start(context) {\n await getFpsBabylonRendererInternalService(context).initialize();\n },\n async dispose(context) {\n await (context.services.getOptional(FPS_BABYLON_RENDERER_SERVICE) as FpsBabylonRendererInternalService | undefined)?.dispose();\n },\n});\n\nexport function createFpsBabylonRendererPlugin(\n options: FpsBabylonRendererPluginOptions,\n): FpsBabylonRendererPlugin {\n const manifest = defineFpsPluginManifest({\n id: FPS_BABYLON_RENDERER_PLUGIN_ID,\n version: options.pluginVersion,\n apiVersion: 1,\n requires: {},\n provides: { features: ['fps.renderer.babylon'] },\n entries: { renderer: './renderer' },\n environmentContracts: {\n renderer: {\n requires: {\n services: [\n FPS_BABYLON_RENDERER_CONTEXT.id,\n FPS_BABYLON_RENDERER_DATA.id,\n FPS_ASSET_RESOURCE_RESOLVER.id,\n ],\n },\n provides: { services: [FPS_BABYLON_RENDERER_SERVICE.id] },\n scopes: ['application'],\n },\n },\n });\n return Object.freeze({ manifest, renderer: pluginEntry });\n}\n\nexport async function createFpsBabylonRendererHost(\n options: FpsBabylonRendererHostOptions,\n): Promise<FpsBabylonRendererHost> {\n const plugin = createFpsBabylonRendererPlugin(options);\n const assetsManifest = createFpsAssetsPluginManifest();\n const host = createFpsPluginHost({\n environment: 'renderer',\n apiVersion: 1,\n manifests: [assetsManifest, plugin.manifest],\n pluginConfigs: {\n [FPS_ASSETS_PLUGIN_ID]: null,\n [FPS_BABYLON_RENDERER_PLUGIN_ID]: options.config ?? {},\n },\n initialServices: [\n { token: FPS_BABYLON_RENDERER_CONTEXT, value: options.context },\n { token: FPS_BABYLON_RENDERER_DATA, value: options.data },\n {\n token: FPS_ASSET_CATALOG_SOURCE,\n value: Object.freeze({ catalog: options.assetCatalog }),\n },\n ],\n loadEntry: async manifest => (\n manifest.id === assetsManifest.id\n ? assetsRendererPluginEntry\n : manifest.id === plugin.manifest.id\n ? plugin.renderer\n : null\n ),\n report: options.report,\n });\n try {\n await host.start();\n } catch (error) {\n if (host.state !== 'cleanup-failed') throw error;\n const retryCleanup: FpsBabylonRendererHostCleanup = () => host.dispose();\n throw attachFpsBabylonRendererHostCleanup(error, retryCleanup);\n }\n const renderer = host.services.get(FPS_BABYLON_RENDERER_SERVICE);\n let hostDisposePromise: Promise<void> | null = null;\n return {\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n host,\n renderer,\n dispose: () => {\n if (!hostDisposePromise) {\n const operation = (async () => {\n // Abort queued renderer work immediately. If cleanup fails, keep the\n // Plugin Host and Scene ownership intact until the caller explicitly\n // retries this public disposal operation.\n await renderer.dispose();\n await host.dispose();\n })();\n hostDisposePromise = operation.catch(error => {\n hostDisposePromise = null;\n throw error;\n });\n }\n return hostDisposePromise;\n },\n };\n}\n\nfunction attachFpsBabylonRendererHostCleanup(\n failure: unknown,\n cleanup: FpsBabylonRendererHostCleanup,\n): Error {\n const error = failure instanceof Error\n ? failure\n : new Error('Babylon Renderer Host start failed and cleanup is incomplete.');\n const metadata = {\n fpsBabylonRendererHostCleanup: cleanup,\n retryCleanup: cleanup,\n };\n try {\n Object.assign(error, metadata);\n if (readFpsBabylonRendererHostCleanup(error) === cleanup) return error;\n } catch {\n // Preserve the primary rejection as cause when it cannot carry cleanup metadata.\n }\n return Object.assign(\n new Error('Babylon Renderer Host start failed and cleanup is incomplete.'),\n { cause: failure, ...metadata },\n );\n}\n\ninterface FpsBabylonRendererInternalService extends FpsBabylonRendererHostController {\n readonly shadowMapExperimentSystem: BabylonShadowMapExperimentSystem;\n initialize(): Promise<void>;\n}\n\nfunction createFpsBabylonRendererService(\n initialData: FpsRuntimeData,\n context: FpsBabylonRendererContext,\n assetResources: PlayableAssetResourceResolver,\n report: (diagnostic: FpsDiagnostic) => void,\n releaseSceneOwnership: () => void,\n): FpsBabylonRendererInternalService {\n const initialPrepared = prepareFpsBabylonRendererUpdate(initialData, assetResources, report);\n let data = initialPrepared.data;\n let disposed = false;\n let acceptingUpdates = true;\n let activeAbort: AbortController | null = null;\n let queue: Promise<void> = Promise.resolve();\n let disposePromise: Promise<void> | null = null;\n const originalEnvironmentTexture = context.scene.environmentTexture;\n const sceneWithIntensity = context.scene as unknown as { environmentIntensity?: number };\n const originalEnvironmentIntensity = sceneWithIntensity.environmentIntensity;\n const restoreOriginalSceneEnvironment = (): void => {\n context.scene.environmentTexture = originalEnvironmentTexture;\n if (originalEnvironmentIntensity === undefined) delete sceneWithIntensity.environmentIntensity;\n else sceneWithIntensity.environmentIntensity = originalEnvironmentIntensity;\n };\n const postProcess = createBabylonDefaultPostProcessPipelineController(\n context.scene,\n [...context.cameras],\n null,\n );\n let environment: BabylonEnvironmentTextureController;\n try {\n environment = createBabylonEnvironmentTextureController(context.scene, {\n createTexture: context.createEnvironmentTexture,\n });\n } catch (error) {\n throwFpsBabylonRendererConstructionFailure(error, [\n () => postProcess.dispose(),\n restoreOriginalSceneEnvironment,\n ]);\n }\n let shadowMapExperiment: BabylonShadowMapExperimentSystem;\n try {\n shadowMapExperiment = createBabylonShadowMapExperimentSystem(context.scene);\n } catch (error) {\n const shadowCleanup = readBabylonShadowMapExperimentSystemCleanup(error);\n throwFpsBabylonRendererConstructionFailure(error, [\n ...(shadowCleanup ? [() => throwCleanupResult(shadowCleanup())] : []),\n () => environment.dispose(),\n () => postProcess.dispose(),\n restoreOriginalSceneEnvironment,\n ]);\n }\n const assertAcceptingShadowOwnership = (): void => {\n if (!acceptingUpdates || disposed) {\n throw new Error('Babylon renderer service is disposed.');\n }\n };\n const shadows: FpsBabylonRendererShadowService = Object.freeze({\n registerRuntimeShadowObjects: (input: BabylonRuntimeShadowObjectsRegistration) => {\n assertAcceptingShadowOwnership();\n return shadowMapExperiment.registerRuntimeShadowObjects(input);\n },\n registerActivitySource: (input: {\n readonly entityId: string;\n readonly kind: ShadowMapExperimentActivityKind;\n readonly sourceId: string;\n }) => {\n assertAcceptingShadowOwnership();\n return shadowMapExperiment.registerCasterActivitySource(input);\n },\n getRuntimeSnapshot: () => shadowMapExperiment.getEvidence().runtime,\n getEvidence: () => shadowMapExperiment.getEvidence(),\n });\n\n const cleanup = (): void => {\n const cleanupErrors: unknown[] = [];\n try { shadowMapExperiment.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { environment.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { postProcess.dispose(); } catch (error) { cleanupErrors.push(error); }\n try { restoreOriginalSceneEnvironment(); } catch (error) { cleanupErrors.push(error); }\n if (cleanupErrors.length === 0) {\n try { releaseSceneOwnership(); } catch (error) { cleanupErrors.push(error); }\n }\n if (cleanupErrors.length > 0) {\n const error = new Error('Babylon renderer cleanup failed.');\n Object.assign(error, { cleanupErrors });\n throw error;\n }\n };\n\n const commit = async (\n prepared: FpsBabylonRendererPreparedUpdate,\n signal: AbortSignal,\n ): Promise<void> => {\n const previousEnvironment = environment.getProfile();\n const previousControllerTexture = environment.getTexture();\n const previousSceneTexture = context.scene.environmentTexture;\n const previousSceneIntensity = sceneWithIntensity.environmentIntensity;\n const previousPostProcess = postProcess.getProfile();\n const previousShadowMapExperimentPlan = shadowMapExperiment.getPlan();\n try {\n shadowMapExperiment.setPlan(prepared.shadowMapExperimentPlan);\n postProcess.setProfile(prepared.postProcess);\n await environment.applyProfile(prepared.environment, signal);\n if (signal.aborted) throw createFpsBabylonRendererAbortError();\n data = prepared.data;\n } catch (error) {\n const rollbackErrors: unknown[] = [];\n try { await environment.applyProfile(previousEnvironment); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n try {\n if (previousSceneTexture !== previousControllerTexture) {\n context.scene.environmentTexture = previousSceneTexture;\n }\n if (previousSceneIntensity === undefined) delete sceneWithIntensity.environmentIntensity;\n else sceneWithIntensity.environmentIntensity = previousSceneIntensity;\n } catch (rollbackError) {\n rollbackErrors.push(rollbackError);\n }\n try { postProcess.setProfile(previousPostProcess); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n try { shadowMapExperiment.setPlan(previousShadowMapExperimentPlan); } catch (rollbackError) { rollbackErrors.push(rollbackError); }\n if (rollbackErrors.length > 0) {\n throw createFailureWithMetadata(\n error,\n 'Babylon renderer update failed.',\n { rollbackErrors: Object.freeze(rollbackErrors) },\n );\n }\n throw error;\n }\n };\n\n const enqueue = (prepared: FpsBabylonRendererPreparedUpdate): Promise<void> => {\n const operation = queue.then(async () => {\n if (!acceptingUpdates || disposed) throw new Error('Babylon renderer service is disposed.');\n const abort = new AbortController();\n activeAbort = abort;\n try {\n await commit(prepared, abort.signal);\n } finally {\n if (activeAbort === abort) activeAbort = null;\n }\n });\n queue = operation.then(() => undefined, () => undefined);\n return operation;\n };\n\n const service: FpsBabylonRendererInternalService = {\n environment,\n postProcess,\n shadows,\n shadowMapExperimentSystem: shadowMapExperiment,\n getRuntimeData: () => data,\n initialize: () => enqueue(initialPrepared),\n async update(nextData) {\n if (!acceptingUpdates || disposed) throw new Error('Babylon renderer service is disposed.');\n await enqueue(prepareFpsBabylonRendererUpdate(nextData, assetResources, report));\n },\n async dispose() {\n if (disposePromise) return disposePromise;\n acceptingUpdates = false;\n activeAbort?.abort();\n const operation = (async () => {\n await queue;\n if (disposed) return;\n cleanup();\n disposed = true;\n })();\n disposePromise = operation.catch(error => {\n disposePromise = null;\n throw error;\n });\n return disposePromise;\n },\n };\n return service;\n}\n\ntype FpsBabylonRendererConstructionCleanup = () => readonly unknown[];\n\nfunction throwFpsBabylonRendererConstructionFailure(\n failure: unknown,\n operations: readonly (() => void)[],\n): never {\n const cleanup = createFpsBabylonRendererConstructionCleanup(operations);\n const cleanupErrors = cleanup();\n if (cleanupErrors.length === 0) throw failure;\n throw createFailureWithMetadata(\n failure,\n 'Babylon renderer construction failed.',\n {\n cleanupErrors,\n fpsBabylonRendererConstructionCleanup: cleanup,\n },\n );\n}\n\nfunction createFpsBabylonRendererConstructionCleanup(\n operations: readonly (() => void)[],\n): FpsBabylonRendererConstructionCleanup {\n let pending = [...operations];\n return () => {\n const cleanupErrors: unknown[] = [];\n const retry: (() => void)[] = [];\n for (const operation of pending) {\n try { operation(); }\n catch (error) {\n cleanupErrors.push(error);\n retry.push(operation);\n }\n }\n pending = retry;\n return Object.freeze(cleanupErrors);\n };\n}\n\nfunction readFpsBabylonRendererConstructionCleanup(\n error: unknown,\n): FpsBabylonRendererConstructionCleanup | null {\n if (!error || (typeof error !== 'object' && typeof error !== 'function')) return null;\n const cleanup = (error as { fpsBabylonRendererConstructionCleanup?: unknown })\n .fpsBabylonRendererConstructionCleanup;\n return typeof cleanup === 'function' ? cleanup as FpsBabylonRendererConstructionCleanup : null;\n}\n\nfunction throwCleanupResult(cleanupErrors: readonly unknown[]): void {\n if (cleanupErrors.length === 0) return;\n if (cleanupErrors.length === 1) throw cleanupErrors[0];\n throw Object.assign(new Error('Babylon renderer construction cleanup failed.'), {\n cleanupErrors: Object.freeze([...cleanupErrors]),\n });\n}\n\nfunction createFailureWithMetadata(\n failure: unknown,\n fallbackMessage: string,\n metadata: Readonly<Record<string, unknown>>,\n): object {\n if (failure && (typeof failure === 'object' || typeof failure === 'function')) {\n try {\n Object.assign(failure, metadata);\n if (Object.entries(metadata).every(([key, value]) => (\n (failure as Record<string, unknown>)[key] === value\n ))) return failure;\n } catch {\n // A non-extensible primary error is wrapped so recovery metadata remains reachable.\n }\n }\n return Object.assign(\n new Error(failure instanceof Error ? failure.message : fallbackMessage),\n { cause: failure, ...metadata },\n );\n}\n\nfunction reserveFpsBabylonRendererScene(scene: Scene): () => void {\n if (fpsBabylonRendererSceneOwners.has(scene)) {\n throw new Error('Babylon renderer Scene already has an active owner.');\n }\n const owner = Object.freeze({});\n fpsBabylonRendererSceneOwners.set(scene, owner);\n let released = false;\n return () => {\n if (released) return;\n if (fpsBabylonRendererSceneOwners.get(scene) !== owner) {\n throw new Error('Babylon renderer Scene ownership was replaced before cleanup completed.');\n }\n fpsBabylonRendererSceneOwners.delete(scene);\n released = true;\n };\n}\n\nfunction getFpsBabylonRendererInternalService(\n context: Parameters<NonNullable<FpsPluginEntry['start']>>[0],\n): FpsBabylonRendererInternalService {\n return context.services.get(FPS_BABYLON_RENDERER_SERVICE) as FpsBabylonRendererInternalService;\n}\n\nfunction createFpsBabylonRendererAbortError(): Error {\n return Object.assign(new Error('Babylon renderer update aborted.'), { name: 'AbortError' });\n}\n\ninterface FpsBabylonRendererPreparedUpdate {\n readonly data: FpsRuntimeData;\n readonly environment: {\n readonly texture: PlayableResolvedAssetResource | null;\n readonly intensity: number;\n readonly rotationY: number;\n };\n readonly postProcess: ReturnType<typeof normalizeEditorSceneRenderingProfile>['postProcess'];\n readonly shadowMapExperimentPlan: ShadowMapExperimentPlan | null;\n}\n\nfunction prepareFpsBabylonRendererUpdate(\n input: FpsRuntimeData,\n assetResources: PlayableAssetResourceResolver,\n report: (diagnostic: FpsDiagnostic) => void,\n): FpsBabylonRendererPreparedUpdate {\n const data = createFpsRuntimeDataSnapshot(input);\n const profile = normalizeEditorSceneRenderingProfile(data.rendering);\n const textureRef = profile.environment.texture;\n const textureResolution = textureRef\n ? assetResources.resolve({\n assetId: textureRef.textureAssetId,\n url: textureRef.url,\n })\n : null;\n if (textureResolution && !textureResolution.ok) {\n const diagnostic: FpsDiagnostic = {\n code: textureResolution.diagnostic.code,\n severity: 'error',\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n message: createAssetResourceResolutionMessage(textureResolution.diagnostic),\n details: { ...textureResolution.diagnostic },\n };\n report(diagnostic);\n throw Object.assign(new Error(diagnostic.message), {\n code: diagnostic.code,\n diagnostic: Object.freeze(diagnostic),\n });\n }\n const shadowMapExperimentEntry = data.plugins?.find(\n entry => entry.pluginId === FPS_SHADOW_MAP_EXPERIMENT_PLUGIN_ID,\n );\n return Object.freeze({\n data,\n environment: Object.freeze({\n texture: textureResolution?.resource ?? null,\n intensity: profile.environment.iblIntensity,\n rotationY: profile.environment.rotationY,\n }),\n postProcess: profile.postProcess,\n shadowMapExperimentPlan: shadowMapExperimentEntry\n ? createShadowMapExperimentPlanSnapshot(shadowMapExperimentEntry.data)\n : null,\n });\n}\n\nfunction createAssetResourceResolutionMessage(\n diagnostic: PlayableAssetResourceResolutionDiagnostic,\n): string {\n const identity = diagnostic.assetId ? ` asset ${diagnostic.assetId}` : ' external resource';\n if (diagnostic.code === 'asset.resource.not-found') {\n return `Environment texture${identity} was not found in the generated asset catalog.`;\n }\n if (diagnostic.code === 'asset.resource.format-missing') {\n return `Environment texture${identity} has no resolvable source format.`;\n }\n if (diagnostic.code === 'asset.resource.format-unsupported') {\n return `Environment texture${identity} uses unsupported format ${diagnostic.format ?? '<unknown>'}.`;\n }\n return `Environment texture${identity} reference is invalid.`;\n}\n"]}
@@ -1,8 +1,6 @@
1
1
  import { type FpsPluginReference } from '@fps-games/plugin-api';
2
2
  export declare const FPS_BABYLON_RENDERER_PLUGIN_ID = "fps.renderer.babylon";
3
3
  export declare const FPS_BABYLON_RENDERER_PACKAGE_NAME = "@fps-games/babylon-renderer";
4
- export interface FpsBabylonRendererPluginConfig {
5
- readonly environmentTexture?: string | null;
6
- }
4
+ export type FpsBabylonRendererPluginConfig = Readonly<Record<string, never>>;
7
5
  export declare function babylonRendererPlugin(config?: FpsBabylonRendererPluginConfig): Readonly<FpsPluginReference<FpsBabylonRendererPluginConfig>>;
8
6
  //# sourceMappingURL=reference.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,8BAA8B,yBAAyB,CAAC;AACrE,eAAO,MAAM,iCAAiC,gCAAgC,CAAC;AAE/E,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7C;AAED,wBAAgB,qBAAqB,CACnC,MAAM,GAAE,8BAAmC,GAC1C,QAAQ,CAAC,kBAAkB,CAAC,8BAA8B,CAAC,CAAC,CAY9D"}
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,8BAA8B,yBAAyB,CAAC;AACrE,eAAO,MAAM,iCAAiC,gCAAgC,CAAC;AAE/E,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAE7E,wBAAgB,qBAAqB,CACnC,MAAM,GAAE,8BAAmC,GAC1C,QAAQ,CAAC,kBAAkB,CAAC,8BAA8B,CAAC,CAAC,CAY9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"reference.js","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAEzB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,MAAM,8BAA8B,GAAG,sBAAsB,CAAC;AACrE,MAAM,CAAC,MAAM,iCAAiC,GAAG,6BAA6B,CAAC;AAM/E,MAAM,UAAU,qBAAqB,CACnC,SAAyC,EAAE;IAE3C,OAAO,wBAAwB,CAAC;QAC9B,WAAW,EAAE,iCAAiC;QAC9C,QAAQ,EAAE,8BAA8B;QACxC,MAAM;QACN,YAAY,EAAE;YACZ,QAAQ,EAAE;gBACR,8BAA8B;gBAC9B,mCAAmC;aACpC;SACF;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n defineFpsPluginReference,\n type FpsPluginReference,\n} from '@fps-games/plugin-api';\n\nexport const FPS_BABYLON_RENDERER_PLUGIN_ID = 'fps.renderer.babylon';\nexport const FPS_BABYLON_RENDERER_PACKAGE_NAME = '@fps-games/babylon-renderer';\n\nexport interface FpsBabylonRendererPluginConfig {\n readonly environmentTexture?: string | null;\n}\n\nexport function babylonRendererPlugin(\n config: FpsBabylonRendererPluginConfig = {},\n): Readonly<FpsPluginReference<FpsBabylonRendererPluginConfig>> {\n return defineFpsPluginReference({\n packageName: FPS_BABYLON_RENDERER_PACKAGE_NAME,\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n config,\n hostServices: {\n renderer: [\n 'fps.renderer.babylon.context',\n 'fps.renderer.babylon.runtime-data',\n ],\n },\n });\n}\n"]}
1
+ {"version":3,"file":"reference.js","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAEzB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,MAAM,8BAA8B,GAAG,sBAAsB,CAAC;AACrE,MAAM,CAAC,MAAM,iCAAiC,GAAG,6BAA6B,CAAC;AAI/E,MAAM,UAAU,qBAAqB,CACnC,SAAyC,EAAE;IAE3C,OAAO,wBAAwB,CAAC;QAC9B,WAAW,EAAE,iCAAiC;QAC9C,QAAQ,EAAE,8BAA8B;QACxC,MAAM;QACN,YAAY,EAAE;YACZ,QAAQ,EAAE;gBACR,8BAA8B;gBAC9B,mCAAmC;aACpC;SACF;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n defineFpsPluginReference,\n type FpsPluginReference,\n} from '@fps-games/plugin-api';\n\nexport const FPS_BABYLON_RENDERER_PLUGIN_ID = 'fps.renderer.babylon';\nexport const FPS_BABYLON_RENDERER_PACKAGE_NAME = '@fps-games/babylon-renderer';\n\nexport type FpsBabylonRendererPluginConfig = Readonly<Record<string, never>>;\n\nexport function babylonRendererPlugin(\n config: FpsBabylonRendererPluginConfig = {},\n): Readonly<FpsPluginReference<FpsBabylonRendererPluginConfig>> {\n return defineFpsPluginReference({\n packageName: FPS_BABYLON_RENDERER_PACKAGE_NAME,\n pluginId: FPS_BABYLON_RENDERER_PLUGIN_ID,\n config,\n hostServices: {\n renderer: [\n 'fps.renderer.babylon.context',\n 'fps.renderer.babylon.runtime-data',\n ],\n },\n });\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fps-games/babylon-renderer",
3
- "version": "0.2.1-beta.2",
3
+ "version": "0.2.1-beta.3",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Babylon-backed renderer capabilities for fps-game-editor.",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "fpsGamePlugin": {
26
26
  "id": "fps.renderer.babylon",
27
- "version": "0.2.1-beta.2",
27
+ "version": "0.2.1-beta.3",
28
28
  "apiVersion": 1,
29
29
  "requires": {},
30
30
  "provides": {
@@ -40,7 +40,8 @@
40
40
  "requires": {
41
41
  "services": [
42
42
  "fps.renderer.babylon.context",
43
- "fps.renderer.babylon.runtime-data"
43
+ "fps.renderer.babylon.runtime-data",
44
+ "fps.asset.resource.resolver"
44
45
  ]
45
46
  },
46
47
  "provides": {
@@ -55,11 +56,13 @@
55
56
  }
56
57
  },
57
58
  "dependencies": {
58
- "@fps-games/playable-contracts": "0.2.1-beta.2",
59
- "@fps-games/playable-rendering": "0.2.1-beta.2",
60
- "@fps-games/playable-runtime-data": "0.2.1-beta.2",
61
- "@fps-games/plugin-api": "0.2.1-beta.2",
62
- "@fps-games/plugin-host": "0.2.1-beta.2"
59
+ "@fps-games/playable-assets": "0.2.1-beta.3",
60
+ "@fps-games/playable-contracts": "0.2.1-beta.3",
61
+ "@fps-games/playable-rendering": "0.2.1-beta.3",
62
+ "@fps-games/playable-runtime-data": "0.2.1-beta.3",
63
+ "@fps-games/plugin-assets": "0.2.1-beta.3",
64
+ "@fps-games/plugin-api": "0.2.1-beta.3",
65
+ "@fps-games/plugin-host": "0.2.1-beta.3"
63
66
  },
64
67
  "peerDependencies": {
65
68
  "@babylonjs/core": "^8.0.0"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fps-games/editor-babylon",
3
- "version": "0.2.1-beta.2",
3
+ "version": "0.2.1-beta.3",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "BabylonJS runtime integrations for fps-game-editor.",
@@ -14,10 +14,10 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@fps-games/babylon-renderer": "0.2.1-beta.2",
18
- "@fps-games/editor-browser": "0.2.1-beta.2",
19
- "@fps-games/editor-core": "0.2.1-beta.2",
20
- "@fps-games/editor-protocol": "0.2.1-beta.2",
21
- "@fps-games/playable-contracts": "0.2.1-beta.2"
17
+ "@fps-games/babylon-renderer": "0.2.1-beta.3",
18
+ "@fps-games/editor-browser": "0.2.1-beta.3",
19
+ "@fps-games/editor-core": "0.2.1-beta.3",
20
+ "@fps-games/editor-protocol": "0.2.1-beta.3",
21
+ "@fps-games/playable-contracts": "0.2.1-beta.3"
22
22
  }
23
23
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fps-games/editor-browser",
3
- "version": "0.2.1-beta.2",
3
+ "version": "0.2.1-beta.3",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Browser host adapters for fps-game-editor.",
@@ -22,11 +22,11 @@
22
22
  }
23
23
  },
24
24
  "dependencies": {
25
- "@fps-games/editor-core": "0.2.1-beta.2",
26
- "@fps-games/editor-playable-sdk": "0.2.1-beta.2",
27
- "@fps-games/editor-protocol": "0.2.1-beta.2",
28
- "@fps-games/editor-ui": "0.2.1-beta.2",
29
- "@fps-games/plugin-api": "0.2.1-beta.2",
30
- "@fps-games/plugin-hierarchy": "0.2.1-beta.2"
25
+ "@fps-games/editor-core": "0.2.1-beta.3",
26
+ "@fps-games/editor-playable-sdk": "0.2.1-beta.3",
27
+ "@fps-games/editor-protocol": "0.2.1-beta.3",
28
+ "@fps-games/editor-ui": "0.2.1-beta.3",
29
+ "@fps-games/plugin-api": "0.2.1-beta.3",
30
+ "@fps-games/plugin-hierarchy": "0.2.1-beta.3"
31
31
  }
32
32
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fps-games/editor-core",
3
- "version": "0.2.1-beta.2",
3
+ "version": "0.2.1-beta.3",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Core runtime shell and adapter contracts for fps-game-editor.",
@@ -38,10 +38,10 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@fps-games/plugin-api": "0.2.1-beta.2",
42
- "@fps-games/plugin-host": "0.2.1-beta.2",
43
- "@fps-games/playable-contracts": "0.2.1-beta.2",
44
- "@fps-games/playable-scene": "0.2.1-beta.2",
45
- "@fps-games/editor-protocol": "0.2.1-beta.2"
41
+ "@fps-games/plugin-api": "0.2.1-beta.3",
42
+ "@fps-games/plugin-host": "0.2.1-beta.3",
43
+ "@fps-games/playable-contracts": "0.2.1-beta.3",
44
+ "@fps-games/playable-scene": "0.2.1-beta.3",
45
+ "@fps-games/editor-protocol": "0.2.1-beta.3"
46
46
  }
47
47
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fps-games/editor-forge-play",
3
- "version": "0.2.1-beta.2",
3
+ "version": "0.2.1-beta.3",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "Forge Play bridge adapter for fps-game-editor.",
@@ -14,6 +14,6 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@fps-games/editor-protocol": "0.2.1-beta.2"
17
+ "@fps-games/editor-protocol": "0.2.1-beta.3"
18
18
  }
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generated-module.d.ts","sourceRoot":"","sources":["../../src/asset-database/generated-module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gCAAgC,EACjC,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,uCAAuC;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,wCAAwC,CACtD,QAAQ,EAAE,SAAS,gCAAgC,EAAE,EACrD,OAAO,GAAE,uCAA4C,GACpD,MAAM,CAiGR"}
1
+ {"version":3,"file":"generated-module.d.ts","sourceRoot":"","sources":["../../src/asset-database/generated-module.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,gCAAgC,EACjC,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,uCAAuC;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,wCAAwC,CACtD,QAAQ,EAAE,SAAS,gCAAgC,EAAE,EACrD,OAAO,GAAE,uCAA4C,GACpD,MAAM,CAuGR"}
@@ -1,4 +1,4 @@
1
- import { toPlayableEditorAssetImportName, } from '@fps-games/playable-assets';
1
+ import { getPlayableAssetFormat, isPlayableAssetFormatSupported, toPlayableEditorAssetImportName, } from '@fps-games/playable-assets';
2
2
  export function generatePlayableEditorAssetCatalogModule(manifest, options = {}) {
3
3
  const generatedBy = options.generatedBy ?? 'scripts/register-asset.mjs';
4
4
  const imports = manifest
@@ -6,12 +6,19 @@ export function generatePlayableEditorAssetCatalogModule(manifest, options = {})
6
6
  .join('\n');
7
7
  const catalogEntries = manifest
8
8
  .map((entry) => {
9
+ const format = getPlayableAssetFormat(entry.relativePath);
10
+ if (!format)
11
+ throw new Error(`Generated asset catalog entry has no file extension: ${entry.assetId}`);
12
+ if (!isPlayableAssetFormatSupported(format)) {
13
+ throw new Error(`Generated asset catalog entry has unsupported format: ${entry.assetId} (${format})`);
14
+ }
9
15
  const pieces = [
10
16
  `guid: ${JSON.stringify(entry.guid)}`,
11
17
  `assetId: ${JSON.stringify(entry.assetId)}`,
12
18
  `kind: ${JSON.stringify(entry.kind)}`,
13
19
  `displayName: ${JSON.stringify(entry.displayName)}`,
14
20
  `url: ${toPlayableEditorAssetImportName(entry.assetId)}`,
21
+ `format: ${JSON.stringify(format)}`,
15
22
  `relativePath: ${JSON.stringify(entry.relativePath)}`,
16
23
  entry.originalFileName ? `originalFileName: ${JSON.stringify(entry.originalFileName)}` : '',
17
24
  entry.codeKey ? `codeKey: ${JSON.stringify(entry.codeKey)}` : '',
@@ -49,6 +56,7 @@ export function generatePlayableEditorAssetCatalogModule(manifest, options = {})
49
56
  ' kind: GeneratedAssetCatalogKind;',
50
57
  ' displayName: string;',
51
58
  ' url: string;',
59
+ ' format: `.${string}`;',
52
60
  ' relativePath: string;',
53
61
  ' originalFileName?: string;',
54
62
  ' codeKey?: string;',
@@ -93,7 +101,6 @@ export function generatePlayableEditorAssetCatalogModule(manifest, options = {})
93
101
  'export const ASSET_IDS = {',
94
102
  idEntries,
95
103
  '} as const satisfies Record<string, string>;',
96
- '',
97
- ].join('\n');
104
+ ].join('\n') + '\n';
98
105
  }
99
106
  //# sourceMappingURL=generated-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generated-module.js","sourceRoot":"","sources":["../../src/asset-database/generated-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AASpC,MAAM,UAAU,wCAAwC,CACtD,QAAqD,EACrD,UAAmD,EAAE;IAErD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,4BAA4B,CAAC;IACxE,MAAM,OAAO,GAAG,QAAQ;SACrB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,+BAA+B,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,MAAM,CAAC,GAAG,CAAC;SAC/H,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,MAAM,cAAc,GAAG,QAAQ;SAC5B,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,MAAM,GAAG;YACb,SAAS,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YACrC,YAAY,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;YAC3C,SAAS,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YACrC,gBAAgB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YACnD,QAAQ,+BAA+B,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;YACxD,iBAAiB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE;YACrD,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,qBAAqB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,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AiB;QACjB,oBAAoB;QACpB,oCAAoC;QACpC,wBAAwB;QACxB,gBAAgB;QAChB,yBAAyB;QACzB,8BAA8B;QAC9B,qBAAqB;QACrB,sBAAsB;QACtB,wBAAwB;QACxB,yBAAyB;QACzB,wBAAwB;QACxB,0BAA0B;QAC1B,uCAAuC;QACvC,yBAAyB;QACzB,sBAAsB;QACtB,mFAAmF;QACnF,uCAAuC;QACvC,uBAAuB;QACvB,uBAAuB;QACvB,GAAG;QACH,EAAE;QACF,sFAAsF;QACtF,cAAc;QACd,IAAI;QACJ,EAAE;QACF,4DAA4D;QAC5D,4FAA4F;QAC5F,8BAA8B;QAC9B,EAAE;QACF,kEAAkE;QAClE,0IAA0I;QAC1I,8BAA8B;QAC9B,EAAE;QACF,oEAAoE;QACpE,4IAA4I;QAC5I,8BAA8B;QAC9B,EAAE;QACF,kEAAkE;QAClE,0IAA0I;QAC1I,8BAA8B;QAC9B,EAAE;QACF,kEAAkE;QAClE,0IAA0I;QAC1I,8BAA8B;QAC9B,EAAE;QACF,4BAA4B;QAC5B,SAAS;QACT,8CAA8C;QAC9C,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC","sourcesContent":["import {\n toPlayableEditorAssetImportName,\n} from '@fps-games/playable-assets';\nimport type {\n PlayableEditorAssetRegistryEntry,\n} from './types';\n\nexport interface PlayableEditorAssetCatalogModuleOptions {\n generatedBy?: string;\n}\n\nexport function generatePlayableEditorAssetCatalogModule(\n manifest: readonly PlayableEditorAssetRegistryEntry[],\n options: PlayableEditorAssetCatalogModuleOptions = {},\n): string {\n const generatedBy = options.generatedBy ?? 'scripts/register-asset.mjs';\n const imports = manifest\n .map((entry) => `import ${toPlayableEditorAssetImportName(entry.assetId)} from ${JSON.stringify(`${entry.relativePath}?url`)};`)\n .join('\\n');\n const catalogEntries = manifest\n .map((entry) => {\n const pieces = [\n `guid: ${JSON.stringify(entry.guid)}`,\n `assetId: ${JSON.stringify(entry.assetId)}`,\n `kind: ${JSON.stringify(entry.kind)}`,\n `displayName: ${JSON.stringify(entry.displayName)}`,\n `url: ${toPlayableEditorAssetImportName(entry.assetId)}`,\n `relativePath: ${JSON.stringify(entry.relativePath)}`,\n entry.originalFileName ? `originalFileName: ${JSON.stringify(entry.originalFileName)}` : '',\n entry.codeKey ? `codeKey: ${JSON.stringify(entry.codeKey)}` : '',\n entry.category ? `category: ${JSON.stringify(entry.category)}` : '',\n typeof entry.placeable === 'boolean' ? `placeable: ${JSON.stringify(entry.placeable)}` : '',\n typeof entry.warmupCount === 'number' ? `warmupCount: ${JSON.stringify(entry.warmupCount)}` : '',\n typeof entry.singleton === 'boolean' ? `singleton: ${JSON.stringify(entry.singleton)}` : '',\n entry.materialMode ? `materialMode: ${JSON.stringify(entry.materialMode)}` : '',\n entry.defaults ? `defaults: ${JSON.stringify(entry.defaults)}` : '',\n entry.contentHash ? `contentHash: ${JSON.stringify(entry.contentHash)}` : '',\n typeof entry.byteSize === 'number' ? `byteSize: ${JSON.stringify(entry.byteSize)}` : '',\n entry.external ? `external: ${JSON.stringify(entry.external)}` : '',\n entry.metadata ? `metadata: ${JSON.stringify(entry.metadata)}` : '',\n entry.createdAt ? `createdAt: ${JSON.stringify(entry.createdAt)}` : '',\n entry.updatedAt ? `updatedAt: ${JSON.stringify(entry.updatedAt)}` : '',\n ].filter(Boolean).join(', ');\n return ` ${JSON.stringify(entry.assetId)}: { ${pieces} },`;\n })\n .join('\\n');\n const idEntries = manifest\n .filter((entry) => entry.codeKey)\n .map((entry) => ` ${JSON.stringify(entry.codeKey)}: ${JSON.stringify(entry.assetId)},`)\n .join('\\n');\n\n return [\n `// This file is generated by ${generatedBy}.`,\n '// Do not edit by hand.',\n '',\n imports,\n imports ? '' : '',\n 'export type GeneratedAssetCatalogKind = \"model\" | \"texture\" | \"image\" | \"sound\";',\n '',\n 'export interface GeneratedAssetCatalogEntry {',\n ' guid: string;',\n ' assetId: string;',\n ' kind: GeneratedAssetCatalogKind;',\n ' displayName: string;',\n ' url: string;',\n ' relativePath: string;',\n ' originalFileName?: string;',\n ' codeKey?: string;',\n ' category?: string;',\n ' placeable?: boolean;',\n ' warmupCount?: number;',\n ' singleton?: boolean;',\n ' materialMode?: string;',\n ' defaults?: Record<string, unknown>;',\n ' contentHash?: string;',\n ' byteSize?: number;',\n ' external?: { platformAssetId?: string; assetPath?: string; assetUrl?: string };',\n ' metadata?: Record<string, unknown>;',\n ' createdAt?: string;',\n ' updatedAt?: string;',\n '}',\n '',\n 'export const GENERATED_ASSET_CATALOG: Record<string, GeneratedAssetCatalogEntry> = {',\n catalogEntries,\n '};',\n '',\n 'export const GENERATED_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_MODEL_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"model\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_TEXTURE_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"texture\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_IMAGE_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"image\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_SOUND_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"sound\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const ASSET_IDS = {',\n idEntries,\n '} as const satisfies Record<string, string>;',\n '',\n ].join('\\n');\n}\n"]}
1
+ {"version":3,"file":"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,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;SACvF,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;QACL,gCAAgC,WAAW,GAAG;QAC9C,yBAAyB;QACzB,EAAE;QACF,OAAO;QACP,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QACjB,kFAAkF;QAClF,EAAE;QACF,+CAA+C;QAC/C,iBAAiB;QACjB,oBAAoB;QACpB,oCAAoC;QACpC,wBAAwB;QACxB,gBAAgB;QAChB,yBAAyB;QACzB,yBAAyB;QACzB,8BAA8B;QAC9B,qBAAqB;QACrB,sBAAsB;QACtB,wBAAwB;QACxB,yBAAyB;QACzB,wBAAwB;QACxB,0BAA0B;QAC1B,uCAAuC;QACvC,yBAAyB;QACzB,sBAAsB;QACtB,mFAAmF;QACnF,uCAAuC;QACvC,uBAAuB;QACvB,uBAAuB;QACvB,GAAG;QACH,EAAE;QACF,sFAAsF;QACtF,cAAc;QACd,IAAI;QACJ,EAAE;QACF,4DAA4D;QAC5D,4FAA4F;QAC5F,8BAA8B;QAC9B,EAAE;QACF,kEAAkE;QAClE,0IAA0I;QAC1I,8BAA8B;QAC9B,EAAE;QACF,oEAAoE;QACpE,4IAA4I;QAC5I,8BAA8B;QAC9B,EAAE;QACF,kEAAkE;QAClE,0IAA0I;QAC1I,8BAA8B;QAC9B,EAAE;QACF,kEAAkE;QAClE,0IAA0I;QAC1I,8BAA8B;QAC9B,EAAE;QACF,4BAA4B;QAC5B,SAAS;QACT,8CAA8C;KAC/C,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACtB,CAAC","sourcesContent":["import {\n getPlayableAssetFormat,\n isPlayableAssetFormatSupported,\n toPlayableEditorAssetImportName,\n} from '@fps-games/playable-assets';\nimport type {\n PlayableEditorAssetRegistryEntry,\n} from './types';\n\nexport interface PlayableEditorAssetCatalogModuleOptions {\n generatedBy?: string;\n}\n\nexport function generatePlayableEditorAssetCatalogModule(\n manifest: readonly PlayableEditorAssetRegistryEntry[],\n options: PlayableEditorAssetCatalogModuleOptions = {},\n): string {\n const generatedBy = options.generatedBy ?? 'scripts/register-asset.mjs';\n const imports = manifest\n .map((entry) => `import ${toPlayableEditorAssetImportName(entry.assetId)} from ${JSON.stringify(`${entry.relativePath}?url`)};`)\n .join('\\n');\n const catalogEntries = manifest\n .map((entry) => {\n const format = getPlayableAssetFormat(entry.relativePath);\n if (!format) throw new Error(`Generated asset catalog entry has no file extension: ${entry.assetId}`);\n if (!isPlayableAssetFormatSupported(format)) {\n throw new Error(`Generated asset catalog entry has unsupported format: ${entry.assetId} (${format})`);\n }\n const pieces = [\n `guid: ${JSON.stringify(entry.guid)}`,\n `assetId: ${JSON.stringify(entry.assetId)}`,\n `kind: ${JSON.stringify(entry.kind)}`,\n `displayName: ${JSON.stringify(entry.displayName)}`,\n `url: ${toPlayableEditorAssetImportName(entry.assetId)}`,\n `format: ${JSON.stringify(format)}`,\n `relativePath: ${JSON.stringify(entry.relativePath)}`,\n entry.originalFileName ? `originalFileName: ${JSON.stringify(entry.originalFileName)}` : '',\n entry.codeKey ? `codeKey: ${JSON.stringify(entry.codeKey)}` : '',\n entry.category ? `category: ${JSON.stringify(entry.category)}` : '',\n typeof entry.placeable === 'boolean' ? `placeable: ${JSON.stringify(entry.placeable)}` : '',\n typeof entry.warmupCount === 'number' ? `warmupCount: ${JSON.stringify(entry.warmupCount)}` : '',\n typeof entry.singleton === 'boolean' ? `singleton: ${JSON.stringify(entry.singleton)}` : '',\n entry.materialMode ? `materialMode: ${JSON.stringify(entry.materialMode)}` : '',\n entry.defaults ? `defaults: ${JSON.stringify(entry.defaults)}` : '',\n entry.contentHash ? `contentHash: ${JSON.stringify(entry.contentHash)}` : '',\n typeof entry.byteSize === 'number' ? `byteSize: ${JSON.stringify(entry.byteSize)}` : '',\n entry.external ? `external: ${JSON.stringify(entry.external)}` : '',\n entry.metadata ? `metadata: ${JSON.stringify(entry.metadata)}` : '',\n entry.createdAt ? `createdAt: ${JSON.stringify(entry.createdAt)}` : '',\n entry.updatedAt ? `updatedAt: ${JSON.stringify(entry.updatedAt)}` : '',\n ].filter(Boolean).join(', ');\n return ` ${JSON.stringify(entry.assetId)}: { ${pieces} },`;\n })\n .join('\\n');\n const idEntries = manifest\n .filter((entry) => entry.codeKey)\n .map((entry) => ` ${JSON.stringify(entry.codeKey)}: ${JSON.stringify(entry.assetId)},`)\n .join('\\n');\n\n return [\n `// This file is generated by ${generatedBy}.`,\n '// Do not edit by hand.',\n '',\n imports,\n imports ? '' : '',\n 'export type GeneratedAssetCatalogKind = \"model\" | \"texture\" | \"image\" | \"sound\";',\n '',\n 'export interface GeneratedAssetCatalogEntry {',\n ' guid: string;',\n ' assetId: string;',\n ' kind: GeneratedAssetCatalogKind;',\n ' displayName: string;',\n ' url: string;',\n ' format: `.${string}`;',\n ' relativePath: string;',\n ' originalFileName?: string;',\n ' codeKey?: string;',\n ' category?: string;',\n ' placeable?: boolean;',\n ' warmupCount?: number;',\n ' singleton?: boolean;',\n ' materialMode?: string;',\n ' defaults?: Record<string, unknown>;',\n ' contentHash?: string;',\n ' byteSize?: number;',\n ' external?: { platformAssetId?: string; assetPath?: string; assetUrl?: string };',\n ' metadata?: Record<string, unknown>;',\n ' createdAt?: string;',\n ' updatedAt?: string;',\n '}',\n '',\n 'export const GENERATED_ASSET_CATALOG: Record<string, GeneratedAssetCatalogEntry> = {',\n catalogEntries,\n '};',\n '',\n 'export const GENERATED_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_MODEL_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"model\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_TEXTURE_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"texture\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_IMAGE_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"image\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const GENERATED_SOUND_ASSET_URL_MAP = Object.fromEntries(',\n ' Object.entries(GENERATED_ASSET_CATALOG).filter(([, entry]) => entry.kind === \"sound\").map(([assetId, entry]) => [assetId, entry.url]),',\n ') as Record<string, string>;',\n '',\n 'export const ASSET_IDS = {',\n idEntries,\n '} as const satisfies Record<string, string>;',\n ].join('\\n') + '\\n';\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  export type { PlayableEditorAssetCatalogEntry, PlayableEditorAssetDatabaseCommands, PlayableEditorAssetDatabaseConfig, PlayableEditorAssetDatabasePaths, PlayableEditorAssetDatabasePublicUrlInput, PlayableEditorAssetDatabaseRelativePathInput, PlayableEditorAssetKind, } from './types';
2
2
  export { definePlayableEditorAssetDatabaseConfig, } from './config';
3
- export { PLAYABLE_EDITOR_ASSET_CATALOG_KINDS, PLAYABLE_EDITOR_DEFAULT_EXTENSIONS, PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS, PLAYABLE_EDITOR_IMAGE_EXTENSIONS, PLAYABLE_EDITOR_MODEL_EXTENSIONS, PLAYABLE_EDITOR_SOUND_EXTENSIONS, PLAYABLE_EDITOR_TEXTURE_EXTENSIONS, createPlayableEditorAssetGuid, createPlayableEditorAssetId, getPlayableEditorAssetKindExtensions, guidToPlayableEditorAssetStableToken, normalizePlayableEditorAssetCodeKey, normalizePlayableEditorAssetDisplayName, normalizePlayableEditorAssetKind, stripKnownPlayableEditorAssetExtension, toPlayableEditorAssetImportName, } from '@fps-games/playable-assets';
3
+ export { PLAYABLE_EDITOR_ASSET_CATALOG_KINDS, PLAYABLE_EDITOR_DEFAULT_EXTENSIONS, PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS, PLAYABLE_EDITOR_IMAGE_EXTENSIONS, PLAYABLE_EDITOR_MODEL_EXTENSIONS, PLAYABLE_EDITOR_SOUND_EXTENSIONS, PLAYABLE_EDITOR_TEXTURE_EXTENSIONS, createPlayableAssetResourceResolver, createPlayableEditorAssetGuid, createPlayableEditorAssetId, getPlayableEditorAssetKindExtensions, guidToPlayableEditorAssetStableToken, normalizePlayableEditorAssetCodeKey, normalizePlayableEditorAssetDisplayName, normalizePlayableEditorAssetKind, getPlayableAssetFormat, getPlayableAssetResourceTransport, isPlayableAssetFormatSupported, stripKnownPlayableEditorAssetExtension, toPlayableEditorAssetImportName, } from '@fps-games/playable-assets';
4
+ export type { PlayableAssetFormat, PlayableAssetResourceReference, PlayableAssetResourceResolution, PlayableAssetResourceResolutionCode, PlayableAssetResourceResolutionDiagnostic, PlayableAssetResourceResolver, PlayableAssetResourceTransport, PlayableGeneratedAssetCatalogEntry, PlayableResolvedAssetResource, } from '@fps-games/playable-assets';
4
5
  export type { PlayableEditorAssetBuildInput, PlayableEditorAssetBuildResult, PlayableEditorAssetCatalogSnapshot, PlayableEditorAssetIdentityInput, PlayableEditorManagedAssetCoreRules, PlayableEditorManagedAssetErrorCodes, PlayableEditorManagedAssetExternalRef, PlayableEditorManagedAssetMetadataRule, PlayableEditorManagedAssetScale3D, PlayableEditorAssetRegistrationPayload, PlayableEditorAssetRegistrationPlanCore, PlayableEditorAssetRegistrationPlanInput, PlayableEditorAssetRegistrationPayloadPathInput, PlayableEditorAssetTransportCommand, PlayableEditorAssetTransportPlan, PlayableEditorAssetTransportWrite, PlayableEditorAssetUnregistrationPlanCore, PlayableEditorAssetUnregistrationPlanInput, PlayableEditorAssetUnregistrationPayloadPathInput, PlayableEditorManagedAssetKind, PlayableEditorManagedSceneAsset, PlayableEditorSceneAssetDefaults, PlayableEditorSceneAssetMaterialMode, } from './manager-core';
5
6
  export { PlayableEditorManagedAssetError, buildPlayableEditorManagedAssetArgs, createPlayableEditorManagedAssetGuid, createPlayableEditorManagedAssetId, createPlayableEditorManagedSceneAsset, guidToPlayableEditorManagedAssetStableToken, planPlayableEditorAssetRegistrationCore, planPlayableEditorAssetUnregistrationCore, readPlayableEditorManagedAssetScale, resolvePlayableEditorAssetIdentity, sanitizePlayableEditorManagedAssetName, } from './manager-core';
6
7
  export { createPlayableEditorManagedAssetFacade, type PlayableEditorManagedAssetFacade, type PlayableEditorManagedAssetFacadeOptions, type PlayableEditorManagedAssetReference, } from './managed-facade';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asset-database/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,+BAA+B,EAC/B,mCAAmC,EACnC,iCAAiC,EACjC,gCAAgC,EAChC,yCAAyC,EACzC,4CAA4C,EAC5C,uBAAuB,GACxB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,uCAAuC,GACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8CAA8C,EAC9C,gCAAgC,EAChC,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,6BAA6B,EAC7B,2BAA2B,EAC3B,oCAAoC,EACpC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,gCAAgC,EAChC,sCAAsC,EACtC,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,gCAAgC,EAChC,mCAAmC,EACnC,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,iCAAiC,EACjC,sCAAsC,EACtC,uCAAuC,EACvC,wCAAwC,EACxC,+CAA+C,EAC/C,mCAAmC,EACnC,gCAAgC,EAChC,iCAAiC,EACjC,yCAAyC,EACzC,0CAA0C,EAC1C,iDAAiD,EACjD,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,EAChC,oCAAoC,GACrC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,oCAAoC,EACpC,kCAAkC,EAClC,qCAAqC,EACrC,2CAA2C,EAC3C,uCAAuC,EACvC,yCAAyC,EACzC,mCAAmC,EACnC,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sCAAsC,EACtC,KAAK,gCAAgC,EACrC,KAAK,uCAAuC,EAC5C,KAAK,mCAAmC,GACzC,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asset-database/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,+BAA+B,EAC/B,mCAAmC,EACnC,iCAAiC,EACjC,gCAAgC,EAChC,yCAAyC,EACzC,4CAA4C,EAC5C,uBAAuB,GACxB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,uCAAuC,GACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8CAA8C,EAC9C,gCAAgC,EAChC,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,EACnC,6BAA6B,EAC7B,2BAA2B,EAC3B,oCAAoC,EACpC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,gCAAgC,EAChC,sBAAsB,EACtB,iCAAiC,EACjC,8BAA8B,EAC9B,sCAAsC,EACtC,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,mBAAmB,EACnB,8BAA8B,EAC9B,+BAA+B,EAC/B,mCAAmC,EACnC,yCAAyC,EACzC,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,gCAAgC,EAChC,mCAAmC,EACnC,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,iCAAiC,EACjC,sCAAsC,EACtC,uCAAuC,EACvC,wCAAwC,EACxC,+CAA+C,EAC/C,mCAAmC,EACnC,gCAAgC,EAChC,iCAAiC,EACjC,yCAAyC,EACzC,0CAA0C,EAC1C,iDAAiD,EACjD,8BAA8B,EAC9B,+BAA+B,EAC/B,gCAAgC,EAChC,oCAAoC,GACrC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,oCAAoC,EACpC,kCAAkC,EAClC,qCAAqC,EACrC,2CAA2C,EAC3C,uCAAuC,EACvC,yCAAyC,EACzC,mCAAmC,EACnC,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sCAAsC,EACtC,KAAK,gCAAgC,EACrC,KAAK,uCAAuC,EAC5C,KAAK,mCAAmC,GACzC,MAAM,kBAAkB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { definePlayableEditorAssetDatabaseConfig, } from './config.js';
2
- export { PLAYABLE_EDITOR_ASSET_CATALOG_KINDS, PLAYABLE_EDITOR_DEFAULT_EXTENSIONS, PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS, PLAYABLE_EDITOR_IMAGE_EXTENSIONS, PLAYABLE_EDITOR_MODEL_EXTENSIONS, PLAYABLE_EDITOR_SOUND_EXTENSIONS, PLAYABLE_EDITOR_TEXTURE_EXTENSIONS, createPlayableEditorAssetGuid, createPlayableEditorAssetId, getPlayableEditorAssetKindExtensions, guidToPlayableEditorAssetStableToken, normalizePlayableEditorAssetCodeKey, normalizePlayableEditorAssetDisplayName, normalizePlayableEditorAssetKind, stripKnownPlayableEditorAssetExtension, toPlayableEditorAssetImportName, } from '@fps-games/playable-assets';
2
+ export { PLAYABLE_EDITOR_ASSET_CATALOG_KINDS, PLAYABLE_EDITOR_DEFAULT_EXTENSIONS, PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS, PLAYABLE_EDITOR_IMAGE_EXTENSIONS, PLAYABLE_EDITOR_MODEL_EXTENSIONS, PLAYABLE_EDITOR_SOUND_EXTENSIONS, PLAYABLE_EDITOR_TEXTURE_EXTENSIONS, createPlayableAssetResourceResolver, createPlayableEditorAssetGuid, createPlayableEditorAssetId, getPlayableEditorAssetKindExtensions, guidToPlayableEditorAssetStableToken, normalizePlayableEditorAssetCodeKey, normalizePlayableEditorAssetDisplayName, normalizePlayableEditorAssetKind, getPlayableAssetFormat, getPlayableAssetResourceTransport, isPlayableAssetFormatSupported, stripKnownPlayableEditorAssetExtension, toPlayableEditorAssetImportName, } from '@fps-games/playable-assets';
3
3
  export { PlayableEditorManagedAssetError, buildPlayableEditorManagedAssetArgs, createPlayableEditorManagedAssetGuid, createPlayableEditorManagedAssetId, createPlayableEditorManagedSceneAsset, guidToPlayableEditorManagedAssetStableToken, planPlayableEditorAssetRegistrationCore, planPlayableEditorAssetUnregistrationCore, readPlayableEditorManagedAssetScale, resolvePlayableEditorAssetIdentity, sanitizePlayableEditorManagedAssetName, } from './manager-core.js';
4
4
  export { createPlayableEditorManagedAssetFacade, } from './managed-facade.js';
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/asset-database/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,uCAAuC,GACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8CAA8C,EAC9C,gCAAgC,EAChC,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,6BAA6B,EAC7B,2BAA2B,EAC3B,oCAAoC,EACpC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,gCAAgC,EAChC,sCAAsC,EACtC,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AA0BpC,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,oCAAoC,EACpC,kCAAkC,EAClC,qCAAqC,EACrC,2CAA2C,EAC3C,uCAAuC,EACvC,yCAAyC,EACzC,mCAAmC,EACnC,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sCAAsC,GAIvC,MAAM,kBAAkB,CAAC","sourcesContent":["export type {\n PlayableEditorAssetCatalogEntry,\n PlayableEditorAssetDatabaseCommands,\n PlayableEditorAssetDatabaseConfig,\n PlayableEditorAssetDatabasePaths,\n PlayableEditorAssetDatabasePublicUrlInput,\n PlayableEditorAssetDatabaseRelativePathInput,\n PlayableEditorAssetKind,\n} from './types';\nexport {\n definePlayableEditorAssetDatabaseConfig,\n} from './config';\nexport {\n PLAYABLE_EDITOR_ASSET_CATALOG_KINDS,\n PLAYABLE_EDITOR_DEFAULT_EXTENSIONS,\n PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS,\n PLAYABLE_EDITOR_IMAGE_EXTENSIONS,\n PLAYABLE_EDITOR_MODEL_EXTENSIONS,\n PLAYABLE_EDITOR_SOUND_EXTENSIONS,\n PLAYABLE_EDITOR_TEXTURE_EXTENSIONS,\n createPlayableEditorAssetGuid,\n createPlayableEditorAssetId,\n getPlayableEditorAssetKindExtensions,\n guidToPlayableEditorAssetStableToken,\n normalizePlayableEditorAssetCodeKey,\n normalizePlayableEditorAssetDisplayName,\n normalizePlayableEditorAssetKind,\n stripKnownPlayableEditorAssetExtension,\n toPlayableEditorAssetImportName,\n} from '@fps-games/playable-assets';\nexport type {\n PlayableEditorAssetBuildInput,\n PlayableEditorAssetBuildResult,\n PlayableEditorAssetCatalogSnapshot,\n PlayableEditorAssetIdentityInput,\n PlayableEditorManagedAssetCoreRules,\n PlayableEditorManagedAssetErrorCodes,\n PlayableEditorManagedAssetExternalRef,\n PlayableEditorManagedAssetMetadataRule,\n PlayableEditorManagedAssetScale3D,\n PlayableEditorAssetRegistrationPayload,\n PlayableEditorAssetRegistrationPlanCore,\n PlayableEditorAssetRegistrationPlanInput,\n PlayableEditorAssetRegistrationPayloadPathInput,\n PlayableEditorAssetTransportCommand,\n PlayableEditorAssetTransportPlan,\n PlayableEditorAssetTransportWrite,\n PlayableEditorAssetUnregistrationPlanCore,\n PlayableEditorAssetUnregistrationPlanInput,\n PlayableEditorAssetUnregistrationPayloadPathInput,\n PlayableEditorManagedAssetKind,\n PlayableEditorManagedSceneAsset,\n PlayableEditorSceneAssetDefaults,\n PlayableEditorSceneAssetMaterialMode,\n} from './manager-core';\nexport {\n PlayableEditorManagedAssetError,\n buildPlayableEditorManagedAssetArgs,\n createPlayableEditorManagedAssetGuid,\n createPlayableEditorManagedAssetId,\n createPlayableEditorManagedSceneAsset,\n guidToPlayableEditorManagedAssetStableToken,\n planPlayableEditorAssetRegistrationCore,\n planPlayableEditorAssetUnregistrationCore,\n readPlayableEditorManagedAssetScale,\n resolvePlayableEditorAssetIdentity,\n sanitizePlayableEditorManagedAssetName,\n} from './manager-core';\nexport {\n createPlayableEditorManagedAssetFacade,\n type PlayableEditorManagedAssetFacade,\n type PlayableEditorManagedAssetFacadeOptions,\n type PlayableEditorManagedAssetReference,\n} from './managed-facade';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/asset-database/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,uCAAuC,GACxC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,8CAA8C,EAC9C,gCAAgC,EAChC,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,EACnC,6BAA6B,EAC7B,2BAA2B,EAC3B,oCAAoC,EACpC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,gCAAgC,EAChC,sBAAsB,EACtB,iCAAiC,EACjC,8BAA8B,EAC9B,sCAAsC,EACtC,+BAA+B,GAChC,MAAM,4BAA4B,CAAC;AAqCpC,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,oCAAoC,EACpC,kCAAkC,EAClC,qCAAqC,EACrC,2CAA2C,EAC3C,uCAAuC,EACvC,yCAAyC,EACzC,mCAAmC,EACnC,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sCAAsC,GAIvC,MAAM,kBAAkB,CAAC","sourcesContent":["export type {\n PlayableEditorAssetCatalogEntry,\n PlayableEditorAssetDatabaseCommands,\n PlayableEditorAssetDatabaseConfig,\n PlayableEditorAssetDatabasePaths,\n PlayableEditorAssetDatabasePublicUrlInput,\n PlayableEditorAssetDatabaseRelativePathInput,\n PlayableEditorAssetKind,\n} from './types';\nexport {\n definePlayableEditorAssetDatabaseConfig,\n} from './config';\nexport {\n PLAYABLE_EDITOR_ASSET_CATALOG_KINDS,\n PLAYABLE_EDITOR_DEFAULT_EXTENSIONS,\n PLAYABLE_EDITOR_ENVIRONMENT_TEXTURE_EXTENSIONS,\n PLAYABLE_EDITOR_IMAGE_EXTENSIONS,\n PLAYABLE_EDITOR_MODEL_EXTENSIONS,\n PLAYABLE_EDITOR_SOUND_EXTENSIONS,\n PLAYABLE_EDITOR_TEXTURE_EXTENSIONS,\n createPlayableAssetResourceResolver,\n createPlayableEditorAssetGuid,\n createPlayableEditorAssetId,\n getPlayableEditorAssetKindExtensions,\n guidToPlayableEditorAssetStableToken,\n normalizePlayableEditorAssetCodeKey,\n normalizePlayableEditorAssetDisplayName,\n normalizePlayableEditorAssetKind,\n getPlayableAssetFormat,\n getPlayableAssetResourceTransport,\n isPlayableAssetFormatSupported,\n stripKnownPlayableEditorAssetExtension,\n toPlayableEditorAssetImportName,\n} from '@fps-games/playable-assets';\nexport type {\n PlayableAssetFormat,\n PlayableAssetResourceReference,\n PlayableAssetResourceResolution,\n PlayableAssetResourceResolutionCode,\n PlayableAssetResourceResolutionDiagnostic,\n PlayableAssetResourceResolver,\n PlayableAssetResourceTransport,\n PlayableGeneratedAssetCatalogEntry,\n PlayableResolvedAssetResource,\n} from '@fps-games/playable-assets';\nexport type {\n PlayableEditorAssetBuildInput,\n PlayableEditorAssetBuildResult,\n PlayableEditorAssetCatalogSnapshot,\n PlayableEditorAssetIdentityInput,\n PlayableEditorManagedAssetCoreRules,\n PlayableEditorManagedAssetErrorCodes,\n PlayableEditorManagedAssetExternalRef,\n PlayableEditorManagedAssetMetadataRule,\n PlayableEditorManagedAssetScale3D,\n PlayableEditorAssetRegistrationPayload,\n PlayableEditorAssetRegistrationPlanCore,\n PlayableEditorAssetRegistrationPlanInput,\n PlayableEditorAssetRegistrationPayloadPathInput,\n PlayableEditorAssetTransportCommand,\n PlayableEditorAssetTransportPlan,\n PlayableEditorAssetTransportWrite,\n PlayableEditorAssetUnregistrationPlanCore,\n PlayableEditorAssetUnregistrationPlanInput,\n PlayableEditorAssetUnregistrationPayloadPathInput,\n PlayableEditorManagedAssetKind,\n PlayableEditorManagedSceneAsset,\n PlayableEditorSceneAssetDefaults,\n PlayableEditorSceneAssetMaterialMode,\n} from './manager-core';\nexport {\n PlayableEditorManagedAssetError,\n buildPlayableEditorManagedAssetArgs,\n createPlayableEditorManagedAssetGuid,\n createPlayableEditorManagedAssetId,\n createPlayableEditorManagedSceneAsset,\n guidToPlayableEditorManagedAssetStableToken,\n planPlayableEditorAssetRegistrationCore,\n planPlayableEditorAssetUnregistrationCore,\n readPlayableEditorManagedAssetScale,\n resolvePlayableEditorAssetIdentity,\n sanitizePlayableEditorManagedAssetName,\n} from './manager-core';\nexport {\n createPlayableEditorManagedAssetFacade,\n type PlayableEditorManagedAssetFacade,\n type PlayableEditorManagedAssetFacadeOptions,\n type PlayableEditorManagedAssetReference,\n} from './managed-facade';\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { PlayableEditorBundledPackageRoots, PlayableEditorBundledPackageRootsOptions, PlayableEditorBundledPackageAliasPlanOptions, PlayableEditorFileExists, PlayableEditorMissingPackageAliasFile, PlayableEditorPackageAliasPlan, PlayableEditorSourcePackageAliasPlanOptions, PlayableEditorSourceTsconfigPathsPlanOptions, PlayableEditorTsconfigPathsPlan } from './types';
2
- export declare const PLAYABLE_EDITOR_PACKAGE_IDS: readonly ["@fps-games/editor", "@fps-games/editor/vite", "@fps-games/babylon-renderer", "@fps-games/babylon-renderer/config", "@fps-games/babylon-renderer/renderer", "@fps-games/editor-tooling", "@fps-games/editor-tooling/node", "@fps-games/editor-tooling/vite", "@fps-games/plugin-api", "@fps-games/plugin-hierarchy", "@fps-games/plugin-hierarchy/editor", "@fps-games/plugin-assets", "@fps-games/plugin-assets/runtime", "@fps-games/plugin-materials", "@fps-games/plugin-materials/runtime", "@fps-games/plugin-markers", "@fps-games/plugin-markers/runtime", "@fps-games/plugin-rendering", "@fps-games/plugin-rendering/runtime", "@fps-games/plugin-shadows", "@fps-games/plugin-shadows/runtime", "@fps-games/plugin-shadow-map-experiment", "@fps-games/plugin-shadow-map-experiment/runtime", "@fps-games/plugin-host", "@fps-games/plugin-scene", "@fps-games/plugin-scene/runtime", "@fps-games/playable-assets", "@fps-games/playable-contracts", "@fps-games/playable-rendering", "@fps-games/playable-rendering/runtime", "@fps-games/playable-runtime", "@fps-games/playable-runtime-data", "@fps-games/playable-scene", "@fps-games/editor/playable-runtime", "@fps-games/editor/playable-runtime/babylon", "@fps-games/editor/playable-sdk", "@fps-games/editor/playable-sdk/upgrade-doctor", "@fps-games/editor/playable-sdk/vite", "@fps-games/editor-playable-sdk", "@fps-games/editor-playable-sdk/upgrade-doctor", "@fps-games/editor-playable-sdk/vite", "@fps-games/editor-babylon", "@fps-games/editor-browser", "@fps-games/editor-core", "@fps-games/editor-core/plugin-host", "@fps-games/editor-forge-play", "@fps-games/editor-protocol", "@fps-games/editor-ui", "@playcanvas/observer", "@playcanvas/pcui", "semver"];
2
+ export declare const PLAYABLE_EDITOR_PACKAGE_IDS: readonly ["@fps-games/editor", "@fps-games/editor/vite", "@fps-games/babylon-renderer", "@fps-games/babylon-renderer/config", "@fps-games/babylon-renderer/renderer", "@fps-games/editor-tooling", "@fps-games/editor-tooling/node", "@fps-games/editor-tooling/vite", "@fps-games/plugin-api", "@fps-games/plugin-hierarchy", "@fps-games/plugin-hierarchy/editor", "@fps-games/plugin-assets", "@fps-games/plugin-assets/runtime", "@fps-games/plugin-assets/renderer", "@fps-games/plugin-assets/resources", "@fps-games/plugin-materials", "@fps-games/plugin-materials/runtime", "@fps-games/plugin-markers", "@fps-games/plugin-markers/runtime", "@fps-games/plugin-rendering", "@fps-games/plugin-rendering/runtime", "@fps-games/plugin-shadows", "@fps-games/plugin-shadows/runtime", "@fps-games/plugin-shadow-map-experiment", "@fps-games/plugin-shadow-map-experiment/runtime", "@fps-games/plugin-host", "@fps-games/plugin-scene", "@fps-games/plugin-scene/runtime", "@fps-games/playable-assets", "@fps-games/playable-contracts", "@fps-games/playable-rendering", "@fps-games/playable-rendering/runtime", "@fps-games/playable-runtime", "@fps-games/playable-runtime-data", "@fps-games/playable-scene", "@fps-games/editor/playable-runtime", "@fps-games/editor/playable-runtime/babylon", "@fps-games/editor/playable-sdk", "@fps-games/editor/playable-sdk/upgrade-doctor", "@fps-games/editor/playable-sdk/vite", "@fps-games/editor-playable-sdk", "@fps-games/editor-playable-sdk/upgrade-doctor", "@fps-games/editor-playable-sdk/vite", "@fps-games/editor-babylon", "@fps-games/editor-browser", "@fps-games/editor-core", "@fps-games/editor-core/plugin-host", "@fps-games/editor-forge-play", "@fps-games/editor-protocol", "@fps-games/editor-ui", "@playcanvas/observer", "@playcanvas/pcui", "semver"];
3
3
  export declare const PLAYABLE_EDITOR_BUNDLED_ALIAS_PACKAGE_IDS: readonly ["@fps-games/babylon-renderer", ...("@fps-games/plugin-hierarchy" | "@fps-games/plugin-hierarchy/editor" | "@fps-games/editor-playable-sdk/upgrade-doctor" | "@fps-games/editor-playable-sdk/vite" | "@fps-games/editor-babylon" | "@fps-games/editor-browser" | "@fps-games/editor-core" | "@fps-games/editor-core/plugin-host" | "@fps-games/editor-forge-play" | "@fps-games/editor-protocol" | "@fps-games/editor-ui")[], "semver"];
4
4
  export declare function createPlayableEditorSourcePackageAliasPlan(repoRoot: string, options?: PlayableEditorSourcePackageAliasPlanOptions): PlayableEditorPackageAliasPlan;
5
5
  export declare function createPlayableEditorSourceTsconfigPathsPlan(repoRoot: string, options?: PlayableEditorSourceTsconfigPathsPlanOptions): PlayableEditorTsconfigPathsPlan;
@@ -1 +1 @@
1
- {"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../src/package-resolution/aliases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,wCAAwC,EACxC,4CAA4C,EAC5C,wBAAwB,EACxB,qCAAqC,EACrC,8BAA8B,EAG9B,2CAA2C,EAC3C,4CAA4C,EAC5C,+BAA+B,EAChC,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,2BAA2B,mqDAoD9B,CAAC;AAuEX,eAAO,MAAM,yCAAyC,kbAI5C,CAAC;AAEX,wBAAgB,0CAA0C,CACxD,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,2CAAgD,GACxD,8BAA8B,CAQhC;AAED,wBAAgB,2CAA2C,CACzD,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,4CAAiD,GACzD,+BAA+B,CAkBjC;AAED,wBAAgB,uCAAuC,CACrD,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,wCAA6C,GACrD,iCAAiC,CAQnC;AAED,wBAAgB,2CAA2C,CACzD,OAAO,EAAE,4CAA4C,GACpD,8BAA8B,CA8BhC;AAED,wBAAgB,6CAA6C,CAC3D,IAAI,EAAE,8BAA8B,EACpC,UAAU,EAAE,wBAAwB,GACnC,qCAAqC,EAAE,CAIzC;AAED,wBAAgB,yCAAyC,CACvD,OAAO,EAAE,SAAS,qCAAqC,EAAE,EACzD,KAAK,SAAkE,GACtE,MAAM,CAKR"}
1
+ {"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../src/package-resolution/aliases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,wCAAwC,EACxC,4CAA4C,EAC5C,wBAAwB,EACxB,qCAAqC,EACrC,8BAA8B,EAG9B,2CAA2C,EAC3C,4CAA4C,EAC5C,+BAA+B,EAChC,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,2BAA2B,8uDAsD9B,CAAC;AAyEX,eAAO,MAAM,yCAAyC,kbAI5C,CAAC;AAEX,wBAAgB,0CAA0C,CACxD,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,2CAAgD,GACxD,8BAA8B,CAQhC;AAED,wBAAgB,2CAA2C,CACzD,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,4CAAiD,GACzD,+BAA+B,CAkBjC;AAED,wBAAgB,uCAAuC,CACrD,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,wCAA6C,GACrD,iCAAiC,CAQnC;AAED,wBAAgB,2CAA2C,CACzD,OAAO,EAAE,4CAA4C,GACpD,8BAA8B,CA8BhC;AAED,wBAAgB,6CAA6C,CAC3D,IAAI,EAAE,8BAA8B,EACpC,UAAU,EAAE,wBAAwB,GACnC,qCAAqC,EAAE,CAIzC;AAED,wBAAgB,yCAAyC,CACvD,OAAO,EAAE,SAAS,qCAAqC,EAAE,EACzD,KAAK,SAAkE,GACtE,MAAM,CAKR"}
@@ -12,6 +12,8 @@ export const PLAYABLE_EDITOR_PACKAGE_IDS = [
12
12
  '@fps-games/plugin-hierarchy/editor',
13
13
  '@fps-games/plugin-assets',
14
14
  '@fps-games/plugin-assets/runtime',
15
+ '@fps-games/plugin-assets/renderer',
16
+ '@fps-games/plugin-assets/resources',
15
17
  '@fps-games/plugin-materials',
16
18
  '@fps-games/plugin-materials/runtime',
17
19
  '@fps-games/plugin-markers',
@@ -62,6 +64,8 @@ const SOURCE_ALIAS_FILES = [
62
64
  ['@fps-games/plugin-hierarchy/editor', 'packages/plugin-hierarchy/src/editor.ts'],
63
65
  ['@fps-games/plugin-hierarchy', 'packages/plugin-hierarchy/src/reference.ts'],
64
66
  ['@fps-games/plugin-assets/runtime', 'packages/plugin-assets/src/runtime.ts'],
67
+ ['@fps-games/plugin-assets/renderer', 'packages/plugin-assets/src/renderer.ts'],
68
+ ['@fps-games/plugin-assets/resources', 'packages/plugin-assets/src/resources.ts'],
65
69
  ['@fps-games/plugin-assets', 'packages/plugin-assets/src/reference.ts'],
66
70
  ['@fps-games/plugin-materials/runtime', 'packages/plugin-materials/src/runtime.ts'],
67
71
  ['@fps-games/plugin-materials', 'packages/plugin-materials/src/reference.ts'],