pub struct CameraShot {
pub path: Vec<Mark>,
pub seconds: Option<u32>,
pub look_at: Option<Mark>,
pub shot_style: Option<ShotStyle>,
pub subject: Option<CameraSubject>,
pub subject_b: Option<CameraSubject>,
pub dist: Option<f64>,
pub degrees: Option<f64>,
pub bearing: Option<f64>,
}Expand description
One shot of a Verb::Cutscene (DSL v0.6): a camera dolly with its
own duration and optional subject. A cutscene plays its shots back-to-back —
a hard cut between them — inside a single gamemode/position save-restore
bracket, so a wide establishing move can be followed by an interior close-up
without the players ever leaving the cinematic.
Fields§
§path: Vec<Mark>Ordered camera waypoints (straight-line lerp between them). A one-waypoint
path is a static shot. Required without shot_style; with one, optional —
an explicit path always overrides the style’s expanded dolly.
seconds: Option<u32>This shot’s duration in seconds. Required without shot_style; with one,
optional — the style’s default duration applies (see
ShotStyle::default_seconds), and an explicit value always overrides.
look_at: Option<Mark>Optional subject the camera keeps framed for this shot. Absent = face
along the direction of travel (or, under a shot_style, the style’s own
aim at its subject). An explicit look_at always overrides a style’s
aim.
shot_style: Option<ShotStyle>Shot-style preset (DSL v0.6, spec-0015 shot-grammar library): the
compiler expands the style deterministically into a camera dolly +
per-keyframe aim from the subject’s resolved geometry. Requires
subject; path/look_at/seconds remain legal and always override
the corresponding expanded part (DW0348 polices the combinations).
subject: Option<CameraSubject>The styled shot’s subject — what the shot is about. Required with
shot_style, rejected without one (DW0348).
subject_b: Option<CameraSubject>two-shot only: the second framed subject (DW0348 elsewhere).
dist: Option<f64>Styled shots only: the style’s characteristic camera distance in blocks
(its start distance for the dolly styles). Default per style — see the
shot_style table in docs/reference/compiler.md. Clamped range 1..=48
(DW0348).
degrees: Option<f64>orbit-arc only: the sweep in degrees, 45..=120 (dossier range),
default 90 (DW0348 elsewhere or out of range).
bearing: Option<f64>Styled shots only: placement bearing in degrees — where the camera sits
(or starts) relative to the subject, measured like a Minecraft yaw
from the subject: 0 puts the camera south of the subject (+Z), 90
west (−X), -90 east (+X), 180 north (−Z). Default 0. For
side-track the bearing picks which side of the subject’s travel the
camera runs abeam (0 = right of travel, 180 = left).
Implementations§
Source§impl CameraShot
impl CameraShot
Sourcepub fn resolved_seconds(&self) -> u32
pub fn resolved_seconds(&self) -> u32
The shot’s resolved duration in seconds: explicit seconds, else the
style default, else 1 (a shape-invalid shot — DW0199 reports it; the
fallback only keeps downstream passes total).
Trait Implementations§
Source§impl Clone for CameraShot
impl Clone for CameraShot
Source§impl Debug for CameraShot
Debug is hand-written because it is a stable content-key rendering:
the compiler’s payload_verb_key (FNV over a verb’s own {:?}) names the
generated volley_, collapse_ and teleport_ functions from it, so a shot
that uses none of the v0.6 style fields must render byte-identically to the
pre-style struct (seconds prints its inner value; absent style fields print
nothing) — otherwise a purely additive schema change would silently churn the
content key of every payload that carries a cutscene.
impl Debug for CameraShot
Debug is hand-written because it is a stable content-key rendering:
the compiler’s payload_verb_key (FNV over a verb’s own {:?}) names the
generated volley_, collapse_ and teleport_ functions from it, so a shot
that uses none of the v0.6 style fields must render byte-identically to the
pre-style struct (seconds prints its inner value; absent style fields print
nothing) — otherwise a purely additive schema change would silently churn the
content key of every payload that carries a cutscene.
Source§impl<'de> Deserialize<'de> for CameraShot
impl<'de> Deserialize<'de> for CameraShot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for CameraShot
impl JsonSchema for CameraShot
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more