@blorkfield/overlay-core 0.11.4 → 0.11.5
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/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -555,7 +555,7 @@ const scene = new OverlayScene(canvas, {
|
|
|
555
555
|
| `floorConfig.minIntegrity` | none | Minimum segments required, otherwise all collapse |
|
|
556
556
|
| `floorConfig.segmentWidths` | none | Proportional widths for each segment (array that sums to 1.0) |
|
|
557
557
|
| `despawnBelowFloor` | 1.0 | Distance below floor to despawn objects (as fraction of height) |
|
|
558
|
-
| `
|
|
558
|
+
| `recenterOnResize` | false | Translate all objects to stay centred when canvas dimensions change — useful for phone rotation and responsive layouts |
|
|
559
559
|
|
|
560
560
|
### Background Configuration
|
|
561
561
|
|
package/dist/index.cjs
CHANGED
|
@@ -2306,7 +2306,7 @@ var OverlayScene = class {
|
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
2308
2308
|
resize(width, height) {
|
|
2309
|
-
if (this.config.
|
|
2309
|
+
if (this.config.recenterOnResize) {
|
|
2310
2310
|
const dx = (width - this.config.bounds.right) / 2;
|
|
2311
2311
|
const dy = (height - this.config.bounds.bottom) / 2;
|
|
2312
2312
|
for (const entry of this.objects.values()) {
|