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

Develop #125

Merged
merged 2 commits into from
Aug 30, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion next2d.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"url": "https://github.com/sponsors/Next2D"
},
"dependencies": {
"htmlparser2": "^9.0.0",
"htmlparser2": "^9.0.0"
},
"devDependencies": {
"@babel/core": "^7.22.11",
Expand Down
32 changes: 14 additions & 18 deletions packages/core/src/Next2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,28 +244,24 @@ export class Next2D
fps: number = 24, options: PlayerOptionsImpl|null = null
): Promise<Sprite> {

return Promise
.all(this._$promises)
.then(() =>
{
$poolArray(this._$promises);
await Promise.all(this._$promises);
$poolArray(this._$promises);

const player: Player = this._$player;
const player: Player = this._$player;

// setup
player.width = width | 0;
player.height = height | 0;
player.mode = "create";
player.stage._$frameRate = fps | 0;
player.setOptions(options);
player._$initialize();
// setup
player.width = width | 0;
player.height = height | 0;
player.mode = "create";
player.stage._$frameRate = fps | 0;
player.setOptions(options);
player._$initialize();

const root: Sprite = player.stage.addChild(new Sprite());
const root: Sprite = player.stage.addChild(new Sprite());

player._$loadStatus = Player.LOAD_END;
player.play();
player._$loadStatus = Player.LOAD_END;
player.play();

return root;
});
return root;
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Next2D } from "@next2d/core";

if (!("next2d" in window)) {

console.log("%c Next2D Player %c 1.17.2 %c https://next2d.app",
console.log("%c Next2D Player %c 1.17.4 %c https://next2d.app",
"color: #fff; background: #5f5f5f",
"color: #fff; background: #4bc729",
"");
Expand Down