anim-3d-obj 1.1.18 → 1.1.21
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/dist/cjs/components/Card.js +25 -0
- package/dist/cjs/components/Card.js.map +1 -0
- package/dist/cjs/components/Cuboid.js +29 -0
- package/dist/cjs/components/Cuboid.js.map +1 -0
- package/dist/cjs/components/Faces/Face.d.ts +1 -2
- package/dist/cjs/components/Faces/Face.js +75 -0
- package/dist/cjs/components/Faces/Face.js.map +1 -0
- package/dist/cjs/components/Ribbon.js +26 -0
- package/dist/cjs/components/Ribbon.js.map +1 -0
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/index.js +19 -0
- package/dist/cjs/components/index.js.map +1 -0
- package/dist/cjs/components/styles/AnimWrap.d.ts +0 -1
- package/dist/cjs/components/styles/AnimWrap.js +86 -0
- package/dist/cjs/components/styles/AnimWrap.js.map +1 -0
- package/dist/cjs/components/styles/Anims.d.ts +23 -23
- package/dist/cjs/components/styles/Anims.js +275 -0
- package/dist/cjs/components/styles/Anims.js.map +1 -0
- package/dist/cjs/components/styles/Global.d.ts +1 -1
- package/dist/cjs/components/styles/Global.js +14 -0
- package/dist/cjs/components/styles/Global.js.map +1 -0
- package/dist/cjs/components/styles/Scene.d.ts +0 -1
- package/dist/cjs/components/styles/Scene.js +24 -0
- package/dist/cjs/components/styles/Scene.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -5
- package/dist/cjs/index.js +18 -4374
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Card.js +18 -0
- package/dist/esm/components/Card.js.map +1 -0
- package/dist/esm/components/Cuboid.js +22 -0
- package/dist/esm/components/Cuboid.js.map +1 -0
- package/dist/esm/components/Faces/Face.d.ts +1 -2
- package/dist/esm/components/Faces/Face.js +70 -0
- package/dist/esm/components/Faces/Face.js.map +1 -0
- package/dist/esm/components/Ribbon.js +19 -0
- package/dist/esm/components/Ribbon.js.map +1 -0
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.js +3 -0
- package/dist/esm/components/index.js.map +1 -0
- package/dist/esm/components/styles/AnimWrap.d.ts +0 -1
- package/dist/esm/components/styles/AnimWrap.js +79 -0
- package/dist/esm/components/styles/AnimWrap.js.map +1 -0
- package/dist/esm/components/styles/Anims.d.ts +23 -23
- package/dist/esm/components/styles/Anims.js +271 -0
- package/dist/esm/components/styles/Anims.js.map +1 -0
- package/dist/esm/components/styles/Global.d.ts +1 -1
- package/dist/esm/components/styles/Global.js +8 -0
- package/dist/esm/components/styles/Global.js.map +1 -0
- package/dist/esm/components/styles/Scene.d.ts +0 -1
- package/dist/esm/components/styles/Scene.js +17 -0
- package/dist/esm/components/styles/Scene.js.map +1 -0
- package/dist/esm/index.d.ts +1 -5
- package/dist/esm/index.js +2 -4367
- package/dist/esm/index.js.map +1 -1
- package/package.json +46 -89
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnimWrap } from './styles/AnimWrap';
|
|
3
|
+
import { SceneStyle } from './styles/Scene';
|
|
4
|
+
import Face from './Faces/Face';
|
|
5
|
+
import { ObjWrapper } from './styles/Global';
|
|
6
|
+
export const Card = (props) => {
|
|
7
|
+
let { anim1Specs, anim2Specs, width = 5, height = 5, faces, global = {}, custom = {}, tranz = (+height / 2) | 0, perspective, perspectiveOrigin, zIndex } = props;
|
|
8
|
+
const buildFace = (faceType) => {
|
|
9
|
+
return React.createElement(Face, { width: width, height: height, depth: 0.1, faceType: faceType, id: faceType, tranz: tranz, global: global, custom: custom });
|
|
10
|
+
};
|
|
11
|
+
return (React.createElement(SceneStyle, { width: width, height: height, perspective: perspective, perspectiveOrigin: perspectiveOrigin, zIndex: zIndex },
|
|
12
|
+
React.createElement(AnimWrap, { animSpecs: anim1Specs },
|
|
13
|
+
React.createElement(AnimWrap, { animSpecs: anim2Specs },
|
|
14
|
+
React.createElement(ObjWrapper, null,
|
|
15
|
+
!!faces && !!faces.front ? buildFace('front') : null,
|
|
16
|
+
!!faces && !!faces.back ? buildFace('back') : null)))));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAe,EAAO,EAAE;IACzC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAElK,MAAM,SAAS,GAAG,CAAC,QAAa,EAAO,EAAE;QACrC,OAAO,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;IAC9I,CAAC,CAAC;IAEF,OAAO,CACH,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM;QACpH,oBAAC,QAAQ,IAAC,SAAS,EAAE,UAAU;YAC3B,oBAAC,QAAQ,IAAC,SAAS,EAAE,UAAU;gBAC3B,oBAAC,UAAU;oBACN,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;oBACpD,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAC1C,CACN,CACJ,CACF,CAChB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnimWrap } from './styles/AnimWrap';
|
|
3
|
+
import { SceneStyle } from './styles/Scene';
|
|
4
|
+
import Face from './Faces/Face';
|
|
5
|
+
import { ObjWrapper } from './styles/Global';
|
|
6
|
+
export const Cuboid = (props) => {
|
|
7
|
+
let { anim1Specs, anim2Specs, width = 5, height = 5, depth = 5, faces, global = {}, custom = {}, tranz = (+height / 2) | 0, perspective, perspectiveOrigin, zIndex } = props;
|
|
8
|
+
const buildFace = (faceType) => {
|
|
9
|
+
return React.createElement(Face, { width: width, height: height, depth: depth, faceType: faceType, id: faceType, tranz: tranz, global: global, custom: custom });
|
|
10
|
+
};
|
|
11
|
+
return (React.createElement(SceneStyle, { width: width, height: height, perspective: perspective, perspectiveOrigin: perspectiveOrigin, zIndex: zIndex },
|
|
12
|
+
React.createElement(AnimWrap, { animSpecs: anim1Specs },
|
|
13
|
+
React.createElement(AnimWrap, { animSpecs: anim2Specs },
|
|
14
|
+
React.createElement(ObjWrapper, null,
|
|
15
|
+
!!faces && !!faces.front ? buildFace('front') : null,
|
|
16
|
+
!!faces && !!faces.right ? buildFace('right') : null,
|
|
17
|
+
!!faces && !!faces.back ? buildFace('back') : null,
|
|
18
|
+
!!faces && !!faces.left ? buildFace('left') : null,
|
|
19
|
+
!!faces && !!faces.top ? buildFace('top') : null,
|
|
20
|
+
!!faces && !!faces.bottom ? buildFace('bottom') : null)))));
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=Cuboid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Cuboid.js","sourceRoot":"","sources":["../../../src/components/Cuboid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAe,EAAO,EAAE;IAC3C,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAE7K,MAAM,SAAS,GAAG,CAAC,QAAa,EAAO,EAAE;QACrC,OAAO,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;IAChJ,CAAC,CAAC;IAEF,OAAO,CACH,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM;QACpH,oBAAC,QAAQ,IAAC,SAAS,EAAE,UAAU;YAC3B,oBAAC,QAAQ,IAAC,SAAS,EAAE,UAAU;gBAC3B,oBAAC,UAAU;oBACN,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;oBACpD,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;oBACpD,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,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,CAC9C,CACN,CACJ,CACF,CAChB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
const Face = (props) => {
|
|
4
|
+
let { depth = 10, faceType, global = {}, height = 10, custom = false, tranz = 80, width = 100 } = props;
|
|
5
|
+
let transform;
|
|
6
|
+
const styles = !!custom[faceType] && !!custom[faceType].css ? custom[faceType].css : global.css;
|
|
7
|
+
const body = !!custom[faceType] && !!custom[faceType].body ? custom[faceType].body : global.body;
|
|
8
|
+
if (faceType === 'bottom') {
|
|
9
|
+
tranz = +height - +depth / 2;
|
|
10
|
+
height = +depth;
|
|
11
|
+
transform = `transform: rotateX(-90deg) translateZ(${tranz}px);`;
|
|
12
|
+
//styles = !!custom["top"] ? custom : global;
|
|
13
|
+
}
|
|
14
|
+
else if (faceType === 'top') {
|
|
15
|
+
height = +depth;
|
|
16
|
+
if (!!depth)
|
|
17
|
+
tranz = +depth / 2;
|
|
18
|
+
transform = `transform: rotateX(90deg) translateZ(${tranz}px);`;
|
|
19
|
+
}
|
|
20
|
+
else if (faceType === 'front') {
|
|
21
|
+
if (!!depth)
|
|
22
|
+
tranz = +depth / 2;
|
|
23
|
+
transform = `transform: rotateY(0deg) translateZ(${tranz}px);`;
|
|
24
|
+
}
|
|
25
|
+
else if (faceType === 'back') {
|
|
26
|
+
if (!!depth)
|
|
27
|
+
tranz = +depth / 2;
|
|
28
|
+
transform = `transform: rotateY(180deg) translateZ(${tranz}px);`;
|
|
29
|
+
}
|
|
30
|
+
else if (faceType === 'right') {
|
|
31
|
+
if (height > width && !depth) {
|
|
32
|
+
tranz = -(+height / 2 - +width);
|
|
33
|
+
width = +height;
|
|
34
|
+
}
|
|
35
|
+
else if (width > height && !depth) {
|
|
36
|
+
tranz = +height / 2;
|
|
37
|
+
height = +width;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
tranz = +width - +depth / 2;
|
|
41
|
+
width = +depth;
|
|
42
|
+
}
|
|
43
|
+
transform = `transform: rotateY(90deg) translateZ(${tranz}px);`;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
if (height > width && !depth) {
|
|
47
|
+
tranz = -(+height / 2 - +width);
|
|
48
|
+
width = +height;
|
|
49
|
+
}
|
|
50
|
+
else if (width > height && !depth) {
|
|
51
|
+
tranz = +height / 2;
|
|
52
|
+
height = +width;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
tranz = +depth / 2;
|
|
56
|
+
width = +depth;
|
|
57
|
+
}
|
|
58
|
+
transform = `transform: rotateY(-90deg) translateZ(${tranz}px);`;
|
|
59
|
+
}
|
|
60
|
+
const Specs = styled.div `
|
|
61
|
+
${styles}
|
|
62
|
+
width: ${width}px;
|
|
63
|
+
position: absolute;
|
|
64
|
+
height: ${height}px;
|
|
65
|
+
${transform};
|
|
66
|
+
`;
|
|
67
|
+
return React.createElement(Specs, null, body);
|
|
68
|
+
};
|
|
69
|
+
export default Face;
|
|
70
|
+
//# sourceMappingURL=Face.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Face.js","sourceRoot":"","sources":["../../../../src/components/Faces/Face.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAO,EAAE;IACnC,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,KAAK,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,GAAG,EAAE,GAAG,KAAK,CAAC;IAExG,IAAI,SAAS,CAAC;IACd,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;IAChG,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,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AAC,KAAK,CAAC;SAClB;QACD,SAAS,GAAG,wCAAwC,KAAK,MAAM,CAAC;KACnE;SAAM;QACH,IAAI,MAAM,GAAG,KAAK,IAAI,CAAC,KAAK,EAAE;YAC1B,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAChC,KAAK,GAAG,CAAC,MAAM,CAAC;SACnB;aAAM,IAAI,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE;YACjC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;YACpB,MAAM,GAAG,CAAC,KAAK,CAAC;SACnB;aAAM;YACH,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;YACnB,KAAK,GAAG,CAAC,KAAK,CAAC;SAClB;QACD,SAAS,GAAG,yCAAyC,KAAK,MAAM,CAAC;KACpE;IAED,MAAM,KAAK,GAAQ,MAAM,CAAC,GAAG,CAAA;UACvB,MAAM;iBACC,KAAK;;kBAEJ,MAAM;UACd,SAAS;KACd,CAAC;IACF,OAAO,oBAAC,KAAK,QAAE,IAAI,CAAS,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnimWrap } from './styles/AnimWrap';
|
|
3
|
+
import { SceneStyle } from './styles/Scene';
|
|
4
|
+
import Face from './Faces/Face';
|
|
5
|
+
import { ObjWrapper } from './styles/Global';
|
|
6
|
+
export const Ribbon = (props) => {
|
|
7
|
+
let { anim1Specs, anim2Specs, width = 5, height = 5, depth = 5, faces, global = {}, custom = {}, tranz = (+height / 2) | 0, perspective, perspectiveOrigin, zIndex } = props;
|
|
8
|
+
const buildFace = (faceType) => {
|
|
9
|
+
return React.createElement(Face, { width: width, height: height, depth: depth, faceType: faceType, id: faceType, tranz: tranz, global: global, custom: custom });
|
|
10
|
+
};
|
|
11
|
+
return (React.createElement(SceneStyle, { width: width, height: height, perspective: perspective, perspectiveOrigin: perspectiveOrigin, zIndex: zIndex },
|
|
12
|
+
React.createElement(AnimWrap, { animSpecs: anim1Specs },
|
|
13
|
+
React.createElement(AnimWrap, { animSpecs: anim2Specs },
|
|
14
|
+
React.createElement(ObjWrapper, null,
|
|
15
|
+
!!faces && !!faces.bottom ? buildFace('bottom') : null,
|
|
16
|
+
!!faces && !!faces.back ? buildFace('back') : null,
|
|
17
|
+
!!faces && !!faces.top ? buildFace('topr') : null)))));
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=Ribbon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ribbon.js","sourceRoot":"","sources":["../../../src/components/Ribbon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAe,EAAO,EAAE;IAC3C,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAE7K,MAAM,SAAS,GAAG,CAAC,QAAa,EAAO,EAAE;QACrC,OAAO,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;IAChJ,CAAC,CAAC;IAEF,OAAO,CACH,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM;QACpH,oBAAC,QAAQ,IAAC,SAAS,EAAE,UAAU;YAC3B,oBAAC,QAAQ,IAAC,SAAS,EAAE,UAAU;gBAC3B,oBAAC,UAAU;oBACN,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,CACzC,CACN,CACJ,CACF,CAChB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
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, noAnim } = allAnims({ degreesHi: AS.degreesHi, degreesLow: AS.degreesLow });
|
|
8
|
+
let theAnim = 'noAnim';
|
|
9
|
+
// need to iterate through all animation posibilities and not use eval() to satisfy TS
|
|
10
|
+
if (AS.name === 'X360')
|
|
11
|
+
theAnim = X360;
|
|
12
|
+
else if (AS.name === 'Y360')
|
|
13
|
+
theAnim = Y360;
|
|
14
|
+
else if (AS.name === 'fadeInkf')
|
|
15
|
+
theAnim = fadeInkf;
|
|
16
|
+
else if (AS.name === 'wobX')
|
|
17
|
+
theAnim = wobX;
|
|
18
|
+
else if (AS.name === 'wobY')
|
|
19
|
+
theAnim = wobY;
|
|
20
|
+
else if (AS.name === 'fwdx018')
|
|
21
|
+
theAnim = fwdx018;
|
|
22
|
+
else if (AS.name === 'fwdx1836')
|
|
23
|
+
theAnim = fwdx1836;
|
|
24
|
+
else if (AS.name === 'fwdx09')
|
|
25
|
+
theAnim = fwdx09;
|
|
26
|
+
else if (AS.name === 'fwdx918')
|
|
27
|
+
theAnim = fwdx918;
|
|
28
|
+
else if (AS.name === 'fwdx1827')
|
|
29
|
+
theAnim = fwdx1827;
|
|
30
|
+
else if (AS.name === 'fwdx2736')
|
|
31
|
+
theAnim = fwdx2736;
|
|
32
|
+
else if (AS.name === 'fwdy018')
|
|
33
|
+
theAnim = fwdy018;
|
|
34
|
+
else if (AS.name === 'fwdy1836')
|
|
35
|
+
theAnim = fwdy1836;
|
|
36
|
+
else if (AS.name === 'fwdy09')
|
|
37
|
+
theAnim = fwdy09;
|
|
38
|
+
else if (AS.name === 'fwdy918')
|
|
39
|
+
theAnim = fwdy918;
|
|
40
|
+
else if (AS.name === 'fwdy1827')
|
|
41
|
+
theAnim = fwdy1827;
|
|
42
|
+
else if (AS.name === 'fwdy2736')
|
|
43
|
+
theAnim = fwdy2736;
|
|
44
|
+
else if (AS.name === 'floatX')
|
|
45
|
+
theAnim = floatX;
|
|
46
|
+
else if (AS.name === 'floatShadow')
|
|
47
|
+
theAnim = floatShadow;
|
|
48
|
+
else if (AS.name === 'pulseSM')
|
|
49
|
+
theAnim = pulseSM;
|
|
50
|
+
else if (AS.name === 'pulseMD')
|
|
51
|
+
theAnim = pulseMD;
|
|
52
|
+
else if (AS.name === 'pulseLG')
|
|
53
|
+
theAnim = pulseLG;
|
|
54
|
+
else
|
|
55
|
+
theAnim = noAnim;
|
|
56
|
+
const AnimWrapDiv = styled.div `
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 100%;
|
|
59
|
+
position: relative;
|
|
60
|
+
transform-style: preserve-3d;
|
|
61
|
+
border: ${AS.border};
|
|
62
|
+
-webkit-animation-duration: ${AS.duration}s;
|
|
63
|
+
animation-duration: ${AS.duration}s;
|
|
64
|
+
-webkit-animation-iteration-count: ${AS.iterationCount};
|
|
65
|
+
animation-iteration-count: ${AS.iterationCount};
|
|
66
|
+
-webkit-animation-name: ${theAnim};
|
|
67
|
+
animation-name: ${theAnim};
|
|
68
|
+
-webkit-animation-fill-mode: ${AS.fillMode};
|
|
69
|
+
animation-fill-mode: ${AS.fillMode};
|
|
70
|
+
animation-direction: ${AS.direction};
|
|
71
|
+
-webkit-animation-direction: ${AS.direction};
|
|
72
|
+
-webkit-animation-timing-function: ${AS.timing};
|
|
73
|
+
animation-timing-function: ${AS.timing};
|
|
74
|
+
-webkit-animation-delay: ${AS.delay}s;
|
|
75
|
+
animation-delay: ${AS.delay}s;
|
|
76
|
+
`;
|
|
77
|
+
return React.createElement(AnimWrapDiv, null, children);
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=AnimWrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimWrap.js","sourceRoot":"","sources":["../../../../src/components/styles/AnimWrap.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;A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,CAAC,QAAQ;6CACI,EAAE,CAAC,cAAc;qCACzB,EAAE,CAAC,cAAc;kCACpB,OAAO;0BACf,OAAO;uCACM,EAAE,CAAC,QAAQ;+BACnB,EAAE,CAAC,QAAQ;+BACX,EAAE,CAAC,SAAS;uCACJ,EAAE,CAAC,SAAS;6CACN,EAAE,CAAC,MAAM;qCACjB,EAAE,CAAC,MAAM;mCACX,EAAE,CAAC,KAAK;2BAChB,EAAE,CAAC,KAAK;KAC9B,CAAC;IAEF,OAAO,oBAAC,WAAW,QAAE,QAAQ,CAAe,CAAC;AACjD,CAAC,CAAC"}
|
|
@@ -3,28 +3,28 @@ interface AllAnimsProps {
|
|
|
3
3
|
degreesHi?: number;
|
|
4
4
|
}
|
|
5
5
|
export declare const allAnims: (props: AllAnimsProps) => {
|
|
6
|
-
X360:
|
|
7
|
-
Y360:
|
|
8
|
-
fadeInkf:
|
|
9
|
-
wobY:
|
|
10
|
-
wobX:
|
|
11
|
-
fwdx018:
|
|
12
|
-
fwdx1836:
|
|
13
|
-
fwdx09:
|
|
14
|
-
fwdx918:
|
|
15
|
-
fwdx1827:
|
|
16
|
-
fwdx2736:
|
|
17
|
-
fwdy018:
|
|
18
|
-
fwdy1836:
|
|
19
|
-
fwdy09:
|
|
20
|
-
fwdy918:
|
|
21
|
-
fwdy1827:
|
|
22
|
-
fwdy2736:
|
|
23
|
-
floatX:
|
|
24
|
-
floatShadow:
|
|
25
|
-
pulseSM:
|
|
26
|
-
pulseMD:
|
|
27
|
-
pulseLG:
|
|
28
|
-
noAnim:
|
|
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
29
|
};
|
|
30
30
|
export {};
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { keyframes } from 'styled-components';
|
|
2
|
+
export const allAnims = (props) => {
|
|
3
|
+
const { degreesLow = 0, degreesHi = 0 } = props;
|
|
4
|
+
const X360 = keyframes `
|
|
5
|
+
from {
|
|
6
|
+
-webkit-transform: rotateX(360deg);
|
|
7
|
+
transform: rotateX(360deg);
|
|
8
|
+
}
|
|
9
|
+
to {
|
|
10
|
+
-webkit-transform: rotateX(0deg);
|
|
11
|
+
transform: rotateX(0deg);
|
|
12
|
+
}
|
|
13
|
+
}`;
|
|
14
|
+
//////// Y360
|
|
15
|
+
const Y360 = keyframes `
|
|
16
|
+
from {
|
|
17
|
+
-webkit-transform: rotateY(360deg);
|
|
18
|
+
transform: rotateY(360deg);
|
|
19
|
+
}
|
|
20
|
+
to {
|
|
21
|
+
-webkit-transform: rotateY(0deg);
|
|
22
|
+
transform: rotateY(0deg);
|
|
23
|
+
}`;
|
|
24
|
+
const fadeInkf = keyframes `
|
|
25
|
+
from {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
}
|
|
28
|
+
to {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}`;
|
|
31
|
+
const wobY = keyframes `
|
|
32
|
+
0% {
|
|
33
|
+
-webkit-transform: rotateY(${degreesLow}deg);
|
|
34
|
+
transform: rotateY(${degreesLow}deg);
|
|
35
|
+
}
|
|
36
|
+
50% {
|
|
37
|
+
-webkit-transform: rotateY(${degreesHi}deg);
|
|
38
|
+
transform: rotateY(${degreesHi}deg);
|
|
39
|
+
}
|
|
40
|
+
100% {
|
|
41
|
+
-webkit-transform: rotateY(${degreesLow}deg);
|
|
42
|
+
transform: rotateY(${degreesLow}deg);
|
|
43
|
+
}`;
|
|
44
|
+
const wobX = keyframes `
|
|
45
|
+
0% {
|
|
46
|
+
-webkit-transform: rotateX(${degreesLow}deg);
|
|
47
|
+
transform: rotateX(${degreesLow}deg);
|
|
48
|
+
}
|
|
49
|
+
50% {
|
|
50
|
+
-webkit-transform: rotateX(${degreesHi}deg);
|
|
51
|
+
transform: rotateX(${degreesHi}deg);
|
|
52
|
+
}
|
|
53
|
+
100% {
|
|
54
|
+
-webkit-transform: rotateX(${degreesLow}deg);
|
|
55
|
+
transform: rotateX(${degreesLow}deg);
|
|
56
|
+
}`;
|
|
57
|
+
/* ============================== x-axis 0-180 >180 - 360 */
|
|
58
|
+
const fwdx018 = keyframes `
|
|
59
|
+
from {
|
|
60
|
+
-webkit-transform: rotateX(360deg);
|
|
61
|
+
transform: rotateX(360deg);
|
|
62
|
+
}
|
|
63
|
+
to {
|
|
64
|
+
-webkit-transform: rotateX(180deg);
|
|
65
|
+
transform: rotateX(180deg);
|
|
66
|
+
}`;
|
|
67
|
+
const fwdx1836 = keyframes `
|
|
68
|
+
from {
|
|
69
|
+
-webkit-transform: rotateX(180deg);
|
|
70
|
+
transform: rotateX(180deg);
|
|
71
|
+
}
|
|
72
|
+
to {
|
|
73
|
+
-webkit-transform: rotateX(0deg);
|
|
74
|
+
transform: rotateX(0deg);
|
|
75
|
+
}`;
|
|
76
|
+
/* ============================= x-axis 0-90, 90-180, 180-270, 270-360 */
|
|
77
|
+
const fwdx09 = keyframes `
|
|
78
|
+
from {
|
|
79
|
+
-webkit-transform: rotateX(360deg);
|
|
80
|
+
transform: rotateX(360deg);
|
|
81
|
+
}
|
|
82
|
+
to {
|
|
83
|
+
-webkit-transform: rotateX(90deg);
|
|
84
|
+
transform: rotateX(90deg);
|
|
85
|
+
}`;
|
|
86
|
+
const fwdx918 = keyframes `
|
|
87
|
+
from {
|
|
88
|
+
-webkit-transform: rotateX(-90deg);
|
|
89
|
+
transform: rotateX(-90deg);
|
|
90
|
+
}
|
|
91
|
+
to {
|
|
92
|
+
-webkit-transform: rotateX(-180deg);
|
|
93
|
+
transform: rotateX(-180deg);
|
|
94
|
+
}`;
|
|
95
|
+
const fwdx1827 = keyframes `
|
|
96
|
+
from {
|
|
97
|
+
-webkit-transform: rotateX(-180deg);
|
|
98
|
+
transform: rotateX(-180deg);
|
|
99
|
+
}
|
|
100
|
+
to {
|
|
101
|
+
-webkit-transform: rotateX(-270deg);
|
|
102
|
+
transform: rotateX(-270deg);
|
|
103
|
+
}`;
|
|
104
|
+
const fwdx2736 = keyframes `
|
|
105
|
+
from {
|
|
106
|
+
-webkit-transform: rotateX(-270deg);
|
|
107
|
+
transform: rotateX(-270deg);
|
|
108
|
+
}
|
|
109
|
+
to {
|
|
110
|
+
-webkit-transform: rotateX(-360deg);
|
|
111
|
+
transform: rotateX(-360deg);
|
|
112
|
+
}`;
|
|
113
|
+
/* ============================== y-axis 0-180 >180 - 360 */
|
|
114
|
+
const fwdy018 = keyframes `
|
|
115
|
+
from {
|
|
116
|
+
-webkit-transform: rotateY(360deg);
|
|
117
|
+
transform: rotateY(360deg);
|
|
118
|
+
}
|
|
119
|
+
to {
|
|
120
|
+
-webkit-transform: rotateY(180deg);
|
|
121
|
+
transform: rotateY(180deg);
|
|
122
|
+
}`;
|
|
123
|
+
const fwdy1836 = keyframes `
|
|
124
|
+
from {
|
|
125
|
+
-webkit-transform: rotateY(180deg);
|
|
126
|
+
transform: rotateY(180deg);
|
|
127
|
+
}
|
|
128
|
+
to {
|
|
129
|
+
-webkit-transform: rotateY(0deg);
|
|
130
|
+
transform: rotateY(0deg);
|
|
131
|
+
}`;
|
|
132
|
+
/* ============================= y-axis 0-90, 90-180, 180-270, 270-360 */
|
|
133
|
+
const fwdy09 = keyframes `
|
|
134
|
+
from {
|
|
135
|
+
-webkit-transform: rotateY(360deg);
|
|
136
|
+
transform: rotateY(360deg);
|
|
137
|
+
}
|
|
138
|
+
to {
|
|
139
|
+
-webkit-transform: rotateY(90deg);
|
|
140
|
+
transform: rotateY(90deg);
|
|
141
|
+
}`;
|
|
142
|
+
const fwdy918 = keyframes `
|
|
143
|
+
from {
|
|
144
|
+
-webkit-transform: rotateY(-90deg);
|
|
145
|
+
transform: rotateY(-90deg);
|
|
146
|
+
}
|
|
147
|
+
to {
|
|
148
|
+
-webkit-transform: rotateY(-180deg);
|
|
149
|
+
transform: rotateY(-180deg);
|
|
150
|
+
}`;
|
|
151
|
+
const fwdy1827 = keyframes `
|
|
152
|
+
from {
|
|
153
|
+
-webkit-transform: rotateY(-180deg);
|
|
154
|
+
transform: rotateY(-180deg);
|
|
155
|
+
}
|
|
156
|
+
to {
|
|
157
|
+
-webkit-transform: rotateY(-270deg);
|
|
158
|
+
transform: rotateY(-270deg);
|
|
159
|
+
}`;
|
|
160
|
+
const fwdy2736 = keyframes `
|
|
161
|
+
from {
|
|
162
|
+
-webkit-transform: rotateY(-270deg);
|
|
163
|
+
transform: rotateY(-270deg);
|
|
164
|
+
}
|
|
165
|
+
to {
|
|
166
|
+
-webkit-transform: rotateY(-360deg);
|
|
167
|
+
transform: rotateY(-360deg);
|
|
168
|
+
}`;
|
|
169
|
+
/* ============================= floating */
|
|
170
|
+
const floatX = keyframes `
|
|
171
|
+
0% { -webkit-transform: translate(0, 0px); -ms-transform: translate(0, 0px); transform: translate(0, 0px); }
|
|
172
|
+
50% { -webkit-transform: translate(0, 15px); -ms-transform: translate(0, 15px); transform: translate(0, 15px); }
|
|
173
|
+
100% { -webkit-transform: translate(0, -0px); -ms-transform: translate(0, -0px); transform: translate(0, -0px); }`;
|
|
174
|
+
const floatShadow = keyframes `
|
|
175
|
+
0% {
|
|
176
|
+
-webkit-box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
|
|
177
|
+
box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
|
|
178
|
+
-webkit-transform: translateY(0px);
|
|
179
|
+
-ms-transform: translateY(0px);
|
|
180
|
+
transform: translateY(0px);
|
|
181
|
+
}
|
|
182
|
+
50% {
|
|
183
|
+
-webkit-box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2);
|
|
184
|
+
box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2);
|
|
185
|
+
-webkit-transform: translateY(-20px);
|
|
186
|
+
-ms-transform: translateY(-20px);
|
|
187
|
+
transform: translateY(-20px);
|
|
188
|
+
}
|
|
189
|
+
100% {
|
|
190
|
+
-webkit-box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
|
|
191
|
+
box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6);
|
|
192
|
+
-webkit-transform: translateY(0px);
|
|
193
|
+
-ms-transform: translateY(0px);
|
|
194
|
+
transform: translateY(0px);
|
|
195
|
+
}`;
|
|
196
|
+
const pulseSM = keyframes `
|
|
197
|
+
0% {
|
|
198
|
+
-webkit-transform: scale(0.9);
|
|
199
|
+
-ms-transform: scale(0.9);
|
|
200
|
+
transform: scale(0.9);
|
|
201
|
+
}
|
|
202
|
+
70% {
|
|
203
|
+
-webkit-transform: scale(1);
|
|
204
|
+
-ms-transform: scale(1);
|
|
205
|
+
transform: scale(1);
|
|
206
|
+
}
|
|
207
|
+
100% {
|
|
208
|
+
-webkit-transform: scale(0.9);
|
|
209
|
+
-ms-transform: scale(0.9);
|
|
210
|
+
transform: scale(0.9);
|
|
211
|
+
}`;
|
|
212
|
+
const pulseMD = keyframes `
|
|
213
|
+
0% {
|
|
214
|
+
-webkit-transform: scale(0.7);
|
|
215
|
+
-ms-transform: scale(0.7);
|
|
216
|
+
transform: scale(0.7);
|
|
217
|
+
}
|
|
218
|
+
70% {
|
|
219
|
+
-webkit-transform: scale(1);
|
|
220
|
+
-ms-transform: scale(1);
|
|
221
|
+
transform: scale(1);
|
|
222
|
+
}
|
|
223
|
+
100% {
|
|
224
|
+
-webkit-transform: scale(0.7);
|
|
225
|
+
-ms-transform: scale(0.7);
|
|
226
|
+
transform: scale(0.7);
|
|
227
|
+
}`;
|
|
228
|
+
const pulseLG = keyframes `
|
|
229
|
+
0% {
|
|
230
|
+
-webkit-transform: scale(0.5);
|
|
231
|
+
-ms-transform: scale(0.5);
|
|
232
|
+
transform: scale(0.5);
|
|
233
|
+
}
|
|
234
|
+
70% {
|
|
235
|
+
-webkit-transform: scale(1);
|
|
236
|
+
-ms-transform: scale(1);
|
|
237
|
+
transform: scale(1);
|
|
238
|
+
}
|
|
239
|
+
100% {
|
|
240
|
+
-webkit-transform: scale(0.5);
|
|
241
|
+
-ms-transform: scale(0.5);
|
|
242
|
+
transform: scale(0.5);
|
|
243
|
+
}`;
|
|
244
|
+
const noAnim = keyframes ``;
|
|
245
|
+
return {
|
|
246
|
+
X360,
|
|
247
|
+
Y360,
|
|
248
|
+
fadeInkf,
|
|
249
|
+
wobY,
|
|
250
|
+
wobX,
|
|
251
|
+
fwdx018,
|
|
252
|
+
fwdx1836,
|
|
253
|
+
fwdx09,
|
|
254
|
+
fwdx918,
|
|
255
|
+
fwdx1827,
|
|
256
|
+
fwdx2736,
|
|
257
|
+
fwdy018,
|
|
258
|
+
fwdy1836,
|
|
259
|
+
fwdy09,
|
|
260
|
+
fwdy918,
|
|
261
|
+
fwdy1827,
|
|
262
|
+
fwdy2736,
|
|
263
|
+
floatX,
|
|
264
|
+
floatShadow,
|
|
265
|
+
pulseSM,
|
|
266
|
+
pulseMD,
|
|
267
|
+
pulseLG,
|
|
268
|
+
noAnim
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
//# sourceMappingURL=Anims.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Anims.js","sourceRoot":"","sources":["../../../../src/components/styles/Anims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAO9C,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC7C,MAAM,EAAE,UAAU,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC;IAEhD,MAAM,IAAI,GAAG,SAAS,CAAA;;;;;;;;;EASxB,CAAC;IAEC,aAAa;IACb,MAAM,IAAI,GAAG,SAAS,CAAA;;;;;;;;MAQpB,CAAC;IAEH,MAAM,QAAQ,GAAG,SAAS,CAAA;;;;;;MAMxB,CAAC;IAEH,MAAM,IAAI,GAAG,SAAS,CAAA;;qCAEW,UAAU;6BAClB,UAAU;;;qCAGF,SAAS;6BACjB,SAAS;;;qCAGD,UAAU;6BAClB,UAAU;MACjC,CAAC;IAEH,MAAM,IAAI,GAAG,SAAS,CAAA;;qCAEW,UAAU;6BAClB,UAAU;;;qCAGF,SAAS;6BACjB,SAAS;;;qCAGD,UAAU;6BAClB,UAAU;MACjC,CAAC;IACH,4DAA4D;IAC5D,MAAM,OAAO,GAAG,SAAS,CAAA;;;;;;;;MAQvB,CAAC;IACH,MAAM,QAAQ,GAAG,SAAS,CAAA;;;;;;;;MAQxB,CAAC;IACH,yEAAyE;IACzE,MAAM,MAAM,GAAG,SAAS,CAAA;;;;;;;;MAQtB,CAAC;IACH,MAAM,OAAO,GAAG,SAAS,CAAA;;;;;;;;MAQvB,CAAC;IACH,MAAM,QAAQ,GAAG,SAAS,CAAA;;;;;;;;MAQxB,CAAC;IACH,MAAM,QAAQ,GAAG,SAAS,CAAA;;;;;;;;MAQxB,CAAC;IAEH,4DAA4D;IAC5D,MAAM,OAAO,GAAG,SAAS,CAAA;;;;;;;;KAQxB,CAAC;IACF,MAAM,QAAQ,GAAG,SAAS,CAAA;;;;;;;;KAQzB,CAAC;IAEF,yEAAyE;IACzE,MAAM,MAAM,GAAG,SAAS,CAAA;;;;;;;;KAQvB,CAAC;IACF,MAAM,OAAO,GAAG,SAAS,CAAA;;;;;;;;KAQxB,CAAC;IACF,MAAM,QAAQ,GAAG,SAAS,CAAA;;;;;;;;KAQzB,CAAC;IACF,MAAM,QAAQ,GAAG,SAAS,CAAA;;;;;;;;KAQzB,CAAC;IAEF,4CAA4C;IAC5C,MAAM,MAAM,GAAG,SAAS,CAAA;;;uHAG2F,CAAC;IAEpH,MAAM,WAAW,GAAG,SAAS,CAAA;;;;;;;;;;;;;;;;;;;;;UAqBvB,CAAC;IAEP,MAAM,OAAO,GAAG,SAAS,CAAA;;;;;;;;;;;;;;;MAevB,CAAC;IAEH,MAAM,OAAO,GAAG,SAAS,CAAA;;;;;;;;;;;;;;;OAetB,CAAC;IAEJ,MAAM,OAAO,GAAG,SAAS,CAAA;;;;;;;;;;;;;;;OAetB,CAAC;IAEJ,MAAM,MAAM,GAAG,SAAS,CAAA,EAAE,CAAC;IAE3B,OAAO;QACH,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;KACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ObjWrapper: any
|
|
1
|
+
export declare const ObjWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Global.js","sourceRoot":"","sources":["../../../../src/components/styles/Global.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKnC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export const SceneStyle = (props) => {
|
|
4
|
+
const { width = 0, height = 0, perspective = 600, perspectiveOrigin = '50% 50%', zIndex = 10, children = {} } = props;
|
|
5
|
+
const SceneStyleDiv = styled.div `
|
|
6
|
+
width: ${width}px;
|
|
7
|
+
height: ${height}px;
|
|
8
|
+
|
|
9
|
+
-webkit-perspective: ${perspective}px;
|
|
10
|
+
perspective: ${perspective}px;
|
|
11
|
+
-webkit-perspective-origin: ${perspectiveOrigin};
|
|
12
|
+
perspective-origin: ${perspectiveOrigin};
|
|
13
|
+
`;
|
|
14
|
+
return (React.createElement("div", { style: { zIndex } },
|
|
15
|
+
React.createElement(SceneStyleDiv, null, children)));
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Scene.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scene.js","sourceRoot":"","sources":["../../../../src/components/styles/Scene.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE;IACjD,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,WAAW,GAAG,GAAG,EAAE,iBAAiB,GAAG,SAAS,EAAE,MAAM,GAAG,EAAE,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAEtH,MAAM,aAAa,GAAQ,MAAM,CAAC,GAAG,CAAA;iBACxB,KAAK;kBACJ,MAAM;;+BAEO,WAAW;uBACnB,WAAW;sCACI,iBAAiB;8BACzB,iBAAiB;KAC1C,CAAC;IAEF,OAAO,CACH,6BAAK,KAAK,EAAE,EAAE,MAAM,EAAE;QAClB,oBAAC,aAAa,QAAE,QAAQ,CAAiB,CACvC,CACT,CAAC;AACN,CAAC,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED