Remove 'reveal pattern' from game, as it's not necessary

This commit is contained in:
2025-06-16 22:41:29 -07:00
parent 2e1a160568
commit 3749477ec1
3 changed files with 143 additions and 152 deletions

View File

@@ -1,5 +1,5 @@
import PanZoom from './modules/panzoom.js';
import Game from './modules/game.js';
import * as panzoom from './modules/panzoom.js';
import * as game from './modules/game.js';
const RecordSheet = {
unSelect: function () {
@@ -40,19 +40,18 @@ document.querySelector('object').addEventListener('load', function () {
});
window.addEventListener('load', () => {
const svg = document.querySelector('object').contentDocument.querySelector('svg'),
game = Game(svg);
const svg = document.querySelector('object').contentDocument.querySelector('svg');
window.game = game;
game.start(svg);
panzoom.start(svg);
const svgns = "http://www.w3.org/2000/svg",
recordSheetVisibility = document.querySelector('#content input[type="checkbox"].visible');
PanZoom(svg);
const distanceOutput = document.getElementById('status');
game.distanceCallback = count => {
game.setDistanceCallback(count => {
const output = {
count: '-',
display: 'none'
@@ -65,12 +64,12 @@ window.addEventListener('load', () => {
distanceOutput.querySelector('#hex-count').textContent = output.count;
distanceOutput.style.display = output.display;
};
});
const proneToggle = document.getElementById('toggle-prone-counter');
game.proneFlagCallback = checked => proneToggle.checked = checked;
game.selectCallback = data => RecordSheet.select(data);
game.setProneFlagCallback(checked => proneToggle.checked = checked);
game.setSelectCallback(data => RecordSheet.select(data));
// Object.values(settingsPanel.querySelectorAll('fieldset')).forEach(fieldset => {
// const identityMtx = [1, 0, 0, 1, 0, 0];