The Panel Core types#

The types a compile returns, read off result.core and book.pages. They are not in scenet.__all__: import one from scenet.core to annotate with it. What each field means is in the Panel Core reference.

Blob#

Import

from scenet.core import Blob

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.Blob[source]#

Bases: CoreModel

A rounded mass – a head, a hand – drawn as a filled circle.

centre#

(x, y) of the centre.

Type:

tuple[float, float]

radius#

Radius in panel units.

Type:

float

Box#

Import

from scenet.core import Box

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.Box[source]#

Bases: CoreModel

A rectangle, as stored in a Core document.

The serialisable twin of BBox. The geometry code works in BBox; this is what gets written to JSON, with every value already rounded so the file is byte-identical across platforms.

x#

Left edge.

Type:

float

y#

Top edge.

Type:

float

width#

Extent rightward.

Type:

float

height#

Extent downward.

Type:

float

property right: float#

The right edge, x + width.

property bottom: float#

The bottom edge, y + height.

classmethod of(bbox)[source]#

Build a Box from a geometry BBox, rounding for emission.

Parameters:

bbox (BBox) – The box to convert.

Return type:

Self

Returns:

The serialisable equivalent, with all four values rounded.

as_bbox()[source]#

Convert back to a geometry BBox for further computation.

Return type:

BBox

Capsule#

Import

from scenet.core import Capsule

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.Capsule[source]#

Bases: CoreModel

A limb segment, as a thick line with rounded ends.

start: tuple[float, float]#

One end’s centre, in panel units.

end: tuple[float, float]#

The other end’s centre, in panel units.

width: float#

How thick it is, in panel units.

CoreActor#

Import

from scenet.core import CoreActor

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreActor[source]#

Bases: CoreModel

One character, fully resolved: placed, posed, scaled and measured.

This is the geometric contract in its final form. Everything the emitter needs to draw the figure, and everything the balloon placer needed to avoid it, with no reference to artwork of any kind.

id#

The actor id from the panel source.

Type:

str

reference#

Which puppet was used, as the cast names it: a shipped puppet’s name, or a puppet file’s path relative to the document, exactly as written. Two actors may share one.

Type:

str

pose#

Which named pose was applied.

Type:

str

expression#

Which named expression was applied.

Type:

str

transform#

Where the root joint landed, and the scale and mirroring applied.

Type:

Transform

anchors#

Named attachment points – mouth, eyes, and whatever else the puppet declared – already in panel coordinates.

Type:

dict[str, tuple[float, float]]

face_exclusion#

The disc no balloon may overlap.

Type:

Disc

gaze#

Unit direction the character is facing, (dx, dy). Derived from the head’s rotation, and what balloon placement reads to keep out of a line of sight.

Type:

tuple[float, float]

gaze_aim#

Unit direction from the eyes to whoever this character is looking_at, or None when they are looking at nobody. Separate from gaze because it is known only after every actor has been placed, and because balloon placement must go on reading the same vector it always has. This is what aims the pupils.

Type:

tuple[float, float] | None

face_marks#

The drawn face – brows, eyes, pupils, nose, mouth – as resolved numeric primitives. Empty when the puppet declares no features, or when the figure is too small for features to read as anything but a smudge.

Type:

tuple[FaceStroke | FaceDisc | FaceStroke | FaceDisc, ...]

marks#

Which emanata were asked for – plewds, grawlixes, and so on.

Type:

tuple[Mark, ...]

emanata#

The marks drawn around the character, as the same strokes and discs a face is made of. Empty when there are no marks, or when the figure is too small to have a face. Ids are numbered per mark: plewd_0, plewd_1, …

Type:

tuple[FaceStroke | FaceDisc | FaceStroke | FaceDisc, ...]

emanata_zones#

One polygon per mark, enclosing what it draws. Balloons and captions pay to cover these and are never forbidden to. Kept apart from hull on purpose: the hull is what staging spaces characters by, and a character who starts sweating must not move.

Type:

tuple[tuple[tuple[float, float], ...], ...]

hull#

Convex silhouette, used for the soft occlusion cost.

Type:

tuple[tuple[float, float], ...]

capsules#

Limb segments, as thick rounded lines.

