Skip to content

Comment on Show HN: Bubbles, a vanilla JavaScript web gameparent

Comments

I think you'd gain clarity from `export function` and `function` over the anonymous fn + const style -- which seems a little like zig?

And the getter/setter system: I dont see a reason for over `{getHeight: () => height}` over `return {height, weight}` ?

Since canvasManager is mostly just data properties, you could also destructure those inline to funciton parameters, ie., function drawX({ctx, height, width, scale}) etc.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.