Skip to content

GenericItemFrame

Defined in: custom-views.ts:9

What one item renderer is given each drawn frame. All numbers, never a PixiJS object, except texture, which is whatever the renderer itself works with (a PixiJS Texture in practice).

Tex = unknown

height: number

Defined in: custom-views.ts:16

The height of the item’s box in world units, centred on (0, 0). Equal to size when square.


hovered: boolean

Defined in: custom-views.ts:22

Whether the mouse is over the item.


opacity: number

Defined in: custom-views.ts:20

0 to 1, already applied to the view by the package; for a renderer that fades parts.


reducedMotion: boolean

Defined in: custom-views.ts:32

Hold still: the viewer asked for less motion.


screenSize: number

Defined in: custom-views.ts:18

The same, in screen pixels: for choosing level of detail.


selected: boolean

Defined in: custom-views.ts:24

Whether the item is selected.


size: number

Defined in: custom-views.ts:12

The item’s diameter in world units: draw centred on (0, 0) at this size. In a box that is not square, the largest circle or square that fits it.


texture: Tex | null

Defined in: custom-views.ts:30

The item’s texture, loaded and cropped to a disc, when it is big enough and ready.


timeMs: number

Defined in: custom-views.ts:26

performance.now() for this frame.


tint: number | null

Defined in: custom-views.ts:28

The colour the item would have been drawn in (its color, ramp or per-id tint).


width: number

Defined in: custom-views.ts:14

The width of the item’s box in world units, centred on (0, 0). Equal to size when square.