anim-3d-obj 1.2.8 → 1.2.10
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 +2 -2
- package/package.json +2 -2
- package/dist/cjs/components/Face.d.ts +0 -11
- package/dist/cjs/components/Face.js +0 -107
- 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 -90
- 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.d.ts +0 -1
- package/dist/cjs/index.js +0 -17
- package/dist/esm/components/Face.d.ts +0 -11
- package/dist/esm/components/Face.js +0 -101
- 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 -83
- package/dist/esm/components/styles/Anims.d.ts +0 -32
- package/dist/esm/components/styles/Anims.js +0 -325
- 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
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ObjWrapper = void 0;
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const ObjWrapper = (props) => {
|
|
10
|
-
const { showCenterDiv = false, children = "" } = props;
|
|
11
|
-
const Wrapper = showCenterDiv
|
|
12
|
-
? styled_components_1.default.section `
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 100%;
|
|
15
|
-
position: relative;
|
|
16
|
-
transform-style: preserve-3d;
|
|
17
|
-
border: 1px solid #0f0;
|
|
18
|
-
`
|
|
19
|
-
: styled_components_1.default.section `
|
|
20
|
-
width: 100%;
|
|
21
|
-
height: 100%;
|
|
22
|
-
position: relative;
|
|
23
|
-
transform-style: preserve-3d;
|
|
24
|
-
`;
|
|
25
|
-
return react_1.default.createElement(Wrapper, null, children);
|
|
26
|
-
};
|
|
27
|
-
exports.ObjWrapper = ObjWrapper;
|
|
@@ -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,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SceneStyle = void 0;
|
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const SceneStyle = (props) => {
|
|
10
|
-
const { width = 0, height = 0, perspective = 600, perspectiveOrigin = "50% 50%", zIndex = 10, children = {}, } = props;
|
|
11
|
-
const SceneStyleDiv = styled_components_1.default.div `
|
|
12
|
-
width: ${width}px;
|
|
13
|
-
height: ${height}px;
|
|
14
|
-
-webkit-perspective: ${perspective}px;
|
|
15
|
-
perspective: ${perspective}px;
|
|
16
|
-
-webkit-perspective-origin: ${perspectiveOrigin};
|
|
17
|
-
perspective-origin: ${perspectiveOrigin};
|
|
18
|
-
`;
|
|
19
|
-
return (react_1.default.createElement("div", { style: { zIndex } },
|
|
20
|
-
react_1.default.createElement(SceneStyleDiv, null, children)));
|
|
21
|
-
};
|
|
22
|
-
exports.SceneStyle = SceneStyle;
|
package/dist/cjs/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./components";
|
package/dist/cjs/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./components"), exports);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FaceType } from "./types";
|
|
2
|
-
interface FaceProps {
|
|
3
|
-
children?: any;
|
|
4
|
-
depth?: number | any;
|
|
5
|
-
face: FaceType;
|
|
6
|
-
global?: any;
|
|
7
|
-
height?: number | string;
|
|
8
|
-
width?: number | string;
|
|
9
|
-
}
|
|
10
|
-
export default function Face(props: FaceProps): JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
export default function Face(props) {
|
|
4
|
-
let display = true;
|
|
5
|
-
let { depth = 10, global = { css: "", body: "" }, height = 10, face, width = 100, } = props;
|
|
6
|
-
let transform;
|
|
7
|
-
let tranz = +height / 2;
|
|
8
|
-
const body = face.body ? face.body : global.body;
|
|
9
|
-
////////////////////////////////////////////////////////////////////////////// BOTTOM
|
|
10
|
-
if (face.name === "bottom") {
|
|
11
|
-
tranz = +height - +depth / 2;
|
|
12
|
-
height = +depth;
|
|
13
|
-
transform = `transform: rotateX(-90deg) translateZ(${tranz}px);`;
|
|
14
|
-
}
|
|
15
|
-
else if (face.name === "bottom_rear") {
|
|
16
|
-
tranz = +height - +depth / 2;
|
|
17
|
-
height = +depth;
|
|
18
|
-
transform = `transform: rotateX(-90deg) translateZ(${tranz}px) translateY(${height}px) `;
|
|
19
|
-
}
|
|
20
|
-
else if (face.name === "bottom_front") {
|
|
21
|
-
tranz = +height - +depth / 2;
|
|
22
|
-
height = +depth;
|
|
23
|
-
transform = `transform: rotateX(-90deg) translateZ(${tranz}px) translateY(${-height}px) `;
|
|
24
|
-
////////////////////////////////////////////////////////////////////////////// TOPS
|
|
25
|
-
}
|
|
26
|
-
else if (face.name === "top") {
|
|
27
|
-
height = +depth;
|
|
28
|
-
if (!!depth)
|
|
29
|
-
tranz = +depth / 2;
|
|
30
|
-
transform = `transform: rotateX(90deg) translateZ(${tranz}px);`;
|
|
31
|
-
}
|
|
32
|
-
else if (face.name === "top_rear") {
|
|
33
|
-
height = +depth;
|
|
34
|
-
if (!!depth)
|
|
35
|
-
tranz = +depth / 2;
|
|
36
|
-
let offset = depth / 2;
|
|
37
|
-
//translate3d(tx, ty, tz)
|
|
38
|
-
transform = `transform: rotateX(90deg) translateZ(${tranz}px) translateY(-${tranz * 2}px) `;
|
|
39
|
-
}
|
|
40
|
-
else if (face.name === "top_front") {
|
|
41
|
-
height = +depth;
|
|
42
|
-
if (!!depth)
|
|
43
|
-
tranz = +depth / 2;
|
|
44
|
-
let offset = depth / 2;
|
|
45
|
-
//translate3d(tx, ty, tz)
|
|
46
|
-
transform = `transform: rotateX(90deg) translateZ(${tranz}px) translateY(${tranz * 2}px) `;
|
|
47
|
-
}
|
|
48
|
-
else if (face.name === "front") {
|
|
49
|
-
if (!!depth)
|
|
50
|
-
tranz = +depth / 2;
|
|
51
|
-
transform = `transform: rotateY(0deg) translateZ(${tranz}px);`;
|
|
52
|
-
}
|
|
53
|
-
else if (face.name === "back") {
|
|
54
|
-
if (!!depth)
|
|
55
|
-
tranz = +depth / 2;
|
|
56
|
-
transform = `transform: rotateY(180deg) translateZ(${tranz}px);`;
|
|
57
|
-
}
|
|
58
|
-
else if (face.name === "right") {
|
|
59
|
-
if (height > width && !depth) {
|
|
60
|
-
tranz = -(+height / 2 - +width);
|
|
61
|
-
width = +height;
|
|
62
|
-
}
|
|
63
|
-
else if (width > height && !depth) {
|
|
64
|
-
tranz = +height / 2;
|
|
65
|
-
height = +width;
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
tranz = +width - +depth / 2;
|
|
69
|
-
width = +depth;
|
|
70
|
-
}
|
|
71
|
-
transform = `transform: rotateY(90deg) translateZ(${tranz}px);`;
|
|
72
|
-
// topr is to of Ribbon which points back
|
|
73
|
-
}
|
|
74
|
-
else if (face.name === "left") {
|
|
75
|
-
if (height > width && !depth) {
|
|
76
|
-
tranz = -(+height / 2 - +width);
|
|
77
|
-
width = +height;
|
|
78
|
-
}
|
|
79
|
-
else if (width > height && !depth) {
|
|
80
|
-
tranz = +height / 2;
|
|
81
|
-
height = +width;
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
tranz = +depth / 2;
|
|
85
|
-
width = +depth;
|
|
86
|
-
}
|
|
87
|
-
transform = `transform: rotateY(-90deg) translateZ(${tranz}px);`;
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
//console.log(face.name + " is not a recognized face.name");
|
|
91
|
-
display = false;
|
|
92
|
-
}
|
|
93
|
-
const Specs = styled.section `
|
|
94
|
-
${face.css || global.css}
|
|
95
|
-
width: ${width}px;
|
|
96
|
-
position: absolute;
|
|
97
|
-
height: ${height}px;
|
|
98
|
-
${transform}
|
|
99
|
-
`;
|
|
100
|
-
return display ? React.createElement(Specs, null, body) : React.createElement(React.Fragment, null);
|
|
101
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ObjWrapper } from "./styles/Global";
|
|
3
|
-
import { AnimWrap } from "./styles/AnimWrap";
|
|
4
|
-
import { SceneStyle } from "./styles/Scene";
|
|
5
|
-
import Face from "./Face";
|
|
6
|
-
export default function (props) {
|
|
7
|
-
let { anim1, anim2, width = 5, height = 5, depth = 5, global = {}, faces, perspective, perspectiveOrigin, zIndex, } = props;
|
|
8
|
-
// process config
|
|
9
|
-
const buildFace = (face) => {
|
|
10
|
-
const details = {
|
|
11
|
-
width,
|
|
12
|
-
height,
|
|
13
|
-
depth,
|
|
14
|
-
face,
|
|
15
|
-
global,
|
|
16
|
-
};
|
|
17
|
-
return React.createElement(Face, Object.assign({}, details, { key: face.name }));
|
|
18
|
-
};
|
|
19
|
-
return (React.createElement(SceneStyle, { width: width, height: height, perspective: perspective, perspectiveOrigin: perspectiveOrigin, zIndex: zIndex },
|
|
20
|
-
React.createElement(AnimWrap, { animSpecs: anim1 },
|
|
21
|
-
React.createElement(AnimWrap, { animSpecs: anim2 },
|
|
22
|
-
React.createElement(ObjWrapper, null, faces && faces[0]
|
|
23
|
-
? faces.map((face) => (face.name ? buildFace(face) : null))
|
|
24
|
-
: null)))));
|
|
25
|
-
}
|
|
@@ -1,83 +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
|
-
-webkit-animation-play-state: ${AS.animationPlayState};
|
|
74
|
-
animation-play-state: ${AS.animationPlayState};
|
|
75
|
-
animation-direction: ${AS.direction};
|
|
76
|
-
-webkit-animation-direction: ${AS.direction};
|
|
77
|
-
-webkit-animation-timing-function: ${AS.timing};
|
|
78
|
-
animation-timing-function: ${AS.timing};
|
|
79
|
-
-webkit-animation-delay: ${AS.delay}s;
|
|
80
|
-
animation-delay: ${AS.delay}s;
|
|
81
|
-
`;
|
|
82
|
-
return React.createElement(AnimWrapDiv, null, children);
|
|
83
|
-
};
|
|
@@ -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,325 +0,0 @@
|
|
|
1
|
-
import { keyframes } from "styled-components";
|
|
2
|
-
export const allAnims = (props) => {
|
|
3
|
-
const { degreesLow = 0, degreesHi = 0 } = props;
|
|
4
|
-
const swing = keyframes `
|
|
5
|
-
0% {
|
|
6
|
-
-webkit-transform-origin: top;
|
|
7
|
-
-ms-transform-origin: top;
|
|
8
|
-
transform-origin: top;
|
|
9
|
-
-webkit-transform: perspective(550px) rotateX(77deg);
|
|
10
|
-
transform: perspective(550px) rotateX(77deg);
|
|
11
|
-
}
|
|
12
|
-
50% {
|
|
13
|
-
-webkit-transform: perspective(550px) rotateX(-77deg);
|
|
14
|
-
transform: perspective(550px) rotateX(-77deg);
|
|
15
|
-
}
|
|
16
|
-
100% {
|
|
17
|
-
-webkit-transform-origin: top;
|
|
18
|
-
-ms-transform-origin: top;
|
|
19
|
-
transform-origin: top;
|
|
20
|
-
-webkit-transform: perspective(550px) rotateX(77deg);
|
|
21
|
-
transform: perspective(550px) rotateX(77deg);
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
const swingDecay = keyframes `
|
|
25
|
-
0% {
|
|
26
|
-
-webkit-transform-origin: top;
|
|
27
|
-
-ms-transform-origin: top;
|
|
28
|
-
transform-origin: top;
|
|
29
|
-
-webkit-transform: perspective(550px) rotateX(77deg);
|
|
30
|
-
transform: perspective(550px) rotateX(77deg);
|
|
31
|
-
}
|
|
32
|
-
20% {
|
|
33
|
-
-webkit-transform: perspective(550px) rotateX(-55deg);
|
|
34
|
-
transform: perspective(550px) rotateX(-55deg);
|
|
35
|
-
}
|
|
36
|
-
40% {
|
|
37
|
-
-webkit-transform: perspective(550px) rotateX(44deg);
|
|
38
|
-
transform: perspective(550px) rotateX(44deg);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
60% {
|
|
42
|
-
-webkit-transform: perspective(550px) rotateX(-22deg);
|
|
43
|
-
transform: perspective(550px) rotateX(-22deg);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
80% {
|
|
47
|
-
-webkit-transform: perspective(550px) rotateX(11deg);
|
|
48
|
-
transform: perspective(550px) rotateX(11deg);
|
|
49
|
-
}
|
|
50
|
-
100% {
|
|
51
|
-
-webkit-transform-origin: top;
|
|
52
|
-
-ms-transform-origin: top;
|
|
53
|
-
transform-origin: top;
|
|
54
|
-
-webkit-transform: perspective(550px) rotateX(0);
|
|
55
|
-
transform: perspective(550px) rotateX(0);
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
58
|
-
const X360 = keyframes `
|
|
59
|
-
from {
|
|
60
|
-
-webkit-transform: rotateX(360deg);
|
|
61
|
-
transform: rotateX(360deg);
|
|
62
|
-
}
|
|
63
|
-
to {
|
|
64
|
-
-webkit-transform: rotateX(0deg);
|
|
65
|
-
transform: rotateX(0deg);
|
|
66
|
-
}`;
|
|
67
|
-
//////// Y360
|
|
68
|
-
const Y360 = keyframes `
|
|
69
|
-
from {
|
|
70
|
-
-webkit-transform: rotateY(360deg);
|
|
71
|
-
transform: rotateY(360deg);
|
|
72
|
-
}
|
|
73
|
-
to {
|
|
74
|
-
-webkit-transform: rotateY(0deg);
|
|
75
|
-
transform: rotateY(0deg);
|
|
76
|
-
}`;
|
|
77
|
-
const fadeInkf = keyframes `
|
|
78
|
-
from {
|
|
79
|
-
opacity: 0;
|
|
80
|
-
}
|
|
81
|
-
to {
|
|
82
|
-
opacity: 1;
|
|
83
|
-
}`;
|
|
84
|
-
const wobY = keyframes `
|
|
85
|
-
0% {
|
|
86
|
-
-webkit-transform: rotateY(${degreesLow}deg);
|
|
87
|
-
transform: rotateY(${degreesLow}deg);
|
|
88
|
-
}
|
|
89
|
-
50% {
|
|
90
|
-
-webkit-transform: rotateY(${degreesHi}deg);
|
|
91
|
-
transform: rotateY(${degreesHi}deg);
|
|
92
|
-
}
|
|
93
|
-
100% {
|
|
94
|
-
-webkit-transform: rotateY(${degreesLow}deg);
|
|
95
|
-
transform: rotateY(${degreesLow}deg);
|
|
96
|
-
}`;
|
|
97
|
-
const wobX = keyframes `
|
|
98
|
-
0% {
|
|
99
|
-
-webkit-transform: rotateX(${degreesLow}deg);
|
|
100
|
-
transform: rotateX(${degreesLow}deg);
|
|
101
|
-
}
|
|
102
|
-
50% {
|
|
103
|
-
-webkit-transform: rotateX(${degreesHi}deg);
|
|
104
|
-
transform: rotateX(${degreesHi}deg);
|
|
105
|
-
}
|
|
106
|
-
100% {
|
|
107
|
-
-webkit-transform: rotateX(${degreesLow}deg);
|
|
108
|
-
transform: rotateX(${degreesLow}deg);
|
|
109
|
-
}`;
|
|
110
|
-
/* ============================== x-axis 0-180 >180 - 360 */
|
|
111
|
-
const fwdx018 = keyframes `
|
|
112
|
-
from {
|
|
113
|
-
-webkit-transform: rotateX(360deg);
|
|
114
|
-
transform: rotateX(360deg);
|
|
115
|
-
}
|
|
116
|
-
to {
|
|
117
|
-
-webkit-transform: rotateX(180deg);
|
|
118
|
-
transform: rotateX(180deg);
|
|
119
|
-
}`;
|
|
120
|
-
const fwdx1836 = keyframes `
|
|
121
|
-
from {
|
|
122
|
-
-webkit-transform: rotateX(180deg);
|
|
123
|
-
transform: rotateX(180deg);
|
|
124
|
-
}
|
|
125
|
-
to {
|
|
126
|
-
-webkit-transform: rotateX(0deg);
|
|
127
|
-
transform: rotateX(0deg);
|
|
128
|
-
}`;
|
|
129
|
-
/* ============================= x-axis 0-90, 90-180, 180-270, 270-360 */
|
|
130
|
-
const fwdx09 = keyframes `
|
|
131
|
-
from {
|
|
132
|
-
-webkit-transform: rotateX(0deg);
|
|
133
|
-
transform: rotateX(0deg);
|
|
134
|
-
}
|
|
135
|
-
to {
|
|
136
|
-
-webkit-transform: rotateX(90deg);
|
|
137
|
-
transform: rotateX(90deg);
|
|
138
|
-
}`;
|
|
139
|
-
const fwdx918 = keyframes `
|
|
140
|
-
from {
|
|
141
|
-
-webkit-transform: rotateX(90deg);
|
|
142
|
-
transform: rotateX(90deg);
|
|
143
|
-
}
|
|
144
|
-
to {
|
|
145
|
-
-webkit-transform: rotateX(180deg);
|
|
146
|
-
transform: rotateX(180deg);
|
|
147
|
-
}`;
|
|
148
|
-
const fwdx1827 = keyframes `
|
|
149
|
-
from {
|
|
150
|
-
-webkit-transform: rotateX(180deg);
|
|
151
|
-
transform: rotateX(180deg);
|
|
152
|
-
}
|
|
153
|
-
to {
|
|
154
|
-
-webkit-transform: rotateX(270deg);
|
|
155
|
-
transform: rotateX(270deg);
|
|
156
|
-
}`;
|
|
157
|
-
const fwdx2736 = keyframes `
|
|
158
|
-
from {
|
|
159
|
-
-webkit-transform: rotateX(270deg);
|
|
160
|
-
transform: rotateX(270deg);
|
|
161
|
-
}
|
|
162
|
-
to {
|
|
163
|
-
-webkit-transform: rotateX(360deg);
|
|
164
|
-
transform: rotateX(360deg);
|
|
165
|
-
}`;
|
|
166
|
-
/* ============================== y-axis 0-180 >180 - 360 */
|
|
167
|
-
const fwdy018 = keyframes `
|
|
168
|
-
from {
|
|
169
|
-
-webkit-transform: rotateY(0deg);
|
|
170
|
-
transform: rotateY(0deg);
|
|
171
|
-
}
|
|
172
|
-
to {
|
|
173
|
-
-webkit-transform: rotateY(180deg);
|
|
174
|
-
transform: rotateY(180deg);
|
|
175
|
-
}`;
|
|
176
|
-
const fwdy1836 = keyframes `
|
|
177
|
-
from {
|
|
178
|
-
-webkit-transform: rotateY(180deg);
|
|
179
|
-
transform: rotateY(180deg);
|
|
180
|
-
}
|
|
181
|
-
to {
|
|
182
|
-
-webkit-transform: rotateY(0deg);
|
|
183
|
-
transform: rotateY(0deg);
|
|
184
|
-
}`;
|
|
185
|
-
/* ============================= y-axis 0-90, 90-180, 180-270, 270-360 */
|
|
186
|
-
const fwdy09 = keyframes `
|
|
187
|
-
from {
|
|
188
|
-
-webkit-transform: rotateY(0deg);
|
|
189
|
-
transform: rotateY(0deg);
|
|
190
|
-
}
|
|
191
|
-
to {
|
|
192
|
-
-webkit-transform: rotateY(90deg);
|
|
193
|
-
transform: rotateY(90deg);
|
|
194
|
-
}`;
|
|
195
|
-
const fwdy918 = keyframes `
|
|
196
|
-
from {
|
|
197
|
-
-webkit-transform: rotateY(90deg);
|
|
198
|
-
transform: rotateY(90deg);
|
|
199
|
-
}
|
|
200
|
-
to {
|
|
201
|
-
-webkit-transform: rotateY(180deg);
|
|
202
|
-
transform: rotateY(180deg);
|
|
203
|
-
}`;
|
|
204
|
-
const fwdy1827 = keyframes `
|
|
205
|
-
from {
|
|
206
|
-
-webkit-transform: rotateY(180deg);
|
|
207
|
-
transform: rotateY(180deg);
|
|
208
|
-
}
|
|
209
|
-
to {
|
|
210
|
-
-webkit-transform: rotateY(270deg);
|
|
211
|
-
transform: rotateY(270deg);
|
|
212
|
-
}`;
|
|
213
|
-
const fwdy2736 = keyframes `
|
|
214
|
-
from {
|
|
215
|
-
-webkit-transform: rotateY(270deg);
|
|
216
|
-
transform: rotateY(270deg);
|
|
217
|
-
}
|
|
218
|
-
to {
|
|
219
|
-
-webkit-transform: rotateY(360deg);
|
|
220
|
-
transform: rotateY(360deg);
|
|
221
|
-
}`;
|
|
222
|
-
/* ============================= floating */
|
|
223
|
-
const floatX = keyframes `
|
|
224
|
-
0% { -webkit-transform: translate(0, 0px); -ms-transform: translate(0, 0px); transform: translate(0, 0px); }
|
|
225
|
-
50% { -webkit-transform: translate(0, 15px); -ms-transform: translate(0, 15px); transform: translate(0, 15px); }
|
|
226
|
-
100% { -webkit-transform: translate(0, -0px); -ms-transform: translate(0, -0px); transform: translate(0, -0px); }`;
|
|
227
|
-
const floatShadow = keyframes `
|
|
228
|
-
0% {
|
|
229
|
-
-webkit-box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
|
|
230
|
-
box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
|
|
231
|
-
-webkit-transform: translateY(0px);
|
|
232
|
-
-ms-transform: translateY(0px);
|
|
233
|
-
transform: translateY(0px);
|
|
234
|
-
}
|
|
235
|
-
50% {
|
|
236
|
-
-webkit-box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2);
|
|
237
|
-
box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2);
|
|
238
|
-
-webkit-transform: translateY(-20px);
|
|
239
|
-
-ms-transform: translateY(-20px);
|
|
240
|
-
transform: translateY(-20px);
|
|
241
|
-
}
|
|
242
|
-
100% {
|
|
243
|
-
-webkit-box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
|
|
244
|
-
box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
|
|
245
|
-
-webkit-transform: translateY(0px);
|
|
246
|
-
-ms-transform: translateY(0px);
|
|
247
|
-
transform: translateY(0px);
|
|
248
|
-
}`;
|
|
249
|
-
const pulseSM = keyframes `
|
|
250
|
-
0% {
|
|
251
|
-
-webkit-transform: scale(0.9);
|
|
252
|
-
-ms-transform: scale(0.9);
|
|
253
|
-
transform: scale(0.9);
|
|
254
|
-
}
|
|
255
|
-
70% {
|
|
256
|
-
-webkit-transform: scale(1);
|
|
257
|
-
-ms-transform: scale(1);
|
|
258
|
-
transform: scale(1);
|
|
259
|
-
}
|
|
260
|
-
100% {
|
|
261
|
-
-webkit-transform: scale(0.9);
|
|
262
|
-
-ms-transform: scale(0.9);
|
|
263
|
-
transform: scale(0.9);
|
|
264
|
-
}`;
|
|
265
|
-
const pulseMD = keyframes `
|
|
266
|
-
0% {
|
|
267
|
-
-webkit-transform: scale(0.7);
|
|
268
|
-
-ms-transform: scale(0.7);
|
|
269
|
-
transform: scale(0.7);
|
|
270
|
-
}
|
|
271
|
-
70% {
|
|
272
|
-
-webkit-transform: scale(1);
|
|
273
|
-
-ms-transform: scale(1);
|
|
274
|
-
transform: scale(1);
|
|
275
|
-
}
|
|
276
|
-
100% {
|
|
277
|
-
-webkit-transform: scale(0.7);
|
|
278
|
-
-ms-transform: scale(0.7);
|
|
279
|
-
transform: scale(0.7);
|
|
280
|
-
}`;
|
|
281
|
-
const pulseLG = keyframes `
|
|
282
|
-
0% {
|
|
283
|
-
-webkit-transform: scale(0.5);
|
|
284
|
-
-ms-transform: scale(0.5);
|
|
285
|
-
transform: scale(0.5);
|
|
286
|
-
}
|
|
287
|
-
70% {
|
|
288
|
-
-webkit-transform: scale(1);
|
|
289
|
-
-ms-transform: scale(1);
|
|
290
|
-
transform: scale(1);
|
|
291
|
-
}
|
|
292
|
-
100% {
|
|
293
|
-
-webkit-transform: scale(0.5);
|
|
294
|
-
-ms-transform: scale(0.5);
|
|
295
|
-
transform: scale(0.5);
|
|
296
|
-
}`;
|
|
297
|
-
const noAnim = keyframes ``;
|
|
298
|
-
return {
|
|
299
|
-
X360,
|
|
300
|
-
Y360,
|
|
301
|
-
fadeInkf,
|
|
302
|
-
wobY,
|
|
303
|
-
wobX,
|
|
304
|
-
fwdx018,
|
|
305
|
-
fwdx1836,
|
|
306
|
-
fwdx09,
|
|
307
|
-
fwdx918,
|
|
308
|
-
fwdx1827,
|
|
309
|
-
fwdx2736,
|
|
310
|
-
fwdy018,
|
|
311
|
-
fwdy1836,
|
|
312
|
-
fwdy09,
|
|
313
|
-
fwdy918,
|
|
314
|
-
fwdy1827,
|
|
315
|
-
fwdy2736,
|
|
316
|
-
floatX,
|
|
317
|
-
floatShadow,
|
|
318
|
-
pulseSM,
|
|
319
|
-
pulseMD,
|
|
320
|
-
pulseLG,
|
|
321
|
-
swing,
|
|
322
|
-
swingDecay,
|
|
323
|
-
noAnim,
|
|
324
|
-
};
|
|
325
|
-
};
|