reacthub-pixitweenjs 0.2.7 → 0.2.8
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.2.8](https://github.com/khanzzirfan/reacthub-pixitweenjs/compare/v0.2.7...v0.2.8) (2023-08-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* exported all pixi elements ([cec8ce1](https://github.com/khanzzirfan/reacthub-pixitweenjs/commit/cec8ce10588432fd775b6cd3cbb22118b034c4ca))
|
|
11
|
+
|
|
5
12
|
### [0.2.7](https://github.com/khanzzirfan/reacthub-pixitweenjs/compare/v0.2.6...v0.2.7) (2023-08-27)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reacthub-pixitweenjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "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",
|
|
5
5
|
"author": "khanzzirfan",
|
|
6
6
|
"type": "module",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { PixiImageSprite } from ".";
|
|
3
3
|
import { AppStateContextProvider } from "../../utils/AppStateProvider";
|
|
4
|
+
import { Effects } from "../../types/Effects";
|
|
4
5
|
|
|
5
6
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
6
7
|
const meta = {
|
|
@@ -35,6 +36,11 @@ const meta = {
|
|
|
35
36
|
scale: { control: "number", description: "scale of the sprite" },
|
|
36
37
|
tint: { control: "number", description: "tint of the sprite" },
|
|
37
38
|
blendMode: { control: "number", description: "blendMode of the sprite" },
|
|
39
|
+
effects: {
|
|
40
|
+
type: "string",
|
|
41
|
+
options: Object.values(Effects),
|
|
42
|
+
description: "filter effects of the sprite",
|
|
43
|
+
},
|
|
38
44
|
colorCorrection: {
|
|
39
45
|
control: "object",
|
|
40
46
|
description: "colorCorrection of the sprite",
|
|
@@ -102,6 +108,7 @@ export const Normal: Story = {
|
|
|
102
108
|
scale: 1,
|
|
103
109
|
tint: 0xffffff,
|
|
104
110
|
blendMode: 0,
|
|
111
|
+
effect: Effects.None,
|
|
105
112
|
colorCorrection: {
|
|
106
113
|
enabled: false,
|
|
107
114
|
contrast: 1,
|
|
@@ -137,6 +144,7 @@ export const FadeIn: Story = {
|
|
|
137
144
|
scale: 1,
|
|
138
145
|
tint: 0xffffff,
|
|
139
146
|
blendMode: 0,
|
|
147
|
+
effect: Effects.None,
|
|
140
148
|
animation: "FADE_IN",
|
|
141
149
|
colorCorrection: {},
|
|
142
150
|
},
|
|
@@ -168,6 +176,7 @@ export const Filters: Story = {
|
|
|
168
176
|
scale: 1,
|
|
169
177
|
tint: 0xffffff,
|
|
170
178
|
blendMode: 0,
|
|
179
|
+
effect: Effects.None,
|
|
171
180
|
colorCorrection: {
|
|
172
181
|
enabled: true,
|
|
173
182
|
contrast: 1,
|
|
@@ -179,3 +188,33 @@ export const Filters: Story = {
|
|
|
179
188
|
initialAlpha: 1,
|
|
180
189
|
},
|
|
181
190
|
};
|
|
191
|
+
|
|
192
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
193
|
+
export const FilterEffects: Story = {
|
|
194
|
+
render: (args: any) => (
|
|
195
|
+
<AppStateContextProvider {...args}>
|
|
196
|
+
<PixiImageSprite {...args} />
|
|
197
|
+
</AppStateContextProvider>
|
|
198
|
+
),
|
|
199
|
+
args: {
|
|
200
|
+
uniqueId: "image-filtereffects001", // uniqueId of the sprite
|
|
201
|
+
src: "https://assets.codepen.io/693612/surya.svg",
|
|
202
|
+
applyTransformer: false,
|
|
203
|
+
startAt: 0,
|
|
204
|
+
endAt: 10,
|
|
205
|
+
transformation: {
|
|
206
|
+
x: 200,
|
|
207
|
+
y: 200,
|
|
208
|
+
width: 150,
|
|
209
|
+
height: 150,
|
|
210
|
+
anchor: 0.5,
|
|
211
|
+
rotation: 0,
|
|
212
|
+
alpha: 1,
|
|
213
|
+
scale: 1,
|
|
214
|
+
tint: 0xffffff,
|
|
215
|
+
blendMode: 0,
|
|
216
|
+
effect: Effects.BlackAndWhite,
|
|
217
|
+
},
|
|
218
|
+
initialAlpha: 1,
|
|
219
|
+
},
|
|
220
|
+
};
|
package/src/index.ts
CHANGED