Home Reference Source
import {HUDShapeStatisticsHandle} from 'shapez.io/js/game/hud/parts/statistics_handle.js'
public class | source

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
public

element: *

public
public
public
public

root: *

public
public

Method Summary

Public Methods
public

attach(parent: HTMLElement)

Attaches the handle

public

Cleans up all child elements

public

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:

NameTypeAttributeDescription
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 visible: boolean source

Public Methods

public attach(parent: HTMLElement) source

Attaches the handle

Params:

NameTypeAttributeDescription
parent HTMLElement

public cleanupChildElements() source

Cleans up all child elements

public destroy() source

Destroys the handle

public detach() source

Detaches the handle

public initElement() source

public setVisible(visibility: boolean) source

Sets whether the shape handle is visible currently

Params:

NameTypeAttributeDescription
visibility boolean

public update(displayMode: enumDisplayMode, dataSource: enumAnalyticsDataSource, unit: string, forced: boolean=) source

Params:

NameTypeAttributeDescription
displayMode enumDisplayMode
dataSource enumAnalyticsDataSource
unit string
forced boolean=