pub const IMAGE: &str = "type Image {\n source: Str = \"\";\n width: Number = 1;\n height: Number = 1;\n}";Expand description
An image resource request with display dimensions.
This schema declares desired resource data only. A host resolves source, owns
I/O and permissions, and reports any loading failure; construction performs no I/O.
§Declaration
type Image {
source: Str = "";
width: Number = 1;
height: Number = 1;
}§Fields and methods
-
source: Host-defined image locator; defaults to empty. -
width: Requested display width in scene units; defaults to 1. -
height: Requested display height in scene units; defaults to 1.
§Describe an image
No file is read until a host chooses to resolve the source.
let value = Image { source: "poster.png", width: 2 };
print(value.source);