component.visualcomponent
Component that provides visual representation on the screen for an entity.
- struct VisualComponent;
Component that provides visual representation on the screen for an entity.
VisualComponent only has a name of a graphics resource, which is lazily
loaded by VisualSystem.
- alias VisualIndex;
Index pointing to visual data.
- VisualIndex dataIndex;
Index to visual data in a lazy array in VisualSystem.
- bool placeholder;
Is placeholder visual data being used? (Did loading fail?)
- this(ref Node yaml);
Load from a YAML node. Throws YAMLException on error.
- pure nothrow this(string resourceName);
Construct manually.
- struct VisualData;
Visual data referenced by a VisualComponent.
- enum Type;
Type of visual data used.
- struct ColoredVertex;
Vertex with a position and a color.
Used for line start/end.
- Vector2f position;
Position of the vertex.
- Color color;
Color of the vertex.
- pure nothrow @safe this(const(Vector2!(float)) position, const(Color) color);
Construct a ColoredVertex.
- FixedArray!(ColoredVertex) vertices;
Vertices (in pairs).
Visual data stored for the Lines type.
- FixedArray!(float) widths;
Line widths (each for a pair of vertices)
Visual data stored for the Lines type.