Documentation
¶
Overview ¶
Package scene defines the portable, executable-code-free On Air document v1.
Index ¶
- func Ease(name string, u, energy float64) float64
- func Eval(v Value, b Bindings, t float64) any
- func HasLiveSlots(d Document) bool
- func IsLiveSlotKey(k string) bool
- func Number(v any, fallback float64) float64
- func RewriteLineupHeading(d *Document, heading string)
- func SplitSlotLayers(d Document) (base Document, overlay Document, splittable bool)
- type Audio
- type Behavior
- type Bindings
- type Cost
- type Document
- type Effect
- type Layer
- type Params
- type Reveal
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasLiveSlots ¶
HasLiveSlots reports whether d's layer tree references any live programme, lineup, or viewer slot (or a daytime-adaptable tonight heading).
func IsLiveSlotKey ¶
IsLiveSlotKey reports whether a scene binding key carries dynamic programme, lineup, schedule, or viewer state that must never be baked into per-title cached masters on disk.
func RewriteLineupHeading ¶
RewriteLineupHeading updates the baked "TONIGHT" / "{words.tonight}" heading on lineup overlays so daytime airings read "COMING UP" while reusing the look's single cached base master.
func SplitSlotLayers ¶
SplitSlotLayers separates a live-slot scene into a slot-free animated base document (cached once per look) and a live foreground overlay document (composited in real time at air time). If animated procedural layers or non-normal blend modes sit above a slot layer, splittable is false and the caller renders the full scene live each airing with no disk save.
Types ¶
type Behavior ¶
type Behavior struct {
Typewriter *Params `json:"typewriter,omitempty"`
Flicker *Params `json:"flicker,omitempty"`
Wiggle *Params `json:"wiggle,omitempty"`
Bounce *Params `json:"bounce,omitempty"`
Glint *Params `json:"glint,omitempty"`
Chroma *Params `json:"chroma,omitempty"`
Drift *Params `json:"drift,omitempty"`
Pop *Params `json:"pop,omitempty"`
Squash *Params `json:"squash,omitempty"`
}
type Bindings ¶
type Document ¶
type Document struct {
Audio *Audio `json:"audio,omitempty"`
V int `json:"v"`
Moment string `json:"moment"`
Duration float64 `json:"duration"`
Poster float64 `json:"poster"`
Slots []string `json:"slots,omitempty"`
Layers []Layer `json:"layers"`
Post []Effect `json:"post,omitempty"`
}
func StandbyBase ¶
StandbyBase derives a clean, text-free animated loop document from a look's break or ident scene so holding on a warming segment never shows a still.
func (Document) StaticForeground ¶
StaticForeground separates a full-frame analogue background from its prepared foreground. Such scenes air over a live Signal engine instead of a clip loop.
type Layer ¶
type Layer struct {
Name string `json:"name,omitempty"`
Hidden bool `json:"hidden,omitempty"`
Locked bool `json:"locked,omitempty"`
Start float64 `json:"start,omitempty"`
End float64 `json:"end,omitempty"`
ID string `json:"id"`
Type string `json:"type"`
X Value `json:"x,omitempty"`
Y Value `json:"y,omitempty"`
W Value `json:"w,omitempty"`
H Value `json:"h,omitempty"`
Scale Value `json:"scale,omitempty"`
ScaleX Value `json:"scaleX,omitempty"`
ScaleY Value `json:"scaleY,omitempty"`
Rotate Value `json:"rotate,omitempty"`
Opacity Value `json:"opacity,omitempty"`
Fill Value `json:"fill,omitempty"`
Stroke Value `json:"stroke,omitempty"`
StrokeWidth Value `json:"strokeWidth,omitempty"`
Join string `json:"join,omitempty"`
Cap string `json:"cap,omitempty"`
FillRule string `json:"fillRule,omitempty"`
Path string `json:"path,omitempty"`
Clip string `json:"clip,omitempty"`
Text Value `json:"text,omitempty"`
Font Value `json:"font,omitempty"`
Size Value `json:"size,omitempty"`
Weight int `json:"weight,omitempty"`
Track Value `json:"track,omitempty"`
Align string `json:"align,omitempty"`
MaxWidth float64 `json:"maxWidth,omitempty"`
Fit string `json:"fit,omitempty"`
MaxLines int `json:"maxLines,omitempty"`
Src Value `json:"src,omitempty"`
Tint Value `json:"tint,omitempty"`
TintBlend string `json:"tintBlend,omitempty"`
Blend string `json:"blend,omitempty"`
Blur float64 `json:"blur,omitempty"`
Glow float64 `json:"glow,omitempty"`
Count int `json:"count,omitempty"`
Seed uint32 `json:"seed,omitempty"`
Repeat int `json:"repeat,omitempty"`
Behave []Behavior `json:"behave,omitempty"`
Reveal *Reveal `json:"reveal,omitempty"`
Layers []Layer `json:"layers,omitempty"`
}