anim-3d-obj 1.2.3 → 1.2.5
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.
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
8
|
function Face(props) {
|
|
9
|
+
let display = true;
|
|
9
10
|
let { depth = 10, global = { css: "", body: "" }, height = 10, face, width = 100, } = props;
|
|
10
11
|
let transform;
|
|
11
12
|
let tranz = +height / 2;
|
|
@@ -92,6 +93,7 @@ function Face(props) {
|
|
|
92
93
|
}
|
|
93
94
|
else {
|
|
94
95
|
console.log(face.name + " is not a recognized face.name");
|
|
96
|
+
display = false;
|
|
95
97
|
}
|
|
96
98
|
const Specs = styled_components_1.default.section `
|
|
97
99
|
${face.css || global.css}
|
|
@@ -100,6 +102,6 @@ function Face(props) {
|
|
|
100
102
|
height: ${height}px;
|
|
101
103
|
${transform}
|
|
102
104
|
`;
|
|
103
|
-
return react_1.default.createElement(Specs, null, body);
|
|
105
|
+
return display ? react_1.default.createElement(Specs, null, body) : react_1.default.createElement(react_1.default.Fragment, null);
|
|
104
106
|
}
|
|
105
107
|
exports.default = Face;
|
|
@@ -12,6 +12,7 @@ function default_1(props) {
|
|
|
12
12
|
let { anim1, anim2, width = 5, height = 5, depth = 5, global = {}, faces, perspective, perspectiveOrigin, zIndex, } = props;
|
|
13
13
|
// process config
|
|
14
14
|
const buildFace = (face) => {
|
|
15
|
+
console.log(face);
|
|
15
16
|
const details = {
|
|
16
17
|
width,
|
|
17
18
|
height,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
export default function Face(props) {
|
|
4
|
+
let display = true;
|
|
4
5
|
let { depth = 10, global = { css: "", body: "" }, height = 10, face, width = 100, } = props;
|
|
5
6
|
let transform;
|
|
6
7
|
let tranz = +height / 2;
|
|
@@ -87,6 +88,7 @@ export default function Face(props) {
|
|
|
87
88
|
}
|
|
88
89
|
else {
|
|
89
90
|
console.log(face.name + " is not a recognized face.name");
|
|
91
|
+
display = false;
|
|
90
92
|
}
|
|
91
93
|
const Specs = styled.section `
|
|
92
94
|
${face.css || global.css}
|
|
@@ -95,5 +97,5 @@ export default function Face(props) {
|
|
|
95
97
|
height: ${height}px;
|
|
96
98
|
${transform}
|
|
97
99
|
`;
|
|
98
|
-
return React.createElement(Specs, null, body);
|
|
100
|
+
return display ? React.createElement(Specs, null, body) : React.createElement(React.Fragment, null);
|
|
99
101
|
}
|
|
@@ -7,6 +7,7 @@ export default function (props) {
|
|
|
7
7
|
let { anim1, anim2, width = 5, height = 5, depth = 5, global = {}, faces, perspective, perspectiveOrigin, zIndex, } = props;
|
|
8
8
|
// process config
|
|
9
9
|
const buildFace = (face) => {
|
|
10
|
+
console.log(face);
|
|
10
11
|
const details = {
|
|
11
12
|
width,
|
|
12
13
|
height,
|
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
3
5
|
{
|
|
4
6
|
"name": "anim-3d-obj",
|
|
5
7
|
"repository": {
|
|
@@ -7,7 +9,7 @@
|
|
|
7
9
|
"url": "https://github.com/mdnelles/anim-3d-obj-npm-publisher.git"
|
|
8
10
|
},
|
|
9
11
|
"homepage": "https://github.com/mdnelles/anim-3d-obj-npm-publisher.git",
|
|
10
|
-
"version": "1.2.
|
|
12
|
+
"version": "1.2.5",
|
|
11
13
|
"description": "React library for creating 3D objects quickly. Also these objects can be animated",
|
|
12
14
|
"main": "dist/cjs/index.js",
|
|
13
15
|
"module": "dist/esm/index.js",
|