lib-prism · crate
kinogaki-prism
Prism documents for Kinogaki.
- Repository
- lib-prism (kinogaki/lib-prism)
- Folder
libs/lib-prism/crates/prism- Source
- 25 files, 6,110 lines
- Tests
- 16 files, 2,519 lines
What it is
Prism documents for Kinogaki.
A Document is a flat, ordered set of path-addressed Elements. Each element has a type token, typed Property values (any DType, any shape, optionally animated by keyframes), string metadata, and may be wired to others through slot connections. The same document reads and writes as .prisma text, a binary crate (PRSMC), or a package (PRSMZ); the content, not the file name, selects the decoder.
Layers (over, unset, delete, disconnect, reorder) compose with overlay, diff computes one, and compose flattens reference arcs through a resolver.
Depends on
None.
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-anim | Core and the app | normal | Studio's animation channels. |
kinogaki-document | Core and the app | tests | Studio's document: the scene, a tree of objects under one root, and the core network each object of a kind naming a context holds. |
kinogaki-editor | Core and the app | normal | Kinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one. |
kinogaki-network | Core and the app | normal | Studio's core networks (design: core-owned networks; "Cooking DAG for nodes is studio core"). |
kinogaki-plugin-host | Core and the app | normal | Studio's plugin loader. |
kinogaki-project | Core and the app | normal | Studio's project files: a document as a Prism document. |
kinogaki-testkit | Core and the app | normal | Kinogaki Studio's core testkit: toy packages written against the SDK alone, so core is tested with no real plugin. |
Modules
aliasesThe fixed catalog of named types (vec3f,matrix4d,color3f, …).55 linesbinaryThe binary crate encoding (PRSMC): a deterministic string table followed by element, property, metadata, connection and layer records, optionally LZ-compressed.34 linesbinary::compress(private)The crate body's LZSS codec.198 linesbinary::read(private)Binary crate reader.396 linesbinary::write(private)Binary crate writer.315 linescompose(private)Composition: applying layers (overlay), computing one (diff), and flatteningreferencearcs (compose).350 linescurveKeyframe curve maths: one number of a value over time, through keys.328 linesdocument(private)The document: ordered elements, connections and layer directives.601 linesdtype(private)Element types and their wire codes.194 lineselement(private)Elements: a path, a type token, properties, string metadata and layer tombstones.156 linesencoding(private)Encoding detection and the one-call decode/encode/load/save entry points.120 lineserror(private)Errors with a reason and, for text input, the line and column where reading stopped.118 lineslimits(private)Resource bounds applied while decoding untrusted input.44 linespackageThe package encoding (PRSMZ): one scene (text or binary) plus asset blobs keyed by the path of the element that owns them.204 linespath(private)Paths: the only identity in a document.352 linespattern(private)Globs over element paths:*within a segment,**across any number of segments.123 linesproperty(private)Properties: a default value, optional keyframes, and an optional catalog type name.355 linestextThe.prismatext encoding: a USD-flavoured, diff-friendly form of a document.26 linestext::lexer(private)Tokens of.prismatext.261 linestext::literal(private)Value literals: the declared type of a property line and the literal that follows it.197 linestext::number(private)Number formatting for text: the shortest decimal that reads back to the same float.116 linestext::read(private).prismatext reader: a recursive-descent parser overLexertokens.542 linestext::write(private).prismatext writer.449 linesvalue(private)Values: a dtype, a row-major shape and the components, stored as a typed vector.542 lines
Public types and traits
At the crate root
Traits IntoPath
Structs DocumentElementErrorGlobLinkKeyframeLimitsLocationPathPathPatternPropertyResolvedDocumentValue
Enums DataDTypeEncodingErrorKindFormatHandleTypeInterp
Type aliases Result
By module: 27 public types and traits in 14 modules
aliases TypeAlias
compose ResolvedDocument
curve InterpKeysSegment
document DocumentGlobLink
dtype DType
element Element
encoding EncodingFormat
error ErrorErrorKindLocationResult
limits Limits
package AssetAssetsSceneEncoding
path IntoPathPath
pattern PathPattern
property HandleTypeKeyframeProperty
value DataValue
Besides these, 6 public functions at module level.
