Skip to content

@ue-too/board / index / TouchContext

インターフェイス: TouchContext

定義: packages/board/src/input-interpretation/input-state-machine/touch-input-context.ts:47

Context interface for the touch input state machine.

Remarks

This context manages the state required for multi-touch gesture recognition:

Touch Point Tracking:

  • Maintains a map of active touch points by identifier
  • Stores initial positions to calculate deltas for pan gestures
  • Stores initial distances to calculate zoom factors

Gesture Recognition:

  • Single-finger: Not handled (reserved for UI interactions)
  • Two-finger: Pan and pinch-to-zoom gestures
  • Three+ fingers: Currently not handled

Coordinate System: Similar to KMT, the alignCoordinateSystem flag controls Y-axis orientation.

This interface extends BaseContext from the @ue-too/being state machine library.

拡張

  • BaseContext

プロパティ

addTouchPoints()

addTouchPoints: (points) => void

定義: packages/board/src/input-interpretation/input-state-machine/touch-input-context.ts:49

Adds new touch points to tracking

パラメータ

points

TouchPoints[]

戻り値

void


alignCoordinateSystem

alignCoordinateSystem: boolean

定義: packages/board/src/input-interpretation/input-state-machine/touch-input-context.ts:59

Whether to use standard screen coordinate system (vs inverted Y-axis)


canvas

canvas: Canvas

定義: packages/board/src/input-interpretation/input-state-machine/touch-input-context.ts:61

Canvas accessor for dimensions and coordinate transformations


getCurrentTouchPointsCount()

getCurrentTouchPointsCount: () => number

定義: packages/board/src/input-interpretation/input-state-machine/touch-input-context.ts:53

Returns the current number of active touch points

戻り値

number


getInitialTouchPointsPositions()

getInitialTouchPointsPositions: (idents) => TouchPoints[]

定義: packages/board/src/input-interpretation/input-state-machine/touch-input-context.ts:55

Retrieves the initial positions of specific touch points

パラメータ

idents

number[]

戻り値

TouchPoints[]


removeTouchPoints()

removeTouchPoints: (idents) => void

定義: packages/board/src/input-interpretation/input-state-machine/touch-input-context.ts:51

Removes touch points from tracking by identifier

パラメータ

idents

number[]

戻り値

void


updateTouchPoints()

updateTouchPoints: (pointsMoved) => void

定義: packages/board/src/input-interpretation/input-state-machine/touch-input-context.ts:57

Updates the current positions of touch points

パラメータ

pointsMoved

TouchPoints[]

戻り値

void

メソッド

cleanup()

cleanup(): void

定義: packages/being/dist/interface.d.ts:31

戻り値

void

継承元

BaseContext.cleanup


setup()

setup(): void

定義: packages/being/dist/interface.d.ts:30

戻り値

void

継承元

BaseContext.setup