Skip to content

jamesx0416/FlightSim

Repository files navigation

FlightSim

Browser-based MSFS 2020 built-package viewer and compatibility runtime prototype.

The current app imports a built package served from the repo tmp folder, parses generic SimObjects aircraft config/model references, compiles a supported subset of MSFS model behavior XML, loads the exterior GLTF, and drives generic animation plus node visibility in the browser.

This slice is intentionally generic:

  • no aircraft-specific overrides or code paths
  • no panel hosting
  • no WASM runtime
  • no sound runtime

Current Scope

  • Package import from a dev-served tmp package root
  • layout.json and manifest.json discovery
  • aircraft.cfg parsing, including base_container inheritance
  • model.cfg and exterior model XML resolution
  • Behavior include loading from package-local ModelBehaviorDefs
  • Optional additional package-root mounting for stock/shared behavior and texture lookup
  • Generic compilation of supported ASOBO_GT_Anim* and ASOBO_GT_Visibility* template outputs
  • Deterministic demo host variables for behavior-driven animation and visibility
  • Diagnostics overlay for missing includes, unsupported templates, and unsupported RPN tokens

Deferred

  • panel.cfg / panel.xml
  • JS instrument hosting
  • WASM
  • sound
  • MSFS 2024 content
  • offline precompilation

Setup

  1. Install dependencies:
bun install
  1. Start the dev server:
bun dev
  1. Build for production:
bun run build

Package Root

By default the viewer imports:

/tmp/headwindsim-aircraft-a330-900/

Override that with:

VITE_MSFS_PACKAGE_ROOT=/tmp/your-built-package/

The package must be a built MSFS 2020 package inside the repo so Vite can serve it.

Optional additional built-package roots can also be mounted for stock/shared assets:

VITE_MSFS_ADDITIONAL_PACKAGE_ROOTS=/tmp/fs-base-aircraft-common/,/tmp/asobo-vcockpits-instruments-airliners/

Those extra roots are searched generically for:

  • simulator-provided ModelBehaviorDefs/... includes such as Asobo/Exterior.xml
  • shared texture fallback paths discovered through texture.cfg

The same additional roots can also be provided at runtime through the URL:

?deps=/tmp/fs-base-aircraft-common/&deps=/tmp/asobo-vcockpits-instruments-airliners/

or as a single delimited query value:

?packages=/tmp/fs-base-aircraft-common/;/tmp/asobo-vcockpits-instruments-airliners/

The main package root can also be selected from the URL:

?package=/tmp/flybywire-aircraft-a320-neo/&aircraft=SimObjects/AirPlanes/FlyByWire_A320_NEO%23fltsim.0

Project Layout

About

A lightweight, photorealistic, web-based flight simulator based on three geospatial. Very much WIP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors