anim-3d-obj 1.1.29 → 1.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,75 +3,37 @@
3
3
  This project allows a user to create Cuboids of any size simply by entering a set of parameters.
4
4
  The program does the leg work with regard to calculating translationZ depth and config on the fly.
5
5
 
6
- - [GIT HOME](https://github.com/mdnelles/anim-3d-objs)
7
- - [NPM HOME](https://www.npmjs.com/package/anim-3d-obj) npm i anim-3d-obj
8
-
9
6
  ## Examples
10
7
 
11
- - [6 sided Cuboid - animate X360 Y360](https://codesandbox.io/s/anim-3d-obj-all-sides-simple-bf67yg-tzr2v6?file=/src/index.js)
8
+ - [6 sided Cuboid - animate X360 Y360](https://codesandbox.io/s/anim-3d-obj-all-sides-simple-bf67yg-tzr2v6)
12
9
  - [3 sided Object - animate y-axis](https://codesandbox.io/s/anim-3d-obj-3-sides-wobble-y-axis-wglkms)
13
10
  - [Double box spin](https://codesandbox.io/s/react-anim-3d-double-box-spin-vbdhg2)
14
11
  - [2 sided object with animation wobble](https://codesandbox.io/s/anim-3d-obj-2-sided-anim-wobble-e14v3b)
15
12
  - [Parallel divs animated x and y axis in tandem](https://codesandbox.io/s/anim-3d-obj-2-sides-simple-4057y7)
16
13
  - [Spinning Slab](https://codesandbox.io/s/react-anim-3d-pulse-kc8g0f)
14
+ - [Double animation] (https://codesandbox.io/s/react-anim-3d-double-animation-kexyzk)
17
15
 
18
16
  ## Config
19
17
 
20
- Animations are optional. Either or both of `anim1Specs` or `anim2Specs` can be applied to the object.
18
+ Animations are optional. Either or both of `anim1Specs` or `anim2Specs` can be applied to the object. Both could be used if you want to apply animations on the X and Y axis.
21
19
 
22
20
  ```typescript
23
21
  const anim1Specs: object = {
24
-
25
- border: '', // while testing reveal the animation wrapper
26
- degreesHi: -45, // degrees if spin
27
- degreesLow: 45, // degrees if spin
28
- delay: 0, // start delay in seconds
29
- direction: 'normal', //normal alternating reverse
30
- duration: 8, // seconds
31
- fillMode: 'forward', // node forward backward both
32
- iterationCount: 'infinite', // number or infinte
33
- name: 'Y360', // ** ANIMATIONS
34
- timing: 'ease-in-out', // linear ease ease-in-out
35
- }
36
- =======
37
- border: "", // while testing reveal the animation wrapper
38
- degreesHi: -45, // degrees if spin
39
- degreesLow: 45, // degrees if spin
40
- delay: 0, // start delay in seconds
41
- direction: "normal", //normal alternating reverse
42
- duration: 8, // seconds
43
- fillMode: "forward", // node forward backward both
44
- iterationCount: "infinite", // number or infinte
45
- name: "Y360", // ** ANIMATIONS
46
- timing: "ease-in-out", // linear ease ease-in-out
22
+ border: '', // while testing reveal the animation wrapper
23
+ degreesHi: -45, // degrees if spin
24
+ degreesLow: 45, // degrees if spin
25
+ delay: 0, // start delay in seconds
26
+ direction: 'normal', //normal alternating reverse
27
+ duration: 8, // seconds
28
+ fillMode: 'forward', // node forward backward both
29
+ iterationCount: 'infinite', // number or infinte
30
+ name: 'Y360', // ** ANIMATIONS
31
+ timing: 'ease-in-out' // linear ease ease-in-out
47
32
  };
48
33
  ```
49
34
 
50
35
  `** ANIMATIONS`
51
36
 
52
- - X360: rotate 360 degrees on the x-axis
53
- - Y360: rotate 360 degrees on the y-axis
54
- - fadeInkf: fade object in from 0 to 1 Opacity
55
- - wobY: wobble on y-axis (degreesHi <-> degreesLow)
56
- - wobX: wobble on x-axis (degreesHi <-> degreesLow)
57
- - fwdx018: spin object on x-axis from 0 degrees to 180 degrees
58
- - fwdx1836: spin object on x-axis from 180 degrees to 360 degrees
59
- - fwdx09: spin object on x-axis from 0 degrees to 90 degrees
60
- - fwdx918: spin object on x-axis from 90 degrees to 180 degrees
61
- - fwdx1827: spin object on x-axis from 180 degrees to 270 degrees
62
- - fwdx2736: spin object on x-axis from 270 degrees to 360 degrees
63
- - fwdy018: spin object on y-axis from 0 degrees to 180 degrees
64
- - fwdy1836: spin object on y-axis from 180 degrees to 360 degrees
65
- - fwdy09: spin object on y-axis from 0 degrees to 90 degrees
66
- - fwdy918: spin object on y-axis from 90 degrees to 180 degrees
67
- - fwdy1827: spin object on y-axis from 180 degrees to 270 degrees
68
- - fwdy2736: spin object on y-axis from 270 degrees to 360 degrees
69
- - floatX: float object so is not stationary
70
- - floatShadow: float object + add shadow
71
- - pulseSM: pulse object Small
72
- - pulseMD: pulse object Medium
73
- - pulseLG: pulse object Large
74
- - # noAnim: no animation place holder
75
37
  - X360: rotate 360 degrees on the x-axis
76
38
  - Y360: rotate 360 degrees on the y-axis
77
39
  - fadeInkf: fade object in from 0 to 1 Opacity
@@ -95,118 +57,3 @@ const anim1Specs: object = {
95
57
  - pulseMD: pulse object Medium
96
58
  - pulseLG: pulse object Large
97
59
  - noAnim: no animation place holder
98
-
99
- <>
100
-
101
- GLOBAL CONFIG
102
-
103
- ```typescript
104
- // EXAMPLE GLOBAL FACE CONFIG
105
- // This will be applied to all Faces that do not have their own custom config
106
- const global: object = {
107
-
108
- // // face individual styles (over rides global)
109
- css: `
110
- =======
111
- // // face individual styles (over rides global)
112
- css: `
113
-
114
- border: 1px solid #fff;
115
- background: rgb(2,0,36);
116
- background: linear-gradient(180deg, rgba(255,255,255,.1) 0%, rgba(141,191,249,.7) 100%);
117
- color:white;
118
- text-align:center;
119
- line-height:10;
120
- backface-visibility: visible;
121
- font-family: Arial, Helvetica, sans-serif;
122
- border-radius:5px;
123
- `,
124
-
125
- body: ' ',
126
- }
127
- =======
128
- body: " ",
129
- };
130
- ```
131
-
132
- <>
133
-
134
- CUSTOM CONFIG FOR INDIVIDUAL FACES
135
-
136
- ```typescript
137
- const custom: object = {
138
- // // face individual styles (over rides global)
139
- front: {
140
- css: ``,
141
- body: <Login />,
142
- },
143
- left: {
144
- css: `
145
- border: 1px solid #fff;
146
- background: rgb(2,0,36);
147
- color:white;
148
- text-align: center;
149
- line-height:8;`
150
- body: " ",
151
- },
152
- right: {
153
- css: ``,
154
- body: " ",
155
- },
156
- back: {
157
- css: ``,
158
- body: <Logout />,
159
- },
160
- bottom: {
161
- css: `
162
- background-color:rgba(141,191,249,1);
163
- -webkit-box-shadow: 0px 0px 23px 18px #858585;
164
- box-shadow: 0px 0px 23px 18px #858585;
165
- `,
166
- },
167
- ```
168
-
169
- ## Render
170
-
171
- and
172
-
173
- ```typescript
174
- <Cuboid
175
- width={250}
176
- height={300}
177
- depth={250}
178
- perspective={800}
179
- perspectiveOrigin='50% 50%'
180
- zIndex={10}
181
- anim1Specs={anim1Specs}
182
- anim2Specs={anim2Specs}
183
- custom={custom}
184
- faces={faceprops}
185
- global={global}
186
- =======
187
- width={250}
188
- height={300}
189
- depth={250}
190
- perspective={800}
191
- perspectiveOrigin='50% 50%'
192
- zIndex={10}
193
- anim1Specs={anim1Specs}
194
- anim2Specs={anim2Specs}
195
- custom={custom}
196
- faces={faceprops}
197
- global={global}
198
- />
199
- ```
200
-
201
- will produce the following
202
-
203
- ![Logo](https://raw.githubusercontent.com/mdnelles/objs-local/main/img.png?token=GHSAT0AAAAAABQVNJ4VATWQM4SI3LXSTDZWYVDOL7Q)
204
-
205
- ## Authors
206
-
207
- - # [@mdnelles](https://github.com/mdnelles)
208
- - [@mdnelles](https://github.com/mdnelles)
209
-
210
- ## License
211
-
212
- [MIT](https://choosealicense.com/licenses/mit/)
@@ -98,8 +98,8 @@ const allAnims = (props) => {
98
98
  transform: rotateX(0deg);
99
99
  }
100
100
  to {
101
- -webkit-transform: rotateX(90deg);
102
- transform: rotateX(90deg);
101
+ -webkit-transform: rotateX(-90deg);
102
+ transform: rotateX(-90deg);
103
103
  }`;
104
104
  const fwdx918 = (0, styled_components_1.keyframes) `
105
105
  from {
@@ -182,8 +182,8 @@ const allAnims = (props) => {
182
182
  transform: rotateY(0deg);
183
183
  }
184
184
  to {
185
- -webkit-transform: rotateY(90deg);
186
- transform: rotateY(90deg);
185
+ -webkit-transform: rotateY(-90deg);
186
+ transform: rotateY(-90deg);
187
187
  }`;
188
188
  const fwdy918 = (0, styled_components_1.keyframes) `
189
189
  from {
@@ -95,8 +95,8 @@ export const allAnims = (props) => {
95
95
  transform: rotateX(0deg);
96
96
  }
97
97
  to {
98
- -webkit-transform: rotateX(90deg);
99
- transform: rotateX(90deg);
98
+ -webkit-transform: rotateX(-90deg);
99
+ transform: rotateX(-90deg);
100
100
  }`;
101
101
  const fwdx918 = keyframes `
102
102
  from {
@@ -179,8 +179,8 @@ export const allAnims = (props) => {
179
179
  transform: rotateY(0deg);
180
180
  }
181
181
  to {
182
- -webkit-transform: rotateY(90deg);
183
- transform: rotateY(90deg);
182
+ -webkit-transform: rotateY(-90deg);
183
+ transform: rotateY(-90deg);
184
184
  }`;
185
185
  const fwdy918 = keyframes `
186
186
  from {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "https://github.com/mdnelles/anim-3d-objs",
6
6
  "homepage": "https://github.com/mdnelles/anim-3d-objs/blob/main/README.md"
7
7
  },
8
- "version": "1.1.29",
8
+ "version": "1.1.32",
9
9
  "description": "A component library for getting people started with easy to re-use components for everyday projects.",
10
10
  "main": "dist/cjs/index.js",
11
11
  "module": "dist/esm/index.js",