{"id":15899157,"url":"https://github.com/prozi/pixi-shim","last_synced_at":"2025-04-10T23:22:00.603Z","repository":{"id":42187252,"uuid":"116880429","full_name":"Prozi/pixi-shim","owner":"Prozi","description":"PIXI.js Back-End \"shim\". For mocking Canvas in Node.js with ❤️","archived":false,"fork":false,"pushed_at":"2024-05-21T20:08:40.000Z","size":731,"stargazers_count":44,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-22T01:16:47.901Z","etag":null,"topics":["canvas","pixi","pixi-shim","pixijs","singleton"],"latest_commit_sha":null,"homepage":"https://pietal.dev","language":"JavaScript","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/Prozi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-09T22:59:05.000Z","updated_at":"2024-06-16T22:45:38.480Z","dependencies_parsed_at":"2024-01-28T19:23:54.804Z","dependency_job_id":"70f95083-a68b-4ef9-b8ff-cd40161627e0","html_url":"https://github.com/Prozi/pixi-shim","commit_stats":{"total_commits":107,"total_committers":9,"mean_commits":11.88888888888889,"dds":0.7476635514018692,"last_synced_commit":"ce4dcb218bf684b7b4f564914af79cf209832381"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prozi%2Fpixi-shim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prozi%2Fpixi-shim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prozi%2Fpixi-shim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prozi%2Fpixi-shim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Prozi","download_url":"https://codeload.github.com/Prozi/pixi-shim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248313179,"owners_count":21082813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["canvas","pixi","pixi-shim","pixijs","singleton"],"created_at":"2024-10-06T10:11:18.715Z","updated_at":"2025-04-10T23:22:00.593Z","avatar_url":"https://github.com/Prozi.png","language":"JavaScript","funding_links":["https://paypal.me/jacekpietal"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    PIXI-SHIM\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    PIXI.js Back-End \"shim\". For mocking Canvas in Node.js with ❤️\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://badge.fury.io/js/pixi-shim.svg\" alt=\"https://badge.fury.io/js/pixi-shim\" /\u003e\n    \u003ca href=\"https://app.circleci.com/pipelines/github/Prozi/pixi-shim\"\u003e\u003cimg src=\"https://circleci.com/gh/Prozi/pixi-shim.svg?style=svg\" alt=\"https://circleci.com/gh/Prozi/pixi-shim\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://snyk.io/test/github/Prozi/pixi-shim\"\u003e\u003cimg src=\"https://snyk.io/test/github/Prozi/pixi-shim/badge.svg\" alt=\"https://snyk.io/test/github/Prozi/pixi-shim\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Purpouse\n\n1. Designed for node - it makes you run universal javascript code that is designed with pixi.js on node.js environment\n\n2. It is very lazy - meaning it won't load anything twice and won't attempt to load it if it's not required\n\n3. It wont even load itself twice - while including multiple instances of pixi.js can cause `Cannot redefine property isJson` Error\n\n## Lazy loading\n\nwith lazy polyfill of\n\n- DOM\n- Window\n- Canvas\n- PIXI\n- other polyfills (requestAnimationFrame, etc.)\n\n## Usage\n\n```js\nrequire(\"pixi-shim\");\n```\n\n## Usage if your game/app is feature-heavy:\n\nand it still doesn't work, you might need to\n\n```bash\n$ yarn add pixi.js-legacy\n```\n\nand then do\n\n```js\nrequire(\"pixi-shim\");\nrequire(\"pixi.js-legacy\");\n```\n\n## Installation\n\n```bash\n$ yarn add pixi-shim\n```\n\n## DEBUG\n\nenvironment flag DEBUG enables DEBUG with progress on which polyfill have been loaded\n\n```bash\n$ DEBUG=pixi-shim node -r pixi-shim yourscript.js\n```\n\n## Canvas.toDataURL()\n\na bit hackish but works, see:\n\n- https://github.com/Prozi/pixi-shim/blob/master/pixi.spec.js\n- https://github.com/Prozi/pixi-shim/blob/master/to-data-url.js\n\n## Tests\n\n```\nTotal test suites: 2\nPassed test suites: 2\nDone in 4.35s.\nites: 0\n\nTotal tests: 10\nPassed tests: 10\nFailed tests: 0\n\nTest Suite - /home/pietal/projects/pixi-shim/index.spec.js\npassed - GIVEN pixi-shim THEN requiring it doesnt throw error\npassed - GIVEN pixi-shim THEN new PIXI.Application doesnt throw error\npassed - GIVEN pixi-shim THEN new PIXI.Sprite from base64 image does *not* work\npassed - GIVEN pixi-shim THEN toDataURL does *not* yet work\npassed - GIVEN pixi-shim THEN normal PIXI gameLoop works\n\nTest Suite - /home/pietal/projects/pixi-shim/pixi.spec.js\npassed - GIVEN pixi-shim/pixi THEN requiring it doesnt throw error\npassed - GIVEN pixi-shim/pixi THEN new PIXI.Application doesnt throw error\npassed - GIVEN pixi-shim/pixi THEN new PIXI.Sprite from base64 image *should* work\npassed - GIVEN pixi-shim/pixi THEN toDataURL *should* work with pixi.js\npassed - GIVEN pixi-shim/pixi THEN normal PIXI gameLoop works\n```\n\nhttps://app.circleci.com/pipelines/github/Prozi/pixi-shim\n\n## License\n\nMIT\n\n## You can buy me a coffee\n\nhttps://paypal.me/jacekpietal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprozi%2Fpixi-shim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprozi%2Fpixi-shim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprozi%2Fpixi-shim/lists"}