Constructor
new DieIcon(randomizer, controller, isActive)
Constructs a DieIcon.
Parameters:
Name | Type | Description |
---|---|---|
randomizer |
Randomizer | The parent Randomizer instance. |
controller |
Controller | The controller this die is attached to. |
isActive |
boolean | Whether the die is active (randomization enabled). |
- Source:
Members
iconURLs :Array.<string>
List of SVG icon URLs for dice faces.
Type:
- Array.<string>
- Source:
Methods
click()
Handles click event to toggle randomization state.
- Source:
randomizeIcon()
Randomizes the die icon image URL and its rotation.
- Source:
remove()
Removes the die icon from the DOM.
- Source:
setActive(isActive)
Sets the active state of the die and updates its display.
Parameters:
Name | Type | Description |
---|---|---|
isActive |
boolean |
- Source:
setDisplay()
Updates the die's display based on its active state.
- Source: