Skip to main content

Class: Debug

Backward-compatible Debug class.

Deprecated

Prefer DebugUI from @voxelize/debug. This class is kept so existing @voxelize/core consumers continue to work unchanged.

Constructors​

constructor​

• new Debug(domElement?, options?): Debug

Parameters​

NameType
domElement?HTMLElement
options?DebugOptions

Returns​

Debug

Properties​

dataWrapper​

• dataWrapper: HTMLDivElement


displayNewline​

• displayNewline: () => this

Type declaration​

▸ (): this

Returns​

this


displayTitle​

• displayTitle: (title: string) => this

Type declaration​

▸ (title): this

Parameters​
NameType
titlestring
Returns​

this


dispose​

• dispose: () => void

Type declaration​

▸ (): void

Returns​

void


domElement​

• domElement: HTMLElement


entriesWrapper​

• entriesWrapper: HTMLDivElement


options​

• options: Required<Omit<DebugOptions, "dataStyles" | "entriesStyles" | "lineStyles" | "newLineStyles" | "statsStyles">> & { dataStyles: Partial<CSSStyleDeclaration> ; entriesStyles: Partial<CSSStyleDeclaration> ; lineStyles: Partial<CSSStyleDeclaration> ; newLineStyles: Partial<CSSStyleDeclaration> ; statsStyles: Partial<CSSStyleDeclaration> }


registerDisplay​

• registerDisplay: <T>(title: string, object?: T | () => unknown, attribute?: keyof T, formatter?: (value: unknown) => string) => this

Type declaration​

▸ <T>(title, object?, attribute?, formatter?): this

Type parameters​
NameType
Tunknown
Parameters​
NameType
titlestring
object?T | () => unknown
attribute?keyof T
formatter?(value: unknown) => string
Returns​

this


remove​

• remove: () => void

Type declaration​

▸ (): void

Returns​

void


removeDisplay​

• removeDisplay: (title: string) => void

Type declaration​

▸ (title): void

Parameters​
NameType
titlestring
Returns​

void


stats​

• Optional stats: FpsMeter


toggle​

• toggle: (force?: boolean) => void

Type declaration​

▸ (force?): void

Parameters​
NameType
force?boolean
Returns​

void


update​

• update: () => void

Type declaration​

▸ (): void

Returns​

void


visible​

• visible: boolean