narraleaf-react 0.14.0 → 0.16.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.
Files changed (45) hide show
  1. package/dist/game/nlcore/action/actionTypes.d.ts +16 -2
  2. package/dist/game/nlcore/action/actions/controlAction.d.ts +2 -0
  3. package/dist/game/nlcore/action/actions/vfxAction.d.ts +24 -0
  4. package/dist/game/nlcore/action/logicAction.d.ts +16 -13
  5. package/dist/game/nlcore/action/stackModel.d.ts +28 -0
  6. package/dist/game/nlcore/common/elements.d.ts +6 -1
  7. package/dist/game/nlcore/common/game.d.ts +2 -1
  8. package/dist/game/nlcore/common/transition.d.ts +8 -9
  9. package/dist/game/nlcore/elements/camera.d.ts +71 -0
  10. package/dist/game/nlcore/elements/character/sentence.d.ts +2 -1
  11. package/dist/game/nlcore/elements/character/textEvent.d.ts +67 -0
  12. package/dist/game/nlcore/elements/character/word.d.ts +2 -1
  13. package/dist/game/nlcore/elements/control.d.ts +62 -0
  14. package/dist/game/nlcore/elements/displayable/image.d.ts +2 -2
  15. package/dist/game/nlcore/elements/scene.d.ts +2 -2
  16. package/dist/game/nlcore/elements/story.d.ts +21 -1
  17. package/dist/game/nlcore/elements/transition/transitions/image/darkness.d.ts +16 -9
  18. package/dist/game/nlcore/elements/transition/transitions/image/dissolve.d.ts +9 -6
  19. package/dist/game/nlcore/elements/transition/transitions/image/fadeIn.d.ts +9 -8
  20. package/dist/game/nlcore/elements/transition/transitions/image/mask.d.ts +162 -0
  21. package/dist/game/nlcore/elements/transition/transitions/image/reveal.d.ts +33 -0
  22. package/dist/game/nlcore/elements/transition/transitions/image/throughColor.d.ts +34 -36
  23. package/dist/game/nlcore/elements/transition/transitions/image/transitionMaskUtils.d.ts +5 -16
  24. package/dist/game/nlcore/elements/transition/transitions/text/fontSize.d.ts +9 -2
  25. package/dist/game/nlcore/elements/vfx.d.ts +85 -0
  26. package/dist/game/nlcore/elements/video.d.ts +26 -0
  27. package/dist/game/nlcore/game/liveGame.d.ts +44 -5
  28. package/dist/game/player/elements/menu/type.d.ts +3 -2
  29. package/dist/game/player/elements/nvl/type.d.ts +2 -1
  30. package/dist/game/player/elements/nvl/useNvlDialogState.d.ts +2 -1
  31. package/dist/game/player/elements/player/Camera.d.ts +1 -0
  32. package/dist/game/player/elements/say/Sentence.d.ts +3 -2
  33. package/dist/game/player/elements/say/UIDialog.d.ts +2 -1
  34. package/dist/game/player/elements/say/textEventEffect.d.ts +19 -0
  35. package/dist/game/player/elements/say/type.d.ts +4 -3
  36. package/dist/game/player/elements/scene/SceneDialogs.d.ts +1 -0
  37. package/dist/game/player/elements/vfx/Vfx.d.ts +1 -0
  38. package/dist/game/player/gameState.d.ts +8 -0
  39. package/dist/game/player/type.d.ts +20 -1
  40. package/dist/main.js +44 -42
  41. package/package.json +1 -1
  42. package/dist/game/nlcore/elements/transition/transitions/image/blinds.d.ts +0 -28
  43. package/dist/game/nlcore/elements/transition/transitions/image/maskTransition.d.ts +0 -38
  44. package/dist/game/nlcore/elements/transition/transitions/image/softIris.d.ts +0 -28
  45. package/dist/game/nlcore/elements/transition/transitions/image/softWipe.d.ts +0 -28
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "narraleaf-react",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "A React visual novel player framework",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
@@ -1,28 +0,0 @@
1
- import { TransitionAnimationType, TransitionTask } from "../../../../elements/transition/type";
2
- import { TransformDefinitions } from "../../../../elements/transform/type";
3
- import { ImageTransition } from "../../../../elements/transition/transitions/image/imageTransition";
4
- import { BlindsOrientation } from "../../../../elements/transition/transitions/image/transitionMaskUtils";
5
- type AnimationType = [TransitionAnimationType.Number];
6
- export type BlindsOptions = {
7
- /** Duration in milliseconds. */
8
- duration: number;
9
- /** Slat orientation. @default "horizontal" */
10
- orientation?: BlindsOrientation;
11
- /** Number of slats. @default 8 */
12
- slats?: number;
13
- easing?: TransformDefinitions.EasingDefinition;
14
- };
15
- /**
16
- * Venetian "blinds": the target image is revealed over the previous one through
17
- * a set of hard-edged slats that widen until they cover the frame.
18
- */
19
- export declare class Blinds extends ImageTransition<AnimationType> {
20
- private duration;
21
- private orientation;
22
- private slats;
23
- private easing?;
24
- constructor(options: BlindsOptions);
25
- createTask(): TransitionTask<HTMLImageElement, AnimationType>;
26
- copy(): Blinds;
27
- }
28
- export {};
@@ -1,38 +0,0 @@
1
- import { TransitionAnimationType, TransitionTask } from "../../../../elements/transition/type";
2
- import { TransformDefinitions } from "../../../../elements/transform/type";
3
- import { ImageTransition } from "../../../../elements/transition/transitions/image/imageTransition";
4
- type AnimationType = [TransitionAnimationType.Number];
5
- export type MaskTransitionCircleOptions = {
6
- duration: number;
7
- easing?: TransformDefinitions.EasingDefinition;
8
- center?: string;
9
- from?: number;
10
- to?: number;
11
- };
12
- export type MaskTransitionWipeOptions = {
13
- duration: number;
14
- easing?: TransformDefinitions.EasingDefinition;
15
- direction?: TransformDefinitions.WipeDirection;
16
- reverse?: boolean;
17
- };
18
- export declare class MaskTransition extends ImageTransition<AnimationType> {
19
- private duration;
20
- private easing;
21
- private clipPathResolver;
22
- private constructor();
23
- /**
24
- * Reveal the target image through an animated circular clip-path.
25
- */
26
- static circle(options: MaskTransitionCircleOptions): MaskTransition;
27
- /**
28
- * Reveal or close the target image through an animated directional wipe.
29
- */
30
- static wipe(options: MaskTransitionWipeOptions): MaskTransition;
31
- createTask(): TransitionTask<HTMLImageElement, AnimationType>;
32
- copy(): MaskTransition;
33
- private static lerp;
34
- private static circleClipPath;
35
- private static wipeClipPath;
36
- private static formatNumber;
37
- }
38
- export {};
@@ -1,28 +0,0 @@
1
- import { TransitionAnimationType, TransitionTask } from "../../../../elements/transition/type";
2
- import { TransformDefinitions } from "../../../../elements/transform/type";
3
- import { ImageTransition } from "../../../../elements/transition/transitions/image/imageTransition";
4
- type AnimationType = [TransitionAnimationType.Number];
5
- export type SoftIrisOptions = {
6
- /** Duration in milliseconds. */
7
- duration: number;
8
- /** Centre of the iris, as a CSS position. @default "50% 50%" */
9
- center?: string;
10
- /** Width of the soft (feathered) edge band, in percent. @default 12 */
11
- feather?: number;
12
- easing?: TransformDefinitions.EasingDefinition;
13
- };
14
- /**
15
- * A soft, feathered iris: the target image is revealed over the previous one
16
- * through an expanding `radial-gradient` circle with a feathered edge — the
17
- * soft-edged counterpart of {@link MaskTransition.circle}.
18
- */
19
- export declare class SoftIris extends ImageTransition<AnimationType> {
20
- private duration;
21
- private center;
22
- private feather;
23
- private easing?;
24
- constructor(options: SoftIrisOptions);
25
- createTask(): TransitionTask<HTMLImageElement, AnimationType>;
26
- copy(): SoftIris;
27
- }
28
- export {};
@@ -1,28 +0,0 @@
1
- import { TransitionAnimationType, TransitionTask } from "../../../../elements/transition/type";
2
- import { TransformDefinitions } from "../../../../elements/transform/type";
3
- import { ImageTransition } from "../../../../elements/transition/transitions/image/imageTransition";
4
- type AnimationType = [TransitionAnimationType.Number];
5
- export type SoftWipeOptions = {
6
- /** Duration in milliseconds. */
7
- duration: number;
8
- /** Direction the wipe travels toward. @default "left" */
9
- direction?: TransformDefinitions.WipeDirection;
10
- /** Width of the soft (feathered) edge band, in percent. @default 12 */
11
- feather?: number;
12
- easing?: TransformDefinitions.EasingDefinition;
13
- };
14
- /**
15
- * A soft, feathered directional wipe. The target image is revealed over the
16
- * previous one through a moving `linear-gradient` alpha mask, giving a gradual
17
- * erase rather than the hard geometric cut of {@link MaskTransition.wipe}.
18
- */
19
- export declare class SoftWipe extends ImageTransition<AnimationType> {
20
- private duration;
21
- private direction;
22
- private feather;
23
- private easing?;
24
- constructor(options: SoftWipeOptions);
25
- createTask(): TransitionTask<HTMLImageElement, AnimationType>;
26
- copy(): SoftWipe;
27
- }
28
- export {};