anim-3d-obj 1.1.74 → 1.1.224
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 +51 -74
- package/ang1.png +0 -0
- package/ang2.png +0 -0
- package/ang3.png +0 -0
- package/angl1.png +0 -0
- package/babel.config.json +18 -0
- package/jestconfig.json +8 -0
- package/package.json +62 -57
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/src/components/Face.tsx +95 -0
- package/src/components/Obj.tsx +52 -0
- package/src/components/index.ts +4 -0
- package/src/components/styles/Anim.d.ts +17 -0
- package/src/components/styles/AnimWrap.tsx +90 -0
- package/{dist/esm/components/styles/Anims.js → src/components/styles/Anims.ts} +82 -60
- package/src/components/styles/Global.tsx +28 -0
- package/src/components/styles/Scene.tsx +37 -0
- package/src/components/types.d.ts +42 -0
- package/tsconfig.json +20 -0
- package/dist/cjs/components/Face.d.ts +0 -11
- package/dist/cjs/components/Face.js +0 -106
- package/dist/cjs/components/Obj.d.ts +0 -2
- package/dist/cjs/components/Obj.js +0 -31
- package/dist/cjs/components/index.d.ts +0 -2
- package/dist/cjs/components/index.js +0 -18
- package/dist/cjs/components/styles/AnimWrap.d.ts +0 -2
- package/dist/cjs/components/styles/AnimWrap.js +0 -88
- package/dist/cjs/components/styles/Anims.d.ts +0 -32
- package/dist/cjs/components/styles/Anims.js +0 -329
- package/dist/cjs/components/styles/Global.d.ts +0 -6
- package/dist/cjs/components/styles/Global.js +0 -27
- package/dist/cjs/components/styles/Scene.d.ts +0 -10
- package/dist/cjs/components/styles/Scene.js +0 -22
- package/dist/cjs/index.js +0 -17
- package/dist/esm/components/Face.d.ts +0 -11
- package/dist/esm/components/Face.js +0 -100
- package/dist/esm/components/Obj.d.ts +0 -2
- package/dist/esm/components/Obj.js +0 -25
- package/dist/esm/components/index.d.ts +0 -2
- package/dist/esm/components/index.js +0 -2
- package/dist/esm/components/styles/AnimWrap.d.ts +0 -2
- package/dist/esm/components/styles/AnimWrap.js +0 -81
- package/dist/esm/components/styles/Anims.d.ts +0 -32
- package/dist/esm/components/styles/Global.d.ts +0 -6
- package/dist/esm/components/styles/Global.js +0 -20
- package/dist/esm/components/styles/Scene.d.ts +0 -10
- package/dist/esm/components/styles/Scene.js +0 -15
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- /package/{dist/cjs/index.d.ts → src/index.ts} +0 -0
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { allAnims } from "./Anims";
|
|
4
|
-
export const AnimWrap = (props) => {
|
|
5
|
-
const { children, animSpecs } = props;
|
|
6
|
-
const AS = animSpecs;
|
|
7
|
-
const { X360, Y360, fadeInkf, wobY, wobX, fwdx018, fwdx1836, fwdx09, fwdx918, fwdx1827, fwdx2736, fwdy018, fwdy1836, fwdy09, fwdy918, fwdy1827, fwdy2736, floatX, floatShadow, pulseSM, pulseMD, pulseLG, swing, swingDecay, noAnim, } = allAnims({ degreesHi: AS.degreesHi, degreesLow: AS.degreesLow });
|
|
8
|
-
let theAnim = "noAnim";
|
|
9
|
-
if (AS.name === "X360")
|
|
10
|
-
theAnim = X360;
|
|
11
|
-
else if (AS.name === "Y360")
|
|
12
|
-
theAnim = Y360;
|
|
13
|
-
else if (AS.name === "fadeInkf")
|
|
14
|
-
theAnim = fadeInkf;
|
|
15
|
-
else if (AS.name === "wobX")
|
|
16
|
-
theAnim = wobX;
|
|
17
|
-
else if (AS.name === "wobY")
|
|
18
|
-
theAnim = wobY;
|
|
19
|
-
else if (AS.name === "fwdx018")
|
|
20
|
-
theAnim = fwdx018;
|
|
21
|
-
else if (AS.name === "fwdx1836")
|
|
22
|
-
theAnim = fwdx1836;
|
|
23
|
-
else if (AS.name === "fwdx09")
|
|
24
|
-
theAnim = fwdx09;
|
|
25
|
-
else if (AS.name === "fwdx918")
|
|
26
|
-
theAnim = fwdx918;
|
|
27
|
-
else if (AS.name === "fwdx1827")
|
|
28
|
-
theAnim = fwdx1827;
|
|
29
|
-
else if (AS.name === "fwdx2736")
|
|
30
|
-
theAnim = fwdx2736;
|
|
31
|
-
else if (AS.name === "fwdy018")
|
|
32
|
-
theAnim = fwdy018;
|
|
33
|
-
else if (AS.name === "fwdy1836")
|
|
34
|
-
theAnim = fwdy1836;
|
|
35
|
-
else if (AS.name === "fwdy09")
|
|
36
|
-
theAnim = fwdy09;
|
|
37
|
-
else if (AS.name === "fwdy918")
|
|
38
|
-
theAnim = fwdy918;
|
|
39
|
-
else if (AS.name === "fwdy1827")
|
|
40
|
-
theAnim = fwdy1827;
|
|
41
|
-
else if (AS.name === "fwdy2736")
|
|
42
|
-
theAnim = fwdy2736;
|
|
43
|
-
else if (AS.name === "floatX")
|
|
44
|
-
theAnim = floatX;
|
|
45
|
-
else if (AS.name === "floatShadow")
|
|
46
|
-
theAnim = floatShadow;
|
|
47
|
-
else if (AS.name === "pulseSM")
|
|
48
|
-
theAnim = pulseSM;
|
|
49
|
-
else if (AS.name === "pulseMD")
|
|
50
|
-
theAnim = pulseMD;
|
|
51
|
-
else if (AS.name === "pulseLG")
|
|
52
|
-
theAnim = pulseLG;
|
|
53
|
-
else if (AS.name === "swing")
|
|
54
|
-
theAnim = swing;
|
|
55
|
-
else if (AS.name === "swingDecay")
|
|
56
|
-
theAnim = swingDecay;
|
|
57
|
-
else
|
|
58
|
-
theAnim = noAnim;
|
|
59
|
-
const AnimWrapDiv = styled.div `
|
|
60
|
-
width: 100%;
|
|
61
|
-
height: 100%;
|
|
62
|
-
position: relative;
|
|
63
|
-
transform-style: preserve-3d;
|
|
64
|
-
border: ${AS.border};
|
|
65
|
-
-webkit-animation-duration: ${AS.duration}s;
|
|
66
|
-
animation-duration: ${AS.duration}s;
|
|
67
|
-
-webkit-animation-iteration-count: ${AS.iterationCount};
|
|
68
|
-
animation-iteration-count: ${AS.iterationCount};
|
|
69
|
-
-webkit-animation-name: ${theAnim};
|
|
70
|
-
animation-name: ${theAnim};
|
|
71
|
-
-webkit-animation-fill-mode: ${AS.fillMode};
|
|
72
|
-
animation-fill-mode: ${AS.fillMode};
|
|
73
|
-
animation-direction: ${AS.direction};
|
|
74
|
-
-webkit-animation-direction: ${AS.direction};
|
|
75
|
-
-webkit-animation-timing-function: ${AS.timing};
|
|
76
|
-
animation-timing-function: ${AS.timing};
|
|
77
|
-
-webkit-animation-delay: ${AS.delay}s;
|
|
78
|
-
animation-delay: ${AS.delay}s;
|
|
79
|
-
`;
|
|
80
|
-
return React.createElement(AnimWrapDiv, null, children);
|
|
81
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
interface AllAnimsProps {
|
|
2
|
-
degreesLow?: number;
|
|
3
|
-
degreesHi?: number;
|
|
4
|
-
}
|
|
5
|
-
export declare const allAnims: (props: AllAnimsProps) => {
|
|
6
|
-
X360: import("styled-components").Keyframes;
|
|
7
|
-
Y360: import("styled-components").Keyframes;
|
|
8
|
-
fadeInkf: import("styled-components").Keyframes;
|
|
9
|
-
wobY: import("styled-components").Keyframes;
|
|
10
|
-
wobX: import("styled-components").Keyframes;
|
|
11
|
-
fwdx018: import("styled-components").Keyframes;
|
|
12
|
-
fwdx1836: import("styled-components").Keyframes;
|
|
13
|
-
fwdx09: import("styled-components").Keyframes;
|
|
14
|
-
fwdx918: import("styled-components").Keyframes;
|
|
15
|
-
fwdx1827: import("styled-components").Keyframes;
|
|
16
|
-
fwdx2736: import("styled-components").Keyframes;
|
|
17
|
-
fwdy018: import("styled-components").Keyframes;
|
|
18
|
-
fwdy1836: import("styled-components").Keyframes;
|
|
19
|
-
fwdy09: import("styled-components").Keyframes;
|
|
20
|
-
fwdy918: import("styled-components").Keyframes;
|
|
21
|
-
fwdy1827: import("styled-components").Keyframes;
|
|
22
|
-
fwdy2736: import("styled-components").Keyframes;
|
|
23
|
-
floatX: import("styled-components").Keyframes;
|
|
24
|
-
floatShadow: import("styled-components").Keyframes;
|
|
25
|
-
pulseSM: import("styled-components").Keyframes;
|
|
26
|
-
pulseMD: import("styled-components").Keyframes;
|
|
27
|
-
pulseLG: import("styled-components").Keyframes;
|
|
28
|
-
swing: import("styled-components").Keyframes;
|
|
29
|
-
swingDecay: import("styled-components").Keyframes;
|
|
30
|
-
noAnim: import("styled-components").Keyframes;
|
|
31
|
-
};
|
|
32
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export const ObjWrapper = (props) => {
|
|
4
|
-
const { showCenterDiv = false, children = "" } = props;
|
|
5
|
-
const Wrapper = showCenterDiv
|
|
6
|
-
? styled.section `
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
position: relative;
|
|
10
|
-
transform-style: preserve-3d;
|
|
11
|
-
border: 1px solid #0f0;
|
|
12
|
-
`
|
|
13
|
-
: styled.section `
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: 100%;
|
|
16
|
-
position: relative;
|
|
17
|
-
transform-style: preserve-3d;
|
|
18
|
-
`;
|
|
19
|
-
return React.createElement(Wrapper, null, children);
|
|
20
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface SceneStyleProps {
|
|
2
|
-
width?: number | string;
|
|
3
|
-
height?: number | string;
|
|
4
|
-
perspective?: number | string | undefined;
|
|
5
|
-
perspectiveOrigin?: string | undefined;
|
|
6
|
-
zIndex?: number | undefined;
|
|
7
|
-
children: any;
|
|
8
|
-
}
|
|
9
|
-
export declare const SceneStyle: (props: SceneStyleProps) => JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export const SceneStyle = (props) => {
|
|
4
|
-
const { width = 0, height = 0, perspective = 600, perspectiveOrigin = "50% 50%", zIndex = 10, children = {}, } = props;
|
|
5
|
-
const SceneStyleDiv = styled.div `
|
|
6
|
-
width: ${width}px;
|
|
7
|
-
height: ${height}px;
|
|
8
|
-
-webkit-perspective: ${perspective}px;
|
|
9
|
-
perspective: ${perspective}px;
|
|
10
|
-
-webkit-perspective-origin: ${perspectiveOrigin};
|
|
11
|
-
perspective-origin: ${perspectiveOrigin};
|
|
12
|
-
`;
|
|
13
|
-
return (React.createElement("div", { style: { zIndex } },
|
|
14
|
-
React.createElement(SceneStyleDiv, null, children)));
|
|
15
|
-
};
|
package/dist/esm/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./components";
|
package/dist/esm/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./components";
|
|
File without changes
|