@pixi/react
Advanced tools
Comparing version 7.1.2 to 8.0.0-dev.0aaf87a
133
package.json
{ | ||
"name": "@pixi/react", | ||
"version": "7.1.2", | ||
"version": "8.0.0-dev.0aaf87a", | ||
"description": "Write PixiJS applications using React declarative style.", | ||
"keywords": [ | ||
"react", | ||
"pixi" | ||
], | ||
"homepage": "https://github.com/pixijs/pixi-react#readme", | ||
"bugs": { | ||
"url": "https://github.com/pixijs/pixi-react/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/pixijs/pixi-react.git", | ||
"directory": "packages/react" | ||
"url": "git+https://github.com/pixijs/pixi-react.git" | ||
}, | ||
"license": "MIT", | ||
"sideEffects": false, | ||
"main": "index.js", | ||
"module": "module.js", | ||
"jsnext:main": "module.js", | ||
"typings": "./index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": { | ||
"types": "./types/index.d.ts", | ||
"default": "./lib/index.mjs" | ||
}, | ||
"require": { | ||
"types": "./types/index.d.ts", | ||
"default": "./lib/index.js" | ||
} | ||
} | ||
}, | ||
"main": "lib/index.js", | ||
"module": "lib/index.mjs", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
"dist/", | ||
"LICENSE", | ||
"README.md", | ||
"index.d.ts", | ||
"index.js", | ||
"module.js" | ||
"lib/", | ||
"types/" | ||
], | ||
"scripts": { | ||
"prebuild": "npm run clean", | ||
"build": "npm run build:dev && npm run build:prod", | ||
"build:dev": "cross-env NODE_ENV=development rollup -c", | ||
"build:prod": "cross-env NODE_ENV=production rollup -c", | ||
"clean": "rimraf ./dist", | ||
"test": "jest --silent", | ||
"test:ci": "jest --silent --runInBand", | ||
"test:types": "tsc --noEmit", | ||
"test:watch": "jest --watch" | ||
"build": "tsc", | ||
"clean": "xs clean", | ||
"docs": "xs docs", | ||
"lint": "xs lint", | ||
"lint:fix": "xs lint --fix", | ||
"prepare": "husky install", | ||
"prerelease": "npm run test:lint && npm run build", | ||
"release": "xs bump,publish,git-push", | ||
"test": "vitest run", | ||
"test:lint": "xs lint", | ||
"test:watch": "vitest" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.{ts,js,mjs}": [ | ||
"eslint --cache --fix --max-warnings 0" | ||
] | ||
}, | ||
"dependencies": { | ||
"lodash.isnil": "4.0.0", | ||
"lodash.times": "4.3.2", | ||
"performance-now": "2.1.0", | ||
"prop-types": "^15.8.1" | ||
"react-reconciler": "^0.29.2", | ||
"statery": "^0.7.1" | ||
}, | ||
"devDependencies": { | ||
"@pixi/events": "^7.1.1", | ||
"@testing-library/react": "^13.4.0", | ||
"canvas": "^2.11.0", | ||
"jest-webgl-canvas-mock": "^0.2.3", | ||
"react-test-renderer": "18.2.0" | ||
"@pixi/extension-scripts": "^2.4.1", | ||
"@types/react": "^18.3.2", | ||
"@types/react-reconciler": "^0.28.8", | ||
"husky": "^8.0.0", | ||
"pixi.js": "v8.1.5-dev.1ebdfc5", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"typescript": "^5.4.5", | ||
"vitest": "^1.6.0" | ||
}, | ||
"peerDependencies": { | ||
"@babel/runtime": "^7.14.8", | ||
"@pixi/app": ">=6.0.0", | ||
"@pixi/constants": ">=6.0.0", | ||
"@pixi/core": ">=6.0.0", | ||
"@pixi/display": ">=6.0.0", | ||
"@pixi/extensions": ">=6.0.0", | ||
"@pixi/graphics": ">=6.0.0", | ||
"@pixi/math": ">=6.0.0", | ||
"@pixi/mesh": ">=6.0.0", | ||
"@pixi/mesh-extras": ">=6.0.0", | ||
"@pixi/particle-container": ">=6.0.0", | ||
"@pixi/sprite": ">=6.0.0", | ||
"@pixi/sprite-animated": ">=6.0.0", | ||
"@pixi/sprite-tiling": ">=6.0.0", | ||
"@pixi/text": ">=6.0.0", | ||
"@pixi/text-bitmap": ">=6.0.0", | ||
"@pixi/ticker": ">=6.0.0", | ||
"prop-types": "^15.8.1", | ||
"react": ">=17.0.0", | ||
"react-dom": ">=17.0.0" | ||
"pixi.js": "^8.0.0", | ||
"react": ">=18.0.0", | ||
"react-dom": ">=18.0.0" | ||
}, | ||
"peerDependenciesMeta": { | ||
"react-dom": { | ||
"optional": true | ||
} | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "9cf16d049800cf29c60360bad9a85b89db713e59" | ||
"extensionConfig": { | ||
"lint": [ | ||
"test", | ||
"lib" | ||
], | ||
"environments": [ | ||
"node" | ||
], | ||
"docsName": "PixiJS React", | ||
"docsTitle": "PixiJS React API Documentation", | ||
"docsDescription": "Documentation for PixiJS React library", | ||
"docsKeyword": "docs, documentation, pixi, pixijs, react, html5, javascript, jsdoc" | ||
} | ||
} |
<p align="center"> | ||
<img src="https://user-images.githubusercontent.com/232559/142733492-3c106f68-8b8e-459c-95f9-aca77561d438.png" alt="pixi-react" width="310" /> | ||
<img src="./.github/react.svg" alt="pixi-react" width="310" /> | ||
</p> | ||
@@ -23,3 +23,2 @@ | ||
<img src="https://img.shields.io/badge/react-latest-ff69b4.svg" alt="react version" /> | ||
<img src="https://img.shields.io/badge/pixi-v6+-ff69b4.svg" alt="pixi version" /> | ||
</p> | ||
@@ -30,77 +29,1 @@ | ||
Pixi React is an open-source, production-ready library to render high performant PixiJS applications in React. | ||
## Features | ||
- React 17 and 18 support | ||
- PixiJS v6 and v7 support | ||
- react-spring compatible animated components | ||
## Get started | ||
### Quick start | ||
If you want to start a new React project from scratch, we recommend [Create React App](https://github.com/facebook/create-react-app). | ||
To add to an existing React application, just install the dependencies: | ||
#### Start New React Project "my-app" with Create React App: | ||
```bash | ||
# for typescript add "--template typescript" | ||
npx create-react-app my-app | ||
cd my-app | ||
``` | ||
#### Install Pixi React Dependencies: | ||
```bash | ||
npm install pixi.js @pixi/react | ||
``` | ||
#### Usage: | ||
```jsx | ||
import { BlurFilter } from 'pixi.js'; | ||
import { Stage, Container, Sprite, Text } from '@pixi/react'; | ||
import { useMemo } from 'react'; | ||
export const MyComponent = () => | ||
{ | ||
const blurFilter = useMemo(() => new BlurFilter(4), []); | ||
return ( | ||
<Stage options={{ background: 0xffffff }}> | ||
<Sprite | ||
image="https://pixijs.io/pixi-react/img/bunny.png" | ||
x={400} | ||
y={270} | ||
anchor={{ x: 0.5, y: 0.5 }} | ||
/> | ||
<Container x={400} y={330}> | ||
<Text text="Hello World" anchor={{ x: 0.5, y: 0.5 }} filters={[blurFilter]} /> | ||
</Container> | ||
</Stage> | ||
); | ||
}; | ||
``` | ||
### Docs | ||
Check out [our documentation](https://pixijs.io/pixi-react/) for guides and a full API reference. | ||
Or checkout [our examples](https://codepen.io/collection/XPpGdb) on codepen for inspiration. | ||
## Contribute | ||
Want to contribute to Pixi React? Our [contributing guide](/.github/CONTRIBUTING.md) has you covered. | ||
## License | ||
Pixi React is MIT licensed. | ||
This project was originally created and maintained by @inlet. He graciously gave the Pixi team the keys to maintain and push the project forward. Big thanks for all the hard work on making this project so awesome. | ||
This projects codebase was originally forked from @michalochman 's [react-pixi-fiber](https://github.com/michalochman/react-pixi-fiber). | ||
## Meet fellow developers | ||
You have an amazing feature in mind or just want to get in touch with other developers? Feel free to join our Discord channel. | ||
[Join us on Discord](https://discord.gg/zqbXQAADuM) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
5
43
1
1
0
136052
9
3740
28
2
+ Addedreact-reconciler@^0.29.2
+ Addedstatery@^0.7.1
+ Added@webgpu/types@0.1.52(transitive)
+ Added@xmldom/xmldom@0.8.10(transitive)
+ Addedeventemitter3@5.0.1(transitive)
+ Addedparse-svg-path@0.1.2(transitive)
+ Addedpixi.js@8.6.6(transitive)
+ Addedreact@18.3.1(transitive)
+ Addedreact-reconciler@0.29.2(transitive)
+ Addedscheduler@0.23.2(transitive)
+ Addedstatery@0.7.1(transitive)
- Removedlodash.isnil@4.0.0
- Removedlodash.times@4.3.2
- Removedperformance-now@2.1.0
- Removedprop-types@^15.8.1
- Removed@babel/runtime@7.26.0(transitive)
- Removed@pixi/app@7.4.2(transitive)
- Removed@pixi/assets@7.4.2(transitive)
- Removed@pixi/color@7.4.2(transitive)
- Removed@pixi/constants@7.4.2(transitive)
- Removed@pixi/core@7.4.2(transitive)
- Removed@pixi/display@7.4.2(transitive)
- Removed@pixi/extensions@7.4.2(transitive)
- Removed@pixi/graphics@7.4.2(transitive)
- Removed@pixi/math@7.4.2(transitive)
- Removed@pixi/mesh@7.4.2(transitive)
- Removed@pixi/mesh-extras@7.4.2(transitive)
- Removed@pixi/particle-container@7.4.2(transitive)
- Removed@pixi/runner@7.4.2(transitive)
- Removed@pixi/settings@7.4.2(transitive)
- Removed@pixi/sprite@7.4.2(transitive)
- Removed@pixi/sprite-animated@7.4.2(transitive)
- Removed@pixi/sprite-tiling@7.4.2(transitive)
- Removed@pixi/text@7.4.2(transitive)
- Removed@pixi/text-bitmap@7.4.2(transitive)
- Removed@pixi/ticker@7.4.2(transitive)
- Removed@pixi/utils@7.4.2(transitive)
- Removedcall-bind-apply-helpers@1.0.1(transitive)
- Removedcall-bound@1.0.3(transitive)
- Removeddunder-proto@1.0.1(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.0.0(transitive)
- Removedeventemitter3@4.0.7(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.7(transitive)
- Removedget-proto@1.0.1(transitive)
- Removedgopd@1.2.0(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedlodash.isnil@4.0.0(transitive)
- Removedlodash.times@4.3.2(transitive)
- Removedmath-intrinsics@1.1.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedobject-inspect@1.13.3(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedpunycode@1.4.1(transitive)
- Removedqs@6.13.1(transitive)
- Removedreact-is@16.13.1(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
- Removedside-channel@1.1.0(transitive)
- Removedside-channel-list@1.0.0(transitive)
- Removedside-channel-map@1.0.1(transitive)
- Removedside-channel-weakmap@1.0.2(transitive)
- Removedurl@0.11.4(transitive)