# ignifx > Builds 2D and 3D web games with the ignifx TypeScript game engine (WebGPU-only, Babylon Lite based, browser and Electron). The pages below are the Agent Skill that ships with the engine. They live in the repository, and every link below is the file itself. ## Docs - [ignifx](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/SKILL.md): ignifx is a code-first TypeScript game engine for browsers and Electron. - [Gotchas](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/gotchas.md): Traps in the engine as it stands (rendering, shaders, particles, terrain and assets included), each with its replacement and, where one exists, the error code you will see. ## Concepts - [Assets](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/concepts/assets.md): Everything a game loads — textures, models, scenes and prefabs, materials, environments, fonts, JSON, text, bytes — is addressed, typed, reference-counted, and asynchronous. - [Extensions](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/concepts/extensions.md): An extension is the unit of optional functionality: it registers components, systems, services, settings, and error codes with one app. - [Lifecycle and time](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/concepts/lifecycle.md): When things happen in a frame, which callbacks a `Script` may implement, and how a headless app is stepped. - [Platform and storage](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/concepts/platform-and-storage.md): `app.platform` says where the game is running; `app.storage` is where it keeps settings, save games, and input rebindings. - [Rendering](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/concepts/rendering.md): ignifx does not render; Babylon Lite does. - [Scene graph](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/concepts/scene-graph.md): `World`, `SceneInstance`, `Entity`, `Transform`, tags, layers, signals, and — since Phase 2 — scene files, prefabs, and instancing. - [Scripting: components, schemas, coroutines](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/concepts/scripting.md): How game code is written: `Component` for data a system owns, `Script` for data with lifecycle callbacks, and a declarative schema instead of decorators (ADR-0004). ## Recipes - [Add a custom post process](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/add-a-custom-post-process.md): A `// @ignifx post` file is one full-screen fragment function. - [Add a surface shader](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/add-a-surface-shader.md): A surface shader is a small piece of WGSL layered onto a **PBR** material, so the engine keeps doing the lighting: shadows, image-based lighting, fog and tone mapping all still apply, and your code only says what the surface is made of. - [Animate a sprite from an atlas](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/animate-a-sprite-from-an-atlas.md): Two documents and two components. - [Bind an action and read it](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/bind-an-action-and-read-it.md): Game code asks for `"move"` and `"jump"`, never for a key code. - [Build a pause menu](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/build-a-pause-menu.md): Game UI in ignifx is HTML, and `@ignifx/ui`'s `Menu` is the list widget a front end is made of: a title, rows that declare what they edit, and one selection model that keyboard, gamepad and pointer all drive. - [Burst particles on a hit](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/burst-particles-on-hit.md): `emit(count)` spawns particles at the system's current clock whether or not it is playing, which is what a one-off impact wants. - [Move a 3D character controller](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/character-controller-3d.md): A `CharacterController` is a kinematic capsule that collides and slides. - [Instance many meshes](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/instance-many-meshes.md): One mesh, one material, thousands of copies, one draw call. - [Load a heightmap terrain](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/load-a-heightmap-terrain.md): A `.terrain.json` says how big the ground is, where its heights come from, how it is chunked, and which texture layers blend across it. - [Load a model](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/load-a-model.md): A `.glb` or `.gltf` file loads as a `ModelAsset`, and a `Model` component instantiates it under an entity. - [Load a tilemap and give it collision](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/load-a-tilemap-with-collision.md): Three components share the work. - [Draw particles in 2D](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/particles-in-2d.md): `ParticleSystem2D` plays the same `.particles.json` a 3D `ParticleSystem` plays, but draws it as sprites in a `@ignifx/2d` sorting layer, so torch fire sorts, blends and pans with the rest of the scene. - [Move a 2D platformer character](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/platformer-controller-2d.md): `CharacterController2D` is a kinematic capsule or box that collides and slides through Rapier. - [Play a positional one-shot and a music loop](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/play-a-one-shot-and-a-loop.md): The mixer is a tree of named buses declared in a `.audio.json`: every sound plays on one, and a bus's volume multiplies through its children. - [Play a particle effect](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/play-a-particle-effect.md): An effect is a document — a `.particles.json`, or the same object built in code by `particleDefinition(preset, overrides)` — and a `ParticleSystem` component plays it. - [Raycast and catch a trigger in 3D](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/raycast-and-trigger-3d.md): Two ways to ask the physics world a question. - [Rebind a key at run time](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/rebind-a-key-at-runtime.md): `performInteractiveRebind` listens for the next control the player touches and writes it onto one binding as an override. - [Save and load game state](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/save-and-load-game-state.md): `app.storage` is the asynchronous key–value store behind save games, settings and input rebindings. - [Scatter foliage on terrain](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/scatter-foliage.md): `TerrainScatter` places instances on the terrain it shares an entity with — or on any ancestor's — by seeded rules: a density in instances per square metre, the splat layers a candidate may stand on, and the slope and height bands it must fall in. - [Show a gameplay counter in devtools](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/show-diagnostics-in-devtools.md): `@ignifx/devtools` draws the overlay; every number on its Stats panel comes from `app.diagnostics`, which is core. - [Spawn a prefab on click](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/spawn-a-prefab-on-click.md): A click is a ray. - [Spawn a prefab](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/spawn-a-prefab.md): A prefab is a scene file (ADR-0005): the same `ignifx.scene` format, loaded as a `SceneAsset` and stamped out with `world.instantiate`. - [Follow a character with a third-person camera](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/third-person-camera.md): `ThirdPersonCamera` is an orbit rig: it puts the entity carrying the `Camera` behind `target`, at `distance`, offset by `shoulderOffset`, and damps toward that pose. - [Tween a transform](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/tween-a-transform.md): `app.tweens` is core: it interpolates any number, `Vec2`, `Vec3` or `Quat` property of any object, on the game clock, in `PostUpdate` — so a tween honours `time.timeScale` and stops with `app.pause()` unless it asks for `updateWhenPaused`. - [Walk on terrain](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/walk-on-terrain.md): `@ignifx/terrain` does not depend on `@ignifx/physics`: a terrain without physics costs no physics code. - [Write a custom shader](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/recipes/write-a-custom-shader.md): A `.wgsl` file whose `// @ignifx` pragma comments **are** its declaration is a material family of your own: the pragmas say which attributes the vertex stage reads, which engine uniforms it wants, and which uniforms, textures and defines a material may set. ## File formats - [components](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/components.md): Generated by `pnpm docs:schemas`. - [ignifx.animator](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.animator.md): Generated by `pnpm docs:schemas`. - [ignifx.audiobuses](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.audiobuses.md): Generated by `pnpm docs:schemas`. - [ignifx.environment](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.environment.md): Generated by `pnpm docs:schemas`. - [ignifx.i18n](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.i18n.md): Generated by `pnpm docs:schemas`. - [ignifx.inputactions](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.inputactions.md): Generated by `pnpm docs:schemas`. - [ignifx.material](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.material.md): Generated by `pnpm docs:schemas`. - [ignifx.particles](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.particles.md): Generated by `pnpm docs:schemas`. - [ignifx.physicsmaterial](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.physicsmaterial.md): Generated by `pnpm docs:schemas`. - [ignifx.scene](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.scene.md): Generated by `pnpm docs:schemas`. - [ignifx.spriteanimation](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.spriteanimation.md): Generated by `pnpm docs:schemas`. - [ignifx.spriteatlas](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.spriteatlas.md): Generated by `pnpm docs:schemas`. - [ignifx.terrain](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.terrain.md): Generated by `pnpm docs:schemas`. - [ignifx.tilemap](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/ignifx.tilemap.md): Generated by `pnpm docs:schemas`. - [Input action files (`.input.json`)](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/inputactions.md): Hand-written companion to the generated field table in `ignifx.inputactions.md`. - [Material files (`.material.json`)](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/material.md): Hand-written companion to the generated field table in `ignifx.material.md`. - [Scene and prefab files (`.scene.json`, `.prefab.json`)](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/scene.md): Hand-written companion to the generated field table in `ignifx.scene.md`. - [Shader files (`.wgsl`)](https://github.com/astrum-forge/ignifx/blob/main/skills/ignifx/references/formats/wgsl.md):