Repository navigation
API Variable PenState
github-actions[bot] edited this page Nov 24, 2026
·
1 revision
const PenState: DataComponentDef<{
deltaX: ScalarType<"f32">;
deltaY: ScalarType<"f32">;
down: ScalarType<"i32">;
held: ScalarType<"i32">;
inRange: ScalarType<"u8">;
pressure: ScalarType<"f32">;
tiltX: ScalarType<"f32">;
tiltY: ScalarType<"f32">;
twist: ScalarType<"f32">;
up: ScalarType<"i32">;
x: ScalarType<"f32">;
y: ScalarType<"f32">;
}>;Defined in: src/engine/input/deviceEntities.ts:72
The pen this frame (it appears when first sensed): held/down/up bitmasks (bit 0 the tip
touching, 1 the barrel button, 2 the eraser), position x/y in canvas pixels and movement
deltaX/deltaY (+Y down), pressure 0..1, tiltX/tiltY -1..1 (±90°, +Y toward the user),
twist 0..1 of a turn, and inRange 1 while hovering or touching.
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference