anim-3d-obj 1.1.225 → 1.2.0

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.
Files changed (55) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/components/Face.d.ts +11 -0
  3. package/dist/cjs/components/Face.js +107 -0
  4. package/dist/cjs/components/Obj.d.ts +2 -0
  5. package/dist/cjs/components/Obj.js +31 -0
  6. package/dist/cjs/components/index.d.ts +2 -0
  7. package/dist/cjs/components/index.js +18 -0
  8. package/dist/cjs/components/styles/AnimWrap.d.ts +2 -0
  9. package/dist/cjs/components/styles/AnimWrap.js +90 -0
  10. package/dist/cjs/components/styles/Anims.d.ts +32 -0
  11. package/dist/cjs/components/styles/Anims.js +329 -0
  12. package/dist/cjs/components/styles/Global.d.ts +6 -0
  13. package/dist/cjs/components/styles/Global.js +27 -0
  14. package/dist/cjs/components/styles/Scene.d.ts +10 -0
  15. package/dist/cjs/components/styles/Scene.js +22 -0
  16. package/dist/cjs/index.js +17 -0
  17. package/dist/esm/components/Face.d.ts +11 -0
  18. package/dist/esm/components/Face.js +101 -0
  19. package/dist/esm/components/Obj.d.ts +2 -0
  20. package/dist/esm/components/Obj.js +25 -0
  21. package/dist/esm/components/index.d.ts +2 -0
  22. package/dist/esm/components/index.js +2 -0
  23. package/dist/esm/components/styles/AnimWrap.d.ts +2 -0
  24. package/dist/esm/components/styles/AnimWrap.js +83 -0
  25. package/dist/esm/components/styles/Anims.d.ts +32 -0
  26. package/{src/components/styles/Anims.ts → dist/esm/components/styles/Anims.js} +60 -82
  27. package/dist/esm/components/styles/Global.d.ts +6 -0
  28. package/dist/esm/components/styles/Global.js +20 -0
  29. package/dist/esm/components/styles/Scene.d.ts +10 -0
  30. package/dist/esm/components/styles/Scene.js +15 -0
  31. package/dist/esm/index.d.ts +1 -0
  32. package/dist/esm/index.js +1 -0
  33. package/package.json +28 -44
  34. package/ang1.png +0 -0
  35. package/babel.config.json +0 -18
  36. package/jestconfig.json +0 -8
  37. package/public/ang2.png +0 -0
  38. package/public/ang3.png +0 -0
  39. package/public/angl1.png +0 -0
  40. package/public/favicon.ico +0 -0
  41. package/public/index.html +0 -43
  42. package/public/logo192.png +0 -0
  43. package/public/logo512.png +0 -0
  44. package/public/manifest.json +0 -25
  45. package/public/robots.txt +0 -3
  46. package/src/components/Face.tsx +0 -95
  47. package/src/components/Obj.tsx +0 -53
  48. package/src/components/index.ts +0 -4
  49. package/src/components/styles/Anim.d.ts +0 -17
  50. package/src/components/styles/AnimWrap.tsx +0 -90
  51. package/src/components/styles/Global.tsx +0 -28
  52. package/src/components/styles/Scene.tsx +0 -37
  53. package/src/components/types.d.ts +0 -42
  54. package/tsconfig.json +0 -20
  55. /package/{src/index.ts → dist/cjs/index.d.ts} +0 -0
@@ -0,0 +1,10 @@
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 {};
@@ -0,0 +1,22 @@
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;
@@ -0,0 +1,17 @@
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);
@@ -0,0 +1,11 @@
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 {};
@@ -0,0 +1,101 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ import { ObjProps } from "./types";
2
+ export default function (props: ObjProps): JSX.Element;
@@ -0,0 +1,25 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./Obj";
2
+ export * from "./Face";
@@ -0,0 +1,2 @@
1
+ export * from "./Obj";
2
+ export * from "./Face";
@@ -0,0 +1,2 @@
1
+ import { AnimStylesProps } from "./Anim";
2
+ export declare const AnimWrap: (props: AnimStylesProps) => JSX.Element;
@@ -0,0 +1,83 @@
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
+ };
@@ -0,0 +1,32 @@
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,14 +1,7 @@
1
1
  import { keyframes } from "styled-components";
