@pixzle/react 0.1.4 → 0.1.6
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/README.md +48 -56
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -12,66 +12,58 @@ npm i @pixzle/react
|
|
|
12
12
|
|
|
13
13
|
### PixzleImage
|
|
14
14
|
|
|
15
|
-
Single image restoration component.
|
|
16
|
-
|
|
17
15
|
```tsx
|
|
18
16
|
import { PixzleImage } from '@pixzle/react';
|
|
17
|
+
```
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
const MyComponentWithManifest = () => {
|
|
22
|
-
return (
|
|
23
|
-
<PixzleImage
|
|
24
|
-
manifest="https://example.com/manifest.json"
|
|
25
|
-
image="https://example.com/fragment.png"
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
19
|
+
### Using manifest URL
|
|
29
20
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{/* #3 */}
|
|
47
|
-
<PixzleImage
|
|
48
|
-
manifest="https://example.com/manifest.json"
|
|
49
|
-
image="https://example.com/fragment3.png"
|
|
50
|
-
imageIndex={2}
|
|
51
|
-
/>
|
|
52
|
-
</>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
21
|
+
```tsx
|
|
22
|
+
<PixzleImage
|
|
23
|
+
manifest="https://example.com/manifest.json"
|
|
24
|
+
image="https://example.com/fragment.png"
|
|
25
|
+
/>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Using manifest URL with multiple images
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
{/* #1 */}
|
|
32
|
+
<PixzleImage
|
|
33
|
+
manifest="https://example.com/manifest.json"
|
|
34
|
+
image="https://example.com/fragment1.png"
|
|
35
|
+
// imageIndex={0}
|
|
36
|
+
/>
|
|
55
37
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/>
|
|
63
|
-
);
|
|
64
|
-
};
|
|
38
|
+
{/* #2 */}
|
|
39
|
+
<PixzleImage
|
|
40
|
+
manifest="https://example.com/manifest.json"
|
|
41
|
+
image="https://example.com/fragment2.png"
|
|
42
|
+
imageIndex={1}
|
|
43
|
+
/>
|
|
65
44
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
45
|
+
{/* #3 */}
|
|
46
|
+
<PixzleImage
|
|
47
|
+
manifest="https://example.com/manifest.json"
|
|
48
|
+
image="https://example.com/fragment3.png"
|
|
49
|
+
imageIndex={2}
|
|
50
|
+
/>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Using manifest data
|
|
54
|
+
```tsx
|
|
55
|
+
<PixzleImage
|
|
56
|
+
manifestData={manifestData}
|
|
57
|
+
image="https://example.com/fragment.png"
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Using explicit parameters
|
|
62
|
+
```tsx
|
|
63
|
+
<PixzleImage
|
|
64
|
+
blockSize={2}
|
|
65
|
+
seed={72411}
|
|
66
|
+
imageInfo={{ w: 500, h: 500 }}
|
|
67
|
+
image="https://example.com/fragment.png"
|
|
68
|
+
/>
|
|
77
69
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixzle/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "React components for pixzle",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@pixzle/browser": "0.1.
|
|
38
|
-
"@pixzle/core": "0.1.
|
|
37
|
+
"@pixzle/browser": "0.1.6",
|
|
38
|
+
"@pixzle/core": "0.1.6"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=16.8.0",
|