Host typegenerated
Camera
The game's camera: projection sizing, 3D orbit with obstruction pull-in, and engine-owned 2D follow, confinement and shake.
21 members · engine 0.1.0
Camera.add_trauma(amount: number) -> unitAdds impact trauma to the authored behavior camera. Bigger amounts shake harder, up to 1, and the authored shake fades by itself.Camera.bounds(min_x: number, min_y: number, max_x: number, max_y: number) -> unitConfines the authored behavior camera to the given world-space rectangle.Camera.clear_bounds() -> unitRemoves runtime confinement from the authored behavior camera.Camera.clear_follow() -> unitStops the authored behavior camera following a target.Camera.clear_orbit(camera: Entity) -> unitRemoves an explicit camera's orbit while keeping its last pose. Any existing 2D camera behavior resumes.Camera.dead_zone(x: number, y: number) -> unitSets the follow dead-zone size for the authored behavior camera.Camera.follow(target: Entity) -> unitMakes the authored behavior camera follow an entity at runtime.Camera.follow_offset(x: number, y: number, z: number) -> unitSets the world-space offset from the follow target used by the authored behavior camera.Camera.impact(amount: number) -> unitShakes the authored behavior camera at least this hard, up to 1: a smaller impact while a bigger one is still shaking changes nothing, so many small hits in a frame do not add up to the biggest shake.Camera.max_speed(value: number) -> unitSets the maximum follow speed of the authored behavior camera.Camera.orbit(camera: Entity, target: Entity, yaw: number, pitch: number, distance: number) -> unitCreates or retargets an explicit camera's engine-owned world-space orbit. Angles are radians; zero yaw is +Z behind the target, positive pitch is above it. Preserves offset, smoothing and collision settings. Target must be an active authored spatial entity, independent of the camera hierarchy.Camera.orbit_collision(camera: Entity, mask: number, padding: number) -> unitSets collider membership bits and world-unit pull-in padding below orbit distance. Mask must be a whole u32; zero disables queries. Sensors, the camera and target are excluded; a ray protects the sight line, not the near-plane volume.Camera.orbit_offset(camera: Entity, offset: Vec3) -> unitSets the orbit focus offset in world units from the target's world position.Camera.orbit_smoothing(camera: Entity, rate: number) -> unitSets exponential orbit position smoothing per second. Zero snaps. Obstruction pull-in remains immediate.Camera.orthographic_size(camera: Entity, size: number) -> unitSets an explicitly selected orthographic camera's view size to a positive finite number. Works without camera behavior and preserves clipping, fit and unknown camera fields.Camera.pan_x: numberHow far the camera view is moved sideways from where it was placed in the scene.Camera.pan_y: numberHow far the camera view is moved up or down from where it was placed in the scene.Camera.pan_z: numberHow far the camera view is moved forwards or backwards from where it was placed in the scene.Camera.perspective_fov(camera: Entity, degrees: number) -> unitSets an explicit perspective camera's vertical field of view in degrees, strictly between 0 and 180. Preserves clipping and unknown fields; requires no behavior component.Camera.shake(strength: number, frequency: number, decay: number) -> unitChanges the authored behavior camera's shake strength, frequency, and trauma decay.Camera.smoothing(value: number) -> unitSets how strongly the authored behavior camera smooths its follow movement.
- Source
- docs/generated/decay-api.json
- Schema
- v1
- Engine version
- 0.1.0
- Source commit
909aca81368b