reacthub-pixitweenjs 0.2.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/.storybook/main.js +23 -0
- package/.storybook/preview.jsx +24 -0
- package/CHANGELOG.md +21 -0
- package/LICENSE +21 -0
- package/README.md +91 -0
- package/index.html +13 -0
- package/package.json +75 -0
- package/public/vite.svg +1 -0
- package/src/App.css +42 -0
- package/src/App.jsx +35 -0
- package/src/assets/font/OpenSans-Light-webfont.eot +0 -0
- package/src/assets/font/OpenSans-Light-webfont.svg +252 -0
- package/src/assets/font/OpenSans-Light-webfont.ttf +0 -0
- package/src/assets/font/OpenSans-Light-webfont.woff +0 -0
- package/src/assets/font/OpenSans-Regular-webfont.eot +0 -0
- package/src/assets/font/OpenSans-Regular-webfont.svg +252 -0
- package/src/assets/font/OpenSans-Regular-webfont.ttf +0 -0
- package/src/assets/font/OpenSans-Regular-webfont.woff +0 -0
- package/src/assets/icon/percolate.eot +0 -0
- package/src/assets/icon/percolate.svg +139 -0
- package/src/assets/icon/percolate.ttf +0 -0
- package/src/assets/icon/percolate.woff +0 -0
- package/src/assets/react.svg +1 -0
- package/src/index.css +457 -0
- package/src/index.js +3 -0
- package/src/main.jsx +10 -0
- package/src/providers/ContextBridge.jsx +67 -0
- package/src/providers/GsapAnim.jsx +82 -0
- package/src/providers/GsapPixieContextProvider.jsx +162 -0
- package/src/providers/VideoSeekBar.jsx +186 -0
- package/src/providers/index.js +3 -0
- package/src/stories/Installation.mdx +40 -0
- package/src/stories/Introduction.mdx +239 -0
- package/src/stories/PixiImageSprite/PixiImageSprite.jsx +318 -0
- package/src/stories/PixiImageSprite/PixiImageSprite.stories.js +107 -0
- package/src/stories/PixiImageSprite/index.js +1 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/vite.config.js +24 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
useState,
|
|
3
|
+
useEffect,
|
|
4
|
+
useCallback,
|
|
5
|
+
useRef,
|
|
6
|
+
useLayoutEffect,
|
|
7
|
+
} from "react";
|
|
8
|
+
import gsap from "gsap";
|
|
9
|
+
import { emitCustomEvent } from "react-custom-events";
|
|
10
|
+
// import { Power4 } from "gsap";
|
|
11
|
+
|
|
12
|
+
// Context has been created
|
|
13
|
+
const GsapPixieContext = React.createContext({});
|
|
14
|
+
|
|
15
|
+
const Events = {
|
|
16
|
+
STOP: "GSAP_STOP",
|
|
17
|
+
PAUSE: "GSAP_PAUSE",
|
|
18
|
+
PLAY: "GSAP_PLAY",
|
|
19
|
+
RESUME: "GSAP_RESUME",
|
|
20
|
+
};
|
|
21
|
+
// Provider
|
|
22
|
+
const GsapPixieContextProvider = ({ children }) => {
|
|
23
|
+
const [play, setPlay] = useState(false);
|
|
24
|
+
const [frameNumber, setFrameNumber] = useState(0);
|
|
25
|
+
|
|
26
|
+
const tl = useRef();
|
|
27
|
+
const gsapCtx = useRef();
|
|
28
|
+
const playerTimeRef = useRef(0.001);
|
|
29
|
+
|
|
30
|
+
// gsap.ticker.add((time, deltaTime, frame) => {
|
|
31
|
+
// console.log("timeframe", time, deltaTime, frame);
|
|
32
|
+
// setFrameNumber(frame);
|
|
33
|
+
// });
|
|
34
|
+
|
|
35
|
+
const parentElementRef = useRef();
|
|
36
|
+
// передаем предка анимируемых элементов
|
|
37
|
+
const q = gsap.utils.selector(parentElementRef);
|
|
38
|
+
|
|
39
|
+
useLayoutEffect(() => {
|
|
40
|
+
gsapCtx.current = gsap.context(() => {
|
|
41
|
+
// add a box and circle animation to our timeline and play on first render
|
|
42
|
+
// console.log("creating timeline");
|
|
43
|
+
tl.current && tl.current.progress(0).kill();
|
|
44
|
+
tl.current = gsap.timeline({
|
|
45
|
+
paused: true,
|
|
46
|
+
defaults: { duration: 0 },
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
return () => gsapCtx.current.revert();
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
const onUpdate = useCallback(() => {
|
|
53
|
+
/// console.log("update event callback");
|
|
54
|
+
const timeline = tl.current;
|
|
55
|
+
var now = timeline.time();
|
|
56
|
+
var elapsedTime;
|
|
57
|
+
if (playerTimeRef.current) {
|
|
58
|
+
elapsedTime = now - playerTimeRef.current;
|
|
59
|
+
}
|
|
60
|
+
// console.log(`elapseTime :${elapsedTime} and frame: ${frameNumber}`);
|
|
61
|
+
//time = now;
|
|
62
|
+
playerTimeRef.current = now;
|
|
63
|
+
}, []);
|
|
64
|
+
|
|
65
|
+
// const timeline = React.useCallback(
|
|
66
|
+
// gsap.timeline({
|
|
67
|
+
// paused: true,
|
|
68
|
+
// defaults: { duration: 0, onUpdate: onUpdate },
|
|
69
|
+
// }),
|
|
70
|
+
// [],
|
|
71
|
+
// );
|
|
72
|
+
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
const timeline = tl.current;
|
|
75
|
+
timeline
|
|
76
|
+
.eventCallback("onUpdate", function () {
|
|
77
|
+
/// console.log("onupdate", timeline.progress());
|
|
78
|
+
onUpdate();
|
|
79
|
+
})
|
|
80
|
+
.eventCallback("onComplete", function () {
|
|
81
|
+
timeline.seek(0.01);
|
|
82
|
+
timeline.pause();
|
|
83
|
+
onUpdate();
|
|
84
|
+
});
|
|
85
|
+
}, []);
|
|
86
|
+
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
const timeline = tl.current;
|
|
89
|
+
if (!play) {
|
|
90
|
+
timeline.pause();
|
|
91
|
+
} else {
|
|
92
|
+
timeline.resume();
|
|
93
|
+
}
|
|
94
|
+
}, [play]);
|
|
95
|
+
|
|
96
|
+
const addTotalDuration = (duration) => {
|
|
97
|
+
const timeline = tl.current;
|
|
98
|
+
timeline.totalDuration(duration);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const handleReset = useCallback(() => {
|
|
102
|
+
const timeline = tl.current;
|
|
103
|
+
|
|
104
|
+
timeline.revert();
|
|
105
|
+
}, []);
|
|
106
|
+
|
|
107
|
+
const handleRestart = useCallback(() => {
|
|
108
|
+
const timeline = tl.current;
|
|
109
|
+
timeline.restart();
|
|
110
|
+
}, []);
|
|
111
|
+
|
|
112
|
+
const handleRepeat = useCallback(() => {
|
|
113
|
+
const timeline = tl.current;
|
|
114
|
+
|
|
115
|
+
timeline.repeat(1);
|
|
116
|
+
timeline.restart();
|
|
117
|
+
}, []);
|
|
118
|
+
|
|
119
|
+
const handleSeek = useCallback(() => {
|
|
120
|
+
const timeline = tl.current;
|
|
121
|
+
timeline.seek(4);
|
|
122
|
+
}, []);
|
|
123
|
+
|
|
124
|
+
const setDurationTimeline = useCallback(() => {
|
|
125
|
+
const timeline = tl.current;
|
|
126
|
+
|
|
127
|
+
timeline.totalDuration(3);
|
|
128
|
+
}, []);
|
|
129
|
+
|
|
130
|
+
const handlePause = () => {
|
|
131
|
+
const timeline = tl.current;
|
|
132
|
+
|
|
133
|
+
timeline.pause();
|
|
134
|
+
emitCustomEvent(Events.PAUSE);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const handlePlay = () => {
|
|
138
|
+
const timeline = tl.current;
|
|
139
|
+
timeline.resume();
|
|
140
|
+
emitCustomEvent(Events.RESUME);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<GsapPixieContext.Provider
|
|
145
|
+
value={{
|
|
146
|
+
gsapCtx,
|
|
147
|
+
tl,
|
|
148
|
+
handlePlay,
|
|
149
|
+
handlePause,
|
|
150
|
+
handleReset,
|
|
151
|
+
handleSeek,
|
|
152
|
+
handleRestart,
|
|
153
|
+
handleRepeat,
|
|
154
|
+
playerTimeRef,
|
|
155
|
+
}}
|
|
156
|
+
>
|
|
157
|
+
{children}
|
|
158
|
+
</GsapPixieContext.Provider>
|
|
159
|
+
);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export { GsapPixieContext, GsapPixieContextProvider, Events };
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Slider,
|
|
4
|
+
SliderTrack,
|
|
5
|
+
SliderFilledTrack,
|
|
6
|
+
SliderThumb,
|
|
7
|
+
SliderMark,
|
|
8
|
+
Flex,
|
|
9
|
+
Icon,
|
|
10
|
+
Text,
|
|
11
|
+
Box,
|
|
12
|
+
Button,
|
|
13
|
+
} from "@chakra-ui/react";
|
|
14
|
+
import { GsapPixieContext } from "./GsapPixieContextProvider";
|
|
15
|
+
|
|
16
|
+
import { gsap } from "gsap";
|
|
17
|
+
import { Draggable } from "gsap/Draggable";
|
|
18
|
+
|
|
19
|
+
gsap.registerPlugin(Draggable);
|
|
20
|
+
|
|
21
|
+
export const VideoSeekBar = () => {
|
|
22
|
+
const rafRef = React.useRef();
|
|
23
|
+
const sliderRef = React.useRef();
|
|
24
|
+
const sliderThumbRef = React.useRef(null);
|
|
25
|
+
const sliderProgressRef = React.useRef(null);
|
|
26
|
+
const {
|
|
27
|
+
tl: timeline,
|
|
28
|
+
playerTimeRef,
|
|
29
|
+
handlePlay,
|
|
30
|
+
handlePause,
|
|
31
|
+
handleReset,
|
|
32
|
+
handleSeek,
|
|
33
|
+
handleRestart,
|
|
34
|
+
handleRepeat,
|
|
35
|
+
} = React.useContext(GsapPixieContext);
|
|
36
|
+
|
|
37
|
+
/// state
|
|
38
|
+
const [time, setTime] = React.useState(0);
|
|
39
|
+
const [duration, setDuration] = React.useState(0);
|
|
40
|
+
|
|
41
|
+
const totalVideoSeconds = 20;
|
|
42
|
+
|
|
43
|
+
const animate = (time) => {
|
|
44
|
+
/// console.log("totalDuration", timeline.current.totalDuration());
|
|
45
|
+
setDuration(timeline.current.totalDuration());
|
|
46
|
+
if (playerTimeRef && playerTimeRef.current) {
|
|
47
|
+
setTime(playerTimeRef.current);
|
|
48
|
+
}
|
|
49
|
+
rafRef.current = requestAnimationFrame(animate);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
rafRef.current = requestAnimationFrame(animate);
|
|
54
|
+
return () => cancelAnimationFrame(rafRef.current);
|
|
55
|
+
}, []); // Make sure the effect runs only once
|
|
56
|
+
|
|
57
|
+
const handleOnSliderChange = (value) => {
|
|
58
|
+
const nTotSeconds =
|
|
59
|
+
totalVideoSeconds && totalVideoSeconds > 0 ? totalVideoSeconds : 1;
|
|
60
|
+
const progress = value / nTotSeconds;
|
|
61
|
+
console.log("progressbar", value, progress);
|
|
62
|
+
playerTimeRef.current = value;
|
|
63
|
+
timeline && timeline.progress(progress);
|
|
64
|
+
gsap.set(sliderProgressRef.current, {
|
|
65
|
+
scaleX: progress,
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const handleOnSliderChangeStart = (value) => {};
|
|
69
|
+
const handleOnSliderChangeEnd = (value) => {};
|
|
70
|
+
|
|
71
|
+
/** Create Draggable for the Gsap Player */
|
|
72
|
+
|
|
73
|
+
const updateDrag = React.useCallback(
|
|
74
|
+
(x, maxX) => {
|
|
75
|
+
console.log("updatgeDrag running", x, maxX);
|
|
76
|
+
const currentTime = (x / maxX) * totalVideoSeconds;
|
|
77
|
+
const prog = x / sliderRef.current.offsetWidth;
|
|
78
|
+
console.log("drage update", currentTime, prog);
|
|
79
|
+
},
|
|
80
|
+
[totalVideoSeconds],
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
React.useEffect(() => {
|
|
85
|
+
console.log(sliderRef.current.clientWidth, sliderRef.current.innerWidth);
|
|
86
|
+
console.log(
|
|
87
|
+
sliderThumbRef.current.clientWidth,
|
|
88
|
+
sliderThumbRef.current.innerWidth,
|
|
89
|
+
);
|
|
90
|
+
Draggable.create(sliderThumbRef.current, {
|
|
91
|
+
type: "x",
|
|
92
|
+
trigger: sliderRef.current,
|
|
93
|
+
bounds: sliderRef.current,
|
|
94
|
+
onPress: function () {
|
|
95
|
+
console.log("Draggable clicked");
|
|
96
|
+
},
|
|
97
|
+
onDrag: function () {
|
|
98
|
+
const currentTime = (this.x / this.maxX) * totalVideoSeconds;
|
|
99
|
+
/// console.log("onDragggg currenttime", currentTime);
|
|
100
|
+
playerTimeRef.current = currentTime;
|
|
101
|
+
const progress = this.x / sliderRef.current.offsetWidth;
|
|
102
|
+
timeline && timeline.progress(progress);
|
|
103
|
+
gsap.set(sliderProgressRef.current, {
|
|
104
|
+
scaleX: progress,
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
onRelease: function (e) {
|
|
108
|
+
e.preventDefault();
|
|
109
|
+
timeline && timeline.pause();
|
|
110
|
+
handlePause();
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
}, []);
|
|
114
|
+
*/
|
|
115
|
+
return (
|
|
116
|
+
<Flex flexDir={"column"}>
|
|
117
|
+
<Box>
|
|
118
|
+
<Button onClick={handleRestart}>Play</Button>
|
|
119
|
+
<Button onClick={handlePause}>Pause</Button>
|
|
120
|
+
<Button onClick={handlePlay}>Resume</Button>
|
|
121
|
+
<Button onClick={handleSeek}>Seek (4:00)</Button>
|
|
122
|
+
</Box>
|
|
123
|
+
<Flex px={1} mt={2}>
|
|
124
|
+
<Slider
|
|
125
|
+
aria-label="slider-ex-1"
|
|
126
|
+
data-testid="sliderthumb"
|
|
127
|
+
value={playerTimeRef.current || 0}
|
|
128
|
+
min={0}
|
|
129
|
+
max={duration}
|
|
130
|
+
step={0.1}
|
|
131
|
+
onChange={handleOnSliderChange}
|
|
132
|
+
onChangeStart={handleOnSliderChangeStart}
|
|
133
|
+
onChangeEnd={handleOnSliderChangeEnd}
|
|
134
|
+
>
|
|
135
|
+
<SliderTrack>
|
|
136
|
+
<SliderFilledTrack />
|
|
137
|
+
</SliderTrack>
|
|
138
|
+
<SliderThumb data-testid="sliderthumb" />
|
|
139
|
+
</Slider>
|
|
140
|
+
</Flex>
|
|
141
|
+
<Flex flexDir={"row"}>
|
|
142
|
+
<Text>
|
|
143
|
+
Gsap-CurrentTime: {Math.round((time + Number.EPSILON) * 100) / 100} /{" "}
|
|
144
|
+
{duration}
|
|
145
|
+
</Text>
|
|
146
|
+
</Flex>
|
|
147
|
+
</Flex>
|
|
148
|
+
);
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
<Box mt={5}>
|
|
154
|
+
<Box
|
|
155
|
+
ref={sliderRef}
|
|
156
|
+
bgColor={"black"}
|
|
157
|
+
width={"100%"}
|
|
158
|
+
height={5}
|
|
159
|
+
cursor={"pointer"}
|
|
160
|
+
position={"relative"}
|
|
161
|
+
>
|
|
162
|
+
<Box
|
|
163
|
+
ref={sliderThumbRef}
|
|
164
|
+
data-id="draggable"
|
|
165
|
+
bgColor={"yellow"}
|
|
166
|
+
h={5}
|
|
167
|
+
width={"5px"}
|
|
168
|
+
top={0}
|
|
169
|
+
position={"absolute"}
|
|
170
|
+
zIndex={2}
|
|
171
|
+
transformOrigin={"0 0"}
|
|
172
|
+
/>
|
|
173
|
+
<Box
|
|
174
|
+
ref={sliderProgressRef}
|
|
175
|
+
data-id="draggable"
|
|
176
|
+
width={"100%"}
|
|
177
|
+
height={"100%"}
|
|
178
|
+
bgColor={"green.100"}
|
|
179
|
+
transform={"scaleX(0)"}
|
|
180
|
+
transformOrigin={"0 0"}
|
|
181
|
+
position={"relative"}
|
|
182
|
+
zIndex={1}
|
|
183
|
+
/>
|
|
184
|
+
</Box>
|
|
185
|
+
</Box>
|
|
186
|
+
*/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Meta } from "@storybook/blocks";
|
|
2
|
+
import Code from "./assets/code-brackets.svg";
|
|
3
|
+
import Colors from "./assets/colors.svg";
|
|
4
|
+
import Comments from "./assets/comments.svg";
|
|
5
|
+
import Direction from "./assets/direction.svg";
|
|
6
|
+
import Flow from "./assets/flow.svg";
|
|
7
|
+
import Plugin from "./assets/plugin.svg";
|
|
8
|
+
import Repo from "./assets/repo.svg";
|
|
9
|
+
import StackAlt from "./assets/stackalt.svg";
|
|
10
|
+
|
|
11
|
+
<Meta title="GETTING STARTED/Installation" />
|
|
12
|
+
|
|
13
|
+
# Installation
|
|
14
|
+
|
|
15
|
+
<br />
|
|
16
|
+
|
|
17
|
+
## To install the component packages using NPM:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npm install reacthub-pixitweenjs
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Make sure you install the devDependencies in your project.
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
npm install
|
|
27
|
+
"@pixi-essentials/react-bindings": "2.0.0",
|
|
28
|
+
"@pixi-essentials/transformer": "2.5.6",
|
|
29
|
+
"@pixi/assets": "6.5.9",
|
|
30
|
+
"@pixi/basis": "6.5.9",
|
|
31
|
+
"@pixi/filter-adjustment": "5.1.1",
|
|
32
|
+
"@pixi/gif": "1.1.3",
|
|
33
|
+
"@pixi/interaction": "6.5.9",
|
|
34
|
+
"@pixi/picture": "^3.0.3",
|
|
35
|
+
"@pixi/react": "7.0.0",
|
|
36
|
+
"@pixi/sound": "^4.3.1",
|
|
37
|
+
"pixi-filters": "5.1.1",
|
|
38
|
+
"pixi-svg": "3.2.0",
|
|
39
|
+
"pixi.js": "6.5.9",
|
|
40
|
+
```
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { Meta } from "@storybook/blocks";
|
|
2
|
+
import Code from "./assets/code-brackets.svg";
|
|
3
|
+
import Colors from "./assets/colors.svg";
|
|
4
|
+
import Comments from "./assets/comments.svg";
|
|
5
|
+
import Direction from "./assets/direction.svg";
|
|
6
|
+
import Flow from "./assets/flow.svg";
|
|
7
|
+
import Plugin from "./assets/plugin.svg";
|
|
8
|
+
import Repo from "./assets/repo.svg";
|
|
9
|
+
import StackAlt from "./assets/stackalt.svg";
|
|
10
|
+
|
|
11
|
+
<Meta title="GETTING STARTED/Introduction" />
|
|
12
|
+
|
|
13
|
+
<style>
|
|
14
|
+
{`
|
|
15
|
+
.subheading {
|
|
16
|
+
--mediumdark: '#999999';
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
font-size: 13px;
|
|
19
|
+
color: #999;
|
|
20
|
+
letter-spacing: 6px;
|
|
21
|
+
line-height: 24px;
|
|
22
|
+
text-transform: uppercase;
|
|
23
|
+
margin-bottom: 12px;
|
|
24
|
+
margin-top: 40px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.link-list {
|
|
28
|
+
display: grid;
|
|
29
|
+
grid-template-columns: 1fr;
|
|
30
|
+
grid-template-rows: 1fr 1fr;
|
|
31
|
+
row-gap: 10px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (min-width: 620px) {
|
|
35
|
+
.link-list {
|
|
36
|
+
row-gap: 20px;
|
|
37
|
+
column-gap: 20px;
|
|
38
|
+
grid-template-columns: 1fr 1fr;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media all and (-ms-high-contrast:none) {
|
|
43
|
+
.link-list {
|
|
44
|
+
display: -ms-grid;
|
|
45
|
+
-ms-grid-columns: 1fr 1fr;
|
|
46
|
+
-ms-grid-rows: 1fr 1fr;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.link-item {
|
|
51
|
+
display: block;
|
|
52
|
+
padding: 20px;
|
|
53
|
+
border: 1px solid #00000010;
|
|
54
|
+
border-radius: 5px;
|
|
55
|
+
transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
|
|
56
|
+
color: #333333;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: flex-start;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.link-item:hover {
|
|
62
|
+
border-color: #1EA7FD50;
|
|
63
|
+
transform: translate3d(0, -3px, 0);
|
|
64
|
+
box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.link-item:active {
|
|
68
|
+
border-color: #1EA7FD;
|
|
69
|
+
transform: translate3d(0, 0, 0);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.link-item strong {
|
|
73
|
+
font-weight: 700;
|
|
74
|
+
display: block;
|
|
75
|
+
margin-bottom: 2px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.link-item img {
|
|
79
|
+
height: 40px;
|
|
80
|
+
width: 40px;
|
|
81
|
+
margin-right: 15px;
|
|
82
|
+
flex: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.link-item span,
|
|
86
|
+
.link-item p {
|
|
87
|
+
margin: 0;
|
|
88
|
+
font-size: 14px;
|
|
89
|
+
line-height: 20px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tip {
|
|
93
|
+
display: inline-block;
|
|
94
|
+
border-radius: 1em;
|
|
95
|
+
font-size: 11px;
|
|
96
|
+
line-height: 12px;
|
|
97
|
+
font-weight: 700;
|
|
98
|
+
background: #E7FDD8;
|
|
99
|
+
color: #66BF3C;
|
|
100
|
+
padding: 4px 12px;
|
|
101
|
+
margin-right: 10px;
|
|
102
|
+
vertical-align: top;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.tip-wrapper {
|
|
106
|
+
font-size: 13px;
|
|
107
|
+
line-height: 20px;
|
|
108
|
+
margin-top: 40px;
|
|
109
|
+
margin-bottom: 40px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.tip-wrapper code {
|
|
113
|
+
font-size: 12px;
|
|
114
|
+
display: inline-block;
|
|
115
|
+
}
|
|
116
|
+
`}
|
|
117
|
+
</style>
|
|
118
|
+
|
|
119
|
+
# Welcome to Reacthub PixiTweenJS
|
|
120
|
+
|
|
121
|
+
PixiTweenJs is designed to help you build animated time-controlled canvas elements on web apps using extensible Pixijs Components underneath.
|
|
122
|
+
The package composes the reacthub/pixitweenjs Web Component package. You can use these Web Components flexibly, either from npm packages, from the CDN, or you can bring it into your project to customize and extend it. See the installation page for details.
|
|
123
|
+
|
|
124
|
+
This storybook provides documentation and an interactive component playground from Accordion to TreeView to help you understand how to build with Fluent Web Components.
|
|
125
|
+
|
|
126
|
+
- See the COMPONENTS live in the side bar.
|
|
127
|
+
- See the installation page for installation and getting started
|
|
128
|
+
- View the integration examples to leverage the components in your front-end framework
|
|
129
|
+
- Check out the GitHub repo for Web Components, part of the Fluent UI monorepo
|
|
130
|
+
|
|
131
|
+
reacthub-pixitweenjs is a library that provides a powerful combination of React, PixiJS, GSAP, and image manipulation capabilities in a timeline sequence. With this library, you can easily create stunning animations and interactive graphics for your React applications.
|
|
132
|
+
|
|
133
|
+
The library is built on top of PixiJS, a popular 2D WebGL rendering engine, and GSAP, a powerful animation library. It provides a simple and intuitive API for creating animations and manipulating images in a timeline sequence. You can easily create complex animations by composing multiple PixiJS and GSAP animations together.
|
|
134
|
+
|
|
135
|
+
reacthub-pixitweenjs also provides a set of React components that make it easy to integrate PixiJS and GSAP animations into your React applications. These components are highly customizable and can be easily styled to match the look and feel of your application.
|
|
136
|
+
|
|
137
|
+
Overall, reacthub-pixitweenjs is a great choice for developers who want to create stunning animations and interactive graphics in their React applications. It provides a powerful set of tools and a simple API that makes it easy to create complex animations and manipulate images in a timeline sequence.
|
|
138
|
+
|
|
139
|
+
Storybook helps you build UI components in isolation from your app's business logic, data, and context.
|
|
140
|
+
That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
|
|
141
|
+
|
|
142
|
+
Browse example stories now by navigating to them in the sidebar.
|
|
143
|
+
View their code in the `stories` directory to learn how they work.
|
|
144
|
+
We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
|
|
145
|
+
|
|
146
|
+
<div className="subheading">Configure</div>
|
|
147
|
+
|
|
148
|
+
<div className="link-list">
|
|
149
|
+
<a
|
|
150
|
+
className="link-item"
|
|
151
|
+
href="https://storybook.js.org/docs/react/addons/addon-types"
|
|
152
|
+
target="_blank"
|
|
153
|
+
>
|
|
154
|
+
<img src={Plugin} alt="plugin" />
|
|
155
|
+
<span>
|
|
156
|
+
<strong>Presets for popular tools</strong>
|
|
157
|
+
Easy setup for TypeScript, SCSS and more.
|
|
158
|
+
</span>
|
|
159
|
+
</a>
|
|
160
|
+
<a
|
|
161
|
+
className="link-item"
|
|
162
|
+
href="https://storybook.js.org/docs/react/configure/webpack"
|
|
163
|
+
target="_blank"
|
|
164
|
+
>
|
|
165
|
+
<img src={StackAlt} alt="Build" />
|
|
166
|
+
<span>
|
|
167
|
+
<strong>Build configuration</strong>
|
|
168
|
+
How to customize webpack and Babel
|
|
169
|
+
</span>
|
|
170
|
+
</a>
|
|
171
|
+
<a
|
|
172
|
+
className="link-item"
|
|
173
|
+
href="https://storybook.js.org/docs/react/configure/styling-and-css"
|
|
174
|
+
target="_blank"
|
|
175
|
+
>
|
|
176
|
+
<img src={Colors} alt="colors" />
|
|
177
|
+
<span>
|
|
178
|
+
<strong>Styling</strong>
|
|
179
|
+
How to load and configure CSS libraries
|
|
180
|
+
</span>
|
|
181
|
+
</a>
|
|
182
|
+
<a
|
|
183
|
+
className="link-item"
|
|
184
|
+
href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
|
|
185
|
+
target="_blank"
|
|
186
|
+
>
|
|
187
|
+
<img src={Flow} alt="flow" />
|
|
188
|
+
<span>
|
|
189
|
+
<strong>Data</strong>
|
|
190
|
+
Providers and mocking for data libraries
|
|
191
|
+
</span>
|
|
192
|
+
</a>
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
<div className="subheading">Learn</div>
|
|
196
|
+
|
|
197
|
+
<div className="link-list">
|
|
198
|
+
<a className="link-item" href="https://storybook.js.org/docs" target="_blank">
|
|
199
|
+
<img src={Repo} alt="repo" />
|
|
200
|
+
<span>
|
|
201
|
+
<strong>Storybook documentation</strong>
|
|
202
|
+
Configure, customize, and extend
|
|
203
|
+
</span>
|
|
204
|
+
</a>
|
|
205
|
+
<a
|
|
206
|
+
className="link-item"
|
|
207
|
+
href="https://storybook.js.org/tutorials/"
|
|
208
|
+
target="_blank"
|
|
209
|
+
>
|
|
210
|
+
<img src={Direction} alt="direction" />
|
|
211
|
+
<span>
|
|
212
|
+
<strong>In-depth guides</strong>
|
|
213
|
+
Best practices from leading teams
|
|
214
|
+
</span>
|
|
215
|
+
</a>
|
|
216
|
+
<a
|
|
217
|
+
className="link-item"
|
|
218
|
+
href="https://github.com/storybookjs/storybook"
|
|
219
|
+
target="_blank"
|
|
220
|
+
>
|
|
221
|
+
<img src={Code} alt="code" />
|
|
222
|
+
<span>
|
|
223
|
+
<strong>GitHub project</strong>
|
|
224
|
+
View the source and add issues
|
|
225
|
+
</span>
|
|
226
|
+
</a>
|
|
227
|
+
<a className="link-item" href="https://discord.gg/storybook" target="_blank">
|
|
228
|
+
<img src={Comments} alt="comments" />
|
|
229
|
+
<span>
|
|
230
|
+
<strong>Discord chat</strong>
|
|
231
|
+
Chat with maintainers and the community
|
|
232
|
+
</span>
|
|
233
|
+
</a>
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
<div className="tip-wrapper">
|
|
237
|
+
<span className="tip">Tip</span>Edit the Markdown in{" "}
|
|
238
|
+
<code>stories/Introduction.stories.mdx</code>
|
|
239
|
+
</div>
|