| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <title>World editor</title> |
| 6 | <link rel="stylesheet" href="/ui/editor.css"> |
| 7 | </head> |
| 8 | <body> |
| 9 | <header> |
| 10 | <h1>World editor</h1> |
| 11 | <p id="who">Connecting…</p> |
| 12 | <p id="error" class="error"></p> |
| 13 | </header> |
| 14 | <aside> |
| 15 | <p>Chunk <strong id="coords">0, 0</strong></p> |
| 16 | <p id="revision"></p> |
| 17 | <p id="authored"></p> |
| 18 | <label class="open-toggle"><input id="open" type="checkbox"> Open (enterable)</label> |
| 19 | <div class="nav"> |
| 20 | <button id="north" type="button">Up</button> |
| 21 | <div> |
| 22 | <button id="west" type="button">Left</button> |
| 23 | <button id="east" type="button">Right</button> |
| 24 | </div> |
| 25 | <button id="south" type="button">Down</button> |
| 26 | </div> |
| 27 | <p>Tool: <strong id="tool"></strong></p> |
| 28 | <div class="palette"> |
| 29 | <button type="button" data-tool='{"kind":"ground","typeId":1}'>Grass</button> |
| 30 | <button type="button" data-tool='{"kind":"ground","typeId":2}'>Wood</button> |
| 31 | <button type="button" data-tool='{"kind":"block","typeId":1}'>Stone wall</button> |
| 32 | <button type="button" data-tool='{"kind":"block","typeId":2}'>Torch</button> |
| 33 | <button type="button" data-tool='{"kind":"block","typeId":3}'>Spawner</button> |
| 34 | <button type="button" data-tool='{"kind":"block","typeId":4}'>Bank</button> |
| 35 | <button type="button" data-tool='{"kind":"erase"}'>Erase block</button> |
| 36 | </div> |
| 37 | <div id="spawner-config"> |
| 38 | <p>Spawner (used when painting a new spawner tile)</p> |
| 39 | <label>Mob <select id="spawner-mob"><option value="deer">Deer</option></select></label> |
| 40 | <label>Max alive <input id="spawner-max" type="number" min="1" max="20" value="3"></label> |
| 41 | <label>Range <input id="spawner-range" type="number" min="1" max="16" value="4"></label> |
| 42 | </div> |
| 43 | <button id="save" type="button">Save chunk</button> |
| 44 | <button id="apply" type="button">Apply now</button> |
| 45 | <label>Night preview <input id="night" type="range" min="0" max="24" step="0.1" value="12"><span id="night-label">12.0</span></label> |
| 46 | <button id="open-settings" type="button">World settings</button> |
| 47 | <p class="hint">The red border is the chunk you are editing. Neighbours are shown for alignment and lighting, but paint only applies inside the border. Hover previews the selected tool. Mouse wheel zooms (view stays centred on the selected chunk); Shift+wheel cycles visual states. Chunk saves write a pending revision; world settings apply immediately. Place a spawner or bank with the tools above (placeholder art until real sprites exist).</p> |
| 48 | </aside> |
| 49 | <section id="changelog-wrap"> |
| 50 | <h2>Changelog</h2> |
| 51 | <div id="changelog"></div> |
| 52 | </section> |
| 53 | <div id="selection-border" aria-hidden="true"></div> |
| 54 | <div id="settings-backdrop" hidden></div> |
| 55 | <div id="settings-modal" hidden> |
| 56 | <div id="settings-main"> |
| 57 | <header> |
| 58 | <h2>World settings</h2> |
| 59 | <button id="settings-close" type="button">Close</button> |
| 60 | </header> |
| 61 | <div id="settings-form"></div> |
| 62 | <footer> |
| 63 | <button id="settings-cancel" type="button">Cancel</button> |
| 64 | <button id="settings-save" type="button" disabled>Save</button> |
| 65 | </footer> |
| 66 | </div> |
| 67 | <aside id="settings-log-wrap"> |
| 68 | <h2>Settings log</h2> |
| 69 | <div id="settings-log"></div> |
| 70 | </aside> |
| 71 | </div> |
| 72 | <script src="/framework/framework.js"></script> |
| 73 | <script type="module" src="/src/editor/main.js"></script> |
| 74 | </body> |
| 75 | </html> |