Type:

tuple[Capsule, ...]

blobs#

Rounded masses such as the head.

Type:

tuple[Blob, ...]

depth#

Painter’s order. Lower is drawn first, so higher sits in front.

Type:

int

joints#

Where every joint of the skeleton landed, by the puppet’s name for it, in panel coordinates. _l and _r are the sides of the screen in the puppet’s rest pose, so on a figure facing left shoulder_l is on the right. Nothing here draws from them; they are the posed skeleton, for an export.

Type:

dict[str, tuple[float, float]]

features#

Where each face feature point sits – eye_l, nose, mouth and the rest the puppet declares – in panel coordinates. The anatomy, not the marks: the same whatever the expression, and recorded when the face is too small to draw.

Type:

dict[str, tuple[float, float]]

looking_at#

Whom this character looks at: an actor id, or the name of somebody heard from off panel. gaze_aim is the direction; this is who.

Type:

str | None

The last three are left out of the JSON when empty, so an actor written before them reads and writes as it did.

property bounds: BBox#

Axis-aligned bounds of the silhouette.

CoreAtmosphere#

Import

from scenet.core import CoreAtmosphere

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreAtmosphere[source]#

Bases: CoreModel

What the air is doing, resolved.

time#

When the panel happens. Recorded rather than re-derived, for the same reason CoreCaption.italic is: the emitter must not be able to draw something the solver did not resolve.

Type:

TimeOfDay

weather#

What is falling, if anything.

Type:

Weather

tone#

The atmosphere’s own value at this hour.

Type:

str

veil#

The noise layer – fog, or cloud for rain and snow.

Type:

CoreVeil | None

streaks#

Rain, every streak at the same angle.

Type:

tuple[CoreStreak, ...]

flecks#

Snow.

Type:

tuple[Disc, ...]

streak_width#

Stroke width for a streak, in panel units.

Type:

float

fall_tone#

What rain and snow are drawn in – ink over a bright sky, paper over a dark one. Resolved rather than left to the emitter, because which one reads is a fact about this panel.

Type:

str

colour#

The atmosphere’s tone in the panel’s palette. Left out of the JSON when there is none.

Type:

str

fall_colour#

What rain is drawn in, in the panel’s palette. Decided on the grey, like fall_tone; snow has none, being white by convention. Left out of the JSON when there is none.

Type:

str

CoreBackdrop#

Import

from scenet.core import CoreBackdrop

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreBackdrop[source]#

Bases: CoreModel

Where the panel is, resolved: masses, tones, the air, or a supplied picture.

horizon#

Where the ground meets what is behind it, in panel units. Left out over a supplied picture, whose horizon the compiler does not know.

Type:

float | None

seed#

What every silhouette in here was generated from. Kept so that a Core document explains itself: two panels with the same masses and different skylines differ here, and here is where to look.

Type:

int

masses#

The tonal masses, back to front.

Type:

tuple[CoreMass, ...]

atmosphere#

The air, or None when the weather is clear.

Type:

CoreAtmosphere | None

image#

The supplied picture behind everything, or None. Left out of the JSON when unset.

Type:

CoreImage | None

place#

The named place these masses are – street, docks – whether place: wrote them or an author wrote the same list out. None for masses no place expands into, and over a picture. A name for what is here, never read to draw it. Left out of the JSON when None.

Type:

Place | None

time#

The hour the values were chosen for, which atmosphere records too but only when something is in the air. None over a picture, whose hour is in the picture. Left out of the JSON when None.

Type:

TimeOfDay | None

Optional on PanelCore, so every document written before this existed is still a valid one – which is why adding it did not need a format_version bump, the same argument captions made. image and a missing horizon are additions of the same kind: a backdrop of masses reads and writes byte for byte as it did.

CoreBalloon#

Import

from scenet.core import CoreBalloon

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreBalloon[source]#

Bases: CoreModel

One balloon, placed and with its lettering already broken into lines.

id#

Stable identifier, b0, b1, … in script order.

Type:

str

speaker#

Actor id of whoever is talking – or, when off_panel is set, the name of somebody off panel, who is not an actor.

Type:

str

order#

Position in reading order, counting from zero.

Type:

