Vector2Signal
A 2D vector signal providing a reactive interface for vector operations.
Overview
Vector2Signal is a signal optimized for the Vector2 type:
const position = createSignal(new Vector2(0, 0));
// Access components
position.x(); // 0
position.y(); // 0
// Set components
.position.x(100);
// Vector chainable animation
.position().to(new Vector2(200, 100), 1);
Methods
| Method | Signature | Description |
|---|---|---|
x | () => number | Get X component |
x | (value: number) => this | Set X component |
y | () => number | Get Y component |
y | (value: number) => this | Set Y component |