diff --git a/README.md b/README.md index cbc92c2e..47292b3b 100644 --- a/README.md +++ b/README.md @@ -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 | +|-----|--------| +| W | Forward | +| A | Left | +| S | Backward | +| D | Right | +| Space | Up | +| Shift | Down | +| Esc | Release mouse | + + ## Development Install dependencies: diff --git a/scripts/convert-dif.ts b/scripts/convert-dif.ts index f115216c..bf161f7e 100644 --- a/scripts/convert-dif.ts +++ b/scripts/convert-dif.ts @@ -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", diff --git a/scripts/convert-dts.ts b/scripts/convert-dts.ts index b9901784..8f2d405c 100644 --- a/scripts/convert-dts.ts +++ b/scripts/convert-dts.ts @@ -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",