int

kind#

Which sort of balloon to draw.

Type:

BalloonKind

box#

Where it sits.

Type:

Box

lines#

The resolved line breaking, not the source string.

Type:

tuple[str, ...]

font_size#

Type size in panel units.

Type:

float

line_height#

Baseline-to-baseline distance in panel units.

Type:

float

tail#

The pointer to the speaker’s mouth.

Type:

Tail

runs#

For a line with emphasis, the line cut wherever its face changes, so each run is drawn in the face it was measured in. Empty when no line has any – and then left out of the JSON, so a balloon without emphasis reads and writes exactly as it did before emphasis existed. lines stays the plain text.

Type:

tuple[tuple[CoreRun, ...], ...]

label#

Who says it, how, and the words – Bob, whispering: I know. – as accessible output reads it. Left out of the JSON when unset.

Type:

str | None

off_panel#

The side of the frame an off-panel speaker is on, which the tail ends on; then speaker names somebody who is not an actor. Left out of the JSON when unset, so every Core written before it reads, and is written, as it was.

Type:

Side | None

Storing broken lines rather than the original string is deliberate. Wrapping is decided during compilation against real font metrics; if the emitter re-measured, it could disagree with the solver about how wide the balloon needed to be, and the text would overflow the shape drawn for it.

CoreCamera#

Import

from scenet.core import CoreCamera

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreCamera[source]#

Bases: CoreModel

The camera’s verdict for a panel, recorded.

Every position in a Core already follows from it, so nothing here is read to draw the panel; it says what framed it. The shot asked for and the angle are what a reader of the panel would name; the numbers are what the solver made of them.

shot#

The shot asked for – the tightest the camera would go.

Type:

ShotType

angle#

The camera’s height, which changed the headroom and nothing else.

Type:

CameraAngle

reference#

The puppet the shot was composed on, as the cast names it: the reference of the member written first.

Type:

str

scale#

The one scale every actor is drawn at.

Type:

float

headroom#

The air above the reference actor’s head, as a fraction of the panel’s height.

Type:

float

footroom#

The room below the crop line, as a fraction of the panel’s height.

Type:

float

pullback#

How far the camera retreated to fit the cast across the panel: 1.0 for the shot as asked, less when it was loosened.

Type:

float

CoreCaption#

Import

from scenet.core import CoreCaption

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreCaption[source]#

Bases: CoreModel

One caption box, placed and with its lettering already broken into lines.

id#

Stable identifier, c0, c1, … in the order the captions appear.

Type:

str

order#

Position in the panel’s reading order. Captions and balloons share one sequence, so a caption written between two lines of dialogue takes the number between theirs.

Type:

int

kind#

What the box is doing, which is what decides how it is set.

Type:

CaptionKind

box#

Where it sits.

Type:

Box

lines#

The resolved line breaking, quotation marks included. A spoken caption’s quotes are part of the text by the time it reaches here, because marks added after measurement would not fit the box drawn for them.

Type:

tuple[str, ...]

font_size#

Type size in panel units.

Type:

float

line_height#

Baseline-to-baseline distance in panel units.

Type:

float

italic#

Whether the lettering is set in the italic face. Recorded rather than re-derived from kind so the emitter cannot draw the box in a face the solver did not measure it in.

Type:

bool

fill#

The value the box is filled with, resolved from the declared tone.

Type:

str

ink#

The value the lettering is drawn in. Chosen against fill by contrast, so a dark box is lettered in paper – reversed type. Resolved rather than left to the emitter for the same reason italic is, and the same reason CoreAtmosphere.fall_tone is: which mark reads is a fact about the panel.

Type:

str

speaker#

Who is talking, for a spoken caption. Not an actor id: the speaker is off panel, so this resolves to nobody in actors.

Type:

str | None

runs#

For a line with emphasis, the line cut wherever its face changes, exactly as on CoreBalloon. Left out of the JSON when empty.

Type:

tuple[tuple[CoreRun, ...], ...]

label#

What the box says, and in whose voice – Caption: Midnight. – without the quotation marks a spoken caption is lettered with. Left out of the JSON when unset.

Type:

str | None

colour#

