forked from ct-js/ct-js-old
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
168 changed files
with
11,938 additions
and
21,946 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule DragonBonesJS
updated
117 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
interface ICutscene extends Promise<void>{ | ||
|
||
/** | ||
* Indicates whether or not the video was removed, | ||
* either manually or automatically after the video has ended. | ||
*/ | ||
removed: bool; | ||
|
||
/** | ||
* The url of a video that is currently playing | ||
*/ | ||
url: string; | ||
|
||
/** | ||
* A reference to the player; its types depends on the vide provider that is used. | ||
* For local videos, this is an HTML `<video>` tag. | ||
*/ | ||
raw: any; | ||
} | ||
|
||
declare namespace ct { | ||
namespace cutscene { | ||
/** | ||
* Shows the cutscene and returns a reference to it. | ||
* | ||
* It can be a link to youtube or vimeo or a direct link to a video. These values are valid: | ||
* | ||
* * `https://youtu.be/xxxxxxxxxx` | ||
* * `https://www.youtube.com/watch?v=xxxxxxxxxx` | ||
* * `https://www.youtube.com/embed/xxxxxxxxxx` | ||
* * `https://vimeo.com/xxxxxxxxxx` | ||
* * `https://player.vimeo.com/video/xxxxxxxxxx` | ||
* * `https://awesomegames.rock/trailers/catmintide.mp4` | ||
* * `./myVideo.mp4` (if you put it inside your `project/include` folder) | ||
*/ | ||
function show(url: string): ICutscene; | ||
|
||
/** | ||
* Use this to manually remove the player. If the video ends, | ||
* it will be removed automatically, but you probably | ||
* want to provide controls to a player, e.g. Escape button | ||
* to skip the cutscene. | ||
* | ||
* **Example:** | ||
* ```js | ||
* // Say, this is placed in a room's On Create event | ||
* this.cutscene = ct.cutscene.show('https://www.youtube.com/watch?v=F8VzZe1FqEM'); | ||
* cutscene.then(() => { | ||
* this.cutscene = void 0; | ||
* }).catch(error => { | ||
* console.error(error); | ||
* }); | ||
* | ||
* // In its Step event | ||
* if (ct.actions.Exit.pressed && this.cutscene) { | ||
* ct.cutscene.remove(this.cutscene); | ||
* } | ||
* ``` | ||
*/ | ||
function remove(cutscene: ICutscene): void; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.