pixi-viewport
Advanced tools
Comparing version 4.38.0 to 5.0.0
{ | ||
"name": "pixi-viewport", | ||
"version": "4.38.0", | ||
"version": "5.0.0", | ||
"description": "A highly configurable viewport/2D camera designed to work with pixi.js. Features include dragging, pinch-to-zoom, mouse wheel zooming, decelerated dragging, follow target, snap to point, snap to zoom, clamping, bouncing on edges, and move on mouse edges.", | ||
"main": "dist/cjs/viewport.js", | ||
"module": "dist/esm/viewport.es.js", | ||
"bundle": "dist/viewport.min.js", | ||
"types": "index.d.ts", | ||
"main": "./dist/pixi_viewport.umd.cjs", | ||
"module": "./dist/pixi_viewport.js", | ||
"type": "module", | ||
"types": "./dist/index.d.ts", | ||
"directories": { | ||
@@ -13,23 +13,18 @@ "doc": "docs" | ||
"files": [ | ||
"dist", | ||
"index.d.ts", | ||
"src" | ||
"dist" | ||
], | ||
"scripts": { | ||
"start": "serve docs/", | ||
"dev": "rollup -w -c docs/sample/rollup.dev.js", | ||
"dev-original": "rollup -w -c docs/original/rollup.dev.js", | ||
"dev": "vite dev", | ||
"test": "floss --path test", | ||
"coverage": "nyc mocha", | ||
"build": "rollup -c && yarn build:types", | ||
"build:types": "rimraf ./compile && tsc -p ./tsconfig.json --outDir compile && api-extractor run", | ||
"docs": "rimraf ./js && tsc -p ./tsconfig-docs.json --outDir js && jsdoc -c .jsdoc.json", | ||
"build": "vite build --config vite.build.ts && node ./scripts/append-mixins.js", | ||
"docs": "vite build && rimraf ./js && tsc -p ./tsconfig-docs.json --outDir js && rimraf ./docs/dist/jsdoc/ && jsdoc -c .jsdoc.json && node ./scripts/copy", | ||
"docs:serve": "vite preview --outDir dist/", | ||
"upgrade": "yarn upgrade-interactive --latest", | ||
"prepublishOnly": "yarn build && yarn builds && yarn build:types && yarn docs", | ||
"builds-rollup": "rollup -c docs/builds/rollup/rollup.config.js", | ||
"builds-browserify": "browserify docs/builds/browserify/code.js -o docs/builds/browserify/index.js", | ||
"builds-standalone": "node scripts/copy", | ||
"builds-typescript": "rollup -c docs/builds/ts/rollup.config.js", | ||
"builds-original": "rollup -c docs/original/rollup.config.js", | ||
"builds": "yarn builds-rollup && yarn builds-browserify && yarn builds-standalone && yarn builds-typescript && yarn builds-original" | ||
"prepublishOnly": "yarn build && yarn docs", | ||
"lint": "eslint . --ignore-path .gitignore", | ||
"lint:fix": "eslint . --ignore-path .gitignore --fix", | ||
"prepare": "husky install && yarn build", | ||
"pre-commit": "lint-staged", | ||
"prepack": "yarn build" | ||
}, | ||
@@ -57,30 +52,11 @@ "repository": { | ||
"homepage": "https://github.com/davidfig/pixi-viewport#readme", | ||
"peerDependencies": { | ||
"@pixi/display": "^6.5.8", | ||
"@pixi/interaction": "^6.5.8", | ||
"@pixi/math": "^6.5.8", | ||
"@pixi/ticker": "^6.5.8" | ||
}, | ||
"dependencies": {}, | ||
"peerDependencies": {}, | ||
"devDependencies": { | ||
"@babel/core": "^7.16.0", | ||
"@babel/preset-env": "^7.16.4", | ||
"@joseph184/rollup-plugin-node-builtins": "^2.1.4", | ||
"@microsoft/api-extractor": "^7.18.19", | ||
"@pixi-build-tools/rollup-configurator": "^1.0.14", | ||
"@pixi/display": "^6.5.8", | ||
"@pixi/core": "^7.0.4", | ||
"@pixi/display": "^7.0.4", | ||
"@pixi/eslint-config": "^4.0.1", | ||
"@pixi/events": "^6.5.8", | ||
"@pixi/interaction": "^6.5.8", | ||
"@pixi/math": "^6.5.8", | ||
"@pixi/ticker": "^6.5.8", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^22.0.2", | ||
"@rollup/plugin-node-resolve": "^13.0.6", | ||
"@rollup/plugin-sucrase": "^4.0.1", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@types/offscreencanvas": "^2019.6.4", | ||
"@typescript-eslint/eslint-plugin": "^5.5.0", | ||
"@pixi/events": "^7.0.4", | ||
"@pixi/math": "^7.0.4", | ||
"@pixi/ticker": "^7.0.4", | ||
"@typescript-eslint/parser": "^5.5.0", | ||
"browserify": "^17.0.0", | ||
"chai": "^4.3.4", | ||
@@ -92,16 +68,12 @@ "clicked": "^4.0.3", | ||
"floss": "^5.0.1", | ||
"fork-me-github": "^1.2.0", | ||
"fs-extra": "^10.0.0", | ||
"husky": "^8.0.3", | ||
"jsdoc": "^3.6.3", | ||
"lint-staged": "^13.1.0", | ||
"pixi-ease": "^3.0.7", | ||
"pixi.js": "^6.5.8", | ||
"pixi.js": "^7.0.5", | ||
"raf": "^3.4.1", | ||
"rollup": "^2.60.2", | ||
"rollup-plugin-node-globals": "^1.4.0", | ||
"rollup-plugin-peer-deps-external": "^2.2.4", | ||
"rollup-plugin-serve": "^2.0.1", | ||
"serve": "^14.0.1", | ||
"settingspanel": "^2.0.0", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.5.2", | ||
"vite": "^3.2.4", | ||
"vite-plugin-dts": "^1.7.1", | ||
"yy-counter": "^2.1.0", | ||
@@ -108,0 +80,0 @@ "yy-fps": "^2.0.0", |
@@ -14,2 +14,14 @@ # pixi-viewport | ||
## v5+ | ||
Moves pixi-viewport to pixi.js v7 (thanks [@cuire](https://github.com/cuire)!). | ||
NOTE: there is a breaking change since pixi-viewport moved to pixi's new event system. `options.interaction` is removed and you need pass `options.events` to the viewport for it to work properly. The events object can be found at pixi's `renderer.events` or `app.renderer.events`. | ||
```js | ||
const viewport = new Viewport({ events: renderer.events }); | ||
// or | ||
// const viewport = new Viewport({ events: app.renderer.events }); | ||
``` | ||
## v4.30.0+ | ||
@@ -44,3 +56,3 @@ This project was migrated to Typescript (thanks [@ShukantPal](https://github.com/ShukantPal)!). All functionality should be the same. The live Example has been updated. | ||
interaction: app.renderer.plugins.interaction // the interaction module is important for wheel to work properly when renderer.view is placed or scaled | ||
events: app.renderer.events // the interaction module is important for wheel to work properly when renderer.view is placed or scaled | ||
}) | ||
@@ -83,14 +95,2 @@ | ||
## Build Examples | ||
I've included the following build examples in the docs/ directory: | ||
* [flems-io interactive demo](https://davidfig.github.io/pixi-viewport/) | ||
* [original demo built with rollup](https://github.com/davidfig/pixi-viewport/tree/master/docs/original) | ||
* [browserify](https://github.com/davidfig/pixi-viewport/tree/master/docs/builds/browserify) | ||
* [rollup](https://github.com/davidfig/pixi-viewport/tree/master/docs/builds/rollup) | ||
* [standalone (e.g., cdn)](https://github.com/davidfig/pixi-viewport/tree/master/docs/builds/standalone) | ||
* [typescript](https://github.com/davidfig/pixi-viewport/tree/master/docs/builds/ts). | ||
You can see the live demos at [https://davidfig.github.io/pixi-viewport/builds/](https://davidfig.github.io/pixi-viewport/builds/). | ||
## Migration from pixi-viewport v3 to v4 | ||
@@ -132,9 +132,6 @@ Viewport needs to be imported or required as follows: | ||
3. yarn dev | ||
4. open browser to http://localhost:10001 | ||
4. open browser to http://localhost:5173 | ||
PRs are more than welcome! | ||
## v4.30.0+ | ||
This project was migrated to Typescript (thanks [@sukantpal](https://github.com/SukantPal)!). All functionality should be the same. The live Example has been updated. | ||
## Other Libraries | ||
@@ -148,2 +145,2 @@ If you liked pixi-viewport, please try my other open source libraries: | ||
MIT License | ||
(c) 2021 [YOPEY YOPEY LLC](https://yopeyopey.com/) by David Figatner (david@yopeyopey.com) | ||
(c) 2023 [YOPEY YOPEY LLC](https://yopeyopey.com/) by David Figatner (david@yopeyopey.com) |
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
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
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
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
0
27
Yes
153619
26
2517
142
1