create-pixifact 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import './styles.css';
|
|
|
2
2
|
import 'pixifact:scenes';
|
|
3
3
|
import { Application } from 'pixi.js';
|
|
4
4
|
import type { PixifactProjectConfig } from 'pixifact';
|
|
5
|
+
import { prepareSceneClass } from 'pixifact/scene';
|
|
5
6
|
import { applyPixifactViewportLayout, calculatePixifactViewportLayout } from 'pixifact/runtime';
|
|
6
7
|
import projectConfigJson from '../pixifact.project.json';
|
|
7
8
|
import { MainMenu } from './scenes/MainMenu';
|
|
@@ -24,6 +25,7 @@ await app.init({
|
|
|
24
25
|
resolution: Math.min(window.devicePixelRatio || 1, 2),
|
|
25
26
|
});
|
|
26
27
|
|
|
28
|
+
await prepareSceneClass(MainMenu);
|
|
27
29
|
const scene = new MainMenu();
|
|
28
30
|
|
|
29
31
|
function resizeViewport() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Graphics, Text } from 'pixi.js';
|
|
2
2
|
import { Group } from 'pixifact/runtime';
|
|
3
|
-
import { createEvent, event, part, scene } from 'pixifact/
|
|
3
|
+
import { createEvent, event, part, scene } from 'pixifact/scene';
|
|
4
4
|
|
|
5
5
|
@scene()
|
|
6
6
|
export class MainMenu extends Group {
|