The fill’s twin in the panel’s palette: a warm caption’s yellow, drawn in place of fill when there is one. fill stays the value, and ink was chosen against it. Left out of the JSON when there is none.

Type:

str

There is no tail. That is the difference that makes this its own type rather than a fifth BalloonKind.

fill and ink are defaulted to the white and the near-black every caption has had since captions shipped, so a Core document written before tones existed is still a valid one – which is why adding them needed no format_version bump.

CoreFigure#

Import

from scenet.core import CoreFigure

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreFigure[source]#

Bases: CoreModel

A figure a supplied picture draws, as its artwork contract declares it.

Not a CoreActor: nobody posed it, so it has no transform, no skeleton and nothing to draw – the picture draws it. What is here is what lettering worked around, in panel units, mapped from the picture’s pixels through the same fit as the picture’s box.

figure#

Its name in the contract.

Type:

str

actor#

The cast member it plays, or None for a figure nobody cast – whose face lettering kept clear of just the same. Left out of the JSON when None.

Type:

str | None

face_exclusion#

The disc no balloon, caption or sound effect may overlap.

Type:

Disc

mouth#

Where a tail it speaks aims, if the contract declares one; otherwise the face’s centre. Left out of the JSON when None.

Type:

tuple[float, float] | None

body#

Its silhouette, which lettering paid to cover. Left out of the JSON when the contract declares none.

Type:

tuple[tuple[float, float], ...]

CoreFont#

Import

from scenet.core import CoreFont

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreFont[source]#

Bases: CoreModel

A font file the lettering was measured in, named by what is in it.

family#

Its family name, from the font’s own name table.

Type:

str

style#

Its style within the family.

Type:

str

sha256#

The digest of the file’s bytes. A renderer is handed fonts by this, and refuses to draw a panel whose fonts it was not handed: lettering drawn in a face it was not measured in would not fit the balloons drawn for it.

Type:

str

Never a path. Where the file was is a fact about one machine, and a Core is the same wherever it was compiled.

CoreFrame#

Import

from scenet.core import CoreFrame

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreFrame[source]#

Bases: CoreModel

Where one panel sits on a page.

panel#

The panel’s name, as panels: gives it. Its own Panel Core is a separate document, compiled at exactly this width and height.

Type:

str

x#

Left edge, in page units.

Type:

float

y#

Top edge, in page units.

Type:

float

width#

Frame width, which is the panel’s width.

Type:

float

height#

Frame height, which is the panel’s height.

Type:

float

inset_of#

For an inset, the panel it is set into. Left out of the JSON otherwise.

Type:

str | None

clearance#

For an inset, the area it covers with its ring of white, in page units: painted white under it, and kept clear by its parent’s lettering. Left out of the JSON otherwise.

Type:

Box | None

outline#

For a panel in a slanted tier, its four corners in page units, clockwise from the top left; the frame is their bounding box. Left out of the JSON for a rectangle.

Type:

tuple[tuple[float, float], ...] | None

bleed#

The sides the frame runs out to the bleed line on, past the trim: its frame is then that larger box, partly off the page. Left out of the JSON when empty.

Type:

tuple[Side, ...]

CoreGlyph#

Import

from scenet.core import CoreGlyph

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreGlyph[source]#

Bases: CoreModel

One letter of a sound effect, where it is drawn.

char#

The letter. Its outline comes from the display face the Core names.

Type:

str

origin#

Where its baseline starts, in panel units.

Type:

tuple[float, float]

angle#

Its rotation about origin, in degrees clockwise.

Type:

float

CoreImage#

Import

from scenet.core import CoreImage

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreImage[source]#

Bases: CoreModel

A supplied picture behind the cast, placed.

Everything a renderer needs, resolved: where the picture is, what it is, and the rectangle it is drawn in. Nothing about its content – the solver never saw any.

href#

The path exactly as the document wrote it, relative to the document. A linked SVG points at the picture by it; nothing else about where the file was reaches the output.

Type:

str

media_type#

image/png or image/jpeg, from the file’s own bytes – what a data: URI of it is labelled.

Type:

Literal['image/png', 'image/jpeg']

sha256#

The digest of its bytes, which is what it is known by: an embedding renderer is handed bytes by digest, and refuses a Core naming bytes it was not given, as it refuses a font.

