Handy StadiumではWebSocketで通信しているので、ボールの位置座標などをフレームごとにプッシュして同期すれば、2台のiPhone間でゲーム画面の状態をまったく同じにできるはずです。Handy Stadiumの当初の実装では、投手のiPhoneの傾きとボールの位置を1フレームごと ...
Canvasを使ったボールとバット、グラウンドの描画 ゲーム画面の背景となるグラウンドの画像と、バット/ボールのアニメーションはCanvasを使って描画しています。バットやボールのアニメーションは1フレームごとにCanvasを再描画していますが、Canvasの ...
An example BlueOS extension demonstrating how to create a WebSocket server that exposes data-lake variables for Cockpit to consume. This extension runs a minimal WebSocket server that streams various ...
Most of the time the default Next.js server will be enough but there are times you'll want to run your own server to integrate into an existing application. Next.js provides a custom server api.