MCPcopy
hub / github.com/KilledByAPixel/LittleJS / touchGamepadButtonCenter

Function touchGamepadButtonCenter

src/engineInput.js:849–855  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

847
848// center position for right touch pad face buttons
849function touchGamepadButtonCenter()
850{
851 const center = mainCanvasSize.subtract(vec2(touchGamepadSize));
852 if (touchGamepadButtonCount === 2)
853 center.x += touchGamepadSize/2;
854 return center;
855}

Callers 3

handleTouchGamepadFunction · 0.85
gamepadsUpdateFunction · 0.85
touchGamepadRenderFunction · 0.85

Calls 2

vec2Function · 0.85
subtractMethod · 0.45

Tested by

no test coverage detected