fdf

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 16 Imported by: 0

README

FDF - Wireframe - Fil de Fer

Wireframe visualizer

Two renderer are available: png to create an image file and ebitengine which in turn can render as a native window or as a WASM website.

Window mode

go run go.creack.net/fdf@latest

WASM

One liner
env -i HOME=${HOME} PATH=${PATH} go run github.com/hajimehoshi/wasmserve@latest go.creack.net/fdf@latest
Details

Install wasmer:

go install github.com/hajimehoshi/wasmserve@latest

Clone this repo:

git clone https://github.com/creack/fdf
cd fdf

Run:

env -i HOME=${HOME} PATH=${PATH} wasmserve .

For development, wasmer exposes an endpoint to do live reload.

I recommend reflex.

Install:

go install github.com/cespare/reflex@latest

Then, with wasmer running:

reflex curl -v http://localhost:8080/_notify

Controls

When running the ebitengine renderer, wasm or window mode, a few keyboard controls are available:

  • up/down/left/right/shift left/shift right: Change x/y/z camera angles
  • w/a/s/d: Move the image
  • 1/2: Change the height
  • 3/4: Change the scale

Examples

maps/42.fdf

42.fdf

maps/t1.fdf

t1.fdf

Documentation

Overview

Package main is the entrypoint.

Directories

Path Synopsis
Package math3 provides basic 3D math utils.
Package math3 provides basic 3D math utils.
Package projection provides the projection interface and implementations.
Package projection provides the projection interface and implementations.
Package render provides the interfaces for the various renderers.
Package render provides the interfaces for the various renderers.
ebitenrenderer
Package ebitenrenderer provides a ebiten impementation of the renderer.
Package ebitenrenderer provides a ebiten impementation of the renderer.
pngrenderer
Package pngrenderer provides a stdlib image/png impementation of the renderer.
Package pngrenderer provides a stdlib image/png impementation of the renderer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL