Kindling is in active development, so these docs are a work in progress. Articles marked Draft are still being written.
Getting started
Installation Draft
What you need, how to get Kindling, and how to check that everything works.
Editor basics Draft
A tour of the Kindling editor — the viewport, scene tree and inspector.
ECS
Quick start guide
Set up BorrowedTorch.ECS, build a first world of entities, components and a system, and find your way around the ECS pages.
Entities
Creating and destroying entities, ids and generations, handles that outlive their entity, "no entity", entities that point at entities, and handles in save files.
Components
Defining components, structs or classes, adding them, reading and writing them in place, how long a reference lasts, removing them, and tags.
Systems and queries
Writing a system, queries over one to three component types, a fourth type, the order of entities, what can change during a query, and running systems in order.
Type-erased access
Components by Type for inspectors, editors and save files, boxed copies, declared defaults, and saving and loading a world.
Storage and performance
The sparse sets behind the world, how removal keeps them packed, what each call costs, memory, threads, and a store of your own.
Glossary
Every type of the ECS library with its members, one page each.
Audio
Quick start guide
Set up BorrowedTorch.Audio in a game, place the listener and a first sound, and find your way around the audio pages.
Emitters
Cached and streaming emitters, clips and file formats, playing, looping, states and events.
Effect chains
Wiring effects between an emitter's send and return, bypassing and removing them, and the order of effects.
Positional sound
Distance attenuation and air absorption, Doppler, HRTF spatialization, HRTF data sets and demo mode.
Volume, tone and time
The volume, three-band equalizer, pitch, delay, fade and time position effects.
Mixing, reverb and output
The signal path, the master volume, the reverb bus, the output device and threading.
Glossary
Every effect and every type of the audio library with its members, one page each.
UI
Quick start guide
Set up BorrowedTorch.UI in a MonoGame game, lay elements out, and find your way around the UI pages.
Base element
What every element has in common, input and states, resizing, the root element and how to write your own element.
Layout elements
Stack panels, grids, scrolling containers, borders, separators, windows and tabs.
Controls
Buttons, check boxes, sliders, progress bars, tooltips and the color picker.
Lists and menus
List boxes, combo boxes, tree views and context menus, with selection, data sources, virtualization and keyboard control.
Text
Plain labels, the rich text box for formatted, editable and scrolling text, and the fonts both of them draw with.
Images and drawing
Images, stencils, view ports for your own drawing, and drag and drop.
Styles, bindings and animation
Style classes, mouse cursors, default settings, dependency properties, view model bindings, items templates and animations.
Markup
Build element trees from XML with BorrowedTorch.UI.Markup, with properties, items, events, bindings, style dictionaries, included files, animations, your own types and errors.
Glossary
Every element and every type of the UI with its members, one page each.
Randomness
Quick start guide
Set up BorrowedTorch.Randomness, give a world one seed and each system its own stream, and find your way around the randomness pages.
Random streams
Integers, doubles and chances from an Rng, numbers in a range, how many numbers a call takes, picking, shuffling, and streams on several threads.
Seeds and forks
One stream per system from one world seed, fork keys and indexes, pre-hashed keys, seeds typed as text, stable hashes, and keys as part of the save format.
Noise
Gradient and fractal noise, their settings, the range their values really use, thresholds, and the coordinates they accept.
Glossary
Every type of the randomness library with its members, one page each.
Camera
Quick start guide
Set up BorrowedTorch.Camera in a game, fly a free camera, play a tour back along a path, and find your way around the camera pages.
Pose and projection
The camera's position and orientation, its basis vectors, looking at a point, the field of view and the clip planes, and when the matrices change.
Picking and large worlds
Rays from the mouse into the world, the floating origin that keeps far-away worlds steady, and drawing and culling relative to it.
Controllers
Attaching and switching controllers, who owns the camera's pose, the free camera and its input, snapping to an axis, and writing a controller of your own.
Camera paths
Waypoints and their orientation modes, building open and closed paths, the shape of the curve, sampling by distance, the nearest point, easing and holds at waypoints, and how accurate the travel is.
Path playback
The animated camera that plays a path, its duration and speed, the waypoints' easing and holds in a run, what it does at the ends of a path, seeking, easing onto the path, and recording and saving waypoints.
Drawing a path
The geometry a camera path hands you to draw it, fixed and adaptive lines, orientation frames, a line renderer, and geometry in buffers of your own.
Glossary
Every type of the camera library with its members, one page each.
Transform gizmo
Quick start guide
Set up BorrowedTorch.TransformGizmo in a game, move, turn and scale a selected object with the pointer, and find your way around the transform gizmo pages.
Targets
The target interface, what the gizmo reads and writes and when, targets for objects with and without parents, lights and markers, and the axes of a target.
Capabilities
The flags that choose the modes and frames each target offers, why scale has no world frame, the rules that turn flags into a mode and a frame, and a mode toolbar that follows them.
Modes and frames
Translate, rotate and scale and what each drag does, switching modes, the world's axes and the target's own, and objects that are skewed or mirrored.
Picking and dragging
The order of the gizmo's calls in a frame, hovering, starting, ending and cancelling a drag, the dead zone, undo, viewports, and worlds far from the origin.
Drawing
Drawing the gizmo over the scene, the render states it sets, its size on screen, the order its handles are painted in, colors, and painter's order for overlays of your own.
Glossary
Every type of the transform gizmo library with its members, one page each.
Scene gizmo
Quick start guide
Set up BorrowedTorch.SceneGizmo in a game, turn the view to an axis with a click, and find your way around the scene gizmo pages.
Picking and snapping
The order of the gizmo's calls in a frame, the hover highlight, which tip a click picks, turning the view to look along an axis, sharing the pointer with the scene, and viewports.
Drawing
Drawing the widget over the scene, the corner it sits in, what it draws and how it turns with the camera, the render states it sets, its paint order, and colors.
Glossary
Every type of the scene gizmo library with its members, one page each.
Shaping functions
Quick start guide
Set up BorrowedTorch.ShapingFunctions, give an animation a curve, and find your way around the shaping functions pages.
The curves
Ease in, ease out and ease in-out, every family of curves with pictures, the curves that overshoot and bounce, and which to choose.
Parameters
The functions that take parameters, the interfaces that set them, their ranges and defaults, and what each parameter does to its curve.
Catalog and IDs
Creating a function from its ID, the categories, what a function says about itself, a curve picker, and saving a curve with its parameters.
Custom functions
A curve of your own on BaseShapingFunction, with parameters if it needs them, used wherever a shaping function is taken, and saved under a name of your own.
Glossary
Every type of the shaping functions library with its members, one page each.
MonoInput
Quick start guide
Set up BorrowedTorch.MonoInput in a game, update it every frame, move a first player with keys, mouse and pad, feed it the keys and mouse of a window MonoGame didn't create, and find your way around the input pages.
Button states
The four states every key, button and note goes through, the five checks that read them, and how one frame moves them.
Keyboard
Checking a key by its state, Ctrl, Shift and Alt, shortcuts, every key held at once, a key-binding screen, typed text, and updating from the keyboard or from a state of your own.
Mouse
The five buttons, the pointer and how far it moved, both wheels, the mouse events, snapshots of the buttons, updating part of the mouse, and updating from a state of your own.
Gamepads
Four player slots, connecting and disconnecting, the fifteen buttons, sticks and their dead zone, triggers, vibration, and status events.
MIDI
Finding MIDI devices, connecting to one, reading the notes held, notes shorter than a frame, unplugging and switching devices, and shutting MIDI down.
Glossary
Every type of the MonoInput library with its members, one page each.
Input binder
Quick start guide
Set up BorrowedTorch.InputBinder, register a first game's actions with default bindings, feed it the input polled each frame, and find your way around the input binder pages.
Actions
The three shapes of action, registering them with a callback, actions built ahead, names, descriptions and pictures, and finding and unregistering actions.
Inputs
What makes an input, its source and id, the factories, buttons and axes, when two inputs are equal, and showing an input to the player.
Binding and rebinding
The slots of an action, default bindings, binding and its results, conflicts between actions, unbinding, reading the bindings back, a rebinding screen and saving the player's bindings.
Updating every frame
What an update does with the inputs it is given, which inputs to pass, reusing them, several players, an adapter that feeds the binder from MonoInput, speed and threads.
Modifier keys
Bindings such as Ctrl+S, telling the binder which modifiers are held, the most specific binding winning, a press keeping its binding, and modifier keys bound on their own.
Glossary
Every type of the input binder library with its members, one page each.
Ray tracing
Quick start guide
Set up BorrowedTorch.RayTracing, trace a first ray through a scene of meshes, pick objects with the mouse, and find your way around the ray tracing pages.
Meshes
Your meshes as the library reads them, meshes from a MonoGame model, building a BLAS and what it keeps, deforming meshes, and the units triangles need.
The scene
Declaring the scene every frame, instance ids, flags, what an update does, why the order matters, transforms that squash an object flat, the instances and the versions.
CPU queries
The closest hit and what it holds, the any hit, starting a ray off a surface, attributes at a hit, tracing one mesh on its own, and distances.
Tracing on the GPU
The GPU copy of the scene and what each upload sends, the HLSL headers, a shadow kernel and its dispatch, tracing from a pixel shader, and counting the steps of a walk.
The G-buffer
The G-buffer's two targets, filling them with a prepass of your own, what to draw into them, telling this frame's surfaces from old ones, and reading positions and normals back in a shader.
The BVH and performance
The one tree builder behind both levels, the depth-first node layout, walking with and without a stack, refits and rebuilds, the layouts the GPU reads, what each step costs, and the limits.
Glossary
Every type and HLSL header of the ray tracing library with its members, one page each.
Frame rate counter
Quick start guide
Set up BorrowedTorch.FrameRateCounter in a game, show the frame rate and the worst frame on screen, and find your way around the frame rate counter pages.
Measuring frames
What a frame is to the counter, why it is called from Draw rather than Update, the clock it keeps, the uncapped frame rate, other game loops, starting over, threads and cost.
The readings
The averaging window and when it closes, the frame rate, the worst frame and the frame budget, showing the readings, per-frame mode, and the window's length.
Glossary
Every type of the frame rate counter library with its members, one page each.
Fabric simulation
Quick start guide
Set up BorrowedTorch.FabricSimulator and the build of its shaders, hang a first sheet of cloth in the wind and draw it, and find your way around the fabric simulation pages.
The sheet and the step
Building the sheet, what it reads when it is built, rebuilding by itself, its sizes as built, the fixed step and what one does, several sheets, and driving the solver without a Fabric.
Drawing the cloth
The vertex shader that reads the particles, what to bind every frame, the triangles, three rules a shader keeps, drawing between steps, texture coordinates, the particle record and the headers' version.
Placement and pins
Where the sheet hangs, in which plane and at what angle, the starting ripple, pin presets and pins of your own, pinning and letting go on the live sheet, long-range attachments, and moving pins.
Settings
The settings read every frame and the ones read at a build, rates stated per 1/120 s, the solver, bending and creases, mass and gravity, the sheet's own settings, what costs the most, and going back to the defaults.
Wind and air
The wind as the air's velocity, gusts computed every frame, wind that varies across the sheet as an HLSL function of position, drag, and aerodynamic pressure for sails and parachutes.
Collisions and rest
The sphere and the ground and their friction, self-collision and the cloth's thickness, the pairing of thickness and slack, the spatial hash behind it, and how settled cloth comes to rest and stays exactly still.
Cuts and tears
Cutting the live sheet along strokes on the flat cloth, what a cut does, single threads and mending, clean lips from the cut mesh and how to draw it, the awkward cases, and the damage as data.
Cutting what you see
Capturing a pose of the sheet to pick against, recording a knife's drag with a stroke, how a stroke joins and breaks, the layers under one ray, scissors through a pile, and surfaces across rebuilds.
Diagnostics
Reading the sheet back once for every check, how much of it rests and how much is held, how close it comes to outrunning its contacts, what self-collision lost, penetration and creases measured on the CPU, and checks of your own.
Tour of the solver
An illustrated walk through the solver's source, layer by layer, from the particle record and the step loop to the kernels, the cuts and the demo.
Glossary
Every type and HLSL file of the fabric simulation library with its members, one page each.
Capabilities
Quick start guide
Set up BorrowedTorch.Capabilities in a game, list the machine's video cards and displays, build a settings screen from them, and find your way around the capabilities pages.
Video cards
The video cards as DirectX knows them, their order, the software renderer, what a card is and how much memory it has, the card a game draws with, and the vendors.
Picking the video card
Windows' graphics preference, which card each one reaches, reading and setting it for a game, starting the game again on the new card, the dotnet host, and where Windows keeps it.
Displays
The displays on the desktop and their order, telling them apart, their names, the desktop's coordinates, DPI and scale, the refresh rate, how a display is turned and the card it is on.
Resolutions and modes
Every mode a display supports, its resolutions and their refresh rates, and a window, a borderless window or full screen at the player's choice.
Glossary
Every type of the capabilities library with its members, one page each.
Systems
Tools
ORMH Converter
Pack the ambient occlusion, roughness, metallic and height maps of a PBR material into one ORMH texture, or an albedo with its opacity, in a window or from the command line.
Localization Helper
Keep a game's translations in order - its languages, the folders and files the texts are split into, the string IDs and every text - as plain JSON files the game reads without the app.