bard-legends-framework 0.2.8 → 0.2.10
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/dist/game-entities/attachable/attachable.d.ts +1 -1
- package/dist/game-entities/view/view.d.ts +1 -1
- package/dist/pixi/game.d.ts +4 -1
- package/dist/pixi/game.js +5 -0
- package/dist/pixi/game.js.map +1 -1
- package/dist/utilities/libraries/animator/animations.d.ts +14 -3
- package/dist/utilities/libraries/animator/animations.js +43 -16
- package/dist/utilities/libraries/animator/animations.js.map +1 -1
- package/package.json +1 -1
- package/package.json.bak +1 -1
- package/tsconfig.json +3 -3
|
@@ -14,7 +14,7 @@ export declare abstract class Attachable implements Destroyable {
|
|
|
14
14
|
readonly onDestroy: Action<void>;
|
|
15
15
|
readonly onAllAttachmentsDestroyed: Action<void>;
|
|
16
16
|
protected destroyed: boolean;
|
|
17
|
-
protected childDestroy:
|
|
17
|
+
protected childDestroy: any;
|
|
18
18
|
protected attachableDestroy: () => void;
|
|
19
19
|
private attachments;
|
|
20
20
|
constructor();
|
|
@@ -8,7 +8,7 @@ export declare function ViewDecorator<EntityType extends Entity>(meta: ViewDecor
|
|
|
8
8
|
export declare abstract class View extends Attachable {
|
|
9
9
|
private static viewClassNames;
|
|
10
10
|
static getInstanceOrFail<T extends View>(this: new (...args: any[]) => T, entityId: string): Promise<T>;
|
|
11
|
-
protected childUpdate:
|
|
11
|
+
protected childUpdate: any;
|
|
12
12
|
protected viewDestroy: () => void;
|
|
13
13
|
private created;
|
|
14
14
|
private entityId;
|
package/dist/pixi/game.d.ts
CHANGED
|
@@ -8,14 +8,17 @@ export interface GameConfiguration {
|
|
|
8
8
|
height: number;
|
|
9
9
|
};
|
|
10
10
|
backgroundColor: RGBColor;
|
|
11
|
+
devMode?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export declare class Game {
|
|
13
14
|
private static inst;
|
|
14
15
|
static get instance(): Game;
|
|
16
|
+
static get time(): number;
|
|
15
17
|
readonly stage: Container;
|
|
18
|
+
readonly renderer: PIXI.Renderer;
|
|
16
19
|
readonly screenSize: Vec2;
|
|
17
20
|
readonly screenSizeCenter: Vec2;
|
|
18
|
-
readonly
|
|
21
|
+
readonly devMode: boolean;
|
|
19
22
|
private readonly pixiApp;
|
|
20
23
|
private readonly configuration;
|
|
21
24
|
constructor(configuration?: Partial<GameConfiguration>);
|
package/dist/pixi/game.js
CHANGED
|
@@ -33,7 +33,11 @@ class Game {
|
|
|
33
33
|
static get instance() {
|
|
34
34
|
return this.inst;
|
|
35
35
|
}
|
|
36
|
+
static get time() {
|
|
37
|
+
return update_cycle_1.UpdateCycle['time'];
|
|
38
|
+
}
|
|
36
39
|
constructor(configuration) {
|
|
40
|
+
this.devMode = false;
|
|
37
41
|
if (Game.inst) {
|
|
38
42
|
throw new Error('There can be only one Game instance!');
|
|
39
43
|
}
|
|
@@ -48,6 +52,7 @@ class Game {
|
|
|
48
52
|
configuration.backgroundColor = { r: 0, g: 0, b: 0 };
|
|
49
53
|
}
|
|
50
54
|
this.configuration = configuration;
|
|
55
|
+
this.devMode = this.configuration.devMode || false;
|
|
51
56
|
this.pixiApp = new PIXI.Application({
|
|
52
57
|
backgroundColor: this.configuration.backgroundColor,
|
|
53
58
|
width: this.configuration.screenResolution.width,
|
package/dist/pixi/game.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game.js","sourceRoot":"","sources":["../../src/pixi/game.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAqD;AACrD,8CAAgC;AAEhC,uDAAmD;AACnD,kEAA+D;AAE/D,gEAA4D;
|
|
1
|
+
{"version":3,"file":"game.js","sourceRoot":"","sources":["../../src/pixi/game.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAqD;AACrD,8CAAgC;AAEhC,uDAAmD;AACnD,kEAA+D;AAE/D,gEAA4D;AAQ5D,MAAa,IAAI;IAE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ions {
|
|
6
|
+
static lineer(time: number): number;
|
|
7
|
+
static easeIn(time: number): number;
|
|
8
|
+
static easeOut(time: number): number;
|
|
9
|
+
static easeInOut(time: number): number;
|
|
10
|
+
static easeInOutCubic(t: number): number;
|
|
11
|
+
}
|
|
5
12
|
export declare class AnimationLineer implements AnimatorAnimation {
|
|
6
13
|
start(): void;
|
|
7
14
|
multiplierFunction(t: number): number;
|
|
8
15
|
}
|
|
9
|
-
export declare class
|
|
16
|
+
export declare class AnimationEaseIn implements AnimatorAnimation {
|
|
10
17
|
start(): void;
|
|
11
18
|
multiplierFunction(t: number): number;
|
|
12
19
|
}
|
|
13
|
-
export declare class
|
|
20
|
+
export declare class AnimationEaseOut implements AnimatorAnimation {
|
|
14
21
|
start(): void;
|
|
15
22
|
multiplierFunction(t: number): number;
|
|
16
23
|
}
|
|
17
|
-
export declare class
|
|
24
|
+
export declare class AnimationEaseInOut implements AnimatorAnimation {
|
|
25
|
+
start(): void;
|
|
26
|
+
multiplierFunction(t: number): number;
|
|
27
|
+
}
|
|
28
|
+
export declare class AnimationEaseInOutCubic implements AnimatorAnimation {
|
|
18
29
|
start(): void;
|
|
19
30
|
multiplierFunction(t: number): number;
|
|
20
31
|
}
|
|
@@ -1,40 +1,67 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnimationFlicker = exports.AnimationEaseOut = exports.AnimationEaseIn = exports.
|
|
3
|
+
exports.AnimationFlicker = exports.AnimationEaseInOutCubic = exports.AnimationEaseInOut = exports.AnimationEaseOut = exports.AnimationEaseIn = exports.AnimationLineer = exports.AnimationInterpolationFunctions = void 0;
|
|
4
4
|
const helpers_lib_1 = require("helpers-lib");
|
|
5
|
-
class
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return t;
|
|
5
|
+
class AnimationInterpolationFunctions {
|
|
6
|
+
static lineer(time) {
|
|
7
|
+
return time;
|
|
9
8
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
static easeIn(time) {
|
|
10
|
+
return Math.pow(time, 2);
|
|
11
|
+
}
|
|
12
|
+
static easeOut(time) {
|
|
13
|
+
return 1 - Math.pow(1 - time, 2);
|
|
14
|
+
}
|
|
15
|
+
static easeInOut(time) {
|
|
16
|
+
if (time < 0.5) {
|
|
17
|
+
return 2 * time * time;
|
|
17
18
|
}
|
|
18
19
|
else {
|
|
19
|
-
|
|
20
|
+
time -= 1;
|
|
21
|
+
return 1 - 2 * time * time;
|
|
20
22
|
}
|
|
21
23
|
}
|
|
24
|
+
static easeInOutCubic(t) {
|
|
25
|
+
let a = 2 * t - 2;
|
|
26
|
+
return t < 0.5 ? 4 * Math.pow(t, 3) : (t - 1) * Math.pow(a, 2) + 1;
|
|
27
|
+
}
|
|
22
28
|
}
|
|
23
|
-
exports.
|
|
29
|
+
exports.AnimationInterpolationFunctions = AnimationInterpolationFunctions;
|
|
30
|
+
class AnimationLineer {
|
|
31
|
+
start() { }
|
|
32
|
+
multiplierFunction(t) {
|
|
33
|
+
return AnimationInterpolationFunctions.lineer(t);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.AnimationLineer = AnimationLineer;
|
|
24
37
|
class AnimationEaseIn {
|
|
25
38
|
start() { }
|
|
26
39
|
multiplierFunction(t) {
|
|
27
|
-
return
|
|
40
|
+
return AnimationInterpolationFunctions.easeIn(t);
|
|
28
41
|
}
|
|
29
42
|
}
|
|
30
43
|
exports.AnimationEaseIn = AnimationEaseIn;
|
|
31
44
|
class AnimationEaseOut {
|
|
32
45
|
start() { }
|
|
33
46
|
multiplierFunction(t) {
|
|
34
|
-
return
|
|
47
|
+
return AnimationInterpolationFunctions.easeOut(t);
|
|
35
48
|
}
|
|
36
49
|
}
|
|
37
50
|
exports.AnimationEaseOut = AnimationEaseOut;
|
|
51
|
+
class AnimationEaseInOut {
|
|
52
|
+
start() { }
|
|
53
|
+
multiplierFunction(t) {
|
|
54
|
+
return AnimationInterpolationFunctions.easeInOut(t);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.AnimationEaseInOut = AnimationEaseInOut;
|
|
58
|
+
class AnimationEaseInOutCubic {
|
|
59
|
+
start() { }
|
|
60
|
+
multiplierFunction(t) {
|
|
61
|
+
return AnimationInterpolationFunctions.easeInOutCubic(t);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.AnimationEaseInOutCubic = AnimationEaseInOutCubic;
|
|
38
65
|
class AnimationFlicker {
|
|
39
66
|
start() {
|
|
40
67
|
this.timeGrid = new Array(10).fill(0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animations.js","sourceRoot":"","sources":["../../../../src/utilities/libraries/animator/animations.ts"],"names":[],"mappings":";;;AAAA,6CAAqC;AAOrC,MAAa,
|
|
1
|
+
{"version":3,"file":"animations.js","sourceRoot":"","sources":["../../../../src/utilities/libraries/animator/animations.ts"],"names":[],"mappings":";;;AAAA,6CAAqC;AAOrC,MAAa,+BAA+B;IAC1C,MAAM,CAAC,MAAM,CAAC,IAAY;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,IAAY;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,IAAY;QACzB,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,IAAY;QAC3B,IAAI,IAAI,GAAG,GAAG,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,IAAI,IAAI,CAAC,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,G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AAQ,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtC,oBAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,oBAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACjE,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACxB,oBAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAClC,IAAI,CAAC,QAAQ,CAAC,oBAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACnE,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACxB,oBAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAClC,IAAI,CAAC,QAAQ,CAAC,oBAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACnE,CAAC;IACH,CAAC;IAED,kBAAkB,CAAC,CAAS;QAC1B,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACF;AArBD,4CAqBC"}
|
package/package.json
CHANGED
package/package.json.bak
CHANGED
package/tsconfig.json
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
"allowJs": true,
|
|
7
7
|
"skipLibCheck": true,
|
|
8
8
|
"esModuleInterop": true,
|
|
9
|
-
"noImplicitAny":
|
|
10
|
-
"noImplicitThis":
|
|
9
|
+
"noImplicitAny": false,
|
|
10
|
+
"noImplicitThis": false,
|
|
11
|
+
"strict": false,
|
|
11
12
|
"sourceMap": true,
|
|
12
13
|
"baseUrl": ".",
|
|
13
14
|
"outDir": "dist",
|
|
14
15
|
"moduleResolution": "node",
|
|
15
16
|
"resolveJsonModule": true,
|
|
16
|
-
"strict": true,
|
|
17
17
|
"strictFunctionTypes": false,
|
|
18
18
|
"allowSyntheticDefaultImports": true,
|
|
19
19
|
"experimentalDecorators": true,
|