2
-
3
- interface AllAnimsProps {
4
- degreesLow?: number;
5
- degreesHi?: number;
6
- }
7
-
8
- export const allAnims = (props: AllAnimsProps) => {
9
- const { degreesLow = 0, degreesHi = 0 } = props;
10
-
11
- const swing = keyframes`
2
+ export const allAnims = (props) => {
3
+ const { degreesLow = 0, degreesHi = 0 } = props;
4
+ const swing = keyframes `
12
5
  0% {
13
6
  -webkit-transform-origin: top;
14
7
  -ms-transform-origin: top;
@@ -28,8 +21,7 @@ export const allAnims = (props: AllAnimsProps) => {
28
21
  transform: perspective(550px) rotateX(77deg);
29
22
  }
30
23
  `;
31
-
32
- const swingDecay = keyframes`
24
+ const swingDecay = keyframes `
33
25
  0% {
34
26
  -webkit-transform-origin: top;
35
27
  -ms-transform-origin: top;
@@ -63,8 +55,7 @@ export const allAnims = (props: AllAnimsProps) => {
63
55
  transform: perspective(550px) rotateX(0);
64
56
  }
65
57
  `;
66
-
67
- const X360 = keyframes`
58
+ const X360 = keyframes `
68
59
  from {
69
60
  -webkit-transform: rotateX(360deg);
70
61
  transform: rotateX(360deg);
@@ -73,9 +64,8 @@ export const allAnims = (props: AllAnimsProps) => {
73
64
  -webkit-transform: rotateX(0deg);
74
65
  transform: rotateX(0deg);
75
66
  }`;
76
-
77
- //////// Y360
78
- const Y360 = keyframes`
67
+ //////// Y360
68
+ const Y360 = keyframes `
79
69
  from {
80
70
  -webkit-transform: rotateY(360deg);
81
71
  transform: rotateY(360deg);
@@ -84,16 +74,14 @@ export const allAnims = (props: AllAnimsProps) => {
84
74
  -webkit-transform: rotateY(0deg);
85
75
  transform: rotateY(0deg);
86
76
  }`;
87
-
88
- const fadeInkf = keyframes`
77
+ const fadeInkf = keyframes `
89
78
  from {
90
79
  opacity: 0;
91
80
  }
92
81
  to {
93
82
  opacity: 1;
94
83
  }`;
95
-
96
- const wobY = keyframes`
84
+ const wobY = keyframes `
97
85
  0% {
98
86
  -webkit-transform: rotateY(${degreesLow}deg);
99
87
  transform: rotateY(${degreesLow}deg);
@@ -106,8 +94,7 @@ export const allAnims = (props: AllAnimsProps) => {
106
94
  -webkit-transform: rotateY(${degreesLow}deg);
107
95
  transform: rotateY(${degreesLow}deg);
108
96
  }`;
109
-
110
- const wobX = keyframes`
97
+ const wobX = keyframes `
111
98
  0% {
112
99
  -webkit-transform: rotateX(${degreesLow}deg);
113
100
  transform: rotateX(${degreesLow}deg);
@@ -120,8 +107,8 @@ export const allAnims = (props: AllAnimsProps) => {
120
107
  -webkit-transform: rotateX(${degreesLow}deg);
121
108
  transform: rotateX(${degreesLow}deg);
122
109
  }`;
123
- /* ============================== x-axis 0-180 >180 - 360 */
124
- const fwdx018 = keyframes`
110
+ /* ============================== x-axis 0-180 >180 - 360 */
111
+ const fwdx018 = keyframes `
125
112
  from {
126
113
  -webkit-transform: rotateX(360deg);
127
114
  transform: rotateX(360deg);
@@ -130,7 +117,7 @@ export const allAnims = (props: AllAnimsProps) => {
130
117
  -webkit-transform: rotateX(180deg);
131
118
  transform: rotateX(180deg);
132
119
  }`;
133
- const fwdx1836 = keyframes`
120
+ const fwdx1836 = keyframes `
134
121
  from {
135
122
  -webkit-transform: rotateX(180deg);
136
123
  transform: rotateX(180deg);
@@ -139,8 +126,8 @@ export const allAnims = (props: AllAnimsProps) => {
139
126
  -webkit-transform: rotateX(0deg);
140
127
  transform: rotateX(0deg);
141
128
  }`;
142
- /* ============================= x-axis 0-90, 90-180, 180-270, 270-360 */
143
- const fwdx09 = keyframes`
129
+ /* ============================= x-axis 0-90, 90-180, 180-270, 270-360 */
130
+ const fwdx09 = keyframes `
144
131
  from {
145
132
  -webkit-transform: rotateX(0deg);
146
133
  transform: rotateX(0deg);
@@ -149,7 +136,7 @@ export const allAnims = (props: AllAnimsProps) => {
149
136
  -webkit-transform: rotateX(90deg);
150
137
  transform: rotateX(90deg);
151
138
  }`;
152
- const fwdx918 = keyframes`
139
+ const fwdx918 = keyframes `
153
140
  from {
154
141
  -webkit-transform: rotateX(90deg);
155
142
  transform: rotateX(90deg);
@@ -158,7 +145,7 @@ export const allAnims = (props: AllAnimsProps) => {
158
145
  -webkit-transform: rotateX(180deg);
159
146
  transform: rotateX(180deg);
160
147
  }`;
161
- const fwdx1827 = keyframes`
148
+ const fwdx1827 = keyframes `
162
149
  from {
163
150
  -webkit-transform: rotateX(180deg);
164
151
  transform: rotateX(180deg);
@@ -167,7 +154,7 @@ export const allAnims = (props: AllAnimsProps) => {
167
154
  -webkit-transform: rotateX(270deg);
168
155
  transform: rotateX(270deg);
169
156
  }`;
170
- const fwdx2736 = keyframes`
157
+ const fwdx2736 = keyframes `
171
158
  from {
172
159
  -webkit-transform: rotateX(270deg);
173
160
  transform: rotateX(270deg);
@@ -176,9 +163,8 @@ export const allAnims = (props: AllAnimsProps) => {
176
163
  -webkit-transform: rotateX(360deg);
177
164
  transform: rotateX(360deg);
178
165
  }`;
179
-
180
- /* ============================== y-axis 0-180 >180 - 360 */
181
- const fwdy018 = keyframes`
166
+ /* ============================== y-axis 0-180 >180 - 360 */
167
+ const fwdy018 = keyframes `
182
168
  from {
183
169
  -webkit-transform: rotateY(0deg);
184
170
  transform: rotateY(0deg);
@@ -187,7 +173,7 @@ export const allAnims = (props: AllAnimsProps) => {
187
173
  -webkit-transform: rotateY(180deg);
188
174
  transform: rotateY(180deg);
189
175
  }`;
190
- const fwdy1836 = keyframes`
176
+ const fwdy1836 = keyframes `
191
177
  from {
192
178
  -webkit-transform: rotateY(180deg);
193
179
  transform: rotateY(180deg);
@@ -196,9 +182,8 @@ export const allAnims = (props: AllAnimsProps) => {
196
182
  -webkit-transform: rotateY(0deg);
197
183
  transform: rotateY(0deg);
198
184
  }`;
199
-
200
- /* ============================= y-axis 0-90, 90-180, 180-270, 270-360 */
201
- const fwdy09 = keyframes`
185
+ /* ============================= y-axis 0-90, 90-180, 180-270, 270-360 */
186
+ const fwdy09 = keyframes `
202
187
  from {
203
188
  -webkit-transform: rotateY(0deg);
204
189
  transform: rotateY(0deg);
@@ -207,7 +192,7 @@ export const allAnims = (props: AllAnimsProps) => {
207
192
  -webkit-transform: rotateY(90deg);
208
193
  transform: rotateY(90deg);
209
194
  }`;
210
- const fwdy918 = keyframes`
195
+ const fwdy918 = keyframes `
211
196
  from {
212
197
  -webkit-transform: rotateY(90deg);
213
198
  transform: rotateY(90deg);
@@ -216,7 +201,7 @@ export const allAnims = (props: AllAnimsProps) => {
216
201
  -webkit-transform: rotateY(180deg);
217
202
  transform: rotateY(180deg);
218
203
  }`;
219
- const fwdy1827 = keyframes`
204
+ const fwdy1827 = keyframes `
220
205
  from {
221
206
  -webkit-transform: rotateY(180deg);
222
207
  transform: rotateY(180deg);
@@ -225,7 +210,7 @@ export const allAnims = (props: AllAnimsProps) => {
225
210
  -webkit-transform: rotateY(270deg);
226
211
  transform: rotateY(270deg);
227
212
  }`;
228
- const fwdy2736 = keyframes`
213
+ const fwdy2736 = keyframes `
229
214
  from {
230
215
  -webkit-transform: rotateY(270deg);
231
216
  transform: rotateY(270deg);
@@ -234,14 +219,12 @@ export const allAnims = (props: AllAnimsProps) => {
234
219
  -webkit-transform: rotateY(360deg);
235
220
  transform: rotateY(360deg);
236
221
  }`;
237
-
238
- /* ============================= floating */
239
- const floatX = keyframes`
222
+ /* ============================= floating */
223
+ const floatX = keyframes `
240
224
  0% { -webkit-transform: translate(0, 0px); -ms-transform: translate(0, 0px); transform: translate(0, 0px); }
241
225
  50% { -webkit-transform: translate(0, 15px); -ms-transform: translate(0, 15px); transform: translate(0, 15px); }
242
226
  100% { -webkit-transform: translate(0, -0px); -ms-transform: translate(0, -0px); transform: translate(0, -0px); }`;
243
-
244
- const floatShadow = keyframes`
227
+ const floatShadow = keyframes `
245
228
  0% {
246
229
  -webkit-box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
247
230
  box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
@@ -263,8 +246,7 @@ export const allAnims = (props: AllAnimsProps) => {
263
246
  -ms-transform: translateY(0px);
264
247
  transform: translateY(0px);
265
248
  }`;
266
-
267
- const pulseSM = keyframes`
249
+ const pulseSM = keyframes `
268
250
  0% {
269
251
  -webkit-transform: scale(0.9);
270
252
  -ms-transform: scale(0.9);
@@ -280,8 +262,7 @@ export const allAnims = (props: AllAnimsProps) => {
280
262
  -ms-transform: scale(0.9);
281
263
  transform: scale(0.9);
282
264
  }`;
283
-
284
- const pulseMD = keyframes`
265
+ const pulseMD = keyframes `
285
266
  0% {
286
267
  -webkit-transform: scale(0.7);
287
268
  -ms-transform: scale(0.7);
@@ -297,8 +278,7 @@ export const allAnims = (props: AllAnimsProps) => {
297
278
  -ms-transform: scale(0.7);
298
279
  transform: scale(0.7);
299
280
  }`;
300
-
301
- const pulseLG = keyframes`
281
+ const pulseLG = keyframes `
302
282
  0% {
303
283
  -webkit-transform: scale(0.5);
304
284
  -ms-transform: scale(0.5);
@@ -314,34 +294,32 @@ export const allAnims = (props: AllAnimsProps) => {
314
294
  -ms-transform: scale(0.5);
315
295
  transform: scale(0.5);
316
296
  }`;
317
-
318
- const noAnim = keyframes``;
319
-
320
- return {
321
- X360,
322
- Y360,
323
- fadeInkf,
324
- wobY,
325
- wobX,
326
- fwdx018,
327
- fwdx1836,
328
- fwdx09,
329
- fwdx918,
330
- fwdx1827,
331
- fwdx2736,
332
- fwdy018,
333
- fwdy1836,
334
- fwdy09,
335
- fwdy918,
336
- fwdy1827,
337
- fwdy2736,
338
- floatX,
339
- floatShadow,
340
- pulseSM,
341
- pulseMD,
342
- pulseLG,
343
- swing,
344
- swingDecay,
345
- noAnim,
346
- };
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
+ };
347
325
  };
@@ -0,0 +1,6 @@
1
+ interface ObjWrapperProps {
2
+ showCenterDiv?: boolean | string | number;
3
+ children?: any;
4
+ }
5
+ export declare const ObjWrapper: (props: ObjWrapperProps) => any;
6
+ export {};
@@ -0,0 +1,20 @@
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
+ };
@@ -0,0 +1,10 @@
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 {};