{"id":19511573,"url":"https://github.com/pixijs-userland/node","last_synced_at":"2026-04-19T02:15:17.967Z","repository":{"id":142758570,"uuid":"607701622","full_name":"pixijs-userland/node","owner":"pixijs-userland","description":"Run PixiJS but in Node.js environments, no browser required!","archived":false,"fork":false,"pushed_at":"2024-03-20T20:30:38.000Z","size":2568,"stargazers_count":45,"open_issues_count":20,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T00:23:56.927Z","etag":null,"topics":["canvas","canvas2d","glsl","nodejs","pixijs","rendering","webgl2"],"latest_commit_sha":null,"homepage":"https://pixijs.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixijs-userland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-02-28T14:05:15.000Z","updated_at":"2025-09-19T00:58:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"4cf5152d-da77-42dd-8377-e55e9d09a923","html_url":"https://github.com/pixijs-userland/node","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"f679ada3cc742eb819daf1aeb72e33e496af07ec"},"previous_names":["pixijs-userland/node","pixijs/node"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pixijs-userland/node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixijs-userland%2Fnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixijs-userland%2Fnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixijs-userland%2Fnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixijs-userland%2Fnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixijs-userland","download_url":"https://codeload.github.com/pixijs-userland/node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixijs-userland%2Fnode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31991721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["canvas","canvas2d","glsl","nodejs","pixijs","rendering","webgl2"],"created_at":"2024-11-10T23:21:31.402Z","updated_at":"2026-04-19T02:15:17.959Z","avatar_url":"https://github.com/pixijs-userland.png","language":"TypeScript","funding_links":["https://opencollective.com/pixijs","https://opencollective.com/pixijs/donate"],"categories":[],"sub_categories":[],"readme":"# @pixi/node\n\n**We are now a part of the [Open Collective](https://opencollective.com/pixijs) and with your support you can help us make PixiJS even better. To make a donation, simply click the button below and we'll love you forever!**\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://opencollective.com/pixijs/donate\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://opencollective.com/pixijs/donate/button@2x.png?color=blue\" width=250 /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n## Setup\n\n### Install\n\n```\nnpm install @pixi/node\n```\n\nThere is no default export. The correct way to import PixiJS is:\n\n```js\nimport * as PIXI from \"@pixi/node\";\n```\n\n### Error installing gl package\n\nIn most cases installing `gl` from npm should just work. However, if you run into problems you might need to adjust your system configuration and make sure all your dependencies are up to date\n\nPlease refer to the [gl installation guide](https://www.npmjs.com/package/gl/v/4.5.3-win64.0#system-dependencies) for more information.\n\n### Error installing canvas package\n\nThe [canvas](https://www.npmjs.com/package/canvas) library currently being used does not have a pre-built version for every environment.\nWhen the package detects an unsupported environment, it will try to build from source.\n\nTo build from source you will need to make sure you have the following dependencies installed and then reinstall:\n\n`brew install pkg-config cairo pango libpng jpeg giflib librsvg`\n\nFor non-mac users, please refer to the [canvas installation guide](https://www.npmjs.com/package/canvas#compiling) for more information.\n\n### Error unable to auto-detect a suitable renderer\nWhen running in a headless environment (e.g. server or continuous integration), use `xvfb` as a virtual frame buffer.\nInstall with:\n```\nsudo apt-get install xvfb\n```\nAnd then use with node when starting the program:\n```\nxvfb-run node ./src/index.js\n```\n\n## Basic Usage Example\n\n```js\nimport { Application, Assets, Sprite } from '@pixi/node';\nimport path from 'path';\nimport { writeFileSync } from 'fs';\n\n// This package requires the new asset loader to be used.\n// Initialize the new assets loader\nawait Assets.init();\n\n// The application will create a renderer using WebGL. It will also setup the ticker\n// and the root stage Container.\nconst app = new Application();\nawait app.init();\n\n// load a sprite\nconst bunnyTexture = await Assets.load(path.join(process.cwd(), 'assets/bunny.png'));\n// create sprite from texture\nconst bunny = Sprite.from(bunnyTexture);\n\n// Setup the position of the bunny\nbunny.x = app.renderer.width / 2;\nbunny.y = app.renderer.height / 2;\n\n// Rotate around the center\nbunny.anchor.x = 0.5;\nbunny.anchor.y = 0.5;\n\n// Add the bunny to the scene we are building.\napp.stage.addChild(bunny);\n\n// Listen for frame updates\napp.ticker.add(() =\u003e {\n    // each frame we spin the bunny around a bit\n    bunny.rotation += 0.01;\n});\n\n// extract and save the stage\napp.renderer.render(app.stage);\nconst base64Image = app.renderer.canvas.toDataURL('image/png');\nconst base64Data = base64Image.replace(/^data:image\\/png;base64,/, '');\nconst output = `./test.png`;\n\nwriteFileSync(output, base64Data, 'base64');\n\nprocess.exit(0);\n```\n\n## Full environment setup with Docker 🐳\n\n*NOTE: It is recommended to add `node_modules` to your `.dockerignore` file.*\n\n```Dockerfile\n# Set the base image\nFROM node:16\n\n# Create and set the working directory\nWORKDIR /usr/src/app\n\n# Add dependencies for gl, canvas and xvfb\n# Important! These dependencies must be installed before running `npm install`\nRUN apt-get update \\\n    \u0026\u0026 apt-get install -y build-essential libcairo2-dev libgif-dev libglew-dev libglu1-mesa-dev libjpeg-dev libpango1.0-dev librsvg2-dev libxi-dev pkg-config xvfb \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\n# Install app dependencies\nCOPY package*.json ./\nRUN npm install\n\n# Bundle app source\nCOPY . .\n\n# Start the server\nEXPOSE 3000\nCMD xvfb-run node ./src/index.js\n```\n\n### License\n\nThis content is released under the (http://opensource.org/licenses/MIT) MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixijs-userland%2Fnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixijs-userland%2Fnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixijs-userland%2Fnode/lists"}