-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
1 parent
57a88f2
commit 8d3f4a3
Showing
1 changed file
with
70 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
type CtTransitionDirection = 'left' | 'right' | 'top' | 'bottom'; | ||
|
||
declare namespace ct { | ||
/** | ||
* Allows you to create transitions between rooms, or whenever you need them. | ||
*/ | ||
namespace transition { | ||
/** | ||
* The beginning of a fading transition, which paints the whole screen through time. | ||
* The arguments `duration` and `color` are optional, | ||
* and default to `500` (0.5 seconds) and `0x000000` (black color). | ||
*/ | ||
function fadeOut(duration: number, color: number): Promise<void>; | ||
/** | ||
* The end of a fading transition. The arguments `duration` and `color` are optional, | ||
* and default to `500` (0.5 seconds) and `0x000000` (black color). | ||
*/ | ||
function fadeIn(duration: number, color: number): Promise<void>; | ||
|
||
/** | ||
* Scales the camera by a given coefficient while also fading to a specified color | ||
* (similar to `ct.transition.fadeOut`). The default `scaling` is `0.1`, | ||
* which will zoom in 10 times. Setting values larger than `1` will zoom out instead. | ||
* The arguments `duration` and `color` are optional, and default to `500` (0.5 seconds) | ||
* and `0x000000` (black color). | ||
*/ | ||
function scaleOut(duration: number, scaling: number, color: number): Promise<void>; | ||
/** | ||
* Scales the camera by a given coefficient and turns back to normal, | ||
* while also fading in from a specified color (similar to `ct.transition.fadeIn`). | ||
* The default `scaling` is `0.1`, which will zoom in 10 times. Setting values larger | ||
* than `1` will zoom out instead. The arguments `duration` and `color` are optional, | ||
* and default to `500` (0.5 seconds) and `0x000000` (black color). | ||
*/ | ||
function scaleIn(duration: number, scaling: number, color: number): Promise<void>; | ||
|
||
/** | ||
* The beginning of a sliding transition. A rectangle will smoothly move | ||
* from one edge of the screen to the opposite, in the given direction, | ||
* covering the screen with an opaque color. | ||
* The arguments `duration` and `color` are optional, and | ||
* default to `500` (0.5 seconds) and `0x000000` (black color). | ||
*/ | ||
function slideOut(duration: number, direction: CtTransitionDirection, color: number): Promise<void>; | ||
/** | ||
* The end of a sliding transition. A rectangle will smoothly move | ||
* from one edge of the screen to the opposite, in the given direction, | ||
* covering the screen with an opaque color. | ||
* The arguments `duration` and `color` are optional, | ||
* and default to `500` (0.5 seconds) and `0x000000` (black color). | ||
*/ | ||
function slideIn(duration: number, direction: CtTransitionDirection, color: number): Promise<void>; | ||
|
||
/** | ||
* The beginning of a circle-shaped transition. This will create a circle | ||
* that smoothly grows from a size of a point to cover the whole screen | ||
* in a given opaque color. The arguments `duration` and `color` are optional, | ||
* and default to `500` (0.5 seconds) and `0x000000` (black color). | ||
*/ | ||
function circleOut(duration: number, color: number): Promise<void>; | ||
/** | ||
* The end of a circle-shaped transition. This will create a circle | ||
* that covers the whole screen in a given opaque color but smoothly | ||
* shrinks to a point. The arguments `duration` and `color` are optional, | ||
* and default to `500` (0.5 seconds) and `0x000000` (black color). | ||
*/ | ||
function circleIn(duration: number, color: number): Promise<void>; | ||
} | ||
|
||
} |