{"_id":"@dezzmeister/expo-pixi","name":"@dezzmeister/expo-pixi","dist-tags":{"latest":"2.1.1"},"versions":{"2.1.1":{"name":"@dezzmeister/expo-pixi","version":"2.1.1","description":"Pixi.js V4 Expo","main":"build/index.js","types":"build/index.d.ts","sideEffects":false,"license":"MIT","scripts":{"build":"expo-module build","clean":"expo-module clean","lint":"expo-module lint","test":"expo-module test","prepare":"expo-module prepare","prepublishOnly":"expo-module prepublishOnly","expo-module":"expo-module"},"dependencies":{"@expo/browser-polyfill":"^1.0.0","@types/pixi.js":"4.8.9","path":"^0.12.7","pixi-filters":"2.7.1","pixi.js":"latest-4.x","url":"^0.11.0"},"devDependencies":{"@types/react-native":"^0.67.7","@typescript-eslint/eslint-plugin":"^5.26.0","@typescript-eslint/parser":"^5.26.0","eslint":"^8.16.0","expo-asset":"^8.5.0","expo-gl":"^11.3.0","expo-module-scripts":"^2.0.0","prettier":"^2.6.2"},"peerDependencies":{"expo-asset":"*","expo-gl":"*","react-native":"*"},"gitHead":"8795b0a39727303c7959f9ef18df1c1259fab879","_id":"@dezzmeister/expo-pixi@2.1.1","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"integrity":"sha512-ZEhlw/SG4/T4MipyXV20QRscnAMqmZjr5eONC5R8BbLTz4dKVQIT0YKVU2Xg13F2fd2vxIRMmyHzIfzX4M7QuQ==","shasum":"8c9cc0ec0f99bf9b65d1a7e28d572ad1f3734238","tarball":"https://registry.npmjs.org/@dezzmeister/expo-pixi/-/expo-pixi-2.1.1.tgz","fileCount":46,"unpackedSize":1164959,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1EuwXVVsGnPfVUevYTTRLGODUHT3iyxB/8Yb+Gdl5lQIgSXiv6d7iCxWYACheN9eybylyxxsdDNOGtr5ezWDZGi0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFozUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmozug/+KlQiAIs/m2Lo0rN1rlBQfDieGLf6LrxoJvYLXU/JwI5660FD\r\n+RW4KGmUoZyPcPskuu5JG4JKudAq8nrJyHbQ/bkxUbjJAsEpWNuqu21UTGFJ\r\ng8SCCciaday4dwVSz+lNgU54gNmzH4cmUhi19Lr9v/Oq33AoI4maoLnwvSM4\r\nDEkbBXYfjcK4ZWiAZd52UeEx2GzeNCqCMbIgfAhctF5iJzS9MAgkih7Y1KOi\r\nb8VCZ52cLkeBzWHJr8s9iTwPqFaB4zH/yy7UdBj4vb3VcC/YIih43W/QLJ8I\r\nylmmD50uUkoU+GklYYNjoO/2W63wDcxxdLhCfOp6P9MXQ4yuxhhm6DjcOv0f\r\nIG02BZUJT1U/M5Sa1peR6T6x7w5jZSwNX9fyhVueki4Cj8Epkkw5Cv8Uifvm\r\nkD6ivDGQFfH99PRLL0SwVqts4Gm4ZpuIGUkDmqZLYRU0SNJJ9lsVq9aY53mR\r\n11IoNuYNOSz9kUshvx+BX63sexQDo2JxkQtvAgDaPHQrantcjCtngI1yMxwC\r\nODNx9Cvu34O/iESbb61SyOu/W0n+zxTNZba5Lk6Xemr5CMriWBl6TEcVr+RW\r\nM+APF95KPwZQTlzdcdLDrmfeacFJiqeuZ4FMeg8QrgNGPUgPKeRkk4yBx0Nl\r\n0PZv4cJUthrNvM/6mTGN/MKZVcZ/8fR7L6o=\r\n=63Fz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dezzmeister","email":"dezzmeister16@gmail.com"},"directories":{},"maintainers":[{"name":"dezzmeister","email":"dezzmeister16@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expo-pixi_2.1.1_1679199444205_0.31707557907642303"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-19T04:17:24.141Z","2.1.1":"2023-03-19T04:17:24.470Z","modified":"2023-03-19T04:17:24.668Z"},"maintainers":[{"name":"dezzmeister","email":"dezzmeister16@gmail.com"}],"description":"Pixi.js V4 Expo","license":"MIT","readme":"# expo-pixi\n\n# NOTE: forked from [Bartozzz/expo-pixi](https://github.com/Bartozzz/expo-pixi) and published to npm\n\n[Pixi.js V4](https://pixijs.download/v4.8.9/docs/) for Expo.\n\n## Installation\n\n```bash\n$ npm install @dezzmeister/expo-pixi\n```\n\n```bash\n$ yarn add @dezzmeister/expo-pixi\n```\n\nAdditionally, you'll need to install the following dependencies:\n\n```bash\n$ expo install expo-gl expo-asset\n```\n\n## Usage\n\n```ts\n// ✅\nimport { PIXI } from \"expo-pixi\";\n\n// ❌\nimport * as PIXI from \"pixi.js\";\n```\n\nNow you can create a new `Application` the way you would on the web, but be sure to pass in a `WebGLRenderingContext` and pass all the configuration options in the first argument:\n\n```ts\n// ✅\nconst app = new PIXI.Application({ width, height, context });\n\n// ❌\nconst app = new PIXI.application(width, height);\n```\n\nFinally, because of the way React Native currently works you must load in assets asynchronously.\n\n```ts\n// ✅\nconst texture = await PIXI.Texture.from(expoAsset);\nconst texture = await PIXI.Texture.from(require(\"../assets/monster.png\"));\nconst texture = await PIXI.Texture.from(\"https://cdn.example.com/monster.png\");\n\n// ✅\nconst sprite = await PIXI.Sprite.from(texture);\nconst sprite = await PIXI.Sprite.from(expoAsset);\nconst sprite = await PIXI.Sprite.from(require(\"../assets/monster.png\"));\nconst sprite = await PIXI.Sprite.from(\"https://cdn.example.com/monster.png\");\n```\n\n## Example\n\nYou can find plenty of examples in the `example/` application. A minimal working example is:\n\n```js\nimport { GLView } from \"expo-gl\";\nimport { PIXI } from \"@Bartozzz/expo-pixi\";\n\nexport function App() {\n  return (\n    <Expo.GLView\n      style={{ flex: 1 }}\n      onContextCreate={async (context) => {\n        const app = new PIXI.Application({ context });\n        const sprite = PIXI.Sprite.from(require(\"../assets/monster.png\"));\n\n        app.stage.addChild(sprite);\n      }}\n    />\n  );\n}\n```\n","readmeFilename":"README.md"}