Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to PIXI v6 with individual package imports #152

Merged
merged 11 commits into from
Jun 21, 2021
17 changes: 0 additions & 17 deletions build/buildAmbientTypes.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/examples/animatedBubbles.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/bubbleSpray.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/bubbleStream.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/bubbleStreamPath.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/bubbles.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/bubblesVertical.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/cartoonSmoke.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/cartoonSmoke2.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/cartoonSmokeBlast.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/coins.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/explosion.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/explosion2.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/explosion3.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/explosionRing.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/flame.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/flameAndSmoke.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/flamePolygonal.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/flamePolygonalAdv.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/flameStepped.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/flameUneven.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/fountain.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/gas.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/megamanDeath.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/particleContainerPerformance.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/rain.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/snow.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/spaceshipDestruction.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/sparks.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/main.css">

<!-- Required dependencies -->
<script src="libs/pixi.js/dist/pixi.js"></script>
<script src="libs/pixi.js/dist/browser/pixi.js"></script>
<script src="../dist/pixi-particles.js"></script>

<!-- Example scaffolding -->
Expand Down
30 changes: 20 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"prebuild": "npm run lint",
"build": "tsc && rollup -c && npm run build:min && npm run build:dts",
"build:min": "terser dist/pixi-particles.js -c -m -o dist/pixi-particles.min.js --source-map \"content='dist/pixi-particles.js.map',includeSources=true,filename='dist/pixi-particles.min.js.map',url='pixi-particles.min.js.map'\" --comments \"/pixi-particles.js - /\"",
"build:dts": "dts-bundle-generator -o index.d.ts src/index.ts && node build/buildAmbientTypes.js",
"build:dts": "dts-bundle-generator -o index.d.ts src/index.ts",
"postbuild": "ncp dist docs/dist",
"predocs": "ncp node_modules/pixi.js docs/examples/libs/pixi.js",
"docs": "typedoc",
Expand All @@ -35,17 +35,30 @@
"test": "echo done"
},
"peerDependencies": {
"pixi.js": ">=4.0.0"
"@pixi/constants": "^6.0.4",
"@pixi/core": "^6.0.4",
"@pixi/display": "^6.0.4",
"@pixi/math": "^6.0.4",
"@pixi/settings": "^6.0.4",
"@pixi/sprite": "^6.0.4",
"@pixi/ticker": "^6.0.4"
},
"devDependencies": {
"@pixi/constants": "^6.0.4",
"@pixi/core": "^6.0.4",
"@pixi/display": "^6.0.4",
"@pixi/eslint-config": "^1.0.1",
"dts-bundle-generator": "^4.3.0",
"@pixi/math": "^6.0.4",
"@pixi/settings": "^6.0.4",
"@pixi/sprite": "^6.0.4",
"@pixi/ticker": "^6.0.4",
"dts-bundle-generator": "^5.9.0",
"electron": "^9.4.0",
"eslint": "^6.5.0",
"gh-pages": "^2.0.0",
"http-server": "^0.12.3",
"ncp": "^2.0.0",
"pixi.js": "^5.0.0",
"pixi.js": "^6.0.4",
"rimraf": "^2.5.4",
"rollup": "^2.7.0",
"rollup-plugin-commonjs": "^9.2.1",
Expand All @@ -72,8 +85,7 @@
"LICENSE",
"package.json",
"README.md",
"index.d.ts",
"ambient.d.ts"
"index.d.ts"
],
"keywords": [
"webgl",
Expand All @@ -85,10 +97,8 @@
"workspaces": {
"packages": [
"./",
"test/pixi-v4-iife",
"test/pixi-v4-module",
"test/pixi-v5-iife",
"test/pixi-v5-module"
"test/pixi-v6-iife",
"test/pixi-v6-module"
]
},
"private": true
Expand Down
12 changes: 9 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async function main()
sourcemap,
},
],
external: ['pixi.js'],
external: [/@pixi\/.*/],
plugins: [jscc({values:{_IIFE:false}})].concat(plugins)
});

Expand All @@ -75,11 +75,17 @@ async function main()
sourcemap,
extend: true,
globals: {
'pixi.js': 'PIXI'
'@pixi/core': 'PIXI',
'@pixi/constants': 'PIXI',
'@pixi/math': 'PIXI',
'@pixi/sprite': 'PIXI',
'@pixi/settings': 'PIXI',
'@pixi/ticker': 'PIXI',
'@pixi/display': 'PIXI'
}
},
treeshake: false,
external: ['pixi.js'],
external: [/@pixi\/.*/],
plugins: [jscc({values:{_IIFE:true}})].concat(plugins),
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/AnimatedParticle.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Particle } from './Particle';
import { Emitter } from './Emitter';
import { GetTextureFromString } from './ParticleUtils';
import { Texture } from 'pixi.js';
import { Texture } from '@pixi/core';

export interface ParsedAnimatedParticleArt
{
Expand Down
Loading