API ReferenceGlobalsGlobalAPI

# Interface: GlobalAPI

# Hierarchy

  • GlobalAPI

# Implemented by

# Index

# Methods

# Methods

# getCameraOffset

getCameraOffset(): CanvasOffset

Defined in packages/common-core/src/main.ts:43

Gets the available screen space for our item default: {left: 0, top: 1, right: 1, bottom: 0} Returns CanvasOffset

Returns: CanvasOffset


# getMain

getMain(): Main

Defined in packages/common-core/src/main.ts:16

Returns: Main


# getScene

getScene(): Scene

Defined in packages/common-core/src/main.ts:22

Returns the three.js scene (https://threejs.org/docs/#api/en/scenes/Scene) WARNING: This is the actual scene (reference) and not a copy!

Returns: Scene


# getUnitFormatter

getUnitFormatter(): UnitFormatter

Defined in packages/common-core/src/main.ts:45

Returns: UnitFormatter


# setCameraOffset

setCameraOffset(offset: CanvasOffset): void

Defined in packages/common-core/src/main.ts:36

Sets the available screen space for our item Example 1: right 0.9 means 10% padding on the right side Example 2: bottom 0.2 means 20% padding on the bottom side default: {left: 0, top: 1, right: 1, bottom: 0}

Parameters:

Name Type Description
offset CanvasOffset CanvasOffset

Returns: void


# updateScene

updateScene(): void

Defined in packages/common-core/src/main.ts:27

Updates the scene (recalculating bounds) and restart rendering

Returns: void


# updateSize

updateSize(): void

Defined in packages/common-core/src/main.ts:14

Returns: void