Builtin Library
README.md
ecs.LiftSurface
Spec for ecs.LiftSurface, which maps to the native LiftSurface: a flat surface on a rigid body (a wing, a spoiler, a sail, a rudder, a keel) that the flow over it lifts and drags inside every physics step. The LiftSurface component drives it; this is the typed value the generic ecs verbs build and read.
Fields
name: string?: theLiftSurfacecomponent instance's name on its entity,""for the unnamed one. A named one sits on an internal entity under that entity, at its origin.area: number?: its area, square metres.normal: { x, y, z }?: the side it lifts toward at a positive angle of attack, in the entity's own frame.forward: { x, y, z }?: the way its leading edge faces, in the entity's own frame.liftSlope: number?: lift per radian of angle of attack below the stall.stallAngle: number?: the angle of attack, degrees, past which it stalls.dragMin: number?/dragMax: number?: the drag coefficient meeting the flow edge-on and face-on.curve: { number }?: lift and drag by angle,angle (degrees), lift, dragone after another in order of angle; empty uses the slope and stall.deflection: number?: degrees added to the angle of attack.deflectionValue: string?: a named value whose number adds degrees todeflection.enabled: boolean?: whether it acts.
Usage
ecs.insertSync(id, ecs.LiftSurface{ area = 2, normal = { x = 0, y = -1, z = 0 } })
ecs.set(id, ecs.LiftSurface{ deflection = 12 })