anim-3d-obj 1.1.65 → 1.1.67
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
|
@@ -10,13 +10,14 @@ The program does the leg work with regard to calculating translationZ depth and
|
|
|
10
10
|
- [Double box spin](https://codesandbox.io/s/react-anim-3d-double-box-spin-vbdhg2)
|
|
11
11
|
- [Floating Ribbon](https://codesandbox.io/s/cocky-butterfly-ygwkps)
|
|
12
12
|
- [Parallel divs animated x and y axis in tandem](https://codesandbox.io/s/anim-3d-obj-2-sides-simple-4057y7)
|
|
13
|
+
- [Obj Skeleton](https://codesandbox.io/s/anim-3d-obj-skeleton-5dlk70)
|
|
13
14
|
|
|
14
15
|
## Config
|
|
15
16
|
|
|
16
17
|
Animations are optional. Either or both of `anim1Specs` or `anim2Specs` can be applied to the object.
|
|
17
18
|
|
|
18
19
|
```typescript
|
|
19
|
-
const
|
|
20
|
+
const anim1 = {
|
|
20
21
|
border: "", // while testing reveal the animation wrapper
|
|
21
22
|
degreesHi: -45, // degrees if spin
|
|
22
23
|
degreesLow: 45, // degrees if spin
|
|
@@ -9,14 +9,14 @@ const AnimWrap_1 = require("./styles/AnimWrap");
|
|
|
9
9
|
const Scene_1 = require("./styles/Scene");
|
|
10
10
|
const Face_1 = __importDefault(require("./Face"));
|
|
11
11
|
function default_1(props) {
|
|
12
|
-
let {
|
|
12
|
+
let { anim1, anim2, width = 5, height = 5, depth = 5, faces = { front: true }, global = {}, custom = {}, tranz = (+height / 2) | 0, perspective, perspectiveOrigin, zIndex, } = props;
|
|
13
13
|
// process config
|
|
14
14
|
const buildFace = (faceType) => {
|
|
15
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
16
|
};
|
|
17
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:
|
|
19
|
-
react_1.default.createElement(AnimWrap_1.AnimWrap, { animSpecs:
|
|
18
|
+
react_1.default.createElement(AnimWrap_1.AnimWrap, { animSpecs: anim1 },
|
|
19
|
+
react_1.default.createElement(AnimWrap_1.AnimWrap, { animSpecs: anim2 },
|
|
20
20
|
react_1.default.createElement(Global_1.ObjWrapper, null,
|
|
21
21
|
!!faces && !!faces.front ? buildFace("front") : null,
|
|
22
22
|
!!faces && !!faces.right ? buildFace("right") : null,
|
|
@@ -4,14 +4,14 @@ import { AnimWrap } from "./styles/AnimWrap";
|
|
|
4
4
|
import { SceneStyle } from "./styles/Scene";
|
|
5
5
|
import Face from "./Face";
|
|
6
6
|
export default function (props) {
|
|
7
|
-
let {
|
|
7
|
+
let { anim1, anim2, width = 5, height = 5, depth = 5, faces = { front: true }, global = {}, custom = {}, tranz = (+height / 2) | 0, perspective, perspectiveOrigin, zIndex, } = props;
|
|
8
8
|
// process config
|
|
9
9
|
const buildFace = (faceType) => {
|
|
10
10
|
return (React.createElement(Face, { width: width, height: height, depth: depth, faceType: faceType, id: faceType, tranz: tranz, global: global, custom: custom }));
|
|
11
11
|
};
|
|
12
12
|
return (React.createElement(SceneStyle, { width: width, height: height, perspective: perspective, perspectiveOrigin: perspectiveOrigin, zIndex: zIndex },
|
|
13
|
-
React.createElement(AnimWrap, { animSpecs:
|
|
14
|
-
React.createElement(AnimWrap, { animSpecs:
|
|
13
|
+
React.createElement(AnimWrap, { animSpecs: anim1 },
|
|
14
|
+
React.createElement(AnimWrap, { animSpecs: anim2 },
|
|
15
15
|
React.createElement(ObjWrapper, null,
|
|
16
16
|
!!faces && !!faces.front ? buildFace("front") : null,
|
|
17
17
|
!!faces && !!faces.right ? buildFace("right") : null,
|
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-npm-publisher.git"
|
|
7
9
|
},
|
|
8
10
|
"homepage": "https://github.com/mdnelles/anim-3d-obj-npm-publisher.git",
|
|
9
|
-
"version": "1.1.
|
|
11
|
+
"version": "1.1.67",
|
|
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",
|