Skip to content

Commit

Permalink
Fix: Revert v8-rc.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtimebuddy committed Jan 21, 2024
1 parent 6889c53 commit 334c8e8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
"magic-string": "^0.27.0",
"npm-run-all": "^4.1.5",
"open-cli": "^7.1.0",
"pixi.js": "^8.0.0-X",
"pixi.js": "8.0.0-rc.4",
"pre-commit": "^1.2.2",
"rimraf": "^4.1.1",
"tslib": "^2.0.3",
Expand Down
18 changes: 13 additions & 5 deletions scripts/screenshots/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@
padding: 0;
width: 100vw;
height: 100vh;
background-color: #000000;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
background-image:
linear-gradient(45deg, #ccc 25%, transparent 25%),
linear-gradient(135deg, #ccc 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #ccc 75%),
linear-gradient(135deg, transparent 75%, #ccc 75%);
background-size:25px 25px; /* Must be a square */
background-position:0 0, 12.5px 0, 12.5px -12.5px, 0px 12.5px;
display: grid;
grid-template-columns: repeat(4, 1fr);
}
img, canvas {
width: 100%;
display: block;
}
</style>
</head>
Expand Down
6 changes: 5 additions & 1 deletion scripts/screenshots/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ app.init({
backgroundColor: outputOptions.border.color,
autoStart: false,
preference: 'webgl',
hello: true,
}).then(() =>
{
const frames = {};
Expand Down Expand Up @@ -70,7 +71,6 @@ app.init({
preview.addChild(bg, fishes);

app.stage.addChild(preview);
document.body.appendChild(app.canvas);
next();
});

Expand Down Expand Up @@ -144,6 +144,9 @@ app.init({
{
app.render();
const base64 = await app.renderer.extract.base64(app.stage);
const img = new Image();

Check warning on line 147 in scripts/screenshots/renderer.js

View workflow job for this annotation

GitHub Actions / Build

Expected blank line after variable declarations
img.src = base64;
document.body.appendChild(img);

// Save image
base64ToImage(
Expand All @@ -158,6 +161,7 @@ app.init({
{
app.render();
const canvas = app.renderer.extract.canvas(app.stage);

Check warning on line 163 in scripts/screenshots/renderer.js

View workflow job for this annotation

GitHub Actions / Build

Expected blank line after variable declarations
document.body.appendChild(canvas);
const context = canvas.getContext('2d');

context.scale(1, -1);
Expand Down

0 comments on commit 334c8e8

Please sign in to comment.