anim-3d-obj 1.1.49 → 1.1.51

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 (36) hide show
  1. package/dist/cjs/components/Button.d.ts +6 -0
  2. package/dist/cjs/components/Button.js +20 -0
  3. package/dist/cjs/components/Button.js.map +1 -0
  4. package/dist/cjs/components/Card.d.ts +2 -0
  5. package/dist/cjs/components/Card.js +25 -0
  6. package/dist/cjs/components/Card.js.map +1 -0
  7. package/dist/cjs/components/Cuboid.d.ts +2 -0
  8. package/dist/cjs/components/Cuboid.js +29 -0
  9. package/dist/cjs/components/Cuboid.js.map +1 -0
  10. package/dist/cjs/components/Face/index.d.ts +3 -0
  11. package/dist/cjs/components/Face/index.js +88 -0
  12. package/dist/cjs/components/Face/index.js.map +1 -0
  13. package/dist/cjs/components/Ribbon.d.ts +2 -0
  14. package/dist/cjs/components/Ribbon.js +26 -0
  15. package/dist/cjs/components/Ribbon.js.map +1 -0
  16. package/dist/cjs/components/index.d.ts +5 -0
  17. package/dist/cjs/components/index.js +15 -0
  18. package/dist/cjs/components/index.js.map +1 -0
  19. package/dist/cjs/components/styles/AnimWrap.d.ts +2 -0
  20. package/dist/cjs/components/styles/AnimWrap.js +86 -0
  21. package/dist/cjs/components/styles/AnimWrap.js.map +1 -0
  22. package/dist/cjs/components/styles/Anims.d.ts +30 -0
  23. package/dist/cjs/components/styles/Anims.js +275 -0
  24. package/dist/cjs/components/styles/Anims.js.map +1 -0
  25. package/dist/cjs/components/styles/Global.d.ts +6 -0
  26. package/dist/cjs/components/styles/Global.js +28 -0
  27. package/dist/cjs/components/styles/Global.js.map +1 -0
  28. package/dist/cjs/components/styles/Scene.d.ts +10 -0
  29. package/dist/cjs/components/styles/Scene.js +23 -0
  30. package/dist/cjs/components/styles/Scene.js.map +1 -0
  31. package/dist/cjs/index.d.ts +1 -0
  32. package/dist/cjs/index.js +20 -0
  33. package/dist/cjs/index.js.map +1 -0
  34. package/dist/esm/components/styles/Global.js +1 -0
  35. package/dist/esm/components/styles/Global.js.map +1 -1
  36. package/package.json +3 -1
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export interface IButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
3
+ backgroundColor?: string;
4
+ color?: string;
5
+ }
6
+ export declare const Button: React.FunctionComponent<IButtonProps>;
@@ -0,0 +1,20 @@
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.Button = void 0;
7
+ // not in the ecosystem
8
+ const react_1 = __importDefault(require("react"));
9
+ const Button = (props) => {
10
+ const { children, backgroundColor, color, style } = props;
11
+ let _style = style || {};
12
+ /** Override Defaults */
13
+ if (backgroundColor && _style)
14
+ _style.backgroundColor = backgroundColor;
15
+ if (color && _style)
16
+ _style.color = color;
17
+ return (react_1.default.createElement("button", Object.assign({ style: _style }, props), children));
18
+ };
19
+ exports.Button = Button;
20
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button.tsx"],"names":[],"mappings":";;;;;;AAAA,uBAAuB;AACvB,kDAA0B;AAWnB,MAAM,MAAM,GAA0C,CAAC,KAAK,EAAE,EAAE;IACrE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAE1D,IAAI,MAAM,GAAwB,KAAK,IAAI,EAAE,CAAC;IAE9C,wBAAwB;IACxB,IAAI,eAAe,IAAI,MAAM;QAAE,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;IACxE,IAAI,KAAK,IAAI,MAAM;QAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IAE1C,OAAO,CACL,wDAAQ,KAAK,EAAE,MAAM,IAAM,KAAK,GAC7B,QAAQ,CACF,CACV,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,MAAM,UAcjB"}
@@ -0,0 +1,2 @@
1
+ import { ObjProps } from "./Face/face";
2
+ export declare const Card: (props: ObjProps) => any;
@@ -0,0 +1,25 @@
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.Card = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const AnimWrap_1 = require("./styles/AnimWrap");
9
+ const Scene_1 = require("./styles/Scene");
10
+ const Face_1 = __importDefault(require("./Face"));
11
+ const Global_1 = require("./styles/Global");
12
+ const Card = (props) => {
13
+ let { anim1Specs, anim2Specs, width = 5, height = 5, faces, global = {}, custom = {}, tranz = (+height / 2) | 0, perspective, perspectiveOrigin, zIndex, } = props;
14
+ const buildFace = (faceType) => {
15
+ return (react_1.default.createElement(Face_1.default, { width: width, height: height, depth: 0.1, faceType: faceType, id: faceType, tranz: tranz, global: global, custom: custom }));
16
+ };
17
+ return (react_1.default.createElement(Scene_1.SceneStyle, { width: width, height: height, perspective: perspective, perspectiveOrigin: perspectiveOrigin, zIndex: zIndex },
18
+ react_1.default.createElement(AnimWrap_1.AnimWrap, { animSpecs: anim1Specs },
19
+ react_1.default.createElement(AnimWrap_1.AnimWrap, { animSpecs: anim2Specs },
20
+ react_1.default.createElement(Global_1.ObjWrapper, null,
21
+ !!faces && !!faces.front ? buildFace("front") : null,
22
+ !!faces && !!faces.back ? buildFace("back") : null)))));
23
+ };
24
+ exports.Card = Card;
25
+ //# sourceMappingURL=Card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/Card.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gDAA6C;AAC7C,0CAA4C;AAE5C,kDAA0B;AAC1B,4CAA6C;AAEtC,MAAM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ObjProps } from "./Face/face";
2
+ export declare const Cuboid: (props: ObjProps) => any;
@@ -0,0 +1,29 @@
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.Cuboid = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const AnimWrap_1 = require("./styles/AnimWrap");
9
+ const Scene_1 = require("./styles/Scene");
10
+ const Face_1 = __importDefault(require("./Face"));
11
+ const Global_1 = require("./styles/Global");
12
+ const Cuboid = (props) => {
13
+ let { anim1Specs, anim2Specs, width = 5, height = 5, depth = 5, faces, global = {}, custom = {}, tranz = (+height / 2) | 0, perspective, perspectiveOrigin, zIndex, } = props;
14
+ const buildFace = (faceType) => {
15
+ return (react_1.default.createElement(Face_1.default, { width: width, height: height, depth: depth, faceType: faceType, id: faceType, tranz: tranz, global: global, custom: custom }));
16
+ };
17
+ return (react_1.default.createElement(Scene_1.SceneStyle, { width: width, height: height, perspective: perspective, perspectiveOrigin: perspectiveOrigin, zIndex: zIndex },
18
+ react_1.default.createElement(AnimWrap_1.AnimWrap, { animSpecs: anim1Specs },
19
+ react_1.default.createElement(AnimWrap_1.AnimWrap, { animSpecs: anim2Specs },
20
+ react_1.default.createElement(Global_1.ObjWrapper, null,
21
+ !!faces && !!faces.front ? buildFace("front") : null,
22
+ !!faces && !!faces.right ? buildFace("right") : null,
23
+ !!faces && !!faces.back ? buildFace("back") : null,
24
+ !!faces && !!faces.left ? buildFace("left") : null,
25
+ !!faces && !!faces.top ? buildFace("top") : null,
26
+ !!faces && !!faces.bottom ? buildFace("bottom") : null)))));
27
+ };
28
+ exports.Cuboid = Cuboid;
29
+ //# sourceMappingURL=Cuboid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cuboid.js","sourceRoot":"","sources":["../../../src/components/Cuboid.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B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CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;oBAClD,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;oBAClD,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;oBAChD,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAC5C,CACJ,CACF,CACA,CACd,CAAC;AACJ,CAAC,CAAC;AArDW,QAAA,MAAM,UAqDjB"}
@@ -0,0 +1,3 @@
1
+ import { FaceProps } from "./face";
2
+ declare const _default: (props: FaceProps) => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,88 @@
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
+ const styled_components_1 = __importDefault(require("styled-components"));
7
+ const react_1 = __importDefault(require("react"));
8
+ exports.default = (props) => {
9
+ let { depth = 10, faceType, global = {}, height = 10, custom = false, tranz = 80, width = 100, } = props;
10
+ let transform;
11
+ let styles = !!custom[faceType] && !!custom[faceType].css
12
+ ? custom[faceType].css
13
+ : global.css;
14
+ const body = !!custom[faceType] && !!custom[faceType].body
15
+ ? custom[faceType].body
16
+ : global.body;
17
+ if (faceType === "bottom") {
18
+ tranz = +height - +depth / 2;
19
+ height = +depth;
20
+ transform = `transform: rotateX(-90deg) translateZ(${tranz}px);`;
21
+ //styles = !!custom["top"] ? custom : global;
22
+ }
23
+ else if (faceType === "top") {
24
+ height = +depth;
25
+ if (!!depth)
26
+ tranz = +depth / 2;
27
+ transform = `transform: rotateX(90deg) translateZ(${tranz}px);`;
28
+ }
29
+ else if (faceType === "front") {
30
+ if (!!depth)
31
+ tranz = +depth / 2;
32
+ transform = `transform: rotateY(0deg) translateZ(${tranz}px);`;
33
+ }
34
+ else if (faceType === "back") {
35
+ if (!!depth)
36
+ tranz = +depth / 2;
37
+ transform = `transform: rotateY(180deg) translateZ(${tranz}px);`;
38
+ }
39
+ else if (faceType === "right") {
40
+ if (height > width && !depth) {
41
+ tranz = -(+height / 2 - +width);
42
+ width = +height;
43
+ }
44
+ else if (width > height && !depth) {
45
+ tranz = +height / 2;
46
+ height = +width;
47
+ }
48
+ else {
49
+ tranz = +width - +depth / 2;
50
+ width = +depth;
51
+ }
52
+ transform = `transform: rotateY(90deg) translateZ(${tranz}px);`;
53
+ // topr is to of Ribbon which points back
54
+ }
55
+ else if (faceType === "topr") {
56
+ height = +depth;
57
+ if (!!depth)
58
+ tranz = +depth / 2;
59
+ let offset = depth / 2;
60
+ //translate3d(tx, ty, tz)
61
+ transform = `transform: rotateX(90deg) translateZ(${tranz}px) translateY(-${tranz * 2}px) `;
62
+ }
63
+ else {
64
+ if (height > width && !depth) {
65
+ tranz = -(+height / 2 - +width);
66
+ width = +height;
67
+ }
68
+ else if (width > height && !depth) {
69
+ tranz = +height / 2;
70
+ height = +width;
71
+ }
72
+ else {
73
+ tranz = +depth / 2;
74
+ width = +depth;
75
+ }
76
+ transform = `transform: rotateY(-90deg) translateZ(${tranz}px);`;
77
+ }
78
+ const BackFlip = styled_components_1.default.section ``;
79
+ const Specs = styled_components_1.default.section `
80
+ ${styles}
81
+ width: ${width}px;
82
+ position: absolute;
83
+ height: ${height}px;
84
+ ${transform};
85
+ `;
86
+ return react_1.default.createElement(Specs, null, body);
87
+ };
88
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../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YAChC,KAAK,GAAG,CAAC,MAAM,CAAC;SACjB;aAAM,IAAI,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;YACnC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;YACpB,MAAM,GAAG,CAAC,KAAK,CAAC;SACjB;aAAM;YACL,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;YACnB,KAAK,GAAG,CAAC,KAAK,CAAC;SAChB;QACD,SAAS,GAAG,yCAAyC,KAAK,MAAM,CAAC;KAClE;IAED,MAAM,QAAQ,GAAQ,2BAAM,CAAC,OAAO,CAAA,EAAE,CAAC;IAEvC,MAAM,KAAK,GAAQ,2BAAM,CAAC,OAAO,CAAA;MAC7B,MAAM;aACC,KAAK;;cAEJ,MAAM;MACd,SAAS;GACZ,CAAC;IAEF,OAAO,8BAAC,KAAK,QAAE,IAAI,CAAS,CAAC;AAC/B,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ObjProps } from "./Face/face";
2
+ export declare const Ribbon: (props: ObjProps) => any;
@@ -0,0 +1,26 @@
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.Ribbon = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const AnimWrap_1 = require("./styles/AnimWrap");
9
+ const Scene_1 = require("./styles/Scene");
10
+ const Face_1 = __importDefault(require("./Face"));
11
+ const Global_1 = require("./styles/Global");
12
+ const Ribbon = (props) => {
13
+ let { anim1Specs, anim2Specs, width = 5, height = 5, depth = 5, faces, global = {}, custom = {}, tranz = (+height / 2) | 0, perspective, perspectiveOrigin, zIndex, showCenterDiv = false, } = props;
14
+ const buildFace = (faceType) => {
15
+ return (react_1.default.createElement(Face_1.default, { width: width, height: height, depth: depth, faceType: faceType, id: faceType, tranz: tranz, global: global, custom: custom }));
16
+ };
17
+ return (react_1.default.createElement(Scene_1.SceneStyle, { width: width, height: height, perspective: perspective, perspectiveOrigin: perspectiveOrigin, zIndex: zIndex },
18
+ react_1.default.createElement(AnimWrap_1.AnimWrap, { animSpecs: anim1Specs },
19
+ react_1.default.createElement(AnimWrap_1.AnimWrap, { animSpecs: anim2Specs },
20
+ react_1.default.createElement(Global_1.ObjWrapper, { showCenterDiv: showCenterDiv },
21
+ !!faces && !!faces.bottom ? buildFace("bottom") : null,
22
+ !!faces && !!faces.back ? buildFace("back") : null,
23
+ !!faces && !!faces.top ? buildFace("topr") : null)))));
24
+ };
25
+ exports.Ribbon = Ribbon;
26
+ //# sourceMappingURL=Ribbon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Ribbon.js","sourceRoot":"","sources":["../../../src/components/Ribbon.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gDAA6C;AAC7C,0CAA4C;AAE5C,kDAA0B;AAC1B,4CAA6C;AAEtC,MAAM,MAAM,GAAG,CAAC,KAAe,EAAO,EAAE;IAC7C,IAAI,EACF,UAAU,EACV,UAAU,EACV,KAAK,GAAG,CAAC,EACT,MAAM,GAAG,CAAC,EACV,KAAK,GAAG,CAAC,EACT,KAAK,EACL,MAAM,GAAG,EAAE,EACX,MAAM,GAAG,EAAE,EACX,KAAK,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,EACzB,WAAW,EACX,iBAAiB,EACjB,MAAM,EACN,aAAa,GAAG,KAAK,GACtB,GAAG,KAAK,CAAC;IAEV,MAAM,SAAS,GAAG,CAAC,QAAa,EAAO,EAAE;QACvC,OAAO,CACL,8BAAC,cAAI,IACH,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,QAAQ,EACZ,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACd,CACH,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,kBAAU,IACT,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,MAAM;QAEd,8BAAC,mBAAQ,IAAC,SAAS,EAAE,UAAU;YAC7B,8BAAC,mBAAQ,IAAC,SAAS,EAAE,UAAU;gBAC7B,8BAAC,mBAAU,IAAC,aAAa,EAAE,aAAa;oBACrC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI;oBACtD,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;oBAClD,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CACvC,CACJ,CACF,CACA,CACd,CAAC;AACJ,CAAC,CAAC;AAnDW,QAAA,MAAM,UAmDjB"}
@@ -0,0 +1,5 @@
1
+ import Face from "./Face";
2
+ import { Cuboid } from "./Cuboid";
3
+ import { Card } from "./Card";
4
+ import { Ribbon } from "./Ribbon";
5
+ export { Face, Cuboid, Card, Ribbon };
@@ -0,0 +1,15 @@
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.Ribbon = exports.Card = exports.Cuboid = exports.Face = void 0;
7
+ const Face_1 = __importDefault(require("./Face"));
8
+ exports.Face = Face_1.default;
9
+ const Cuboid_1 = require("./Cuboid");
10
+ Object.defineProperty(exports, "Cuboid", { enumerable: true, get: function () { return Cuboid_1.Cuboid; } });
11
+ const Card_1 = require("./Card");
12
+ Object.defineProperty(exports, "Card", { enumerable: true, get: function () { return Card_1.Card; } });
13
+ const Ribbon_1 = require("./Ribbon");
14
+ Object.defineProperty(exports, "Ribbon", { enumerable: true, get: function () { return Ribbon_1.Ribbon; } });
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAKjB,eALF,cAAI,CAKE;AAJb,qCAAkC;AAInB,uFAJN,eAAM,OAIM;AAHrB,iCAA8B;AAGP,qFAHd,WAAI,OAGc;AAF3B,qCAAkC;AAEL,uFAFpB,eAAM,OAEoB"}
@@ -0,0 +1,2 @@
1
+ import { AnimStylesProps } from "./Anim";
2
+ export declare const AnimWrap: (props: AnimStylesProps) => JSX.Element;
@@ -0,0 +1,86 @@
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.AnimWrap = void 0;
7
+ const styled_components_1 = __importDefault(require("styled-components"));
8
+ const react_1 = __importDefault(require("react"));
9
+ const Anims_1 = require("./Anims");
10
+ const AnimWrap = (props) => {
11
+ const { children, animSpecs } = props;
12
+ const AS = animSpecs;
13
+ const { X360, Y360, fadeInkf, wobY, wobX, fwdx018, fwdx1836, fwdx09, fwdx918, fwdx1827, fwdx2736, fwdy018, fwdy1836, fwdy09, fwdy918, fwdy1827, fwdy2736, floatX, floatShadow, pulseSM, pulseMD, pulseLG, noAnim, } = (0, Anims_1.allAnims)({ degreesHi: AS.degreesHi, degreesLow: AS.degreesLow });
14
+ let theAnim = "noAnim";
15
+ // need to iterate through all animation posibilities and not use eval() to satisfy TS
16
+ if (AS.name === "X360")
17
+ theAnim = X360;
18
+ else if (AS.name === "Y360")
19
+ theAnim = Y360;
20
+ else if (AS.name === "fadeInkf")
21
+ theAnim = fadeInkf;
22
+ else if (AS.name === "wobX")
23
+ theAnim = wobX;
24
+ else if (AS.name === "wobY")
25
+ theAnim = wobY;
26
+ else if (AS.name === "fwdx018")
27
+ theAnim = fwdx018;
28
+ else if (AS.name === "fwdx1836")
29
+ theAnim = fwdx1836;
30
+ else if (AS.name === "fwdx09")
31
+ theAnim = fwdx09;
32
+ else if (AS.name === "fwdx918")
33
+ theAnim = fwdx918;
34
+ else if (AS.name === "fwdx1827")
35
+ theAnim = fwdx1827;
36
+ else if (AS.name === "fwdx2736")
37
+ theAnim = fwdx2736;
38
+ else if (AS.name === "fwdy018")
39
+ theAnim = fwdy018;
40
+ else if (AS.name === "fwdy1836")
41
+ theAnim = fwdy1836;
42
+ else if (AS.name === "fwdy09")
43
+ theAnim = fwdy09;
44
+ else if (AS.name === "fwdy918")
45
+ theAnim = fwdy918;
46
+ else if (AS.name === "fwdy1827")
47
+ theAnim = fwdy1827;
48
+ else if (AS.name === "fwdy2736")
49
+ theAnim = fwdy2736;
50
+ else if (AS.name === "floatX")
51
+ theAnim = floatX;
52
+ else if (AS.name === "floatShadow")
53
+ theAnim = floatShadow;
54
+ else if (AS.name === "pulseSM")
55
+ theAnim = pulseSM;
56
+ else if (AS.name === "pulseMD")
57
+ theAnim = pulseMD;
58
+ else if (AS.name === "pulseLG")
59
+ theAnim = pulseLG;
60
+ else
61
+ theAnim = noAnim;
62
+ const AnimWrapDiv = styled_components_1.default.div `
63
+ width: 100%;
64
+ height: 100%;
65
+ position: relative;
66
+ transform-style: preserve-3d;
67
+ border: ${AS.border};
68
+ -webkit-animation-duration: ${AS.duration}s;
69
+ animation-duration: ${AS.duration}s;
70
+ -webkit-animation-iteration-count: ${AS.iterationCount};
71
+ animation-iteration-count: ${AS.iterationCount};
72
+ -webkit-animation-name: ${theAnim};
73
+ animation-name: ${theAnim};
74
+ -webkit-animation-fill-mode: ${AS.fillMode};
75
+ animation-fill-mode: ${AS.fillMode};
76
+ animation-direction: ${AS.direction};
77
+ -webkit-animation-direction: ${AS.direction};
78
+ -webkit-animation-timing-function: ${AS.timing};
79
+ animation-timing-function: ${AS.timing};
80
+ -webkit-animation-delay: ${AS.delay}s;
81
+ animation-delay: ${AS.delay}s;
82
+ `;
83
+ return react_1.default.createElement(AnimWrapDiv, null, children);
84
+ };
85
+ exports.AnimWrap = AnimWrap;
86
+ //# sourceMappingURL=AnimWrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimWrap.js","sourceRoot":"","sources":["../../../../src/components/styles/AnimWrap.tsx"],"names":[],"mappings":";;;;;;AAAA,0EAAuC;AACvC,kDAA0B;AAE1B,mCAAmC;AAE5B,MAAM,QAAQ,GAAG,CAAC,KAAsB,EAAE,EAAE;IACjD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,GAAQ,SAAS,CAAC;IAE1B,MAAM,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,WAAW,EACX,OAAO,EACP,OAAO,EACP,OAAO,EACP,MAAM,GACP,GAAG,IAAA,gBAAQ,EAAC,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC;IAErE,IAAI,OAAO,GAAQ,QAAQ,CAAC;IAC5B,sFAAsF;IACtF,IAAI,EAAE,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,GAAG,IAAI,CAAC;SAClC,IAAI,EAAE,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,GAAG,IAAI,CAAC;SACvC,IAAI,EAAE,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,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KAAK,SAAS;QAAE,OAAO,GAAG,OAAO,CAAC;SAC7C,IAAI,EAAE,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,GAAG,OAAO,CAAC;SAC7C,IAAI,EAAE,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,GAAG,OAAO,CAAC;;QAC7C,OAAO,GAAG,MAAM,CAAC;IAEtB,MAAM,WAAW,GAAQ,2BAAM,CAAC,GAAG,CAAA;;;;;cAKvB,EAAE,CAAC,MAAM;kCACW,EAAE,CAAC,QAAQ;0BACnB,EAAE,CAAC,QAAQ;yCACI,EAAE,CAAC,cAAc;iCACzB,EAAE,CAAC,cAAc;8BACpB,OAAO;sBACf,OAAO;mCACM,EAAE,CAAC,QAAQ;2BACnB,EAAE,CAAC,QAAQ;2BACX,EAAE,CAAC,SAAS;mCACJ,EAAE,CAAC,SAAS;yCACN,EAAE,CAAC,MAAM;iCACjB,EAAE,CAAC,MAAM;+BACX,EAAE,CAAC,KAAK;uBAChB,EAAE,CAAC,KAAK;GAC5B,CAAC;IAEF,OAAO,8BAAC,WAAW,QAAE,QAAQ,CAAe,CAAC;AAC/C,CAAC,CAAC;AA/EW,QAAA,QAAQ,YA+EnB"}
@@ -0,0 +1,30 @@
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
+ noAnim: import("styled-components").Keyframes;
29
+ };
30
+ export {};
@@ -0,0 +1,275 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.allAnims = void 0;
4
+ const styled_components_1 = require("styled-components");
5
+ const allAnims = (props) => {
6
+ const { degreesLow = 0, degreesHi = 0 } = props;
7
+ const X360 = (0, styled_components_1.keyframes) `
8
+ from {
9
+ -webkit-transform: rotateX(360deg);
10
+ transform: rotateX(360deg);
11
+ }
12
+ to {
13
+ -webkit-transform: rotateX(0deg);
14
+ transform: rotateX(0deg);
15
+ }
16
+ }`;
17
+ //////// Y360
18
+ const Y360 = (0, styled_components_1.keyframes) `
19
+ from {
20
+ -webkit-transform: rotateY(360deg);
21
+ transform: rotateY(360deg);
22
+ }
23
+ to {
24
+ -webkit-transform: rotateY(0deg);
25
+ transform: rotateY(0deg);
26
+ }`;
27
+ const fadeInkf = (0, styled_components_1.keyframes) `
28
+ from {
29
+ opacity: 0;
30
+ }
31
+ to {
32
+ opacity: 1;
33
+ }`;
34
+ const wobY = (0, styled_components_1.keyframes) `
35
+ 0% {
36
+ -webkit-transform: rotateY(${degreesLow}deg);
37
+ transform: rotateY(${degreesLow}deg);
38
+ }
39
+ 50% {
40
+ -webkit-transform: rotateY(${degreesHi}deg);
41
+ transform: rotateY(${degreesHi}deg);
42
+ }
43
+ 100% {
44
+ -webkit-transform: rotateY(${degreesLow}deg);
45
+ transform: rotateY(${degreesLow}deg);
46
+ }`;
47
+ const wobX = (0, styled_components_1.keyframes) `
48
+ 0% {
49
+ -webkit-transform: rotateX(${degreesLow}deg);
50
+ transform: rotateX(${degreesLow}deg);
51
+ }
52
+ 50% {
53
+ -webkit-transform: rotateX(${degreesHi}deg);
54
+ transform: rotateX(${degreesHi}deg);
55
+ }
56
+ 100% {
57
+ -webkit-transform: rotateX(${degreesLow}deg);
58
+ transform: rotateX(${degreesLow}deg);
59
+ }`;
60
+ /* ============================== x-axis 0-180 >180 - 360 */
61
+ const fwdx018 = (0, styled_components_1.keyframes) `
62
+ from {
63
+ -webkit-transform: rotateX(360deg);
64
+ transform: rotateX(360deg);
65
+ }
66
+ to {
67
+ -webkit-transform: rotateX(180deg);
68
+ transform: rotateX(180deg);
69
+ }`;
70
+ const fwdx1836 = (0, styled_components_1.keyframes) `
71
+ from {
72
+ -webkit-transform: rotateX(180deg);
73
+ transform: rotateX(180deg);
74
+ }
75
+ to {
76
+ -webkit-transform: rotateX(0deg);
77
+ transform: rotateX(0deg);
78
+ }`;
79
+ /* ============================= x-axis 0-90, 90-180, 180-270, 270-360 */
80
+ const fwdx09 = (0, styled_components_1.keyframes) `
81
+ from {
82
+ -webkit-transform: rotateX(360deg);
83
+ transform: rotateX(360deg);
84
+ }
85
+ to {
86
+ -webkit-transform: rotateX(90deg);
87
+ transform: rotateX(90deg);
88
+ }`;
89
+ const fwdx918 = (0, styled_components_1.keyframes) `
90
+ from {
91
+ -webkit-transform: rotateX(-90deg);
92
+ transform: rotateX(-90deg);
93
+ }
94
+ to {
95
+ -webkit-transform: rotateX(-180deg);
96
+ transform: rotateX(-180deg);
97
+ }`;
98
+ const fwdx1827 = (0, styled_components_1.keyframes) `
99
+ from {
100
+ -webkit-transform: rotateX(-180deg);
101
+ transform: rotateX(-180deg);
102
+ }
103
+ to {
104
+ -webkit-transform: rotateX(-270deg);
105
+ transform: rotateX(-270deg);
106
+ }`;
107
+ const fwdx2736 = (0, styled_components_1.keyframes) `
108
+ from {
109
+ -webkit-transform: rotateX(-270deg);
110
+ transform: rotateX(-270deg);
111
+ }
112
+ to {
113
+ -webkit-transform: rotateX(-360deg);
114
+ transform: rotateX(-360deg);
115
+ }`;
116
+ /* ============================== y-axis 0-180 >180 - 360 */
117
+ const fwdy018 = (0, styled_components_1.keyframes) `
118
+ from {
119
+ -webkit-transform: rotateY(360deg);
120
+ transform: rotateY(360deg);
121
+ }
122
+ to {
123
+ -webkit-transform: rotateY(180deg);
124
+ transform: rotateY(180deg);
125
+ }`;
126
+ const fwdy1836 = (0, styled_components_1.keyframes) `
127
+ from {
128
+ -webkit-transform: rotateY(180deg);
129
+ transform: rotateY(180deg);
130
+ }
131
+ to {
132
+ -webkit-transform: rotateY(0deg);
133
+ transform: rotateY(0deg);
134
+ }`;
135
+ /* ============================= y-axis 0-90, 90-180, 180-270, 270-360 */
136
+ const fwdy09 = (0, styled_components_1.keyframes) `
137
+ from {
138
+ -webkit-transform: rotateY(360deg);
139
+ transform: rotateY(360deg);
140
+ }
141
+ to {
142
+ -webkit-transform: rotateY(90deg);
143
+ transform: rotateY(90deg);
144
+ }`;
145
+ const fwdy918 = (0, styled_components_1.keyframes) `
146
+ from {
147
+ -webkit-transform: rotateY(-90deg);
148
+ transform: rotateY(-90deg);
149
+ }
150
+ to {
151
+ -webkit-transform: rotateY(-180deg);
152
+ transform: rotateY(-180deg);
153
+ }`;
154
+ const fwdy1827 = (0, styled_components_1.keyframes) `
155
+ from {
156
+ -webkit-transform: rotateY(-180deg);
157
+ transform: rotateY(-180deg);
158
+ }
159
+ to {
160
+ -webkit-transform: rotateY(-270deg);
161
+ transform: rotateY(-270deg);
162
+ }`;
163
+ const fwdy2736 = (0, styled_components_1.keyframes) `
164
+ from {
165
+ -webkit-transform: rotateY(-270deg);
166
+ transform: rotateY(-270deg);
167
+ }
168
+ to {
169
+ -webkit-transform: rotateY(-360deg);
170
+ transform: rotateY(-360deg);
171
+ }`;
172
+ /* ============================= floating */
173
+ const floatX = (0, styled_components_1.keyframes) `
174
+ 0% { -webkit-transform: translate(0, 0px); -ms-transform: translate(0, 0px); transform: translate(0, 0px); }
175
+ 50% { -webkit-transform: translate(0, 15px); -ms-transform: translate(0, 15px); transform: translate(0, 15px); }
176
+ 100% { -webkit-transform: translate(0, -0px); -ms-transform: translate(0, -0px); transform: translate(0, -0px); }`;
177
+ const floatShadow = (0, styled_components_1.keyframes) `
178
+ 0% {
179
+ -webkit-box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
180
+ box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
181
+ -webkit-transform: translateY(0px);
182
+ -ms-transform: translateY(0px);
183
+ transform: translateY(0px);
184
+ }
185
+ 50% {
186
+ -webkit-box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2);
187
+ box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2);
188
+ -webkit-transform: translateY(-20px);
189
+ -ms-transform: translateY(-20px);
190
+ transform: translateY(-20px);
191
+ }
192
+ 100% {
193
+ -webkit-box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
194
+ box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
195
+ -webkit-transform: translateY(0px);
196
+ -ms-transform: translateY(0px);
197
+ transform: translateY(0px);
198
+ }`;
199
+ const pulseSM = (0, styled_components_1.keyframes) `
200
+ 0% {
201
+ -webkit-transform: scale(0.9);
202
+ -ms-transform: scale(0.9);
203
+ transform: scale(0.9);
204
+ }
205
+ 70% {
206
+ -webkit-transform: scale(1);
207
+ -ms-transform: scale(1);
208
+ transform: scale(1);
209
+ }
210
+ 100% {
211
+ -webkit-transform: scale(0.9);
212
+ -ms-transform: scale(0.9);
213
+ transform: scale(0.9);
214
+ }`;
215
+ const pulseMD = (0, styled_components_1.keyframes) `
216
+ 0% {
217
+ -webkit-transform: scale(0.7);
218
+ -ms-transform: scale(0.7);
219
+ transform: scale(0.7);
220
+ }
221
+ 70% {
222
+ -webkit-transform: scale(1);
223
+ -ms-transform: scale(1);
224
+ transform: scale(1);
225
+ }
226
+ 100% {
227
+ -webkit-transform: scale(0.7);
228
+ -ms-transform: scale(0.7);
229
+ transform: scale(0.7);
230
+ }`;
231
+ const pulseLG = (0, styled_components_1.keyframes) `
232
+ 0% {
233
+ -webkit-transform: scale(0.5);
234
+ -ms-transform: scale(0.5);
235
+ transform: scale(0.5);
236
+ }
237
+ 70% {
238
+ -webkit-transform: scale(1);
239
+ -ms-transform: scale(1);
240
+ transform: scale(1);
241
+ }
242
+ 100% {
243
+ -webkit-transform: scale(0.5);
244
+ -ms-transform: scale(0.5);
245
+ transform: scale(0.5);
246
+ }`;
247
+ const noAnim = (0, styled_components_1.keyframes) ``;
248
+ return {
249
+ X360,
250
+ Y360,
251
+ fadeInkf,
252
+ wobY,
253
+ wobX,
254
+ fwdx018,
255
+ fwdx1836,
256
+ fwdx09,
257
+ fwdx918,
258
+ fwdx1827,
259
+ fwdx2736,
260
+ fwdy018,
261
+ fwdy1836,
262
+ fwdy09,
263
+ fwdy918,
264
+ fwdy1827,
265
+ fwdy2736,
266
+ floatX,
267
+ floatShadow,
268
+ pulseSM,
269
+ pulseMD,
270
+ pulseLG,
271
+ noAnim,
272
+ };
273
+ };
274
+ exports.allAnims = allAnims;
275
+ //# sourceMappingURL=Anims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Anims.js","sourceRoot":"","sources":["../../../../src/components/styles/Anims.ts"],"names":[],"mappings":";;;AAAA,yDAA8C;AAOvC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC/C,MAAM,EAAE,UAAU,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC;IAEhD,MAAM,IAAI,GAAG,IAAA,6BAAS,EAAA;;;;;;;;;EAStB,CAAC;IAED,aAAa;IACb,MAAM,IAAI,GAAG,IAAA,6BAAS,EAAA;;;;;;;;MAQlB,CAAC;IAEL,MAAM,QAAQ,GAAG,IAAA,6BAAS,EAAA;;;;;;MAMtB,CAAC;IAEL,MAAM,IAAI,GAAG,IAAA,6BAAS,EAAA;;qCAEa,UAAU;6BAClB,UAAU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AG,IAAA,6BAAS,EAAA;;;;;;;;;;;;;;;MAerB,CAAC;IAEL,MAAM,OAAO,GAAG,IAAA,6BAAS,EAAA;;;;;;;;;;;;;;;OAepB,CAAC;IAEN,MAAM,OAAO,GAAG,IAAA,6BAAS,EAAA;;;;;;;;;;;;;;;OAepB,CAAC;IAEN,MAAM,MAAM,GAAG,IAAA,6BAAS,EAAA,EAAE,CAAC;IAE3B,OAAO;QACL,IAAI;QACJ,IAAI;QACJ,QAAQ;QACR,IAAI;QACJ,IAAI;QACJ,OAAO;QACP,QAAQ;QACR,MAAM;QACN,OAAO;QACP,QAAQ;QACR,QAAQ;QACR,OAAO;QACP,QAAQ;QACR,MAAM;QACN,OAAO;QACP,QAAQ;QACR,QAAQ;QACR,MAAM;QACN,WAAW;QACX,OAAO;QACP,OAAO;QACP,OAAO;QACP,MAAM;KACP,CAAC;AACJ,CAAC,CAAC;AA1RW,QAAA,QAAQ,YA0RnB"}
@@ -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,28 @@
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;
28
+ //# sourceMappingURL=Global.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Global.js","sourceRoot":"","sources":["../../../../src/components/styles/Global.tsx"],"names":[],"mappings":";;;;;;AAAA,0EAAuC;AACvC,kDAA0B;AAOnB,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAO,EAAE;IACxD,MAAM,EAAE,aAAa,GAAG,KAAK,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAEvD,MAAM,OAAO,GAAQ,aAAa;QAChC,CAAC,CAAC,2BAAM,CAAC,OAAO,CAAA;;;;;;OAMb;QACH,CAAC,CAAC,2BAAM,CAAC,OAAO,CAAA;;;;;OAKb,CAAC;IAEN,OAAO,8BAAC,OAAO,QAAE,QAAQ,CAAW,CAAC;AACvC,CAAC,CAAC;AAnBW,QAAA,UAAU,cAmBrB"}
@@ -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,23 @@
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;
23
+ //# sourceMappingURL=Scene.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scene.js","sourceRoot":"","sources":["../../../../src/components/styles/Scene.tsx"],"names":[],"mappings":";;;;;;AAAA,0EAAuC;AACvC,kDAA0B;AAWnB,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE;IACnD,MAAM,EACJ,KAAK,GAAG,CAAC,EACT,MAAM,GAAG,CAAC,EACV,WAAW,GAAG,GAAG,EACjB,iBAAiB,GAAG,SAAS,EAC7B,MAAM,GAAG,EAAE,EACX,QAAQ,GAAG,EAAE,GACd,GAAG,KAAK,CAAC;IAEV,MAAM,aAAa,GAAQ,2BAAM,CAAC,GAAG,CAAA;aAC1B,KAAK;cACJ,MAAM;2BACO,WAAW;mBACnB,WAAW;kCACI,iBAAiB;0BACzB,iBAAiB;GACxC,CAAC;IAEF,OAAO,CACL,uCAAK,KAAK,EAAE,EAAE,MAAM,EAAE;QACpB,8BAAC,aAAa,QAAE,QAAQ,CAAiB,CACrC,CACP,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,UAAU,cAwBrB"}
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1,20 @@
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
+ //export * from './hooks';
18
+ //export * from './library';
19
+ __exportStar(require("./components"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0BAA0B;AAC1B,4BAA4B;AAC5B,+CAA6B"}
@@ -1,4 +1,5 @@
1
1
  import styled from "styled-components";
2
+ import React from "react";
2
3
  export const ObjWrapper = (props) => {
3
4
  const { showCenterDiv = false, children = "" } = props;
4
5
  const Wrapper = showCenterDiv
@@ -1 +1 @@
1
- {"version":3,"file":"Global.js","sourceRoot":"","sources":["../../../../src/components/styles/Global.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAOvC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAO,EAAE;IACxD,MAAM,EAAE,aAAa,GAAG,KAAK,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAEvD,MAAM,OAAO,GAAQ,aAAa;QAChC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAA;;;;;;OAMb;QACH,CAAC,CAAC,MAAM,CAAC,OAAO,CAAA;;;;;OAKb,CAAC;IAEN,OAAO,oBAAC,OAAO,QAAE,QAAQ,CAAW,CAAC;AACvC,CAAC,CAAC"}
1
+ {"version":3,"file":"Global.js","sourceRoot":"","sources":["../../../../src/components/styles/Global.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAO,EAAE;IACxD,MAAM,EAAE,aAAa,GAAG,KAAK,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAEvD,MAAM,OAAO,GAAQ,aAAa;QAChC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAA;;;;;;OAMb;QACH,CAAC,CAAC,MAAM,CAAC,OAAO,CAAA;;;;;OAKb,CAAC;IAEN,OAAO,oBAAC,OAAO,QAAE,QAAQ,CAAW,CAAC;AACvC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+
3
+
2
4
  {
3
5
  "name": "anim-3d-obj",
4
6
  "repository": {
@@ -6,7 +8,7 @@
6
8
  "url": "https://github.com/mdnelles/anim-3d-obj.git"
7
9
  },
8
10
  "homepage": "https://github.com/mdnelles/anim-3d-obj.git",
9
- "version": "1.1.49",
11
+ "version": "1.1.51",
10
12
  "description": "React library for creating 3D objects quickly. Also these objects can be animated",
11
13
  "main": "dist/cjs/index.js",
12
14
  "module": "dist/esm/index.js",