Nothing

NCF Level 1 specification

The Level 1 document contract for source, diagnostics, canvas, clocks and scene order.

Read as Markdown

Ratified internal rehearsal · 0.9.0. A .nothing file describes an editable 2D scene. The same source can be opened as artwork, sampled at a time, or placed in another composition. Level 1 defines the meaning of the source independently of any renderer, editor, or conversion tool. “Level 1” names this specification. It introduces no version attribute or file migration. The first review draft and subsequent contract decisions are listed under Unreleased. Changelog

Start here for the document contract. The chapters below define how its contents evaluate. A rule marked open identifies a limit of Level 1.

ChapterWhat it defines
GraphicsShape geometry, editable boolean operands, multiple paints and strokes, gradients, images, masks, and compositing
Boxed geometryRegistration, contour displacement and resize behavior for rectangles, circles and ellipses
Image effectsDrawable-owned backdrop blur, ordered source filters, Gaussian blur, alpha-based drop and inner shadows, and outer and inset rectangle shadows
AnimationProperty ownership, base values, key addresses, interpolation, repetition, and seeking
SequencesPlacement of picture, sound, and nested compositions, local clocks, and audio mixing
Attached drawablesPlacement on bounds, a contour or a vertex, host ownership, facing and paint order
Spatial compositionGroups, local coordinates, pivots, cameras, mask ownership, and composited opacity
FontsFamily and weight requests, host font sources, coverage fallback and reproducible layout
TextEditable copy, styled spans, font input, line layout, and replacement keys
Contour trimSelect a distance interval for one stroke while retaining its source geometry

Level 1 defines the 2D camera. A separate perspective trial exercises the ratified optical behavior with proposed spatial authoring syntax. Perspective optics · Scene camera RFC

The scene format type model defines the structural reference for all 32 Level 1 elements and the explicitly labeled spatial trial.

A complete document

<scene width="64" height="64">
  <shape translate-x="28" translate-y="28">
    <rect width="40" height="40"/>
    <fill><paint><solid color="#CD6843FF"/></paint></fill>
  </shape>
</scene>

This still has a transparent 64 × 64 canvas. The rectangle is centered at (28, 28), with its upper-left corner at (8, 8). A second fill paint would cover the same rectangle. A sibling stroke would follow its contour. Changing the canvas width and changing the rectangle width are distinct edits. To move the entire shape by a further (4, 8), set translate-x="32" translate-y="36" on the shape. Its paints and mask follow it. Each axis is an independently keyable scalar, with the same translation semantics as the two components of SVG translation. SVG coordinate systems

Source and names

Use UTF-8 XML 1.0 with one unnamespaced scene root. The ASCII vocabulary is case-sensitive. UTF-8 also accommodates literal copy, filenames and comments. An XML declaration is optional. XML quoting, numeric character references, and the five predefined entity references have their XML meanings. The document grammar admits comments and whitespace between elements. Character data is significant inside text and span; elsewhere only inter-element whitespace is permitted. See text content before indenting mixed content. A DTD, processing instruction, or unknown element requires a diagnostic. XML 1.0

Attributes outside the Level 1 vocabulary are permitted on any element. Their values are opaque to NCF evaluation and have no effect on the sampled picture, audio mix, or animation. Source-preserving editors retain them on unrelated edits. An unqualified core attribute still requires its specified owner and value. A namespaced attribute has a distinct expanded name even when its local spelling matches a core field. A host can supply a list of well-known attribute names to a spelling checker. That list affects lint diagnostics only. Host vocabulary example

Read a scalar number as a finite signed decimal in local units unless its property gives another unit. The lexical form is an optional sign, decimal digits with an optional fractional part (or a leading dot followed by digits), and an optional decimal exponent with sign. For example, 8, 0.5, .5, and 5e-1 are numbers. Property ranges still apply. Clock values, frame rates, colors, point lists, and path data have their own grammars. Resolve names on their owning element. For example, fill on animate is an end-of-animation policy. Its spelling as a child of shape introduces a paint operation. Keyword table

