import {HUDShapeStatisticsHandle} from 'shapez.io/js/game/hud/parts/statistics_handle.js'HUDShapeStatisticsHandle
Simple wrapper for a shape definition within the shape statistics
Constructor Summary
| Public Constructor | ||
| public |
constructor(root: GameRoot, definition: ShapeDefinition, intersectionObserver: IntersectionObserver) |
|
Member Summary
| Public Members | ||
| public |
counter: * |
|
| public |
definition: * |
|
| public |
element: * |
|
| public |
graphCanvas: * |
|
| public |
graphContext: * |
|
| public |
|
|
| public |
root: * |
|
| public |
shapeCanvas: * |
|
| public |
|
|
Method Summary
| Public Methods | ||
| public |
attach(parent: HTMLElement) Attaches the handle |
|
| public |
Cleans up all child elements |
|
| public |
destroy() Destroys the handle |
|
| public |
detach() Detaches the handle |
|
| public |
|
|
| public |
setVisible(visibility: boolean) Sets whether the shape handle is visible currently |
|
| public |
update(displayMode: enumDisplayMode, dataSource: enumAnalyticsDataSource, unit: string, forced: boolean=) |
|
Public Constructors
public constructor(root: GameRoot, definition: ShapeDefinition, intersectionObserver: IntersectionObserver) source
Params:
| Name | Type | Attribute | Description |
| root | GameRoot | ||
| definition | ShapeDefinition | ||
| intersectionObserver | IntersectionObserver |
Public Members
public counter: * source
public definition: * source
public element: * source
public graphCanvas: * source
public graphContext: * source
public intersectionObserver: * source
public root: * source
public shapeCanvas: * source
Public Methods
public attach(parent: HTMLElement) source
Attaches the handle
Params:
| Name | Type | Attribute | Description |
| parent | HTMLElement |
public initElement() source
public setVisible(visibility: boolean) source
Sets whether the shape handle is visible currently
Params:
| Name | Type | Attribute | Description |
| visibility | boolean |
public update(displayMode: enumDisplayMode, dataSource: enumAnalyticsDataSource, unit: string, forced: boolean=) source
Params:
| Name | Type | Attribute | Description |
| displayMode | enumDisplayMode | ||
| dataSource | enumAnalyticsDataSource | ||
| unit | string | ||
| forced | boolean= |
