Skip to content

Import a 3D Model and automatically assign and export animations

TypeScript

Add github logo and link to project

Scott Petrovic0d624a6c48a7
diff --git a/src/index.html b/src/index.html
index 2ea6b12..f7194d3 100644
--- a/src/index.html
+++ b/src/index.html
@@ -156,5 +156,12 @@
</div>
+
+ <!-- github project link-->
+ <a id="github-logo" href="https://github.com/scottpetrovic/ModelMotionizer/tree/main" target="_blank">
+ <span>View on</span><img src="images/GitHub_Logo_White.png" />
+ </a>
+
+
</body>
</html>
\ No newline at end of file
diff --git a/src/lib/Generators.ts b/src/lib/Generators.ts
index 4ee6c48..ec34175 100644
--- a/src/lib/Generators.ts
+++ b/src/lib/Generators.ts
@@ -145,10 +145,10 @@ export class Generators
camera.position.z = 10;
// @ts-ignore
- camera.position.y = 10;
+ camera.position.y = 5;
// @ts-ignore
- camera.position.x = 10;
+ camera.position.x = 5;
return camera;
}
diff --git a/src/lib/processes/StepAnimationsListing.js b/src/lib/processes/StepAnimationsListing.js
index b290301..1d48f81 100644
--- a/src/lib/processes/StepAnimationsListing.js
+++ b/src/lib/processes/StepAnimationsListing.js
@@ -35,7 +35,7 @@ export class StepAnimationsListing extends EventTarget
return `<div>Instructions</div>
<div>Test and export animations to GLB format</div>
<ol>
- <li>Only GLTF files can be loaded</li>
+ <li>Only GLTF files can be exported</li>
<li>Go back to edit skeleton if results don't look right</li>
<li>Select animations you want to export by checking them by animation</li>
</ol>`;
diff --git a/src/script.js b/src/script.js
index 07f5008..598db0b 100644
--- a/src/script.js
+++ b/src/script.js
@@ -29,7 +29,7 @@ document.body.appendChild(renderer.domElement);
// center orbit controls around mid-section area with target change
const controls = new OrbitControls(camera, renderer.domElement);
-controls.target.set(0, 0.75, 0);
+controls.target.set(0, 0.9,0);
controls.update();
// setup transform controls to eventually test out differnt bone rotations
diff --git a/src/styles.css b/src/styles.css
index 69b0ff1..9971442 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -3,7 +3,7 @@
* {
color: white;
font-family: 'Jost', sans-serif;
- font-size: 15px;
+ font-size: 13px;
display: inline-block;
}
@@ -67,11 +67,10 @@ button.secondary-button {
border-radius: 3px;
border-width: 2px;
cursor: pointer;
- transition: all 0.2s ease-in-out;
+ transition: all 0.1s ease-in-out;
}
button.secondary-button:hover {
- background: #657a7638;
- transform: scale(1.02);
+ background: #7c928e38;
}
button.secondary-button.play
@@ -79,21 +78,26 @@ button.secondary-button.play
padding: 0.2rem 0.5rem; /* play has much smaller padding */
}
-
button, .button {
- background: linear-gradient(0deg, rgba(87,119,119,1) 0%, rgba(32,105,99,1) 98%);
+ background: #337baa;
padding: 0.5rem 1.0rem;
margin-right: 0.5rem;
border: 1px solid #85c4a3;
border-radius: 0.25rem;
cursor: pointer;
text-align: center; /* useful for custom file upload label */
+ transition: all 0.05s ease-in-out;
}
button:hover, .button:hover {
- background: linear-gradient(0deg, rgba(32,105,99,1) 0%, rgba(87,119,119,1) 98%);
- transform: scale(1.02);
+ background: #4089b9;
}
+button:active, .button:active {
+
+ transform: scale(0.98);
+}
+
+
.button-icon-group {
display: flex;
@@ -258,4 +262,25 @@ option {
input[type="file"] {
display: none;
+}
+
+#github-logo {
+ position: fixed;
+ bottom: 10px;
+ left: 10px;
+ display: flex;
+ opacity: 0.3;
+ column-gap: 6px;
+ align-items: center;
+ transition: opacity 0.5s ease-in-out;
+ text-decoration: none;
+ padding: 0.5rem;
+}
+#github-logo:hover {
+ opacity: 0.6;
+}
+
+#github-logo img {
+ width: 50px;
+ height: auto;
}
\ No newline at end of file
diff --git a/static/images/GitHub_Logo_White.png b/static/images/GitHub_Logo_White.png
new file mode 100644
index 0000000..c61ab9d
Binary files /dev/null and b/static/images/GitHub_Logo_White.png differ