Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / TouchControlsConfig

Type Alias: TouchControlsConfig ​

ts
type TouchControlsConfig = {
  stick?: "float" | "fixed" | false;
  look?: boolean;
  buttons?: TouchButtonConfig[];
  pause?: boolean;
  opacity?: number;
  scale?: number;
  haptics?: boolean;
};

Defined in: input/touchControls.ts:21

Properties ​

PropertyTypeDescriptionDefined in
stick?"float" | "fixed" | falseThe movement stick. float appears where the thumb lands; fixed stays put. false for none.input/touchControls.ts:23
look?booleanDrag anywhere on the right half to look.input/touchControls.ts:25
buttons?TouchButtonConfig[]Action buttons, most important first: the first is the big one under the thumb. Up to 5.input/touchControls.ts:27
pause?booleanA pause button in the top corner, bound as touch:pause.input/touchControls.ts:29
opacity?number0.2..1, how solid the controls look.input/touchControls.ts:31
scale?number0.7..1.5, the size of every control.input/touchControls.ts:33
haptics?booleanVibrate briefly on a press, where the device can.input/touchControls.ts:35