react-gif-timeline 0.0.1 → 0.0.2
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/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -45,8 +45,6 @@ function initCanvas(canvas, width, height) {
|
|
|
45
45
|
const dpr = window.devicePixelRatio || 1;
|
|
46
46
|
canvas.width = width * dpr;
|
|
47
47
|
canvas.height = height * dpr;
|
|
48
|
-
canvas.style.width = `${width}px`;
|
|
49
|
-
canvas.style.height = `${height}px`;
|
|
50
48
|
const ctx = canvas.getContext("2d");
|
|
51
49
|
ctx.scale(dpr, dpr);
|
|
52
50
|
}
|
|
@@ -218,6 +216,8 @@ function useGifTimeline(options) {
|
|
|
218
216
|
canvasRef,
|
|
219
217
|
currentFrame,
|
|
220
218
|
totalFrames: gifDataRef.current?.frames.length ?? 0,
|
|
219
|
+
width: gifDataRef.current?.width ?? 0,
|
|
220
|
+
height: gifDataRef.current?.height ?? 0,
|
|
221
221
|
isLoaded,
|
|
222
222
|
error,
|
|
223
223
|
isTransitioning,
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-gif-timeline",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Control GIF animation timelines with React state — map anchor frames to states and animate between them.",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"workspaces": [
|
|
6
|
+
"workspaces": [
|
|
7
|
+
"demo"
|
|
8
|
+
],
|
|
7
9
|
"license": "MIT",
|
|
8
10
|
"type": "module",
|
|
9
11
|
"types": "./dist/index.d.ts",
|