Crea un juego para Apple Watch

Mueve un marcador con la Digital Crown. El reloj entrega cada fotograma mediante runGame.

main.ts
import { initWindow, runGame, clearBackground, Colors } from "@bloomengine/engine";
import { getCrownRotation, getScreenWidth } from "@bloomengine/engine/core";
import { drawCircle } from "@bloomengine/engine/shapes";

initWindow(180, 180, "Bloom");
let x = 90;
runGame(() => {
  x = Math.max(8, Math.min(getScreenWidth() - 8, x + getCrownRotation() * 20));
  clearBackground(Colors.BLACK);
  drawCircle(x, 90, 8, Colors.GREEN);
});

Estado actual

En watchOS, Canvas dibuja en 2D y SceneKit en 3D. La física Jolt y el renderizado diferido de escritorio no están disponibles.

Preguntas y respuestas

¿Hay un juego publicado para probar en el reloj?

Bloom Jump Watch tiene su propia ficha en el App Store.

Fuentes