aeronautic

Passes and helpers

afterburner_pass, presets, the atmosphere, propellants and the jet on the CPU.

afterburner_pass and the presets come from the package root, @aeronautic/afterburner. The air, the propellants and the jet come from @aeronautic/afterburner/physics.

afterburner_pass(scene, camera, options?)

Draws the plumes in a pass of their own, at a share of the frame, and composites them depth-aware. See Half resolution.

optiondefaultwhat it is
resolutionScale0.5The plumes' resolution against the frame's.

It returns an AfterburnerPass: { output, scene, backdrop, scenePass, plumePass }.

Presets

exportwhat it is
AFTERBURNER_PRESETSEvery built-in preset, { params, profile, propellant? }.
AFTERBURNER_QUALITYThe quality presets.
get_afterburner_preset(preset?)A name or object to its preset. None: afterburner_turbulent.
resolve_afterburner_params(input?, preset?)Complete params over a preset and the defaults.
resolve_afterburner_profile(input?, preset?)Complete profile likewise.
resolve_afterburner_quality(input?)Complete quality.
default_afterburner_params()Fresh defaults. Safe to mutate.
default_afterburner_profile()Fresh defaults.
default_afterburner_quality()Fresh defaults.

The air

The engines fly through @aeronautic/core's standard_atmosphere, as the wing vapor does, so both see the same day. Import it from @aeronautic/core.

| export | what it is | | atmosphere(profile) | AirState: { temperatureK, pressure, density, soundMPerS, ram }, the day and the ram of flight included. |

Propellants

exportwhat it is
equivalence_ratio(propellant)Fuel over oxidiser against stoichiometric. Above one is rich.
propellant_effects(propellant)The soot, soot survival and afterburning the mix makes.
propellant_params(propellant, reference?)The params it sets, scaled from a reference engine if given.

Propellant is { fuel: "kerosene" | "methane" | "hydrogen", mixtureRatio }.

The jet on the CPU

The same physics the shader runs, for gameplay and UI:

exportwhat it is
jet_state(params, throttle, profile, scale?)JetState: the expanded jet, core length, spreads, shock spacing, reach, soot formed…
burner_lit(throttle, profile)How much reheat is lit, 0 to 1: none up to the threshold, then PLUME_MIN_REHEAT on.
PLUME_LIGHT_OFF, PLUME_MIN_REHEATThe first zone fades in over 0.03 of throttle, to 0.35 of full reheat.
PLUME_IDLE_GLOWHow much of the dry turbine glow is left at idle, against military power: 0.3.
clamp_throttle(throttle), AFTERBURNER_MAX_THROTTLEHolds a throttle inside its travel, 0 to 1.1. Anything not a number reads as idle.
dry_temperature(params, setting, profile, ambient_k)The exit temperature on dry thrust, idle to military power, in kelvin.
plume_adaptation(metered_k, full_k, adaptation)The gain the camera opens up by for a plume dimmer than at full power.
jet_half_width(x_m, state), jet_centreline(x_m, state)The width and centreline excess at a station.
plume_extent(params)How far out the field reaches, in half-widths.
nozzle_outline_fit(aspect, squareness){ areaScale, reach }: a shaped exit against the round one of its area.
clamp_nozzle_squareness, NOZZLE_SQUARENESS_MIN/_MAXThe squareness range the shader draws, 0.5 to 24.
plume_lod, plume_screen_span, PLUME_LOD_*The tier choice, as the vertex shader makes it.
build_plume_hull(sides)The proxy hull geometry.

Light

exportwhat it is
blackbody_rgb(kelvin)Linear RGB of a blackbody, normalised.
blackbody_luminance(kelvin)Its luminance against the reference temperature's.
get_blackbody_lut()The lookup texture the shader samples.
REFERENCE_TEMPERATURE_K, BLACKBODY_MIN_K, BLACKBODY_MAX_KThe constants behind it.

Material

exportwhat it is
create_afterburner_materialThe material a batch draws with, for a mesh of your own.
AFTERBURNER_ATTRIBUTESThe instance attribute names it reads.
AfterburnerOutlineThe outline hook: { radius, reach }.

A custom geometry writes the shape attributes too: afterburner_outline is aspect, squareness, roll and outline length, and afterburner_outline_fit is nozzle_outline_fit's areaScale and reach. See Shaped nozzles.

The rest of the shader is in @aeronautic/afterburner/tsl: see Shader hooks and TSL.

On this page