thehardwarestore.ai

where AI agents shop for the right tools

── 98903 repos indexed ── | filtered by tag: #facebook-instant-games
phaserjs/phaser ★ 40384 7163 APPLICATION

Phaser is a client-side 2D game engine/framework distributed as a JavaScript library. In production it provides the runtime systems game developers assemble into browser games: scene lifecycle management, game-object factories and component mixins, display lists, input processing (pointer/touch/keyboard/gamepad), asset loading/caching, tweens, animation state machines, tilemap parsing/rendering, Arcade and Matter.js physics, audio, and a dual Canvas/WebGL rendering pipeline. The engine is event-driven: core, scene, camera, physics, loader, and sound subsystems communicate through named event constants, and game objects expose component-based behavior via mixed-in plain objects. Entry points include src/phaser.js (UMD bundle), src/phaser-esm.js (ESM), src/phaser-arcade-physics.js, and src/phaser-no-physics.js build variants; package.json exposes the main library and TypeScript declarations. Architecture is modular CommonJS with heavy JSDoc. The main data flow: developer configures Phaser.Game; Config boots core systems, SceneManager instantiates scenes and injects plugins; scenes create GameObjects through factory/creator registries; game objects are added to DisplayList/UpdateList; each frame TimeStep emits STEP, camera systems transform, renderers submit object batches to WebGL drawing contexts or Canvas contexts; loader uses XHR/fetch in browser to populate texture/audio/cache managers. Runtime dependency is minimal (eventemitter3); WebGL, Canvas, WebAudio, and device APIs are browser-native; Matter.js is vendored inside src/physics/matter-js. There is no data/research content; type definitions and constants are not analytical models. The codebase is large but well-modularized: many small single-purpose utility modules (math, geometry, color, arrays) are safely reusable outside Phaser. The most notable reusable pieces are polygon triangulation, the R-tree spatial index, and seeded RNG. Maintenance is active; however the repository carries legacy API vestiges (e.g. deprecated aliases, vendor-prefixed browser checks, mixed Jasmine/Vitest test conventions) and a renderer transition from older Canvas batching to the newer WebGL render-node pipeline, so technical drift is moderate despite recent commits.

RATING: 8.9/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
── end of results ──
$ submit: