anim-3d-obj 1.1.21 → 1.1.25

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 JTL (Saman)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,154 +1,223 @@
1
- # React Typescript Cuboid Builder
2
-
3
- This project allows a user to create Cuboids of any size simply by entering a set of parameters.
4
- The program does the leg work with regard to calculating translationZ depth and config on the fly.
5
-
6
- - [GIT HOME](https://github.com/mdnelles/anim-3d-objs-launcher)
7
- - [NPM HOME](https://www.npmjs.com/package/anim-3d-obj) npm i anim-3d-obj
8
-
9
- ## Examples
10
-
11
- - [6 sided Cuboid - animate X360 Y360](https://codesandbox.io/s/anim-3d-obj-all-sides-simple-bf67yg)
12
- - [3 sided Object - animate y-axis](https://codesandbox.io/s/anim-3d-obj-3-sides-wobble-y-axis-wglkms)
13
- - [Double box spin](https://codesandbox.io/s/react-anim-3d-double-box-spin-vbdhg2)
14
- - [2 sided object with animation wobble](https://codesandbox.io/s/anim-3d-obj-wobblex-mmidkg)
15
- - [Parallel divs animated x and y axis in tandem](https://codesandbox.io/s/anim-3d-obj-2-sides-simple-4057y7)
16
- - [Spinning Slab](https://codesandbox.io/s/react-anim-3d-pulse-kc8g0f)
17
-
18
- ## Config
19
-
20
- Animations are optional. Either or both of `anim1Specs` or `anim2Specs` can be applied to the object.
21
-
22
- ```typescript
23
- const anim1Specs: object = {
24
- border: '', // while testing reveal the animation wrapper
25
- degreesHi: -45, // degrees if spin
26
- degreesLow: 45, // degrees if spin
27
- delay: 0, // start delay in seconds
28
- direction: 'normal', //normal alternating reverse
29
- duration: 8, // seconds
30
- fillMode: 'forward', // node forward backward both
31
- iterationCount: 'infinite', // number or infinte
32
- name: 'Y360', // ** ANIMATIONS
33
- timing: 'ease-in-out', // linear ease ease-in-out
34
- }
35
- ```
36
-
37
- `** ANIMATIONS`
38
-
39
- - X360: rotate 360 degrees on the x-axis
40
- - Y360: rotate 360 degrees on the y-axis
41
- - fadeInkf: fade object in from 0 to 1 Opacity
42
- - wobY: wobble on y-axis (degreesHi <-> degreesLow)
43
- - wobX: wobble on x-axis (degreesHi <-> degreesLow)
44
- - fwdx018: spin object on x-axis from 0 degrees to 180 degrees
45
- - fwdx1836: spin object on x-axis from 180 degrees to 360 degrees
46
- - fwdx09: spin object on x-axis from 0 degrees to 90 degrees
47
- - fwdx918: spin object on x-axis from 90 degrees to 180 degrees
48
- - fwdx1827: spin object on x-axis from 180 degrees to 270 degrees
49
- - fwdx2736: spin object on x-axis from 270 degrees to 360 degrees
50
- - fwdy018: spin object on y-axis from 0 degrees to 180 degrees
51
- - fwdy1836: spin object on y-axis from 180 degrees to 360 degrees
52
- - fwdy09: spin object on y-axis from 0 degrees to 90 degrees
53
- - fwdy918: spin object on y-axis from 90 degrees to 180 degrees
54
- - fwdy1827: spin object on y-axis from 180 degrees to 270 degrees
55
- - fwdy2736: spin object on y-axis from 270 degrees to 360 degrees
56
- - floatX: float object so is not stationary
57
- - floatShadow: float object + add shadow
58
- - pulseSM: pulse object Small
59
- - pulseMD: pulse object Medium
60
- - pulseLG: pulse object Large
61
- - noAnim: no animation place holder
62
-
63
- <>
64
-
65
- GLOBAL CONFIG
66
-
67
- ```typescript
68
- // EXAMPLE GLOBAL FACE CONFIG
69
- // This will be applied to all Faces that do not have their own custom config
70
- const global: object = {
71
- // // face individual styles (over rides global)
72
- css: `
73
- border: 1px solid #fff;
74
- background: rgb(2,0,36);
75
- background: linear-gradient(180deg, rgba(255,255,255,.1) 0%, rgba(141,191,249,.7) 100%);
76
- color:white;
77
- text-align:center;
78
- line-height:10;
79
- backface-visibility: visible;
80
- font-family: Arial, Helvetica, sans-serif;
81
- border-radius:5px;
82
- `,
83
- body: ' ',
84
- }
85
- ```
86
-
87
- <>
88
-
89
- CUSTOM CONFIG FOR INDIVIDUAL FACES
90
-
91
- ```typescript
92
- const custom: object = {
93
- // // face individual styles (over rides global)
94
- front: {
95
- css: ``,
96
- body: <Login />,
97
- },
98
- left: {
99
- css: `
100
- border: 1px solid #fff;
101
- background: rgb(2,0,36);
102
- color:white;
103
- text-align: center;
104
- line-height:8;`
105
- body: " ",
106
- },
107
- right: {
108
- css: ``,
109
- body: " ",
110
- },
111
- back: {
112
- css: ``,
113
- body: <Logout />,
114
- },
115
- bottom: {
116
- css: `
117
- background-color:rgba(141,191,249,1);
118
- -webkit-box-shadow: 0px 0px 23px 18px #858585;
119
- box-shadow: 0px 0px 23px 18px #858585;
120
- `,
121
- },
122
- ```
123
-
124
- ## Render
125
-
126
- and
127
-
128
- ```typescript
129
- <Cuboid
130
- width={250}
131
- height={300}
132
- depth={250}
133
- perspective={800}
134
- perspectiveOrigin='50% 50%'
135
- zIndex={10}
136
- anim1Specs={anim1Specs}
137
- anim2Specs={anim2Specs}
138
- custom={custom}
139
- faces={faceprops}
140
- global={global}
141
- />
142
- ```
143
-
144
- will produce the following
145
-
146
- ![Logo](https://raw.githubusercontent.com/mdnelles/objs-local/main/img.png?token=GHSAT0AAAAAABQVNJ4VATWQM4SI3LXSTDZWYVDOL7Q)
147
-
148
- ## Authors
149
-
150
- - [@mdnelles](https://github.com/mdnelles)
151
-
152
- ## License
153
-
154
- [MIT](https://choosealicense.com/licenses/mit/)
1
+ # React Typescript Cuboid Builder
2
+
3
+ This project allows a user to create Cuboids of any size simply by entering a set of parameters.
4
+ The program does the leg work with regard to calculating translationZ depth and config on the fly.
5
+
6
+ - [GIT HOME](https://github.com/mdnelles/anim-3d-objs-launcher)
7
+ - [NPM HOME](https://www.npmjs.com/package/anim-3d-obj) npm i anim-3d-obj
8
+
9
+ ## Examples
10
+
11
+ - [6 sided Cuboid - animate X360 Y360](https://codesandbox.io/s/anim-3d-obj-all-sides-simple-bf67yg)
12
+ - [3 sided Object - animate y-axis](https://codesandbox.io/s/anim-3d-obj-3-sides-wobble-y-axis-wglkms)
13
+ - [Double box spin](https://codesandbox.io/s/react-anim-3d-double-box-spin-vbdhg2)
14
+ - [2 sided object with animation wobble](https://codesandbox.io/s/anim-3d-obj-wobblex-mmidkg)
15
+ - [Parallel divs animated x and y axis in tandem](https://codesandbox.io/s/anim-3d-obj-2-sides-simple-4057y7)
16
+ - [Spinning Slab](https://codesandbox.io/s/react-anim-3d-pulse-kc8g0f)
17
+ - [GIT HOME](https://github.com/mdnelles/anim-3d-objs-launcher)
18
+ - [NPM HOME](https://www.npmjs.com/package/anim-3d-obj) npm i anim-3d-obj
19
+
20
+ ## Examples
21
+
22
+ - [6 sided Cuboid - animate X360 Y360](https://codesandbox.io/s/anim-3d-obj-all-sides-simple-bf67yg)
23
+ - [3 sided Object - animate y-axis](https://codesandbox.io/s/anim-3d-obj-3-sides-wobble-y-axis-wglkms)
24
+ - [Double box spin](https://codesandbox.io/s/react-anim-3d-double-box-spin-vbdhg2)
25
+ - [2 sided object with animation wobble](https://codesandbox.io/s/anim-3d-obj-wobblex-mmidkg)
26
+ - [Parallel divs animated x and y axis in tandem](https://codesandbox.io/s/anim-3d-obj-2-sides-simple-4057y7)
27
+ - [Spinning Slab](https://codesandbox.io/s/react-anim-3d-pulse-kc8g0f)
28
+
29
+ ## Config
30
+
31
+ Animations are optional. Either or both of `anim1Specs` or `anim2Specs` can be applied to the object.
32
+
33
+ ```typescript
34
+ const anim1Specs: object = {
35
+
36
+ border: '', // while testing reveal the animation wrapper
37
+ degreesHi: -45, // degrees if spin
38
+ degreesLow: 45, // degrees if spin
39
+ delay: 0, // start delay in seconds
40
+ direction: 'normal', //normal alternating reverse
41
+ duration: 8, // seconds
42
+ fillMode: 'forward', // node forward backward both
43
+ iterationCount: 'infinite', // number or infinte
44
+ name: 'Y360', // ** ANIMATIONS
45
+ timing: 'ease-in-out', // linear ease ease-in-out
46
+ }
47
+ =======
48
+ border: "", // while testing reveal the animation wrapper
49
+ degreesHi: -45, // degrees if spin
50
+ degreesLow: 45, // degrees if spin
51
+ delay: 0, // start delay in seconds
52
+ direction: "normal", //normal alternating reverse
53
+ duration: 8, // seconds
54
+ fillMode: "forward", // node forward backward both
55
+ iterationCount: "infinite", // number or infinte
56
+ name: "Y360", // ** ANIMATIONS
57
+ timing: "ease-in-out", // linear ease ease-in-out
58
+ };
59
+ ```
60
+
61
+ `** ANIMATIONS`
62
+
63
+ - X360: rotate 360 degrees on the x-axis
64
+ - Y360: rotate 360 degrees on the y-axis
65
+ - fadeInkf: fade object in from 0 to 1 Opacity
66
+ - wobY: wobble on y-axis (degreesHi <-> degreesLow)
67
+ - wobX: wobble on x-axis (degreesHi <-> degreesLow)
68
+ - fwdx018: spin object on x-axis from 0 degrees to 180 degrees
69
+ - fwdx1836: spin object on x-axis from 180 degrees to 360 degrees
70
+ - fwdx09: spin object on x-axis from 0 degrees to 90 degrees
71
+ - fwdx918: spin object on x-axis from 90 degrees to 180 degrees
72
+ - fwdx1827: spin object on x-axis from 180 degrees to 270 degrees
73
+ - fwdx2736: spin object on x-axis from 270 degrees to 360 degrees
74
+ - fwdy018: spin object on y-axis from 0 degrees to 180 degrees
75
+ - fwdy1836: spin object on y-axis from 180 degrees to 360 degrees
76
+ - fwdy09: spin object on y-axis from 0 degrees to 90 degrees
77
+ - fwdy918: spin object on y-axis from 90 degrees to 180 degrees
78
+ - fwdy1827: spin object on y-axis from 180 degrees to 270 degrees
79
+ - fwdy2736: spin object on y-axis from 270 degrees to 360 degrees
80
+ - floatX: float object so is not stationary
81
+ - floatShadow: float object + add shadow
82
+ - pulseSM: pulse object Small
83
+ - pulseMD: pulse object Medium
84
+ - pulseLG: pulse object Large
85
+ - # noAnim: no animation place holder
86
+ - X360: rotate 360 degrees on the x-axis
87
+ - Y360: rotate 360 degrees on the y-axis
88
+ - fadeInkf: fade object in from 0 to 1 Opacity
89
+ - wobY: wobble on y-axis (degreesHi <-> degreesLow)
90
+ - wobX: wobble on x-axis (degreesHi <-> degreesLow)
91
+ - fwdx018: spin object on x-axis from 0 degrees to 180 degrees
92
+ - fwdx1836: spin object on x-axis from 180 degrees to 360 degrees
93
+ - fwdx09: spin object on x-axis from 0 degrees to 90 degrees
94
+ - fwdx918: spin object on x-axis from 90 degrees to 180 degrees
95
+ - fwdx1827: spin object on x-axis from 180 degrees to 270 degrees
96
+ - fwdx2736: spin object on x-axis from 270 degrees to 360 degrees
97
+ - fwdy018: spin object on y-axis from 0 degrees to 180 degrees
98
+ - fwdy1836: spin object on y-axis from 180 degrees to 360 degrees
99
+ - fwdy09: spin object on y-axis from 0 degrees to 90 degrees
100
+ - fwdy918: spin object on y-axis from 90 degrees to 180 degrees
101
+ - fwdy1827: spin object on y-axis from 180 degrees to 270 degrees
102
+ - fwdy2736: spin object on y-axis from 270 degrees to 360 degrees
103
+ - floatX: float object so is not stationary
104
+ - floatShadow: float object + add shadow
105
+ - pulseSM: pulse object Small
106
+ - pulseMD: pulse object Medium
107
+ - pulseLG: pulse object Large
108
+ - noAnim: no animation place holder
109
+
110
+ <>
111
+
112
+ GLOBAL CONFIG
113
+
114
+ ```typescript
115
+ // EXAMPLE GLOBAL FACE CONFIG
116
+ // This will be applied to all Faces that do not have their own custom config
117
+ const global: object = {
118
+
119
+ // // face individual styles (over rides global)
120
+ css: `
121
+ =======
122
+ // // face individual styles (over rides global)
123
+ css: `
124
+
125
+ border: 1px solid #fff;
126
+ background: rgb(2,0,36);
127
+ background: linear-gradient(180deg, rgba(255,255,255,.1) 0%, rgba(141,191,249,.7) 100%);
128
+ color:white;
129
+ text-align:center;
130
+ line-height:10;
131
+ backface-visibility: visible;
132
+ font-family: Arial, Helvetica, sans-serif;
133
+ border-radius:5px;
134
+ `,
135
+
136
+ body: ' ',
137
+ }
138
+ =======
139
+ body: " ",
140
+ };
141
+ ```
142
+
143
+ <>
144
+
145
+ CUSTOM CONFIG FOR INDIVIDUAL FACES
146
+
147
+ ```typescript
148
+ const custom: object = {
149
+ // // face individual styles (over rides global)
150
+ front: {
151
+ css: ``,
152
+ body: <Login />,
153
+ },
154
+ left: {
155
+ css: `
156
+ border: 1px solid #fff;
157
+ background: rgb(2,0,36);
158
+ color:white;
159
+ text-align: center;
160
+ line-height:8;`
161
+ body: " ",
162
+ },
163
+ right: {
164
+ css: ``,
165
+ body: " ",
166
+ },
167
+ back: {
168
+ css: ``,
169
+ body: <Logout />,
170
+ },
171
+ bottom: {
172
+ css: `
173
+ background-color:rgba(141,191,249,1);
174
+ -webkit-box-shadow: 0px 0px 23px 18px #858585;
175
+ box-shadow: 0px 0px 23px 18px #858585;
176
+ `,
177
+ },
178
+ ```
179
+
180
+ ## Render
181
+
182
+ and
183
+
184
+ ```typescript
185
+ <Cuboid
186
+ width={250}
187
+ height={300}
188
+ depth={250}
189
+ perspective={800}
190
+ perspectiveOrigin='50% 50%'
191
+ zIndex={10}
192
+ anim1Specs={anim1Specs}
193
+ anim2Specs={anim2Specs}
194
+ custom={custom}
195
+ faces={faceprops}
196
+ global={global}
197
+ =======
198
+ width={250}
199
+ height={300}
200
+ depth={250}
201
+ perspective={800}
202
+ perspectiveOrigin='50% 50%'
203
+ zIndex={10}
204
+ anim1Specs={anim1Specs}
205
+ anim2Specs={anim2Specs}
206
+ custom={custom}
207
+ faces={faceprops}
208
+ global={global}
209
+ />
210
+ ```
211
+
212
+ will produce the following
213
+
214
+ ![Logo](https://raw.githubusercontent.com/mdnelles/objs-local/main/img.png?token=GHSAT0AAAAAABQVNJ4VATWQM4SI3LXSTDZWYVDOL7Q)
215
+
216
+ ## Authors
217
+
218
+ - # [@mdnelles](https://github.com/mdnelles)
219
+ - [@mdnelles](https://github.com/mdnelles)
220
+
221
+ ## License
222
+
223
+ [MIT](https://choosealicense.com/licenses/mit/)
@@ -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,19 @@
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
+ const react_1 = __importDefault(require("react"));
8
+ const Button = (props) => {
9
+ const { children, backgroundColor, color, style } = props;
10
+ let _style = style || {};
11
+ /** Override Defaults */
12
+ if (backgroundColor && _style)
13
+ _style.backgroundColor = backgroundColor;
14
+ if (color && _style)
15
+ _style.color = color;
16
+ return (react_1.default.createElement("button", Object.assign({ style: _style }, props), children));
17
+ };
18
+ exports.Button = Button;
19
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAOnB,MAAM,MAAM,GAA0C,CAAC,KAAK,EAAE,EAAE;IACnE,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,CACH,wDAAQ,KAAK,EAAE,MAAM,IAAM,KAAK,GAC3B,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC;AAdW,QAAA,MAAM,UAcjB"}
@@ -1,3 +1,3 @@
1
1
  import { FaceProps } from './FaceInter';
2
- declare const Face: (props: FaceProps) => any;
2
+ declare const Face: (props: FaceProps) => JSX.Element;
3
3
  export default Face;
@@ -8,7 +8,7 @@ const react_1 = __importDefault(require("react"));
8
8
  const Face = (props) => {
9
9
  let { depth = 10, faceType, global = {}, height = 10, custom = false, tranz = 80, width = 100 } = props;
10
10
  let transform;
11
- const styles = !!custom[faceType] && !!custom[faceType].css ? custom[faceType].css : global.css;
11
+ let styles = !!custom[faceType] && !!custom[faceType].css ? custom[faceType].css : global.css;
12
12
  const body = !!custom[faceType] && !!custom[faceType].body ? custom[faceType].body : global.body;
13
13
  if (faceType === 'bottom') {
14
14
  tranz = +height - +depth / 2;
@@ -46,6 +46,14 @@ const Face = (props) => {
46
46
  width = +depth;
47
47
  }
48
48
  transform = `transform: rotateY(90deg) translateZ(${tranz}px);`;
49
+ // topr is to of Ribbon which points back
50
+ }
51
+ else if (faceType === 'topr') {
52
+ height = +depth;
53
+ if (!!depth)
54
+ tranz = +depth / 2;
55
+ //let offset = depth / 2;
56
+ transform = `transform: rotateX(90deg) translateZ(${tranz}px ); `;
49
57
  }
50
58
  else {
51
59
  if (height > width && !depth) {
@@ -62,7 +70,8 @@ const Face = (props) => {
62
70
  }
63
71
  transform = `transform: rotateY(-90deg) translateZ(${tranz}px);`;
64
72
  }
65
- const Specs = styled_components_1.default.div `
73
+ //const BackFlip: any = styled.section``;
74
+ const Specs = styled_components_1.default.section `
66
75
  ${styles}
67
76
  width: ${width}px;
68
77
  position: absolute;
@@ -1 +1 @@
1
- {"version":3,"file":"Face.js","sourceRoot":"","sources":["../../../../src/components/Faces/Face.tsx"],"names":[],"mappings":";;;;;AAAA,0EAAuC;AACvC,kDAA0B;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,CAAC,MAAM,CAAC,IAAI,CAAC;IAEjG,IAAI,QAAQ,KAAK,QAAQ,EAAE;QACvB,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;QAC7B,MAAM,GAAG,CAAC,KAAK,CAAC;QAChB,SAAS,GAAG,yCAAyC,KAAK,MAAM,CAAC;QACjE,6CAA6C;KAChD;SAAM,IAAI,QAAQ,KAAK,KAAK,EAAE;QAC3B,MAAM,GAAG,CAA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C,KAAK,CAAC;SAClB;QACD,SAAS,GAAG,wCAAwC,KAAK,MAAM,CAAC;QAChE,yCAAyC;KAC5C;SAAM,IAAI,QAAQ,KAAK,MAAM,EAAE;QAC5B,MAAM,GAAG,CAAC,KAAK,CAAC;QAChB,IAAI,CAAC,CAAC,KAAK;YAAE,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;QAChC,yBAAyB;QACzB,SAAS,GAAG,wCAAwC,KAAK,SAAS,CAAC;KACtE;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,yCAAyC;IAEzC,MAAM,KAAK,GAAQ,2BAAM,CAAC,OAAO,CAAA;UAC3B,MAAM;iBACC,KAAK;;kBAEJ,MAAM;UACd,SAAS;KACd,CAAC;IAEF,OAAO,8BAAC,KAAK,QAAE,IAAI,CAAS,CAAC;AACjC,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC"}
@@ -1,2 +1,5 @@
1
- export * from './Cuboid';
1
+ export * from './Button';
2
+ export * from './Faces/Face';
2
3
  export * from './Card';
4
+ export * from './Cuboid';
5
+ export * from './Ribbon';
@@ -14,6 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Cuboid"), exports);
17
+ __exportStar(require("./Button"), exports);
18
+ __exportStar(require("./Faces/Face"), exports);
18
19
  __exportStar(require("./Card"), exports);
20
+ __exportStar(require("./Cuboid"), exports);
21
+ __exportStar(require("./Ribbon"), exports);
19
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B;AAC7B,yCAAuB;AACvB,2CAAyB;AACzB,2CAAyB"}
@@ -11,7 +11,6 @@ const SceneStyle = (props) => {
11
11
  const SceneStyleDiv = styled_components_1.default.div `
12
12
  width: ${width}px;
13
13
  height: ${height}px;
14
-
15
14
  -webkit-perspective: ${perspective}px;
16
15
  perspective: ${perspective}px;
17
16
  -webkit-perspective-origin: ${perspectiveOrigin};
@@ -1 +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;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,2BAAM,CAAC,GAAG,CAAA;iBACxB,KAAK;kBACJ,MAAM;;+BAEO,WAAW;uBACnB,WAAW;sCACI,iBAAiB;8BACzB,iBAAiB;KAC1C,CAAC;IAEF,OAAO,CACH,uCAAK,KAAK,EAAE,EAAE,MAAM,EAAE;QAClB,8BAAC,aAAa,QAAE,QAAQ,CAAiB,CACvC,CACT,CAAC;AACN,CAAC,CAAC;AAlBW,QAAA,UAAU,cAkBrB"}
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;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,2BAAM,CAAC,GAAG,CAAA;iBACxB,KAAK;kBACJ,MAAM;+BACO,WAAW;uBACnB,WAAW;sCACI,iBAAiB;8BACzB,iBAAiB;KAC1C,CAAC;IAEF,OAAO,CACH,uCAAK,KAAK,EAAE,EAAE,MAAM,EAAE;QAClB,8BAAC,aAAa,QAAE,QAAQ,CAAiB,CACvC,CACT,CAAC;AACN,CAAC,CAAC;AAjBW,QAAA,UAAU,cAiBrB"}
package/dist/cjs/index.js CHANGED
@@ -14,5 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ //export * from './hooks';
18
+ //export * from './library';
17
19
  __exportStar(require("./components"), exports);
18
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0BAA0B;AAC1B,4BAA4B;AAC5B,+CAA6B"}
@@ -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,12 @@
1
+ import React from 'react';
2
+ export const Button = (props) => {
3
+ const { children, backgroundColor, color, style } = props;
4
+ let _style = style || {};
5
+ /** Override Defaults */
6
+ if (backgroundColor && _style)
7
+ _style.backgroundColor = backgroundColor;
8
+ if (color && _style)
9
+ _style.color = color;
10
+ return (React.createElement("button", Object.assign({ style: _style }, props), children));
11
+ };
12
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,CAAC,MAAM,MAAM,GAA0C,CAAC,KAAK,EAAE,EAAE;IACnE,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,CACH,8CAAQ,KAAK,EAAE,MAAM,IAAM,KAAK,GAC3B,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { FaceProps } from './FaceInter';
2
- declare const Face: (props: FaceProps) => any;
2
+ declare const Face: (props: FaceProps) => JSX.Element;
3
3
  export default Face;
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  const Face = (props) => {
4
4
  let { depth = 10, faceType, global = {}, height = 10, custom = false, tranz = 80, width = 100 } = props;
5
5
  let transform;
6
- const styles = !!custom[faceType] && !!custom[faceType].css ? custom[faceType].css : global.css;
6
+ let styles = !!custom[faceType] && !!custom[faceType].css ? custom[faceType].css : global.css;
7
7
  const body = !!custom[faceType] && !!custom[faceType].body ? custom[faceType].body : global.body;
8
8
  if (faceType === 'bottom') {
9
9
  tranz = +height - +depth / 2;
@@ -41,6 +41,14 @@ const Face = (props) => {
41
41
  width = +depth;
42
42
  }
43
43
  transform = `transform: rotateY(90deg) translateZ(${tranz}px);`;
44
+ // topr is to of Ribbon which points back
45
+ }
46
+ else if (faceType === 'topr') {
47
+ height = +depth;
48
+ if (!!depth)
49
+ tranz = +depth / 2;
50
+ //let offset = depth / 2;
51
+ transform = `transform: rotateX(90deg) translateZ(${tranz}px ); `;
44
52
  }
45
53
  else {
46
54
  if (height > width && !depth) {
@@ -57,7 +65,8 @@ const Face = (props) => {
57
65
  }
58
66
  transform = `transform: rotateY(-90deg) translateZ(${tranz}px);`;
59
67
  }
60
- const Specs = styled.div `
68
+ //const BackFlip: any = styled.section``;
69
+ const Specs = styled.section `
61
70
  ${styles}
62
71
  width: ${width}px;
63
72
  position: absolute;
@@ -1 +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,G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K,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,yCAAyC;IAEzC,MAAM,KAAK,GAAQ,MAAM,CAAC,OAAO,CAAA;UAC3B,MAAM;iBACC,KAAK;;kBAEJ,MAAM;UACd,SAAS;KACd,CAAC;IAEF,OAAO,oBAAC,KAAK,QAAE,IAAI,CAAS,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,2 +1,5 @@
1
- export * from './Cuboid';
1
+ export * from './Button';
2
+ export * from './Faces/Face';
2
3
  export * from './Card';
4
+ export * from './Cuboid';
5
+ export * from './Ribbon';
@@ -1,3 +1,6 @@
1
- export * from './Cuboid';
1
+ export * from './Button';
2
+ export * from './Faces/Face';
2
3
  export * from './Card';
4
+ export * from './Cuboid';
5
+ export * from './Ribbon';
3
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -5,7 +5,6 @@ export const SceneStyle = (props) => {
5
5
  const SceneStyleDiv = styled.div `
6
6
  width: ${width}px;
7
7
  height: ${height}px;
8
-
9
8
  -webkit-perspective: ${perspective}px;
10
9
  perspective: ${perspective}px;
11
10
  -webkit-perspective-origin: ${perspectiveOrigin};
@@ -1 +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"}
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;+BACO,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.js CHANGED
@@ -1,2 +1,4 @@
1
+ //export * from './hooks';
2
+ //export * from './library';
1
3
  export * from './components';
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,4BAA4B;AAC5B,cAAc,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,48 +1,41 @@
1
1
  {
2
- "name": "anim-3d-obj",
3
- "repository": {
4
- "type": "git",
5
- "url": "https://github.com/mdnelles/Component-Library"
6
- },
7
- "homepage": "https://github.com/mdnelles/anim-3d-objs-launchers",
8
- "version": "1.1.21",
9
- "description": "React library for creating 3D objects quickly. Also these objects can be animated",
10
- "main": "dist/cjs/index.js",
11
- "module": "dist/esm/index.js",
12
- "files": [
13
- "dist"
14
- ],
15
- "scripts": {
16
- "build": "rm -rf dist/ && prettier --write src/ && npm run build:esm && npm run build:cjs",
17
- "build:esm": "tsc",
18
- "build:cjs": "tsc --module CommonJS --outDir dist/cjs"
19
- },
20
- "author": "mdnelles",
21
- "license": "MIT",
22
- "devDependencies": {
23
- "@types/node": "^17.0.21",
24
- "@types/react": "^17.0.37",
25
- "@types/react-dom": "^17.0.11",
26
- "@types/styled-components": "^5.1.25",
27
- "react": "^18.2.0",
28
- "react-dom": "^18.2.0",
29
- "typescript": "^4.5.2"
30
- },
31
- "peerDependencies": {
32
- "react": "^18.2.0",
33
- "react-dom": "^18.2.0"
34
- },
35
- "dependencies": {
36
- "styled-components": "^5.3.5"
37
- },
38
- "keywords": [
39
- "React",
40
- "CSS",
41
- "style",
42
- "animation",
43
- "cube",
44
- "cuboid",
45
- "3d",
46
- "webGL"
47
- ]
2
+ "name": "anim-3d-obj",
3
+ "repository": {
4
+ "type": "git",
5
+ "url": "https://github.com/mdnelles/anim-3d-objs",
6
+ "homepage": "https://github.com/mdnelles/anim-3d-objs/blob/main/README.md"
7
+ },
8
+ "version": "1.1.25",
9
+ "description": "A component library for getting people started with easy to re-use components for everyday projects.",
10
+ "main": "dist/cjs/index.js",
11
+ "module": "dist/esm/index.js",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "scripts": {
16
+ "build": "rm -rf dist/ && prettier --write src/ && npm run build:esm && npm run build:cjs",
17
+ "build:esm": "tsc",
18
+ "build:cjs": "tsc --module CommonJS --outDir dist/cjs"
19
+ },
20
+ "author": "mnelles",
21
+ "license": "MIT",
22
+ "devDependencies": {
23
+ "@types/node": "^18.7.8",
24
+ "@types/react": "^18.0.17",
25
+ "@types/react-dom": "^18.0.6",
26
+ "@types/styled-components": "^5.1.26",
27
+ "react": "^18.2.0",
28
+ "react-dom": "^18.2.0",
29
+ "typescript": "^4.7.4",
30
+ "styled-components": "^5.3.5"
31
+ },
32
+ "peerDependencies": {
33
+ "react": "^18.2.0",
34
+ "react-dom": "^18.2.0",
35
+ "styled-components": "^5.3.5"
36
+ },
37
+ "dependencies": {
38
+ "release-it": "^15.3.0",
39
+ "styled-components": "^5.3.5"
40
+ }
48
41
  }