Class: ItemSlots<T>
Type parameters
Name | Type |
---|---|
T | number |
Constructors
constructor
• new ItemSlots<T
>(options?
): ItemSlots
<T
>
Type parameters
Name | Type |
---|---|
T | number |
Parameters
Name | Type |
---|---|
options | Partial <ItemSlotsOptions > |
Returns
ItemSlots
<T
>
Properties
activated
• activated: boolean
= false
canvas
• canvas: HTMLCanvasElement
focusedCol
• focusedCol: number
= -1
focusedRow
• focusedRow: number
= -1
hoveredCol
• hoveredCol: number
= -1
hoveredRow
• hoveredRow: number
= -1
onSlotClick
• onSlotClick: (slot
: ItemSlot
<T
>) => void
= noop
Type declaration
▸ (slot
): void
Parameters
Name | Type |
---|---|
slot | ItemSlot <T > |
Returns
void
onSlotUpdate
• onSlotUpdate: (slot
: ItemSlot
<T
>) => void
= noop
Type declaration
▸ (slot
): void
Parameters
Name | Type |
---|---|
slot | ItemSlot <T > |
Returns
void
options
• options: ItemSlotsOptions
renderer
• renderer: WebGLRenderer
slotTotalHeight
• slotTotalHeight: number
slotTotalWidth
• slotTotalWidth: number
wrapper
• wrapper: HTMLDivElement
Accessors
element
• get
element(): HTMLDivElement
Returns
HTMLDivElement
Methods
activate
▸ activate(): void
Returns
void
connect
▸ connect(inputs
, namespace?
): () => void
Parameters
Name | Type | Default value |
---|---|---|
inputs | Inputs <any > | undefined |
namespace | string | "*" |
Returns
fn
▸ (): void
Returns
void
deactivate
▸ deactivate(): void
Returns
void
getContent
▸ getContent(row
, col
): T
Parameters
Name | Type |
---|---|
row | number |
col | number |
Returns
T
getFocused
▸ getFocused(): ItemSlot
<T
>
Returns
ItemSlot
<T
>
getObject
▸ getObject(row
, col
): Object3D
<Object3DEventMap
>
Parameters
Name | Type |
---|---|
row | number |
col | number |
Returns
Object3D
<Object3DEventMap
>
getRowColFromEvent
▸ getRowColFromEvent(event
): Object
Parameters
Name | Type |
---|---|
event | MouseEvent |
Returns
Object
Name | Type |
---|---|
col | number |
row | number |
getSlot
▸ getSlot(row
, col
): ItemSlot
<T
>
Parameters
Name | Type |
---|---|
row | number |
col | number |
Returns
ItemSlot
<T
>
getSubscript
▸ getSubscript(row
, col
): string
Parameters
Name | Type |
---|---|
row | number |
col | number |
Returns
string
onFocusChange
▸ onFocusChange(callbackFunc
): void
Parameters
Name | Type |
---|---|
callbackFunc | (prevSlot : ItemSlot <T >, nextSlot : ItemSlot <T >) => void |
Returns
void
render
▸ render(): void
Returns
void
setContent
▸ setContent(row
, col
, content
): void
Parameters
Name | Type |
---|---|
row | number |
col | number |
content | T |
Returns
void
setFocused
▸ setFocused(row
, col
): void
Parameters
Name | Type |
---|---|
row | number |
col | number |
Returns
void
setObject
▸ setObject(row
, col
, object
): void
Parameters
Name | Type |
---|---|
row | number |
col | number |
object | Object3D <Object3DEventMap > |
Returns
void
setSubscript
▸ setSubscript(row
, col
, subscript
): void
Parameters
Name | Type |
---|---|
row | number |
col | number |
subscript | string |
Returns
void
triggerFocusChange
▸ triggerFocusChange(prevSlot
, nextSlot
): void
Parameters
Name | Type |
---|---|
prevSlot | ItemSlot <T > |
nextSlot | ItemSlot <T > |
Returns
void