@energy8platform/game-engine 0.33.4 → 0.33.6
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/host.cjs.js +24 -17
- package/dist/host.cjs.js.map +1 -1
- package/dist/host.esm.js +24 -17
- package/dist/host.esm.js.map +1 -1
- package/dist/scene.cjs.js +12 -8
- package/dist/scene.cjs.js.map +1 -1
- package/dist/scene.esm.js +12 -8
- package/dist/scene.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/host/shellConfig.ts +21 -14
package/dist/scene.esm.js
CHANGED
|
@@ -3129,17 +3129,21 @@ const reelGridContribution = {
|
|
|
3129
3129
|
system.setBoard(board.map((column) => column.map((cell) => (typeof cell === 'string' ? { symbol: cell } : cell))));
|
|
3130
3130
|
};
|
|
3131
3131
|
setBoard(props.board);
|
|
3132
|
-
// The reel system's local content does not start at (0,0) (cells
|
|
3133
|
-
//
|
|
3134
|
-
//
|
|
3132
|
+
// The reel system's local content does not start at (0,0) (cells center on geometry
|
|
3133
|
+
// positions), so align it inside a wrapper. The origin comes from the STATIC geometry
|
|
3134
|
+
// (first cell center − half cell), never from getLocalBounds — animated cells hang
|
|
3135
|
+
// far outside the window mid-spin and a bounds-based origin would drift the grid.
|
|
3135
3136
|
const wrapper = new Container();
|
|
3136
3137
|
wrapper.addChild(system.view);
|
|
3137
|
-
|
|
3138
|
+
const contentOrigin = { x: 0, y: 0 };
|
|
3138
3139
|
const syncContent = () => {
|
|
3139
|
-
const
|
|
3140
|
-
|
|
3141
|
-
system.
|
|
3142
|
-
|
|
3140
|
+
const geom = system.grid.geometry;
|
|
3141
|
+
const first = system.grid.cellPosition(0, 0);
|
|
3142
|
+
const cell = system.config.grid.cellSize;
|
|
3143
|
+
contentOrigin.x = first.x - cell / 2;
|
|
3144
|
+
contentOrigin.y = first.y - cell / 2;
|
|
3145
|
+
system.view.position.set(-contentOrigin.x, -contentOrigin.y);
|
|
3146
|
+
return { width: geom.gridW, height: geom.gridH };
|
|
3143
3147
|
};
|
|
3144
3148
|
const instance = {
|
|
3145
3149
|
view: wrapper,
|