@fps-games/editor 0.1.4-beta.5 → 0.1.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +16 -16
- package/dist/local-editor-harness.d.ts +24 -5
- package/dist/local-editor-harness.d.ts.map +1 -1
- package/dist/local-editor-harness.js +456 -90
- package/dist/local-editor-harness.js.map +1 -1
- package/dist/local-editor-performance-stats.d.ts +12 -0
- package/dist/local-editor-performance-stats.d.ts.map +1 -0
- package/dist/local-editor-performance-stats.js +46 -0
- package/dist/local-editor-performance-stats.js.map +1 -0
- package/dist/playable-babylon-facade.d.ts +2 -2
- package/dist/playable-babylon-facade.d.ts.map +1 -1
- package/dist/playable-babylon-facade.js +1 -1
- package/dist/playable-babylon-facade.js.map +1 -1
- package/dist/playable-babylon-rendering.d.ts +57 -12
- package/dist/playable-babylon-rendering.d.ts.map +1 -1
- package/dist/playable-babylon-rendering.js +529 -20
- package/dist/playable-babylon-rendering.js.map +1 -1
- package/dist/playable-local-editor-host.d.ts +10 -9
- package/dist/playable-local-editor-host.d.ts.map +1 -1
- package/dist/playable-local-editor-host.js.map +1 -1
- package/dist/playable-sdk.d.ts +5 -3
- package/dist/playable-sdk.d.ts.map +1 -1
- package/dist/playable-sdk.js +3 -2
- package/dist/playable-sdk.js.map +1 -1
- package/dist/static-shadow-cpu-worker.d.ts +7 -0
- package/dist/static-shadow-cpu-worker.d.ts.map +1 -0
- package/dist/static-shadow-cpu-worker.js +221 -0
- package/dist/static-shadow-cpu-worker.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/index.d.ts +3 -1
- package/node_modules/@fps-games/babylon-renderer/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/index.js +3 -1
- package/node_modules/@fps-games/babylon-renderer/dist/index.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.d.ts +4 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.js +584 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-artifact-system.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.d.ts +61 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.js +382 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.d.ts +47 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.js +285 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.d.ts +88 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.js +813 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-baker.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.d.ts +27 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.d.ts.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.js +220 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-rendering.js.map +1 -0
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.d.ts +35 -3
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.js +65 -609
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-system.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.d.ts +169 -14
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.d.ts.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.js +9 -3
- package/node_modules/@fps-games/babylon-renderer/dist/shadows/types.js.map +1 -1
- package/node_modules/@fps-games/babylon-renderer/package.json +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/index.d.ts +2 -0
- package/node_modules/@fps-games/editor-babylon/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/index.js +2 -0
- package/node_modules/@fps-games/editor-babylon/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.d.ts +34 -0
- package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.js +272 -0
- package/node_modules/@fps-games/editor-babylon/dist/performance-monitor.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +6 -0
- package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js +65 -1
- package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/rendering.d.ts +19 -0
- package/node_modules/@fps-games/editor-babylon/dist/rendering.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/rendering.js +66 -0
- package/node_modules/@fps-games/editor-babylon/dist/rendering.js.map +1 -0
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.d.ts +5 -2
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.js +65 -32
- package/node_modules/@fps-games/editor-babylon/dist/shadow-preview-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +19 -2
- package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
- package/node_modules/@fps-games/editor-babylon/package.json +5 -5
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.d.ts +8 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.js +14 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-rendering-actions.js.map +1 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.js +10 -2
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-tree.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +17 -0
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +466 -42
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +70 -5
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +595 -5
- package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
- package/node_modules/@fps-games/editor-browser/package.json +3 -3
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +14 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/editor-session.js +34 -10
- package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/inspector.d.ts +2 -1
- package/node_modules/@fps-games/editor-core/dist/inspector.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/inspector.js +11 -1
- package/node_modules/@fps-games/editor-core/dist/inspector.js.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/serialized-object.d.ts +7 -0
- package/node_modules/@fps-games/editor-core/dist/serialized-object.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-core/dist/serialized-object.js +1 -0
- package/node_modules/@fps-games/editor-core/dist/serialized-object.js.map +1 -1
- package/node_modules/@fps-games/editor-core/package.json +2 -2
- package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.js +10 -5
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/document.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.js +3 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/asset-placement/placement.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts +4 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +29 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/types.d.ts +10 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/document/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.js +3 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/field-schema/schema.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.d.ts +33 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.js +232 -16
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/document-sections.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.d.ts +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/inspector/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.d.ts +12 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.js +153 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/field-patch.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.d.ts +4 -2
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.js +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.js +4 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/reducer.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.d.ts +19 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.js +57 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/rendering-alpha-index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/types.d.ts +7 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/mutation/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js +620 -36
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/panel.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.d.ts +8 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.js +258 -10
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/profile.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts +110 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/rendering-profile/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.js +25 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/nodes.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/types.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/runtime-preview/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +4 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.d.ts +9 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.js +12 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/companion-configs.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.js +75 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/descriptors.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.d.ts +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.js +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.d.ts +17 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.js +262 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/inspector.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/object.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/object.js +7 -3
- package/node_modules/@fps-games/editor-playable-sdk/dist/serialized-property/object.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.d.ts +6 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.js +31 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/identity.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.d.ts +2 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.js +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/index.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.d.ts.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.js +21 -9
- package/node_modules/@fps-games/editor-playable-sdk/dist/session/patches.js.map +1 -1
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.d.ts +151 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.js +445 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/artifact.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.d.ts +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.d.ts.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.js +2 -0
- package/node_modules/@fps-games/editor-playable-sdk/dist/static-shadows/index.js.map +1 -0
- package/node_modules/@fps-games/editor-playable-sdk/package.json +3 -3
- package/node_modules/@fps-games/editor-protocol/package.json +1 -1
- package/package.json +8 -8
package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export interface StaticProjectedShadowAtlasTileSource {
|
|
2
|
+
id: string;
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
}
|
|
6
|
+
export interface StaticProjectedShadowAtlasRect {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
export interface StaticProjectedShadowAtlasUv {
|
|
13
|
+
u0: number;
|
|
14
|
+
v0: number;
|
|
15
|
+
u1: number;
|
|
16
|
+
v1: number;
|
|
17
|
+
}
|
|
18
|
+
export interface StaticProjectedShadowAtlasTileLayout {
|
|
19
|
+
id: string;
|
|
20
|
+
pageId: string;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
copyX: number;
|
|
24
|
+
copyY: number;
|
|
25
|
+
atlasRect: StaticProjectedShadowAtlasRect;
|
|
26
|
+
atlasUv: StaticProjectedShadowAtlasUv;
|
|
27
|
+
}
|
|
28
|
+
export interface StaticProjectedShadowAtlasPageLayout {
|
|
29
|
+
id: string;
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
tiles: StaticProjectedShadowAtlasTileLayout[];
|
|
33
|
+
}
|
|
34
|
+
export interface StaticProjectedShadowAtlasPacking {
|
|
35
|
+
effectiveTexelsPerMeter: number;
|
|
36
|
+
atlasSize: number;
|
|
37
|
+
usedPixels: number;
|
|
38
|
+
allocatedPixels: number;
|
|
39
|
+
occupancy: number;
|
|
40
|
+
pages: StaticProjectedShadowAtlasPageLayout[];
|
|
41
|
+
layoutsByTileId: Map<string, StaticProjectedShadowAtlasTileLayout>;
|
|
42
|
+
}
|
|
43
|
+
export interface StaticProjectedShadowAtlasPackOptions {
|
|
44
|
+
texelsPerMeter: number;
|
|
45
|
+
atlasSize: number;
|
|
46
|
+
maxAtlasPages: number;
|
|
47
|
+
paddingPx?: number;
|
|
48
|
+
}
|
|
49
|
+
export interface StaticProjectedShadowSdfTileFromMaskPixels {
|
|
50
|
+
sdfAlpha: Uint8ClampedArray;
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
hasCoverage: boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare function packStaticProjectedShadowAtlasTiles(sources: readonly StaticProjectedShadowAtlasTileSource[], options: StaticProjectedShadowAtlasPackOptions): StaticProjectedShadowAtlasPacking;
|
|
56
|
+
export declare function createStaticProjectedShadowSdfAlpha(maskAlpha: ArrayLike<number>, width: number, height: number, radiusPx: number): Uint8ClampedArray;
|
|
57
|
+
export declare function extractStaticProjectedShadowMaskAlpha(rgbaPixels: ArrayBufferView, width: number, height: number): Uint8ClampedArray;
|
|
58
|
+
export declare function createStaticProjectedShadowSdfTileFromMaskPixels(rgbaPixels: ArrayBufferView, width: number, height: number, radiusPx: number): StaticProjectedShadowSdfTileFromMaskPixels;
|
|
59
|
+
export declare function createStaticProjectedShadowAtlasPixels(width: number, height: number): Uint8ClampedArray;
|
|
60
|
+
export declare function copyStaticProjectedShadowSdfTileToAtlas(atlasPixels: Uint8ClampedArray, atlasWidth: number, sdfAlpha: ArrayLike<number>, tileWidth: number, tileHeight: number, x: number, y: number): void;
|
|
61
|
+
//# sourceMappingURL=static-projected-shadow-atlas.d.ts.map
|
package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-projected-shadow-atlas.d.ts","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PADDING_PX = 2;
|
|
2
|
+
const DISTANCE_TRANSFORM_INF = 1e20;
|
|
3
|
+
const MAX_STATIC_PROJECTED_SHADOW_ATLAS_SIZE = 4096;
|
|
4
|
+
const MIN_EFFECTIVE_TEXELS_PER_METER = 1e-6;
|
|
5
|
+
const SDF_MASK_INSIDE_ALPHA_THRESHOLD = 128;
|
|
6
|
+
export function packStaticProjectedShadowAtlasTiles(sources, options) {
|
|
7
|
+
const atlasSize = clampInteger(options.atlasSize, 16, MAX_STATIC_PROJECTED_SHADOW_ATLAS_SIZE);
|
|
8
|
+
const maxAtlasPages = Math.max(1, Math.floor(options.maxAtlasPages));
|
|
9
|
+
const targetTexelsPerMeter = Math.max(MIN_EFFECTIVE_TEXELS_PER_METER, finiteNumber(options.texelsPerMeter, 1));
|
|
10
|
+
const paddingPx = clampInteger(options.paddingPx ?? DEFAULT_ATLAS_PADDING_PX, 0, Math.floor(atlasSize / 4));
|
|
11
|
+
const maxTileDensity = calculateMaxTileTexelDensity(sources, atlasSize);
|
|
12
|
+
const effectiveTargetTexelsPerMeter = Math.min(targetTexelsPerMeter, maxTileDensity);
|
|
13
|
+
const targetPacking = packAtTexelDensity(sources, {
|
|
14
|
+
atlasSize,
|
|
15
|
+
texelsPerMeter: effectiveTargetTexelsPerMeter,
|
|
16
|
+
paddingPx,
|
|
17
|
+
});
|
|
18
|
+
if (targetPacking.pages.length <= maxAtlasPages)
|
|
19
|
+
return targetPacking;
|
|
20
|
+
let low = MIN_EFFECTIVE_TEXELS_PER_METER;
|
|
21
|
+
let high = effectiveTargetTexelsPerMeter;
|
|
22
|
+
let best = packAtTexelDensity(sources, {
|
|
23
|
+
atlasSize,
|
|
24
|
+
texelsPerMeter: low,
|
|
25
|
+
paddingPx,
|
|
26
|
+
});
|
|
27
|
+
if (best.pages.length > maxAtlasPages)
|
|
28
|
+
return best;
|
|
29
|
+
for (let attempt = 0; attempt < 18; attempt += 1) {
|
|
30
|
+
const mid = (low + high) * 0.5;
|
|
31
|
+
const packing = packAtTexelDensity(sources, {
|
|
32
|
+
atlasSize,
|
|
33
|
+
texelsPerMeter: mid,
|
|
34
|
+
paddingPx,
|
|
35
|
+
});
|
|
36
|
+
if (packing.pages.length <= maxAtlasPages) {
|
|
37
|
+
best = packing;
|
|
38
|
+
low = mid;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
high = mid;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return best;
|
|
45
|
+
}
|
|
46
|
+
export function createStaticProjectedShadowSdfAlpha(maskAlpha, width, height, radiusPx) {
|
|
47
|
+
const pixelCount = Math.max(0, Math.floor(width) * Math.floor(height));
|
|
48
|
+
const output = new Uint8ClampedArray(pixelCount);
|
|
49
|
+
if (pixelCount === 0)
|
|
50
|
+
return output;
|
|
51
|
+
const binary = new Uint8Array(pixelCount);
|
|
52
|
+
let insideCount = 0;
|
|
53
|
+
for (let index = 0; index < pixelCount; index += 1) {
|
|
54
|
+
if (Number(maskAlpha[index] ?? 0) >= SDF_MASK_INSIDE_ALPHA_THRESHOLD) {
|
|
55
|
+
binary[index] = 1;
|
|
56
|
+
insideCount += 1;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (insideCount === 0)
|
|
60
|
+
return output;
|
|
61
|
+
if (insideCount === pixelCount) {
|
|
62
|
+
output.fill(255);
|
|
63
|
+
return output;
|
|
64
|
+
}
|
|
65
|
+
const radius = Math.max(0, finiteNumber(radiusPx, 0));
|
|
66
|
+
if (radius <= 0) {
|
|
67
|
+
for (let index = 0; index < pixelCount; index += 1)
|
|
68
|
+
output[index] = binary[index] ? 255 : 0;
|
|
69
|
+
return output;
|
|
70
|
+
}
|
|
71
|
+
const distToInside = createDistanceTransform(binary, width, height, 1);
|
|
72
|
+
const distToOutside = createDistanceTransform(binary, width, height, 0);
|
|
73
|
+
for (let index = 0; index < pixelCount; index += 1) {
|
|
74
|
+
if (binary[index]) {
|
|
75
|
+
const distance = Math.min(radius, Math.sqrt(distToOutside[index] ?? 0));
|
|
76
|
+
output[index] = Math.round((0.5 + 0.5 * (distance / radius)) * 255);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
const distance = Math.min(radius, Math.sqrt(distToInside[index] ?? 0));
|
|
80
|
+
output[index] = Math.round((0.5 - 0.5 * (distance / radius)) * 255);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return output;
|
|
84
|
+
}
|
|
85
|
+
export function extractStaticProjectedShadowMaskAlpha(rgbaPixels, width, height) {
|
|
86
|
+
const source = rgbaPixels instanceof Uint8Array || rgbaPixels instanceof Uint8ClampedArray
|
|
87
|
+
? rgbaPixels
|
|
88
|
+
: new Uint8Array(rgbaPixels.buffer, rgbaPixels.byteOffset, rgbaPixels.byteLength);
|
|
89
|
+
const alpha = new Uint8ClampedArray(Math.max(0, Math.floor(width) * Math.floor(height)));
|
|
90
|
+
for (let index = 0; index < alpha.length; index += 1) {
|
|
91
|
+
alpha[index] = source[index * 4 + 3] ?? 0;
|
|
92
|
+
}
|
|
93
|
+
return alpha;
|
|
94
|
+
}
|
|
95
|
+
export function createStaticProjectedShadowSdfTileFromMaskPixels(rgbaPixels, width, height, radiusPx) {
|
|
96
|
+
const maskAlpha = extractStaticProjectedShadowMaskAlpha(rgbaPixels, width, height);
|
|
97
|
+
if (!hasAlphaCoverage(maskAlpha)) {
|
|
98
|
+
return {
|
|
99
|
+
sdfAlpha: new Uint8ClampedArray(maskAlpha.length),
|
|
100
|
+
width,
|
|
101
|
+
height,
|
|
102
|
+
hasCoverage: false,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
sdfAlpha: createStaticProjectedShadowSdfAlpha(maskAlpha, width, height, radiusPx),
|
|
107
|
+
width,
|
|
108
|
+
height,
|
|
109
|
+
hasCoverage: true,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export function createStaticProjectedShadowAtlasPixels(width, height) {
|
|
113
|
+
return new Uint8ClampedArray(Math.max(0, Math.floor(width) * Math.floor(height) * 4));
|
|
114
|
+
}
|
|
115
|
+
export function copyStaticProjectedShadowSdfTileToAtlas(atlasPixels, atlasWidth, sdfAlpha, tileWidth, tileHeight, x, y) {
|
|
116
|
+
for (let row = 0; row < tileHeight; row += 1) {
|
|
117
|
+
for (let column = 0; column < tileWidth; column += 1) {
|
|
118
|
+
const sourceIndex = row * tileWidth + column;
|
|
119
|
+
const targetIndex = ((y + row) * atlasWidth + x + column) * 4;
|
|
120
|
+
const alpha = clampInteger(sdfAlpha[sourceIndex] ?? 0, 0, 255);
|
|
121
|
+
atlasPixels[targetIndex] = 255;
|
|
122
|
+
atlasPixels[targetIndex + 1] = 255;
|
|
123
|
+
atlasPixels[targetIndex + 2] = 255;
|
|
124
|
+
atlasPixels[targetIndex + 3] = alpha;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function hasAlphaCoverage(maskAlpha) {
|
|
129
|
+
for (let index = 0; index < maskAlpha.length; index += 1) {
|
|
130
|
+
if (Number(maskAlpha[index] ?? 0) > 0)
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
function packAtTexelDensity(sources, options) {
|
|
136
|
+
const sizedTiles = sources.map((source, index) => createSizedTile(source, index, options));
|
|
137
|
+
const sortedTiles = [...sizedTiles].sort((left, right) => (right.paddedHeight - left.paddedHeight
|
|
138
|
+
|| right.paddedWidth - left.paddedWidth
|
|
139
|
+
|| left.id.localeCompare(right.id)
|
|
140
|
+
|| left.index - right.index));
|
|
141
|
+
const pages = [];
|
|
142
|
+
const layoutsByTileId = new Map();
|
|
143
|
+
let page = createAtlasPage(pages.length, options.atlasSize);
|
|
144
|
+
let cursorX = 0;
|
|
145
|
+
let cursorY = 0;
|
|
146
|
+
let shelfHeight = 0;
|
|
147
|
+
const pushPage = () => {
|
|
148
|
+
if (page.tiles.length > 0)
|
|
149
|
+
pages.push(page);
|
|
150
|
+
page = createAtlasPage(pages.length, options.atlasSize);
|
|
151
|
+
cursorX = 0;
|
|
152
|
+
cursorY = 0;
|
|
153
|
+
shelfHeight = 0;
|
|
154
|
+
return page;
|
|
155
|
+
};
|
|
156
|
+
for (const tile of sortedTiles) {
|
|
157
|
+
if (cursorX + tile.paddedWidth > options.atlasSize) {
|
|
158
|
+
cursorX = 0;
|
|
159
|
+
cursorY += shelfHeight;
|
|
160
|
+
shelfHeight = 0;
|
|
161
|
+
}
|
|
162
|
+
if (cursorY + tile.paddedHeight > options.atlasSize && page.tiles.length > 0) {
|
|
163
|
+
pushPage();
|
|
164
|
+
}
|
|
165
|
+
const copyX = cursorX + tile.paddingX;
|
|
166
|
+
const copyY = cursorY + tile.paddingY;
|
|
167
|
+
const layout = {
|
|
168
|
+
id: tile.id,
|
|
169
|
+
pageId: page.id,
|
|
170
|
+
width: tile.width,
|
|
171
|
+
height: tile.height,
|
|
172
|
+
copyX,
|
|
173
|
+
copyY,
|
|
174
|
+
atlasRect: {
|
|
175
|
+
x: copyX,
|
|
176
|
+
y: copyY,
|
|
177
|
+
width: tile.width,
|
|
178
|
+
height: tile.height,
|
|
179
|
+
},
|
|
180
|
+
atlasUv: {
|
|
181
|
+
u0: copyX / options.atlasSize,
|
|
182
|
+
v0: copyY / options.atlasSize,
|
|
183
|
+
u1: (copyX + tile.width) / options.atlasSize,
|
|
184
|
+
v1: (copyY + tile.height) / options.atlasSize,
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
page.tiles.push(layout);
|
|
188
|
+
layoutsByTileId.set(tile.id, layout);
|
|
189
|
+
cursorX += tile.paddedWidth;
|
|
190
|
+
shelfHeight = Math.max(shelfHeight, tile.paddedHeight);
|
|
191
|
+
}
|
|
192
|
+
if (page.tiles.length > 0)
|
|
193
|
+
pages.push(page);
|
|
194
|
+
finalizeAtlasPages(pages, options.atlasSize, options.paddingPx);
|
|
195
|
+
const usedPixels = pages.reduce((sum, pageLayout) => (sum + pageLayout.tiles.reduce((pageSum, tile) => pageSum + tile.width * tile.height, 0)), 0);
|
|
196
|
+
const allocatedPixels = pages.reduce((sum, pageLayout) => sum + pageLayout.width * pageLayout.height, 0);
|
|
197
|
+
return {
|
|
198
|
+
effectiveTexelsPerMeter: roundNumber(options.texelsPerMeter),
|
|
199
|
+
atlasSize: options.atlasSize,
|
|
200
|
+
usedPixels,
|
|
201
|
+
allocatedPixels,
|
|
202
|
+
occupancy: roundNumber(allocatedPixels > 0 ? usedPixels / allocatedPixels : 0),
|
|
203
|
+
pages,
|
|
204
|
+
layoutsByTileId,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function finalizeAtlasPages(pages, atlasSize, paddingPx) {
|
|
208
|
+
for (const page of pages) {
|
|
209
|
+
const used = calculateAtlasPageUsedExtent(page, atlasSize, paddingPx);
|
|
210
|
+
page.width = roundAtlasPageExtent(used.width, atlasSize);
|
|
211
|
+
page.height = roundAtlasPageExtent(used.height, atlasSize);
|
|
212
|
+
for (const tile of page.tiles) {
|
|
213
|
+
tile.atlasUv = {
|
|
214
|
+
u0: tile.copyX / page.width,
|
|
215
|
+
v0: tile.copyY / page.height,
|
|
216
|
+
u1: (tile.copyX + tile.width) / page.width,
|
|
217
|
+
v1: (tile.copyY + tile.height) / page.height,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function calculateAtlasPageUsedExtent(page, atlasSize, paddingPx) {
|
|
223
|
+
let width = 1;
|
|
224
|
+
let height = 1;
|
|
225
|
+
for (const tile of page.tiles) {
|
|
226
|
+
const rectEndX = tile.atlasRect.x + tile.atlasRect.width;
|
|
227
|
+
const rectEndY = tile.atlasRect.y + tile.atlasRect.height;
|
|
228
|
+
width = Math.max(width, rectEndX + calculateTrailingPadding(tile.atlasRect.x, rectEndX, atlasSize, paddingPx));
|
|
229
|
+
height = Math.max(height, rectEndY + calculateTrailingPadding(tile.atlasRect.y, rectEndY, atlasSize, paddingPx));
|
|
230
|
+
}
|
|
231
|
+
return { width, height };
|
|
232
|
+
}
|
|
233
|
+
function calculateTrailingPadding(start, end, atlasSize, paddingPx) {
|
|
234
|
+
if (paddingPx <= 0)
|
|
235
|
+
return 0;
|
|
236
|
+
if (start <= 0)
|
|
237
|
+
return 0;
|
|
238
|
+
return Math.min(paddingPx, Math.max(0, atlasSize - end));
|
|
239
|
+
}
|
|
240
|
+
function roundAtlasPageExtent(value, atlasSize) {
|
|
241
|
+
const extent = clampInteger(Math.ceil(value), 16, atlasSize);
|
|
242
|
+
if (!isPowerOfTwo(atlasSize))
|
|
243
|
+
return extent;
|
|
244
|
+
return Math.min(atlasSize, nextPowerOfTwo(extent));
|
|
245
|
+
}
|
|
246
|
+
function nextPowerOfTwo(value) {
|
|
247
|
+
let result = 1;
|
|
248
|
+
while (result < value)
|
|
249
|
+
result *= 2;
|
|
250
|
+
return result;
|
|
251
|
+
}
|
|
252
|
+
function isPowerOfTwo(value) {
|
|
253
|
+
return Number.isInteger(value) && value > 0 && (value & (value - 1)) === 0;
|
|
254
|
+
}
|
|
255
|
+
function createSizedTile(source, index, options) {
|
|
256
|
+
const maxContentSize = Math.max(1, options.atlasSize);
|
|
257
|
+
const width = clampInteger(Math.ceil(Math.max(1e-6, source.width) * options.texelsPerMeter), 1, maxContentSize);
|
|
258
|
+
const height = clampInteger(Math.ceil(Math.max(1e-6, source.height) * options.texelsPerMeter), 1, maxContentSize);
|
|
259
|
+
const paddingX = width + options.paddingPx * 2 <= options.atlasSize ? options.paddingPx : 0;
|
|
260
|
+
const paddingY = height + options.paddingPx * 2 <= options.atlasSize ? options.paddingPx : 0;
|
|
261
|
+
return {
|
|
262
|
+
id: source.id,
|
|
263
|
+
index,
|
|
264
|
+
width,
|
|
265
|
+
height,
|
|
266
|
+
paddingX,
|
|
267
|
+
paddingY,
|
|
268
|
+
paddedWidth: width + paddingX * 2,
|
|
269
|
+
paddedHeight: height + paddingY * 2,
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
function createAtlasPage(index, size) {
|
|
273
|
+
return {
|
|
274
|
+
id: `page_${index}`,
|
|
275
|
+
width: size,
|
|
276
|
+
height: size,
|
|
277
|
+
tiles: [],
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
function calculateMaxTileTexelDensity(sources, atlasSize) {
|
|
281
|
+
if (sources.length === 0)
|
|
282
|
+
return atlasSize;
|
|
283
|
+
let maxDensity = Infinity;
|
|
284
|
+
for (const source of sources) {
|
|
285
|
+
const width = Math.max(1e-6, source.width);
|
|
286
|
+
const height = Math.max(1e-6, source.height);
|
|
287
|
+
maxDensity = Math.min(maxDensity, atlasSize / width, atlasSize / height);
|
|
288
|
+
}
|
|
289
|
+
return Number.isFinite(maxDensity)
|
|
290
|
+
? Math.max(MIN_EFFECTIVE_TEXELS_PER_METER, maxDensity)
|
|
291
|
+
: atlasSize;
|
|
292
|
+
}
|
|
293
|
+
function createDistanceTransform(binary, width, height, featureValue) {
|
|
294
|
+
const pixelCount = width * height;
|
|
295
|
+
const temp = new Float64Array(pixelCount);
|
|
296
|
+
const output = new Float64Array(pixelCount);
|
|
297
|
+
const rowInput = new Float64Array(width);
|
|
298
|
+
const rowOutput = new Float64Array(width);
|
|
299
|
+
for (let y = 0; y < height; y += 1) {
|
|
300
|
+
const rowOffset = y * width;
|
|
301
|
+
for (let x = 0; x < width; x += 1) {
|
|
302
|
+
rowInput[x] = binary[rowOffset + x] === featureValue ? 0 : DISTANCE_TRANSFORM_INF;
|
|
303
|
+
}
|
|
304
|
+
distanceTransform1d(rowInput, rowOutput, width);
|
|
305
|
+
for (let x = 0; x < width; x += 1)
|
|
306
|
+
temp[rowOffset + x] = rowOutput[x] ?? DISTANCE_TRANSFORM_INF;
|
|
307
|
+
}
|
|
308
|
+
const columnInput = new Float64Array(height);
|
|
309
|
+
const columnOutput = new Float64Array(height);
|
|
310
|
+
for (let x = 0; x < width; x += 1) {
|
|
311
|
+
for (let y = 0; y < height; y += 1)
|
|
312
|
+
columnInput[y] = temp[y * width + x] ?? DISTANCE_TRANSFORM_INF;
|
|
313
|
+
distanceTransform1d(columnInput, columnOutput, height);
|
|
314
|
+
for (let y = 0; y < height; y += 1)
|
|
315
|
+
output[y * width + x] = columnOutput[y] ?? DISTANCE_TRANSFORM_INF;
|
|
316
|
+
}
|
|
317
|
+
return output;
|
|
318
|
+
}
|
|
319
|
+
function distanceTransform1d(input, output, length) {
|
|
320
|
+
let firstFinite = -1;
|
|
321
|
+
for (let index = 0; index < length; index += 1) {
|
|
322
|
+
if (Number.isFinite(input[index])) {
|
|
323
|
+
firstFinite = index;
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
if (firstFinite < 0) {
|
|
328
|
+
output.fill(DISTANCE_TRANSFORM_INF);
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
const v = new Int32Array(length);
|
|
332
|
+
const z = new Float64Array(length + 1);
|
|
333
|
+
let k = 0;
|
|
334
|
+
v[0] = firstFinite;
|
|
335
|
+
z[0] = -Infinity;
|
|
336
|
+
z[1] = Infinity;
|
|
337
|
+
for (let q = firstFinite + 1; q < length; q += 1) {
|
|
338
|
+
if (!Number.isFinite(input[q]))
|
|
339
|
+
continue;
|
|
340
|
+
let s = calculateParabolaIntersection(input, q, v[k] ?? 0);
|
|
341
|
+
while (s <= (z[k] ?? -Infinity)) {
|
|
342
|
+
k -= 1;
|
|
343
|
+
s = calculateParabolaIntersection(input, q, v[k] ?? 0);
|
|
344
|
+
}
|
|
345
|
+
k += 1;
|
|
346
|
+
v[k] = q;
|
|
347
|
+
z[k] = s;
|
|
348
|
+
z[k + 1] = Infinity;
|
|
349
|
+
}
|
|
350
|
+
k = 0;
|
|
351
|
+
for (let q = 0; q < length; q += 1) {
|
|
352
|
+
while ((z[k + 1] ?? Infinity) < q)
|
|
353
|
+
k += 1;
|
|
354
|
+
const nearest = v[k] ?? 0;
|
|
355
|
+
const delta = q - nearest;
|
|
356
|
+
output[q] = delta * delta + (input[nearest] ?? DISTANCE_TRANSFORM_INF);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
function calculateParabolaIntersection(input, q, nearest) {
|
|
360
|
+
const denominator = 2 * q - 2 * nearest;
|
|
361
|
+
if (denominator === 0)
|
|
362
|
+
return Infinity;
|
|
363
|
+
const fq = input[q] ?? DISTANCE_TRANSFORM_INF;
|
|
364
|
+
const fn = input[nearest] ?? DISTANCE_TRANSFORM_INF;
|
|
365
|
+
if (!Number.isFinite(fq) && !Number.isFinite(fn))
|
|
366
|
+
return Infinity;
|
|
367
|
+
if (!Number.isFinite(fq))
|
|
368
|
+
return Infinity;
|
|
369
|
+
if (!Number.isFinite(fn))
|
|
370
|
+
return -Infinity;
|
|
371
|
+
return ((fq + q * q) - (fn + nearest * nearest)) / denominator;
|
|
372
|
+
}
|
|
373
|
+
function clampInteger(value, min, max) {
|
|
374
|
+
return Math.min(max, Math.max(min, Math.round(finiteNumber(value, min))));
|
|
375
|
+
}
|
|
376
|
+
function finiteNumber(value, fallback) {
|
|
377
|
+
return Number.isFinite(value) ? value : fallback;
|
|
378
|
+
}
|
|
379
|
+
function roundNumber(value) {
|
|
380
|
+
return Math.round(value * 1000000) / 1000000;
|
|
381
|
+
}
|
|
382
|
+
//# sourceMappingURL=static-projected-shadow-atlas.js.map
|
package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-atlas.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-projected-shadow-atlas.js","sourceRoot":"","sources":["../../src/shadows/static-projected-shadow-atlas.ts"],"names":[],"mappings":"AA8DA,MAAM,wBAAwB,GAAG,CAAC,CAAC;AACnC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AACpC,MAAM,sCAAsC,GAAG,IAAI,CAAC;AACpD,MAAM,8BAA8B,GAAG,IAAI,CAAC;AAC5C,MAAM,+BAA+B,GAAG,GAAG,CAAC;AAE5C,MAAM,UAAU,mCAAmC,CACjD,OAAwD,EACxD,OAA8C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babylonjs/core/Maths/math.vector';
|
|
2
|
+
import { RenderTargetTexture } from '@babylonjs/core/Materials/Textures/renderTargetTexture';
|
|
3
|
+
import { AbstractMesh } from '@babylonjs/core/Meshes/abstractMesh';
|
|
4
|
+
import type { Scene } from '@babylonjs/core/scene';
|
|
5
|
+
export declare const STATIC_PROJECTED_BAKE_LAYER_MASK = 268435456;
|
|
6
|
+
export type StaticProjectedShadowBakeBounds = {
|
|
7
|
+
center: Vector3;
|
|
8
|
+
width: number;
|
|
9
|
+
depth: number;
|
|
10
|
+
minX: number;
|
|
11
|
+
maxX: number;
|
|
12
|
+
minZ: number;
|
|
13
|
+
maxZ: number;
|
|
14
|
+
};
|
|
15
|
+
export interface StaticProjectedShadowMaskTexture {
|
|
16
|
+
texture: RenderTargetTexture;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
}
|
|
19
|
+
export declare function collectStaticProjectedShadowNodeMeshes(root: AbstractMesh): AbstractMesh[];
|
|
20
|
+
export declare function buildStaticProjectedShadowBounds(meshes: AbstractMesh[], options: {
|
|
21
|
+
lightDir: Vector3;
|
|
22
|
+
planeY: number;
|
|
23
|
+
padding: number;
|
|
24
|
+
maxSize?: number;
|
|
25
|
+
}): StaticProjectedShadowBakeBounds | null;
|
|
26
|
+
export declare function buildStaticProjectedShadowBoundsFromPoints(points: readonly Vector3[], options: {
|
|
27
|
+
planeY: number;
|
|
28
|
+
padding: number;
|
|
29
|
+
maxSize?: number;
|
|
30
|
+
}): StaticProjectedShadowBakeBounds | null;
|
|
31
|
+
export declare function createStaticProjectedShadowMaskTexture(meshes: AbstractMesh[], options: {
|
|
32
|
+
scene: Scene;
|
|
33
|
+
name: string;
|
|
34
|
+
bounds: StaticProjectedShadowBakeBounds;
|
|
35
|
+
lightDir: Vector3;
|
|
36
|
+
planeY: number;
|
|
37
|
+
resolution: number | {
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
};
|
|
41
|
+
}): Promise<StaticProjectedShadowMaskTexture | null>;
|
|
42
|
+
export declare function projectStaticShadowMeshPositions(positions: ArrayLike<number>, matrix: Matrix, lightDir: Vector3, options: {
|
|
43
|
+
bounds: StaticProjectedShadowBakeBounds;
|
|
44
|
+
planeY: number;
|
|
45
|
+
mirrorXForBakeCamera?: boolean;
|
|
46
|
+
}): number[];
|
|
47
|
+
//# sourceMappingURL=static-projected-shadow-bake.d.ts.map
|
package/node_modules/@fps-games/babylon-renderer/dist/shadows/static-projected-shadow-bake.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-projected-shadow-bake.d.ts","sourceRoot":"","sources":["../../src/shadows/static-projected-shadow-bake.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAGpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAG7F,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAInE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAMnD,eAAO,MAAM,gCAAgC,YAAa,CAAC;AAE3D,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,mBAAmB,CAAC;IAC7B,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,sCAAsC,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,EAAE,CAKzF;AAED,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,YAAY,EAAE,EACtB,OAAO,EAAE;IACP,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE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