{"id":25363554,"url":"https://github.com/tcd93/pixi-pack","last_synced_at":"2026-05-01T13:31:07.728Z","repository":{"id":42667200,"uuid":"257845780","full_name":"tcd93/pixi-pack","owner":"tcd93","description":"A 6-packed PIXI.js boilerplate (ts/svelte/ssr/rollup)","archived":false,"fork":false,"pushed_at":"2023-01-07T05:21:26.000Z","size":2292,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T04:19:57.586Z","etag":null,"topics":["boilerplate","pixi","pixijs","rollup","sapper","ssr","svelte","template","typescript"],"latest_commit_sha":null,"homepage":"https://tcd93.github.io/pixi-pack/blog/what-is-this","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tcd93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-22T08:54:25.000Z","updated_at":"2022-01-21T10:39:07.000Z","dependencies_parsed_at":"2023-02-06T12:46:15.571Z","dependency_job_id":null,"html_url":"https://github.com/tcd93/pixi-pack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tcd93/pixi-pack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcd93%2Fpixi-pack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcd93%2Fpixi-pack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcd93%2Fpixi-pack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcd93%2Fpixi-pack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tcd93","download_url":"https://codeload.github.com/tcd93/pixi-pack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcd93%2Fpixi-pack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32499681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","pixi","pixijs","rollup","sapper","ssr","svelte","template","typescript"],"created_at":"2025-02-14T22:34:50.402Z","updated_at":"2026-05-01T13:31:07.659Z","avatar_url":"https://github.com/tcd93.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What is this?\n\u003cp\u003eThis is just a template project to get you quickly started with PIXI.js\u003c/p\u003e\n\n\u003ch4\u003e\u003cb\u003eCheck it out \u003ca href=\"https://tcd93.github.io/pixi-pack/\"\u003elive!\u003c/a\u003e\u003c/b\u003e 🔥🔥🔥\u003c/h4\u003e\n\n\u003cp\u003eOut of the box, you get:\u003c/p\u003e\n\n\u003cul\u003e\n  \u003cli\u003eA (very bad) Pong game that somehow implements a \u003ca href='https://brm.io/matter-js/'\u003ephysics engine\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003eAn OOP(-ish?) style of writing game objects\u003c/li\u003e\n  \u003cli\u003eTypescript\u003c/li\u003e\n  \u003cli\u003eCode-splitting, dynamic imports and live reloading, powered by Rollup\u003c/li\u003e\n  \u003cli\u003eServer-side rendering (SSR) with client-side hydration, Service worker for offline support using \u003ca href='https://sapper.svelte.dev/'\u003eSapper\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003cb\u003eNo\u003c/b\u003e support for IE\u003c/li\u003e\n\u003c/ul\u003e\n\n## Basic Structure\n\u003cp\u003eTwo main parts:\u003c/p\u003e\n\u003cul\u003e\n  \u003cli\u003e\n    The \u003cb\u003egame\u003c/b\u003e part (PIXI \u0026 Matter)\n    \n\u003cp\u003eThe game includes: \u003ccode\u003egame.ts\u003c/code\u003e,\u003ccode\u003egame_config.ts\u003c/code\u003e \u0026 the bunch of \u003ci\u003egame objects\u003c/i\u003e inside \u003ccode\u003e/src/game\u003c/code\u003e folder\u003c/p\u003e\n\u003cul\u003e\n  \u003cli\u003e\n    \u003cdetails\u003e\n      \u003csummary\u003e\u003ccode\u003egame.ts\u003c/code\u003e specifies the basic layout: a canvas container \u0026 the \u003ci\u003egame objects\u003c/i\u003e\u003c/summary\u003e\n      \u003cpre\u003e\u003ccode\u003e\nnew Container({\n  view: canvas, // the canvas element to draw the game on\n  builder: (app, { topId, bottomId }) =\u003e [\n    new Background(app),\n    new Ball({ app: app, name: 'ball', onCollisionCallback: (otherBody) =\u003e ... }),\n    new Paddle({ app: app, name: 'paddle-top' }),\n    new Paddle({ app: app, name: 'paddle-bottom' })\n  ]\n})\n      \u003c/code\u003e\u003c/pre\u003e\n    \u003c/details\u003e\n  \u003c/li\u003e\n\n  \u003cli\u003e\n    \u003ccode\u003egame_config.ts\u003c/code\u003e contains defaults for canvas width, height \u0026 physics stuff such as friction, inertia...\n  \u003c/li\u003e\n\n  \u003cli\u003e\n    \u003cdetails\u003e\n      \u003csummary\u003e\u003ci\u003eGame objects\u003c/i\u003e should extends \u003ccode\u003esrc/game/app/GameObject.ts\u003c/code\u003e parent class \u0026 be included in \u003ccode\u003egame.ts\u003c/code\u003e\u003c/summary\u003e\n      \u003cpre\u003e\u003ccode\u003e\nclass Ball extends GameObject // basic\nclass Ball extends Materialized(GameObject) // \"materialize\" it and include in physics world, trigger onCollisionCallback\nclass Ball extends Interactive(Materialized(GameObject)) // subscribe to key press events\n      \u003c/code\u003e\u003c/pre\u003e\n    \u003c/details\u003e\n  \u003c/li\u003e\n\n  \u003cli\u003e\n    There are two game loops (exposed as \u003ccode\u003eupdate(_delta: time)\u003c/code\u003e \u0026 \u003ccode\u003efixedUpdate(_delta: time)\u003c/code\u003e)\n      \u003cul\u003e\n        \u003cli\u003e\n          \u003ccode\u003eupdate()\u003c/code\u003e does not have FPS cap, there more refresh rate your monitor have, the lower \u003ccode\u003e_delta\u003c/code\u003e goes\n        \u003c/li\u003e\n        \u003cli\u003e\n          \u003ccode\u003efixedUpdate()\u003c/code\u003e have FPS cap of \u003ci\u003e60FPS\u003c/i\u003e, \u003ccode\u003e_delta\u003c/code\u003e will stay closely to 1.0 as it can; you should put logics \u0026 physics-related codes inside this loop (this is to prevents\n          having objects on 144Hz monitor move more quickly than a 60Hz one)\n        \u003c/li\u003e\n      \u003c/ul\u003e\n  \u003c/li\u003e\n\n  \u003cli\u003e\n    \u003cdetails\u003e\n      \u003csummary\u003eSome already-made interfaces that a \u003ci\u003eGame object\u003c/i\u003e can implements to simplify codes\u003c/summary\u003e\n      \u003cpre\u003e\u003ccode\u003e\n// A game object can implement \"Shapeable\" interface \u0026 \"requiredGraphics\" method,\n// it requires a PIXI Graphics instance to draw onto the canvas stage\nclass Ball extends GameObject implements Shapeable {\n  requireGraphics(): Graphics {\n    const [x, y, radius] = [100, 100, 6]\n    //draw a circle\n    return new Graphics().beginFill(0xFFFFFF).drawCircle(x, y, radius).endFill()\n  }\n}\n      \u003c/code\u003e\u003c/pre\u003e\n    \u003c/details\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003eThe \u003cb\u003eother stuff\u003c/b\u003e part, handled by Sapper \u0026 Svelte, checkout their awesome tutorial for know-how\u003c/li\u003e\n\u003c/ul\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcd93%2Fpixi-pack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftcd93%2Fpixi-pack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcd93%2Fpixi-pack/lists"}