add camera controls to README

This commit is contained in:
Brian Beck 2025-11-12 20:28:31 -08:00
parent 2a7af04023
commit c20ca94953
3 changed files with 27 additions and 4 deletions

View file

@ -4,6 +4,25 @@
![Screenshot of map inspector](./screenshot.png "Map inspector with Surreal loaded")
## Usage
👉 **[Open the app!](https://exogen.github.io/t2-mapper/)**
### Camera Controls
Click inside the map preview area to capture the mouse.
| Key | Action |
|-----|--------|
| <kbd>W</kbd> | Forward |
| <kbd>A</kbd> | Left |
| <kbd>S</kbd> | Backward |
| <kbd>D</kbd> | Right |
| <kbd>Space</kbd> | Up |
| <kbd>Shift</kbd> | Down |
| <kbd>Esc</kbd> | Release mouse |
## Development
Install dependencies:

View file

@ -1,7 +1,9 @@
import fs from "node:fs/promises";
import { execFileSync } from "node:child_process";
const blender = `/Applications/Blender.app/Contents/MacOS/Blender`;
const BLENDER_PATH =
process.env.BLENDER_PATH ||
`/Applications/Blender.app/Contents/MacOS/Blender`;
/**
* Find all .dif files in `public/base` and convert them to glTF.
@ -10,7 +12,7 @@ async function run() {
for await (const inFile of fs.glob("public/base/**/*.dif")) {
const outFile = inFile.replace(/\.dif$/i, ".gltf");
execFileSync(
blender,
BLENDER_PATH,
[
"--background",
"--python",

View file

@ -1,7 +1,9 @@
import fs from "node:fs/promises";
import { execFileSync } from "node:child_process";
const blender = `/Applications/Blender.app/Contents/MacOS/Blender`;
const BLENDER_PATH =
process.env.BLENDER_PATH ||
`/Applications/Blender.app/Contents/MacOS/Blender`;
/**
* Find all .dts files in `public/base` and convert them to glTF.
@ -10,7 +12,7 @@ async function run() {
for await (const inFile of fs.glob("public/base/**/*.dts")) {
const outFile = inFile.replace(/\.dts$/i, ".gltf");
execFileSync(
blender,
BLENDER_PATH,
[
"--background",
"--python",