gizgame/attention
where a character looks, as people do. A person turns its head and eyes to what matters to it now, the strongest first: whom it talks with (a conversation, Game.utter), the eye that watches one who speaks alone, one who is struck or hurt near it (the orienting reflex: a sudden event draws the eyes at once), one who speaks within earshot, one who comes up to it within social distance (Hall: 3.6 m). The view turns the head that share of the way and the eyes the rest (Gltf.Plant look), easing to each new mark as a head does. One who listens nods at the pauses of the one who speaks.
import * as Attention from "gizgame/attention";Types
Attention
type Attention = { at: Point3; weight: f64; by?: Entity; glance?: Point3; }What a character attends to: the point AT it looks at (the world's), the share WEIGHT of the turn its head makes (the eyes make the rest), the one it looks at (BY: none for the eye that watches), and where its eyes are (GLANCE: at AT when none).
at:gizlang_geometry.Point3weight:f64by:_gizlang_sdk_core.Option<M212.Entity>glance:_gizlang_sdk_core.Option<gizlang_geometry.Point3>
Functions
eyesOf
function eyesOf(game: Game, e: Entity): Point3 throws stringWhere the eyes of actor E are: its place, raised by its figure's height to the eyes.
Effects: fail, read, write, console, io, alloc.
attention
function attention(game: Game, actor: Entity, watches: Point3): Attention | undefined throws stringWhat ACTOR attends to now, the strongest first; WATCHES is the eye that watches (the camera). None: it looks where its clip has it look.
Effects: fail, read, write, console, io, alloc.
Constants
TALL
const TALL = 1.8The height of a figure whose kind says none, in meters.