Documentation
¶
Overview ¶
Package demo renders the agentscope screen from a SYNTHETIC, deterministic scenario into one animated SVG, for demo videos and documentation.
The scenario drives the SAME view-model as the live screen (ui.ViewModel): a step applies a snapshot, switches a tab, picks a theme or a language, exactly as the browser or the server would. Nothing is drawn by hand and nothing is read from this machine: every account, plan, session and repository below is invented, and the clock is a constant, so the same scenario yields the same bytes on every run.
Index ¶
- Constants
- Variables
- func DefaultOutDir() (string, error)
- func InsideGitTree(p string) (bool, error)
- func Names() []string
- func ParseSize(s string) (w, h int, err error)
- func Snapshot(labColor, personalColor string) model.Snapshot
- func Usage(labColor, personalColor string) *model.Usage
- type Env
- type Options
- type Result
- type Scenario
- type Step
Constants ¶
const ( MinSize = 320 MaxSize = 4096 )
Size bounds: a capture is a picture of a window, not an allocation attack.
const DefaultSize = "1280x720"
DefaultSize is the captured window, in logical pixels.
Variables ¶
var Epoch = time.Date(2030, 1, 15, 10, 0, 0, 0, time.UTC)
Epoch is the demo's fixed "now". Nothing in the output reads the real clock.
Functions ¶
func DefaultOutDir ¶
DefaultOutDir is the durable directory captures go to: under the user's config directory, never inside a repository.
func InsideGitTree ¶
InsideGitTree reports whether p, or a directory above it, holds a .git.
Types ¶
type Env ¶
Env is what a step may touch: the screen and its view-model, the only door the live UI has too.
type Options ¶
type Options struct {
W, H int
}
Options tune Render. The zero value renders DefaultSize.
type Result ¶
type Result struct {
SVG []byte
Frames int // frames recorded, one per step
Duration time.Duration // the loop length
Stats svg.Stats // the assembly: slots, pictures, shared subtrees, sizes
Raster int // elements that embed a PNG; 0 means fully vector
Doc *svg.Document // the assembly, whose Frame(i) is the still of slot i
Texts []string // every distinct string drawn: the outlines hide them from a text scan
}
Result is one rendered scenario.