panorama

package
v0.1.76 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package panorama holds the renderer that draws mods' interfaces in the player's game. A host whose own interface script receives the screens may compile Drawing from src/draw.ts into that script, hiddenParts from src/hud.ts to read the parts of the game's HUD the screens list, and the StockGuard or its finders, hidePanel and restorePanel from src/guard.ts to hide them and give them back, with src/ability-hud.ts, whose AbilityHud listens on the ability bar and, through src/abilities.ts, draws the replaced abilities the screens name on Tab and the bar. A host whose own guard holds the stock HUD holds an AbilityHud too. A host that draws mods' own layouts installs src/layout.ts, built as an IIFE with the global name Modlock, as scripts/modlock/layout.js, which those layouts include. Vendoring this package delivers the source beside the ui protocol it reads. A page may draw the same screens in a browser on browser/dom.ts, the stand-in for game panels, which applies layout style sheets with browser/sheets.ts, with the layout rules in browser/panels.css. Every file these sources import is embedded, so a vendored copy builds.

Index

Constants

This section is empty.

Variables

View Source
var Layout []byte

Layout is the renderer's layout, which a client content package installs as panorama/layout/modlock/ui.xml beside the built renderer script.

View Source
var Sources embed.FS

Sources holds the drawing's, the hud's, the guard's, its ability bar's and display's and the layout library's TypeScript source and the drawing's browser stand-in.

Functions

func AppendPacked added in v0.1.8

func AppendPacked(line, data []byte) []byte

AppendPacked appends data one character per byte. Printable ASCII other than the backslash stands for itself, and every other byte for U+0100 plus the byte, so a page title carries it without whitespace, control or escape characters the browser could fold. A byte takes at most two UTF-8 bytes.

func AppendPackedLine added in v0.1.8

func AppendPackedLine(line []byte, sequence uint64, frame []byte) []byte

AppendPackedLine appends one binary frame as the line the relay page carries into a Panorama page title: "~<sequence>:<packed>\n". The relay splits the packed text into acknowledged title parts without reading it, and src/packed.ts reads the bytes back.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL