DataDungeon::ImageMeta
Inherits JSON::Serializable < DataDungeon::AssetMeta < Struct < Value < Object
Image fields (image_meta). nil means not known, never zero.
Measured by DataDungeon from the stored bytes: width, height,
transparent (any pixel not fully opaque), dominant_color (0xRRGGBB,
hex in JSON), the content box around the visible pixels (content_*),
and an animation's frames (animation). For an animation every field
describes its first frame, and keyframes record what changes.
Set by the application, usually from what it asked the generator for:
the view (view_x/y/z, a unit vector from the thing toward the camera,
in the thing's frame, and view_roll in quarter turns), the light
(light_x/y/z, where it comes from, in the picture's frame), the anchor
(anchor_x/y, 0 to 1 across and down, the point that sits on the
ground or attaches), and the thing's real size in metres in its own
frame (world_width across, world_height up, world_depth front to
back). view: and light: take the readable form (Direction).
Constants
The fields the application sets, which update_asset(image:) changes.
Constructors
Instance methods
These fields with what DataDungeon measured in place of its own.
Renderer placement hint (opaque JSON blob). Present on visual media (image, video); nil for audio and text.