Type:

str

pixels#

Its size, (width, height), read from its header.

Type:

tuple[int, int]

fit#

How it fills the panel.

Type:

Fit

preserve_aspect_ratio#

The same fit in SVG’s words, xMidYMid slice for cover and xMidYMid meet for contain. Recorded rather than derived, as CoreCaption.italic is: the emitter copies it. box already has the picture’s proportions, so a renderer that reads them as the compiler did draws the same either way; this says what to do to one that does not.

Type:

Literal['xMidYMid slice', 'xMidYMid meet']

box#

Where the picture is drawn, in panel units: centred, larger than the panel under cover and cropped by it, inside it under contain. Change it and the picture moves.

Type:

Box

keep_out#

The regions of the picture its artwork contract asks lettering to stay off, in panel units: what balloons, captions and sound effects paid to cover, and were never forbidden to. Left out of the JSON when there are none.

Type:

tuple[tuple[tuple[float, float], ...], ...]

CoreMass#

Import

from scenet.core import CoreMass

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreMass[source]#

Bases: CoreModel

One tonal mass of the backdrop, resolved to a numeric polygon.

The same discipline as capsules, blobs and face_marks: everything the emitter needs is a number by the time it gets here, so drawing a backdrop involves no layout decision at all.

id#

Stable identifier, m0, m1, … back to front.

Type:

str

kind#

What the mass is made of. Carried so a Core document stays readable – it is not consulted when drawing, since the tone is already resolved. The depth export reads it: the sky is at infinity, and a ground, floor, water or ceiling recedes.

Type:

MassKind

plane#

How far back it sits.

Type:

Plane

depth#

Painter’s order, shared with the actors. Backdrop planes are negative; a foreground mass sits above the frontmost actor.

Type:

int

tone#

The #rrggbb fill, already chosen from the value ladder. Always the grey, whatever the palette: it is the value, and every decision was made on it.

Type:

str

polygon#

The silhouette, in panel coordinates.

Type:

tuple[tuple[float, float], ...]

colour#

The tone’s twin in the panel’s palette, which is what is drawn when there is one. Left out of the JSON in mono.

Type:

str

CoreRun#

Import

from scenet.core import CoreRun

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreRun[source]#

Bases: CoreModel

A stretch of one line set in one face.

text#

The characters.

Type:

str

face#

The face they are measured and drawn in.

Type:

Face

CoreSfx#

Import

from scenet.core import CoreSfx

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreSfx[source]#

Bases: CoreModel

One sound effect, placed, with every letter resolved.

id#

s0, s1, … in script order.

Type:

str

order#

Its number in the panel’s one reading order, which it shares with balloons and captions. It is exempt from the geometric reading-order rule: a sound sits where the sound is.

Type:

int

text#

The sound, as written – what a reader of the text is given.

Type:

str

source#

The actor it comes from, if it names one.

Type:

str | None

font_size#

Its type size in panel units, in the display face.

Type:

float

glyphs#

Every letter: where it starts, and how far it is turned. The arc and the rotation are already in these numbers, so the emitter decides nothing.

Type:

tuple[CoreGlyph, ...]

zone#

What the letters cover, outline included: the polygon balloons and captions paid to avoid, and which no face was allowed inside.

Type:

tuple[tuple[float, float], ...]

fill#

What the letters are filled with – ink, or none for a hollow effect.

Type:

str

stroke#

What they are outlined in – a paper halo, or ink for a hollow effect.

Type:

str

stroke_width#

The outline’s width, in panel units.

Type:

float

hollow#

Whether it is an open effect: all outline, so the art shows through.

Type:

bool

label#

The sound as it is read – Sound effect, from Bob: BLAM. Left out of the JSON when unset.

Type:

str | None

CoreStreak#

Import

from scenet.core import CoreStreak

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreStreak[source]#

Bases: CoreModel

One streak of falling rain.

The width is on CoreAtmosphere rather than here: every streak in a panel shares it, and repeating it per streak would make the file longer without making it say anything more.

start: tuple[float, float]#

Where the streak starts, in panel units.

end: tuple[float, float]#

Where it ends, in panel units.

