Skip to content

Commit

Permalink
Merge branch 'dev' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtimebuddy committed Jul 23, 2022
2 parents 0a986ca + 63b9f0c commit c79f46c
Show file tree
Hide file tree
Showing 147 changed files with 6,975 additions and 6,763 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Install npm
run: npm install -g npm@>=7
Expand Down
28 changes: 14 additions & 14 deletions bundles/pixi.js-legacy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pixi.js-legacy",
"version": "6.4.2",
"version": "6.5.0",
"description": "The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.",
"author": "Mat Groves",
"contributors": [
Expand All @@ -11,7 +11,7 @@
],
"standalone": true,
"main": "dist/cjs/pixi-legacy.js",
"module": "dist/esm/pixi-legacy.js",
"module": "dist/esm/pixi-legacy.mjs",
"bundle": "dist/browser/pixi-legacy.js",
"bundleModule": "dist/browser/pixi-legacy.mjs",
"bundleOutput": {
Expand All @@ -22,7 +22,7 @@
".": {
"import": {
"types": "./index.d.ts",
"default": "./dist/esm/pixi-legacy.js"
"default": "./dist/esm/pixi-legacy.mjs"
},
"require": {
"types": "./index.d.ts",
Expand All @@ -46,16 +46,16 @@
"url": "https://opencollective.com/pixijs"
},
"dependencies": {
"@pixi/canvas-display": "6.4.2",
"@pixi/canvas-extract": "6.4.2",
"@pixi/canvas-graphics": "6.4.2",
"@pixi/canvas-mesh": "6.4.2",
"@pixi/canvas-particle-container": "6.4.2",
"@pixi/canvas-prepare": "6.4.2",
"@pixi/canvas-renderer": "6.4.2",
"@pixi/canvas-sprite": "6.4.2",
"@pixi/canvas-sprite-tiling": "6.4.2",
"@pixi/canvas-text": "6.4.2",
"pixi.js": "6.4.2"
"@pixi/canvas-display": "6.5.0",
"@pixi/canvas-extract": "6.5.0",
"@pixi/canvas-graphics": "6.5.0",
"@pixi/canvas-mesh": "6.5.0",
"@pixi/canvas-particle-container": "6.5.0",
"@pixi/canvas-prepare": "6.5.0",
"@pixi/canvas-renderer": "6.5.0",
"@pixi/canvas-sprite": "6.5.0",
"@pixi/canvas-sprite-tiling": "6.5.0",
"@pixi/canvas-text": "6.5.0",
"pixi.js": "6.5.0"
}
}
21 changes: 21 additions & 0 deletions bundles/pixi.js-node/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2013-2018 Mathew Groves, Chad Engler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
85 changes: 85 additions & 0 deletions bundles/pixi.js-node/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# @pixi/node

**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!**

<div align="center">
<a href="https://opencollective.com/pixijs/donate" target="_blank">
<img src="https://opencollective.com/pixijs/donate/button@2x.png?color=blue" width=250 />
</a>
</div>

## Setup

### Install

```
npm install @pixi/node
```

There is no default export. The correct way to import PixiJS is:

```js
import * as PIXI from "@pixi/node";
```

### Error installing canvas package

The [canvas](https://www.npmjs.com/package/canvas) library currently being used does not have a pre-built version for every environment.
When the package detects an unsupported environment, it will try to build from source.

To build from source you will need to make sure you have the following dependencies installed and then reinstall:

`brew install pkg-config cairo pango libpng jpeg giflib librsvg`

## Basic Usage Example

```js
import { Application, Sprite, Assets } from '@pixi/node';
import path from 'path';
import { writeFileSync } from 'fs';

// This package requires the new asset loader to be used.
// Initialize the new assets loader
await Assets.init();

// The application will create a renderer using WebGL. It will also setup the ticker
// and the root stage Container.
const app = new Application();

// load a sprite
const bunnyTexture = await Assets.load(path.join(process.cwd(), 'assets/bunny.png'));
// create sprite from texture
const bunny = Sprite.from(bunnyTexture);

// Setup the position of the bunny
bunny.x = app.renderer.width / 2;
bunny.y = app.renderer.height / 2;

// Rotate around the center
bunny.anchor.x = 0.5;
bunny.anchor.y = 0.5;

// Add the bunny to the scene we are building.
app.stage.addChild(bunny);

// Listen for frame updates
app.ticker.add(() => {
// each frame we spin the bunny around a bit
bunny.rotation += 0.01;
});

// extract and save the stage
app.renderer.render(app.stage);
const base64Image = app.renderer.plugins.extract
.canvas(app.stage)
.toDataURL('image/png');

const base64Data = base64Image.replace(/^data:image\/png;base64,/, '');
const output = `./test.png`;

writeFileSync(output, base64Data, 'base64');
```

### License

This content is released under the (http://opensource.org/licenses/MIT) MIT License.
82 changes: 82 additions & 0 deletions bundles/pixi.js-node/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"name": "@pixi/node",
"version": "6.5.0",
"description": "Bundle for PixiJS with support for NodeJS",
"homepage": "http://pixijs.com/",
"bugs": "https://github.com/pixijs/pixi.js/issues",
"repository": {
"type": "git",
"url": "https://github.com/pixijs/pixi.js.git"
},
"license": "MIT",
"author": "PixiJS Team",
"main": "dist/cjs/node.cjs",
"module": "dist/esm/node.mjs",
"types": "index.d.ts",
"exports": {
".": {
"import": {
"types": "./index.d.ts",
"default": "./dist/esm/node.mjs"
},
"require": {
"types": "./index.d.ts",
"default": "./dist/cjs/node.cjs"
}
}
},
"files": [
"dist",
"*.d.ts"
],
"engines": {
"node": ">=16"
},
"dependencies": {
"@pixi/app": "6.5.0",
"@pixi/assets": "6.5.0",
"@pixi/constants": "6.5.0",
"@pixi/core": "6.5.0",
"@pixi/display": "6.5.0",
"@pixi/extract": "6.5.0",
"@pixi/filter-alpha": "6.5.0",
"@pixi/filter-blur": "6.5.0",
"@pixi/filter-color-matrix": "6.5.0",
"@pixi/filter-displacement": "6.5.0",
"@pixi/filter-fxaa": "6.5.0",
"@pixi/filter-noise": "6.5.0",
"@pixi/graphics": "6.5.0",
"@pixi/math": "6.5.0",
"@pixi/mesh": "6.5.0",
"@pixi/mesh-extras": "6.5.0",
"@pixi/mixin-cache-as-bitmap": "6.5.0",
"@pixi/mixin-get-child-by-name": "6.5.0",
"@pixi/mixin-get-global-position": "6.5.0",
"@pixi/particle-container": "6.5.0",
"@pixi/prepare": "6.5.0",
"@pixi/runner": "6.5.0",
"@pixi/settings": "6.5.0",
"@pixi/sprite": "6.5.0",
"@pixi/sprite-animated": "6.5.0",
"@pixi/sprite-tiling": "6.5.0",
"@pixi/spritesheet": "6.5.0",
"@pixi/text": "6.5.0",
"@pixi/text-bitmap": "6.5.0",
"@pixi/ticker": "6.5.0",
"@pixi/utils": "6.5.0",
"@types/gl": "^4.1.0",
"@types/xml2js": "^0.4.11",
"canvas": "^2.9.1",
"cross-fetch": "^3.1.5",
"gl": "^5.0.0",
"xml2js": "^0.4.23"
},
"nodeDependencies": [
"fs",
"path"
],
"publishConfig": {
"access": "public"
},
"transpile": "es6"
}

0 comments on commit c79f46c

Please sign in to comment.