Skip to content

Commit cf579e3

Browse files
committed
Updates version to 1.5.16 in package.json and improves animation handling in GameUnifier
1 parent 3ba6064 commit cf579e3

3 files changed

Lines changed: 3 additions & 14 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@drincs/pixi-vn",
3-
"version": "1.5.15",
3+
"version": "1.5.16",
44
"type": "module",
55
"description": "Pixi'VN is a npm package that provides various features for creating visual novels.",
66
"main": "./dist/index.cjs",

src/canvas/CanvasManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ export default class CanvasManager implements CanvasManagerInterface {
775775
options?: AnimationOptions | SequenceOptions,
776776
priority?: UPDATE_PRIORITY,
777777
): string | undefined {
778-
return GameUnifier.animate(components, keyframes as any, options as any, priority);
778+
return GameUnifier.animate(components, keyframes, options, priority);
779779
}
780780

781781
/* Layers Methods */

src/core/GameUnifier.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export default class GameUnifier {
430430

431431
static onEnd?: StepLabelType;
432432
static onError?: (type: "step", error: any, props: StepLabelPropsType) => void | Promise<void>;
433-
private static _animate?: <T>(
433+
private static _animate: <T>(
434434
components: T | string | (string | T)[],
435435
keyframes: any,
436436
options?: any,
@@ -446,17 +446,6 @@ export default class GameUnifier {
446446
* @template T - The type of Pixi’VN component(s) being animated.
447447
*/
448448
static get animate() {
449-
if (!GameUnifier._animate) {
450-
logger.warn(
451-
"Animate function not initialized. You should add the animate function in the Game.init() method.",
452-
);
453-
return () => {
454-
logger.warn(
455-
"Animate function not initialized. You should add the animate function in the Game.init() method.",
456-
);
457-
return undefined;
458-
};
459-
}
460449
return GameUnifier._animate;
461450
}
462451
}

0 commit comments

Comments
 (0)