p2hacks2023 / pre-06

fuNG
0 stars 1 forks source link

Component: HotMeter #52

Closed jugesuke closed 11 months ago

jugesuke commented 11 months ago

12 の実装。

当初は横向きバーの予定だったが、議論 (discord 参照) の結果、縦向きの温度計型のオブジェクトに変更した

インターフェースは以下の通り。

const hotMeter = new HotMeter(
  0, // x
  0, // y
  57, // パーセント
)
TadaTeruki commented 11 months ago

Screenshot from 2023-12-15 10-51-16 目盛りが流出している?

componentTimeline.ts

export function InitializeComponents(
  router: GameRouter,
  canvas: HTMLCanvasElement,
  videoElement: HTMLVideoElement,
) {
  let componentContainer: ComponentContainer = new ComponentContainer();
  ...
  const hotMeter = new HotMeter(
    canvas.width*0.05,
    canvas.height*0.1,
    30.0,
  );
  componentContainer.addComponent(hotMeter, ["take!"]);

  return componentContainer;
}
jugesuke commented 11 months ago

げ、調査・修正やります

cloudflare-workers-and-pages[bot] commented 11 months ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c68230c
Status: ✅  Deploy successful!
Preview URL: https://057a2920.pre-06.pages.dev
Branch Preview URL: https://jugesuke-hot-meter.pre-06.pages.dev

View logs

TadaTeruki commented 11 months ago

LGTM