Canvas and clock

  • Supply width and height together as positive finite numbers to give the scene a fixed canvas. Its origin is the top left, x increases right, and y increases down. The visible region spans zero to the declared width and height. Geometry can extend beyond those boundaries.
  • With both dimensions omitted, the caller supplies the viewport for visual sampling. A referenced scene without dimensions uses its enclosing viewport. Rendering needs a known extent. A lone dimension is an error. Changing an object's bounds never implicitly resizes the canvas.
  • The first SVG exchange case uses a matching viewport at one local unit per CSS pixel. Export resolution is a separate input. Responsive sizing, automatic fit on resize, and authored viewBox transforms remain open. Sources with different dimensions can already be placed at their native size and scaled explicitly. Source coordinates SVG distinguishes viewport establishment from the transform into user coordinates. SVG coordinate systems
  • Optional background="#RRGGBBAA" fills the resolved scene viewport once, beneath all drawable children. The default is transparent black (#00000000). Background alpha participates in ordinary compositing. On resize the fill follows the viewport. A referenced scene uses its own resolved viewport and local time. Its placement transforms, clips, masks, and fades the entire picture, background included. Inline sequences and groups start transparent. The scene owns its background color track. Color sampling
  • A scene containing a placement or a property track declares frame-rate. A still containing neither can omit it. Canvas dimensions and frame rate are document settings. Moving a key and changing the rate have distinct meanings. Frame and time addresses

From source to a sample

A scene owns zero or more shapes, groups, and sequence placements in drawing order. An optional named 2D camera frames their combined scene coordinates in the viewport. A camera declaration consumes no paint slot. Cameras Start with the sampled scene background and silence. Resolve at Base to inspect authored properties, or at an explicit instant to obtain animated values. A nested drawable can take its position from its host’s sampled geometry. Each group passes the enclosing time to its children. For each active placement, map parent time to source time before resolving its contents. Resolve text and its font inputs before using glyph geometry. Each stroke can select part of the shared contour. Apply each drawable's local mask and opacity to its assembled picture, then place that result in the parent. Spatial operations preserve the audio mix. A composition contributes its composited picture and audio mix to its parent. The same document, resources, viewport, and sampling environment must give the same result when seeking back to an instant. Shape evaluation · Sampling sequences

Source-preserving editing

An editor must be able to locate an authored element, property, or key in the specific source file that owns it. Syntax positions belong to a revision of that file. Two equal paint values on different strokes are distinct targets. A nested scene's placement belongs to the parent file, and an edit to the referenced artwork belongs to the referenced file.

For a save without edits, preserve every byte. For a value change on an existing attribute, replace only the bytes of the selected value. Preserve the surrounding quotes, indentation, comments, sibling order, line endings, and the other occurrences of that value. A literal-copy edit targets the selected character-data range or held key in its owning text or span. Adding an absent property or a new key is a structural edit at its owner. Reopening the file must reproduce the edit. Full-fidelity syntax trees are one precedent for retaining tokens, trivia, and source locations. The format specifies the observable edit. Roslyn syntax model

Diagnostics and evidence

A reader can recognize syntax that its renderer cannot evaluate. When a requested operation encounters malformed source, an invalid owner or value, a missing resource, or an unsupported construct, a strict reader reports the reason and refuses that result. A best-effort renderer identifies any degradation at its source. Include the file and an element or attribute location. For malformed XML, a byte position or line and column suffices. Source-preserving tools retain unedited source even when a construct is unavailable for rendering.

The rectangle exchange case supplies a complete SVG input, native counterpart, expected samples, and a byte-local edit. The composition cases exercise graphics and timing together. These are expectations for implementations. The vocabulary check checks the authoring examples against the inventory. The moving card exercises copy replacement, source slip, framing, stroke trim, and group opacity together.

Scope under review

AreaIn this draftDecision still needed
Content and geometryBasic shapes, per-corner rectangle radii, paths and editable boolean geometryStandalone images, further path and shape coverage
Text and layoutHorizontal text layout, literal mixed content, stable styled spans and held copySelection by laid-out unit, path baselines, inline objects and container layout
Structure and placementGeometry attachments, spatial groups, pivoted scale, X-skew and rotation, independent parent and source clocksArbitrary matrices and automatic fitting on resize
Appearance and compositingLocal masks, isolated opacity, ordered paints, drawable blend modes, pass-through scopes, source filters, backdrop blur and shadowsAdditional blend modes, general filters and host-defined shaders
Geometry modifiersIndependent strokes and whole-path trim across authored contoursShape-wide modifiers and derived geometry branches
Time and exchangeLocal property tracks, unit-speed nested sequences, fixed-viewport rectangle exchangeReusable animation, retiming and the remaining SVG crosswalk

The design doctrine gives the criteria for reviewing these decisions. The authoring guide teaches the current vocabulary.

On this page