aeronautic

Core classes

AfterburnerBatch and AfterburnerNozzle, the plain three.js API.

The plain three.js classes the components wrap. See Without React for a walkthrough.

AfterburnerBatch

new AfterburnerBatch(options?: AfterburnerBatchOptions)

Options

optiontypewhat it is
presetAfterburnerPresetName | AfterburnerPresetWhich look nozzles start from, and the profile it brings.
profilePartial<AfterburnerProfile>Over the preset's.
qualityAfterburnerQualityInputWhat a frame may spend.
hazebooleanWhether to bend what is behind the plumes.
hooksAfterburnerHooksTSL to change the plume.
capacitynumberHow many nozzles to make room for up front. It grows past this.
responseSnumberSeconds a plume takes to follow its throttle. Default 0.25; 0 is at once.
backdropAfterburnerBackdropFrom afterburner_pass. Fixed for the batch's life.

Members

memberwhat it does
meshThe one instanced mesh. Add it to your scene.
add(options?)Add a nozzle. Returns an AfterburnerNozzle.
remove(nozzle)Take a nozzle out.
nozzlesEvery nozzle, read-only.
profileThe resolved profile, read-only.
setProfile(partial?)Replace the profile, over the batch's preset.
updateProfile(partial)Merge into the current profile. Uniforms only: cheap every frame.
qualityThe resolved quality, read-only.
setQuality(input?)Change it. Only an octave change recompiles.
setHaze(boolean)Turn the haze on or off. Recompiles.
setHooks(hooks?)Change the hooks. Recompiles.
timeScaleSeconds of flame per second.
responseSSeconds a plume takes to follow its throttle. Default 0.25.
detailDistanceMPast this, eddies are dropped. Default 900.
cheapDistanceMPast this, one sample. Default 3000.
minScreenFractionSmaller plumes are culled. Default 0.001.
uniformsThe material's uniforms, for sharing with a material of your own.
presetThe preset it was made with.
stats(){ nozzles, near, mid, far, culled }, as of the last frame.
dispose()Free the geometry and materials.

The batch updates in its mesh's onBeforeRender, once a frame however many cameras draw it.

AfterburnerNozzle

Made by batch.add(options).

Options

optiontypewhat it is
objectObject3DFollow this object's world matrix: any mesh, group or bone.
matrixMatrix4Or a world matrix, for a nozzle with no object.
offsetAfterburnerOffsetWhere on the object (or the matrix) it sits.
paramsAfterburnerParamsInputThe engine.
presetAfterburnerPresetName | AfterburnerPresetWhich look to start from. Defaults to the batch's.
throttlenumber0 to 1 dry, to 1.1 with reheat.

Members

memberwhat it does
throttleRead or write. The plume eases toward it over responseS.
drawnThrottleThe throttle it is drawn at right now, read-only.
paramsThe resolved params, read-only.
setParams(params?, preset?)Replace the params.
updateParams(partial)Merge into them.
objectWhat it follows, or null.
matrixThe world matrix used when there's no object.
position, quaternionThe offset in the followed frame. Write them, or use setOffset.
attach(object, offset?)Follow another object. attach(null) holds the current world pose.
setOffset(offset)Change the offset. Fields left out are kept.
setDirection([x, y, z])Point the exhaust.
worldMatrix(target?)Where it is drawn, offset included.
remove()Take it out of its batch.

AfterburnerOffset

type AfterburnerOffset = {
  position?: { x; y; z } | [x, y, z];
  rotation?: Euler | Quaternion | [x, y, z] | [x, y, z, w];
  direction?: { x; y; z } | [x, y, z]; // wins over rotation
};

On this page