annotations library
Component annotations for the flutter_scene_codegen extractor.
Annotate a Component subclass with SceneComponent and its editable
fields with SceneProperty (or a typed variant), then run
dart run flutter_scene_codegen:generate to produce the component's
codec, schema manifest, and project registrar.
Classes
- AngleProperty Scene graph
- A number stored in radians and edited in degrees, lowering to an AngleRadians constraint plus a Range when min or max is given.
- AssetProperty Scene graph
- A source-path asset reference property, carried as the asset key string. extensions lowers to an AssetExtensions constraint.
- BoolProperty Scene graph
- A boolean property.
- ColorProperty Scene graph
- An RGBA color property.
- EnumProperty Scene graph
- An enum property, carried as the value name string with the enum's values as options.
- GizmoArrow
- An arrow from the node origin along a node-local axis.
- GizmoColor
- A color parameter, a literal linear RGBA or a binding to a color/vec3 property. A null GizmoPrimitive.color means the editor theme's gizmo color (accent when selected).
- GizmoCondition
- Draws a primitive only when the property at path equals equals, for union-kind properties (a collider's shape variant).
- GizmoFrustum
- A perspective view frustum opening along node-local +Z (the engine camera looks along its node's local +Z).
- GizmoIcon
- An unscaled billboard glyph at the node origin, the component's clickable presence when the node has no mesh.
- GizmoLines
- Literal node-local line segments, consumed as point pairs.
- GizmoPrimitive
- One drawable unit of a gizmo. Subtypes carry their geometry parameters; the shared fields govern visibility, color, and conditional drawing.
- GizmoScalar
- A scalar parameter, a literal or a binding to a numeric property.
- GizmoSpec
- The declarative gizmo block a component schema carries, an ordered list of primitives the editor draws for components of that type.
- GizmoWireBox
- A wireframe box, sized by literal half extents or a bound vec3 property.
- GizmoWireCapsule
- A wireframe capsule centered on the node origin, its length along axis.
- GizmoWireCircle
- A wireframe circle centered on the node origin, in the plane normal to axis.
- GizmoWireCone
- A wireframe cone with its apex at the node origin, opening along axis.
- GizmoWireCylinder
- A wireframe cylinder centered on the node origin, its length along axis.
- GizmoWireRect
- A wireframe rectangle centered on the node origin, in the plane normal to axis.
- GizmoWireSphere
- A wireframe sphere (three great circles).
- IntProperty Scene graph
- An integer property. min and max lower to an IntRange.
- NodeProperty Scene graph
- A document node reference property.
- NumberProperty Scene graph
- A floating-point property. min/max lower to a Range, softMin/softMax to a SoftRange, and step to a Step.
- QuaternionProperty Scene graph
- A rotation quaternion property.
- ResourceProperty Scene graph
-
A document resource reference property (
geometry,material,texture,environment). - SceneComponent Scene graph
-
Marks a class extending
Componentas a serializable scene component carrying document type tag type. - SceneGizmo Scene graph
-
Attaches a declarative editor gizmo to a
@SceneComponentclass: the ordered primitives the editor draws in its viewport for components of this type. Primitives must be const constructors frompackage:scene/schema.dart(GizmoIcon, GizmoArrow, wire shapes...), with scalar and color parameters either literal or bound to a property by dotted path (GizmoScalar.bind, GizmoColor.bind). - SceneProperty Scene graph
- Marks a field as an editable component property.
- StringProperty Scene graph
- A string property. multiline lowers to a Multiline constraint and pattern to a TextPattern.
- Vec2Property Scene graph
- A 2-component vector property.
- Vec3Property Scene graph
- A 3-component vector property. rgbColor lowers to an RgbColor constraint and normalized to a Normalized.
- Vec4Property Scene graph
- A 4-component vector property.
Enums
- GizmoVisibility
- When a primitive draws relative to the owning node's selection state.