Home Reference Source
import {PlatformWrapperInterface} from 'shapez.io/js/platform/wrapper.js'
public class | source

PlatformWrapperInterface

Indirect Subclass:

PlatformWrapperImplElectron

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Method Summary

Public Methods
public

Attempts to quit the app

public
public

Should return the maximum supported zoom level

public

Should return the minimum supported zoom level

public
public

Should return if this platform supports ads at all

public

Returns whether this platform supports quitting the app

public

Returns whether this platform supports a toggleable fullscreen

public

Whether this platform supports a keyboard

public
public

Returns the strength of touch pans with the mouse

public

Returns the UI scale, called on every resize

public

initialize(): Promise<void>

public

Should initialize the apps ad provider in case supported

public

openExternalLink(url: string, force: boolean=)

Attempt to open an external url

public

Attempt to restart the app

public

Should set the apps fullscreen state to the desired state

Public Constructors

public constructor() source

Public Members

public app: Application source

Public Methods

public exitApp() source

Attempts to quit the app

public getId(): string source

Return:

string

public getMaximumZoom(): number source

Should return the maximum supported zoom level

Return:

number

public getMinimumZoom(): number source

Should return the minimum supported zoom level

Return:

number

public getScreenScale(): * source

Return:

*

public getSupportsAds(): boolean source

Should return if this platform supports ads at all

Return:

boolean

public getSupportsAppExit(): boolean source

Returns whether this platform supports quitting the app

Return:

boolean

public getSupportsFullscreen(): boolean source

Returns whether this platform supports a toggleable fullscreen

Return:

boolean

public getSupportsKeyboard(): * source

Whether this platform supports a keyboard

Return:

*

public getSupportsRestart(): boolean source

Return:

boolean

public getTouchPanStrength(): number source

Returns the strength of touch pans with the mouse

Return:

number

public getUiScale(): number source

Returns the UI scale, called on every resize

Return:

number

public initialize(): Promise<void> source

Return:

Promise<void>

public initializeAdProvider(): Promise<void> source

Should initialize the apps ad provider in case supported

Return:

Promise<void>

Attempt to open an external url

Params:

NameTypeAttributeDescription
url string
force boolean=

Whether to always open the url even if not allowed

public performRestart() source

Attempt to restart the app

public setFullscreen(flag: boolean) source

Should set the apps fullscreen state to the desired state

Params:

NameTypeAttributeDescription
flag boolean