CoreVeil#

Import

from scenet.core import CoreVeil

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.CoreVeil[source]#

Bases: CoreModel

The atmospheric noise layer, as parameters rather than as pixels.

SVG has Perlin noise built in through feTurbulence, and the specification includes reference code, so a fixed seed is reproducible by definition: the emitted text is byte-identical. Browsers agree only approximately on what to paint from it, which is fine and is exactly why the determinism contract is on the SVG text and has never been on pixels.

tone#

The #rrggbb the veil is tinted.

Type:

str

opacity#

How much of it lands, 0 .. 1.

Type:

float

frequency#

baseFrequency, per panel unit.

Type:

float

octaves#

numOctaves.

Type:

int

seed#

seed, derived from the declared content and the panel size.

Type:

int

colour#

The tone’s twin in the panel’s palette, tinting the veil when there is one. Left out of the JSON in mono.

Type:

str

Disc#

Import

from scenet.core import Disc

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.Disc[source]#

Bases: CoreModel

A circle, as stored in a Core document.

Usually a face exclusion zone – the region no balloon may cover. Also a fleck of falling snow, which is the same shape and wants the same rounding.

cx#

Centre x.

Type:

float

cy#

Centre y.

Type:

float

r#

Radius.

Type:

float

classmethod of(circle)[source]#

Build a Disc from a geometry Circle, rounding for emission.

Parameters:

circle (Circle) – The circle to convert.

Return type:

Self

Returns:

The serialisable equivalent.

as_circle()[source]#

Convert back to a geometry Circle for further computation.

Return type:

Circle

FaceDisc#

Import

from scenet.core import FaceDisc

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.FaceDisc[source]#

Bases: CoreModel

A round mark on a face – an eye, or the pupil inside it.

mark#

Always disc.

Type:

Literal['disc']

id#

Which feature this draws.

Type:

str

centre#

(x, y) of the centre.

Type:

tuple[float, float]

radius#

Radius in panel units.

Type:

float

filled#

Filled marks are pupils; outlined ones are the eyes around them.

Type:

bool

width#

Outline width in panel units, ignored when filled.

Type:

float

FaceStroke#

Import

from scenet.core import FaceStroke

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.FaceStroke[source]#

Bases: CoreModel

One line of a drawn face, already sampled into straight segments.

Curves are sampled during compilation rather than emitted as Bezier control points, so that everything an expression does is a number here. A face can then be read, diffed and hand-adjusted exactly like the rest of this tier, and the emitter has nothing left to decide.

mark#

Always stroke. What distinguishes this from a FaceDisc.

Type:

Literal['stroke']

id#

Which feature this draws – brow_l, mouth, and so on.

Type:

str

points#

The polyline, in panel coordinates.

Type:

tuple[tuple[float, float], ...]

width#

Stroke width in panel units.

Type:

float

closed#

Whether the last point joins back to the first, which is what makes an open mouth a shape rather than a stray arc.

Type:

bool

Tail#

Import

from scenet.core import Tail

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.Tail[source]#

Bases: CoreModel

The pointer from a balloon to its speaker’s mouth.

control is present only when the straight route was obstructed and the tail had to bend, which keeps the common case honest about being a simple straight line.

start: tuple[float, float]#

Where it leaves the balloon, in panel units.

end: tuple[float, float]#

Its point, at the speaker’s mouth, or on the frame for a speaker off panel.

control: tuple[float, float] | None#

The control point of the curve it bends along, or None when it is straight.

width: float#

How wide it is where it leaves the balloon, in panel units.

property is_curved: bool#

Whether this tail had to bend around an obstacle.

Transform#

Import

from scenet.core import Transform

Defined in

scenet.core (source)

Stability

Returned, not exported: its fields are the Panel Core format’s, and change only as the format says, under CORE_FORMAT_VERSION.

class scenet.core.Transform[source]#

Bases: CoreModel

Where a puppet’s root joint lands, and how it is scaled and mirrored.

x: float#

Where the puppet’s root joint lands, across, in panel units.

y: float#

Where it lands, down, in panel units.

scale: float#

Panel units per puppet unit.

mirrored: bool#

Whether the puppet is flipped to face left.