API ReferenceGlobalsGlobalAPI

# Interface: GlobalAPI

# Hierarchy

  • GlobalAPI

# Implemented by

# Index

# Methods

# Methods

# getCameraOffset

getCameraOffset(): CanvasOffset

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

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:15

Returns: Main


# getScene

getScene(): Scene

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

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


# setCameraOffset

setCameraOffset(offset: CanvasOffset): void

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

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:26

Updates the scene (recalculating bounds) and restart rendering

Returns: void


# updateSize

updateSize(): void

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

Returns: void