Interface WLVirtualKeyboardRootProperties

Optional WLVirtualKeyboardRoot constructor properties.

interface WLVirtualKeyboardRootProperties {
    canvasStartingHeight?: number;
    canvasStartingWidth?: number;
    cloneMaterial?: boolean;
    collisionGroupsMask?: number;
    collisionOverextensionPixels?: number;
    constraints?: LayoutConstraints;
    cursorStyleManager?: null | ICursorStyleManager;
    destroyTextureWhenDisabled?: boolean;
    enablePasteEvents?: boolean;
    keyboardDriver?: KeyboardDriver<KeyboardDriverGroup, KeyboardDriverGroupOptions>;
    keyboardTemplate?: VirtualKeyboardTemplate;
    maxCanvasHeight?: number;
    maxCanvasWidth?: number;
    overextendCollisionOnCursorCapture?: boolean;
    pointerStyleHandler?: null | PointerStyleHandler;
    preventAtlasBleeding?: boolean;
    preventBleeding?: boolean;
    registerKeyboardDriver?: boolean;
    registerPointerDriver?: boolean;
    resolution?: number;
    tabFocusable?: boolean;
    textureUniformName?: string;
    theme?: Theme;
    unitsPerPixel?: number;
}

Hierarchy

Properties

canvasStartingHeight?: number

The starting height of the Root#viewport's canvas.

canvasStartingWidth?: number

The starting width of the Root#viewport's canvas.

cloneMaterial?: boolean

Should the material used for the Root be cloned? If false, then the actual material will be used, which will lead to issues if the material is also used elsewhere.

collisionGroupsMask?: number

The collision groups that this root's collider will belong to. If 0, collider and cursor-target will not be added.

collisionOverextensionPixels?: number

How many pixels to over-extend the collision by. For example, if 2, and the units-per-pixel is 0.01, then the collision extents will be expanded by 0.02 game units on all sides.

constraints?: LayoutConstraints

The starting layout constraints of the Root.

cursorStyleManager?: null | ICursorStyleManager

A cursor style manager for sharing the cursor style with other components without having a glitchy cursor style. If omitted and the pointer style handler is not overridden, then the cursor style is set directly.

Even if the pointerStyleHandler is overridden, this should still be passed if it's available, so that the root can clear the pointer style when it's disabled.

destroyTextureWhenDisabled?: boolean

When true, the UI texture will be destroyed to clear up space in the texture atlas whenever the UI root is disabled. Note that this will cause additional texture updates when re-enabling the UI root.

enablePasteEvents?: boolean

Should contentEditable be set to true? Needed for paste events, but creates issues on mobile; virtual keyboard is opened whenever the canvas is clicked. Disabled by default

The KeyboardDriver to dispatch key events to. If null (default), WLRoot.keyboardDriver is used.

keyboardTemplate?: VirtualKeyboardTemplate

The keyboard template to use for the VirtualKeyboard Widget in a VirtualKeyboardRoot.

maxCanvasHeight?: number
maxCanvasWidth?: number
overextendCollisionOnCursorCapture?: boolean

Should the collision extents only be expanded when the cursor is being captured?

pointerStyleHandler?: null | PointerStyleHandler
preventAtlasBleeding?: boolean

Sets CanvasViewport#preventAtlasBleeding in the internal viewport (Root#viewport).

preventBleeding?: boolean
registerKeyboardDriver?: boolean

Register the default keyboard driver to this root?

registerPointerDriver?: boolean

Register the default pointer driver to this root? If collisionGroupsMask is 0, this is forced to false.

resolution?: number
tabFocusable?: boolean
textureUniformName?: string

Which uniform name should be used for setting the material's texture? If not passed, then the uniform name will be guessed from the pipeline name, which will result in an error when an unknown pipeline is used.

theme?: Theme
unitsPerPixel?: number

The amount of world units per canvas pixel. Determines the pixel density of the mesh.

Generated using TypeDoc