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

Fix node not initialising #8497

Merged
merged 1 commit into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions bundles/pixi.js-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ To build from source you will need to make sure you have the following dependenc
```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
Expand Down Expand Up @@ -68,9 +69,9 @@ app.ticker.add(() => {
});

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

const base64Data = base64Image.replace(/^data:image\/png;base64,/, '');
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@ const extensions = {
{
list.push(extension.ref);
// TODO: remove me later, only added for @pixi/loaders
extension.ref.add?.();
if (type === ExtensionType.Loader)
{
extension.ref.add?.();
}
},
(extension) =>
{
Expand Down