Skip to content

Commit

Permalink
Merge pull request #213 from DRincs-Productions/209-fix-pixijs-import…
Browse files Browse the repository at this point in the history
…-in-codepen

209 fix pixijs import in codepen
  • Loading branch information
BlackRam-oss authored Aug 23, 2024
2 parents 8625427 + d0dfbcc commit f954d5b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 23 deletions.
32 changes: 22 additions & 10 deletions package-lock.json

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

12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,20 @@
"funding": "https://github.com/DRincs-Productions/pixi-vn?sponsor=1",
"devDependencies": {
"@drincs/pixi-vn": "^0.6.16",
"@pixi/devtools": "^2.0.1",
"@pixi/sound": "^6.0.1",
"@types/crypto-js": "^4.2.2",
"@types/css-font-loading-module": "^0.0.13",
"@types/deep-diff": "^1.0.5",
"crypto-js": "^4.2.0",
"deep-diff": "^1.0.2",
"jsdom": "^24.1.1",
"pixi.js": "^8.3.4",
"ts-node": "^10.9.2",
"tsup": "^8.2.4",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
},
"dependencies": {
"@pixi/devtools": "^2.0.1",
"@pixi/sound": "^6.0.1",
"crypto-js": "^4.2.0",
"deep-diff": "^1.0.2",
"pixi.js": "^8.3.3"
},
"keywords": [
"game",
"js",
Expand Down
7 changes: 3 additions & 4 deletions src/managers/WindowManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { initDevtools } from '@pixi/devtools';
import sha1 from 'crypto-js/sha1';
import * as PIXI from "pixi.js";
import { ApplicationOptions, Container, Ticker } from "pixi.js";
import { Application, ApplicationOptions, Container, Ticker } from "pixi.js";
import CanvasBase from "../classes/canvas/CanvasBase";
import TickerBase, { TickerArgsType } from "../classes/ticker/TickerBase";
import { Repeat } from "../constants";
Expand All @@ -23,7 +22,7 @@ import { aliasToRemoveAfter } from '../types/ticker/AliasToRemoveAfterType';
export default class GameWindowManager {
private constructor() { }

private static _app: PIXI.Application | undefined = undefined
private static _app: Application | undefined = undefined
/**
* The PIXI Application instance.
* It not recommended to use this property directly.
Expand Down Expand Up @@ -74,7 +73,7 @@ export default class GameWindowManager {
public static async initialize(element: HTMLElement, width: number, height: number, options?: Partial<ApplicationOptions>): Promise<void> {
GameWindowManager.canvasWidth = width
GameWindowManager.canvasHeight = height
GameWindowManager._app = new PIXI.Application()
GameWindowManager._app = new Application()
return GameWindowManager.app.init({
resolution: window.devicePixelRatio || 1,
autoDensity: true,
Expand Down
4 changes: 2 additions & 2 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export default defineConfig({
dts: true, // Generate declaration file (.d.ts)
treeshake: true,
splitting: false,
sourcemap: true,
// sourcemap: true, // Generate sourcemap, it was removed because otherwise it would explode
clean: true,
minify: true,
bundle: true,
skipNodeModulesBundle: true,
skipNodeModulesBundle: false, // Skip bundling of node_modules
entryPoints: ['src/index.ts'],
});

0 comments on commit f954d5b

Please sign in to comment.