anim-3d-obj 1.2.2 → 1.2.4
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,8 +6,8 @@ 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
|
-
console.log(face);
|
|
11
11
|
let transform;
|
|
12
12
|
let tranz = +height / 2;
|
|
13
13
|
const body = face.body ? face.body : global.body;
|
|
@@ -93,6 +93,7 @@ function Face(props) {
|
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
95
|
console.log(face.name + " is not a recognized face.name");
|
|
96
|
+
display = false;
|
|
96
97
|
}
|
|
97
98
|
const Specs = styled_components_1.default.section `
|
|
98
99
|
${face.css || global.css}
|
|
@@ -101,6 +102,6 @@ function Face(props) {
|
|
|
101
102
|
height: ${height}px;
|
|
102
103
|
${transform}
|
|
103
104
|
`;
|
|
104
|
-
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);
|
|
105
106
|
}
|
|
106
107
|
exports.default = Face;
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
-
console.log(face);
|
|
6
6
|
let transform;
|
|
7
7
|
let tranz = +height / 2;
|
|
8
8
|
const body = face.body ? face.body : global.body;
|
|
@@ -88,6 +88,7 @@ export default function Face(props) {
|
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
90
90
|
console.log(face.name + " is not a recognized face.name");
|
|
91
|
+
display = false;
|
|
91
92
|
}
|
|
92
93
|
const Specs = styled.section `
|
|
93
94
|
${face.css || global.css}
|
|
@@ -96,5 +97,5 @@ export default function Face(props) {
|
|
|
96
97
|
height: ${height}px;
|
|
97
98
|
${transform}
|
|
98
99
|
`;
|
|
99
|
-
return React.createElement(Specs, null, body);
|
|
100
|
+
return display ? React.createElement(Specs, null, body) : React.createElement(React.Fragment, null);
|
|
100
101
|
}
|
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.2.
|
|
11
|
+
"version": "1.2.4",
|
|
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",
|