diff --git a/_includes/mastodon_post.html b/_includes/mastodon_post.html new file mode 100644 index 0000000..aba74ff --- /dev/null +++ b/_includes/mastodon_post.html @@ -0,0 +1,4 @@ +
+ + +
\ No newline at end of file diff --git a/_projects/bathroom_shelf.md b/_projects/bathroom_shelf.md new file mode 100644 index 0000000..4f0129e --- /dev/null +++ b/_projects/bathroom_shelf.md @@ -0,0 +1,33 @@ +--- +title: Bathroom Shelf +layout: post +excerpt: A little modification to an IKEA thingy. +permalink: /projects/bathroom_shelf + +img: + src: + alt: + class: invertable + +social_image: +model: + +head: | + + + +--- + + +

Loading model...

+
+ +{% include mastodon_post.html post_id = "111822564173512216" %} diff --git a/_projects/usbc_power_station.md b/_projects/usbc_power_station.md new file mode 100644 index 0000000..3eb2828 --- /dev/null +++ b/_projects/usbc_power_station.md @@ -0,0 +1,30 @@ +--- +title: USB-C Power Station +layout: post +excerpt: One charging station to rule them all! +permalink: /projects/usbc_charging_station + +img: + src: + alt: + class: invertable + +social_image: +model: + +head: | + + + +--- + +{% include mastodon_post.html post_id = "111813225328398667" %} +{% include mastodon_post.html post_id = "111816310882560850" %} \ No newline at end of file diff --git a/_sass/base.scss b/_sass/base.scss index 4e3b149..2fdffad 100644 --- a/_sass/base.scss +++ b/_sass/base.scss @@ -120,6 +120,11 @@ figure > img, figure > svg, figure > canvas { border-radius: 10px; } +figure.centered { + display: flex; + justify-content: center; +} + // For fallback images inside custom outline-model-viewer elements .outline-model-poster { width: 100%; diff --git a/_sass/comments.scss b/_sass/comments.scss index b6a41af..81f4ee0 100644 --- a/_sass/comments.scss +++ b/_sass/comments.scss @@ -1,3 +1,7 @@ +.mastodon-embed { + border-radius: 5px; +} + .comments { .comment .avatar { float: left; diff --git a/_sass/projects.scss b/_sass/projects.scss index 87a2b66..ed1bc14 100644 --- a/_sass/projects.scss +++ b/_sass/projects.scss @@ -7,6 +7,11 @@ article.project { h2 {margin-top: 0;} + a.photo { + width: 7em; + height: 7em; + } + img { max-height: 7em; width: unset; diff --git a/assets/js/outline-model-viewer/index.js b/assets/js/outline-model-viewer/index.js index d534463..85a7546 100644 --- a/assets/js/outline-model-viewer/index.js +++ b/assets/js/outline-model-viewer/index.js @@ -3,6 +3,7 @@ import * as THREE from "three"; // import * as dat from 'dat.gui'; import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js"; +import { DRACOLoader } from "three/addons/loaders/DRACOLoader.js"; import { OrbitControls } from "three/addons/controls/OrbitControls.js"; import { EffectComposer } from "three/addons/postprocessing/EffectComposer.js"; import { RenderPass } from "three/addons/postprocessing/RenderPass.js"; @@ -119,6 +120,11 @@ class OutlineModelViewer extends HTMLElement { const surfaceFinder = new FindSurfaces(); // Load model const loader = new GLTFLoader(); + const dracoLoader = new DRACOLoader(); + dracoLoader.setDecoderConfig({ type: 'js' }); + dracoLoader.setDecoderPath('https://www.gstatic.com/draco/v1/decoders/'); + loader.setDRACOLoader( dracoLoader ); + loader.load(model_path, (gltf) => { scene.add(gltf.scene); surfaceFinder.surfaceId = 0; diff --git a/assets/projects/bathroom_shelf/models/ikea.glb b/assets/projects/bathroom_shelf/models/ikea.glb new file mode 100644 index 0000000..fe2a59b Binary files /dev/null and b/assets/projects/bathroom_shelf/models/ikea.glb differ diff --git a/projects.md b/projects.md index e760611..12c365a 100644 --- a/projects.md +++ b/projects.md @@ -13,7 +13,7 @@ social_image: /assets/projects/lego_adapters/thumbnail.png --- {% for post in site.projects %}
- + {{post.img.alt}}