@idosgames/characters 0.1.3 → 0.1.4
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/chunk-CMQ6UYQV.js +2 -0
- package/dist/chunk-I7UPBAMR.js +1 -0
- package/dist/chunk-JZU255IQ.js +1 -0
- package/dist/rig2d/editor/index.cjs +2 -2
- package/dist/rig2d/editor/index.js +1 -1
- package/dist/rig2d/index.cjs +4 -4
- package/dist/rig2d/index.d.cts +12 -0
- package/dist/rig2d/index.d.ts +12 -0
- package/dist/rig2d/index.js +3 -3
- package/dist/rig2d/phaser/index.cjs +2 -2
- package/dist/rig2d/phaser/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-BMZA5JIA.js +0 -1
- package/dist/chunk-SDZXML7V.js +0 -1
package/dist/rig2d/index.d.cts
CHANGED
|
@@ -118,6 +118,11 @@ interface CharacterCanvasOptions {
|
|
|
118
118
|
side: number;
|
|
119
119
|
top: number;
|
|
120
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* × the art's size its images are rasterized at, live (default 3). A game that draws the same hero passes its own
|
|
123
|
+
* resolution: the pictures it already made are then reused, not made again (art/raster.ts).
|
|
124
|
+
*/
|
|
125
|
+
resolution?: number;
|
|
121
126
|
}
|
|
122
127
|
declare class CharacterCanvas {
|
|
123
128
|
private readonly options;
|
|
@@ -144,6 +149,13 @@ declare class CharacterCanvas {
|
|
|
144
149
|
/** An animation event, "end", or "*". Returns the unsubscribe. */
|
|
145
150
|
on(event: string, listener: (e: AnimationEvent) => void): () => void;
|
|
146
151
|
setLook(look: CharacterLook): void;
|
|
152
|
+
/**
|
|
153
|
+
* Puts the canvas into a host (moved out of the one it was in). A screen that closes and opens again keeps one
|
|
154
|
+
* view this way: its WebGL context and its textures stay, and the hero is there at once, not drawn anew.
|
|
155
|
+
*/
|
|
156
|
+
attach(host: HTMLElement): void;
|
|
157
|
+
/** Takes the canvas off the page; it stops drawing until `attach`. */
|
|
158
|
+
detach(): void;
|
|
147
159
|
destroy(): void;
|
|
148
160
|
private stanceOf;
|
|
149
161
|
private resize;
|
package/dist/rig2d/index.d.ts
CHANGED
|
@@ -118,6 +118,11 @@ interface CharacterCanvasOptions {
|
|
|
118
118
|
side: number;
|
|
119
119
|
top: number;
|
|
120
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* × the art's size its images are rasterized at, live (default 3). A game that draws the same hero passes its own
|
|
123
|
+
* resolution: the pictures it already made are then reused, not made again (art/raster.ts).
|
|
124
|
+
*/
|
|
125
|
+
resolution?: number;
|
|
121
126
|
}
|
|
122
127
|
declare class CharacterCanvas {
|
|
123
128
|
private readonly options;
|
|
@@ -144,6 +149,13 @@ declare class CharacterCanvas {
|
|
|
144
149
|
/** An animation event, "end", or "*". Returns the unsubscribe. */
|
|
145
150
|
on(event: string, listener: (e: AnimationEvent) => void): () => void;
|
|
146
151
|
setLook(look: CharacterLook): void;
|
|
152
|
+
/**
|
|
153
|
+
* Puts the canvas into a host (moved out of the one it was in). A screen that closes and opens again keeps one
|
|
154
|
+
* view this way: its WebGL context and its textures stay, and the hero is there at once, not drawn anew.
|
|
155
|
+
*/
|
|
156
|
+
attach(host: HTMLElement): void;
|
|
157
|
+
/** Takes the canvas off the page; it stops drawing until `attach`. */
|
|
158
|
+
detach(): void;
|
|
147
159
|
destroy(): void;
|
|
148
160
|
private stanceOf;
|
|
149
161
|
private resize;
|