iPhone/iPad ProのLiDARを使えばわずか数分で自分の3Dモデルができあがり!自分モデルがあると開発が捗ると聞いて、撮ってもらいました。
![](https://img.sabae.cc/data/2059/6512ed5b-9ecf-43af-ba80-a2568312fe87.jpg)
「vr-fukuno」
真ん中の等身大と、小さいのと大きいの、計5つ並べるプログラム。
<script type="module">
import { cr, rgb, asset } from "https://js.sabae.cc/aframe.js";
const scene = cr("a-scene");
scene.setAttribute("renderer", "colorManagement: true;");
document.body.appendChild(scene);
const aid = asset("https://taisukef.github.io/vr-fukuno/fukuno.glb");
for (let i = -2; i <= 2; i++) {
const obj = cr("a-entity", scene);
obj.setAttribute("gltf-model", aid);
const s = Math.pow(2, i / 2);
obj.setAttribute("scale", { x: s, y: s, z: s });
obj.setAttribute("position", { x: s * 2.7 - 1, y: 0, z: -1 });
}
</script>
シンプルのくりかえしで3Dモデルを並べるプログラムです。
ES-Jamでもサクッと動きます。座標や大きさなど、いろいろパラメータいじって遊んでみましょう。obj.setAttribute("rotation", { x: 0, y: -90, z: 0 }); を追加すると!?
無料の3Dスキャンアプリ、Scaniverseで作成しGLB形式にすると色が濃くなってしまうので、renderer属性にcolorManagement: trueと設定しています。
![](https://img.sabae.cc/data/2059/37f7773b-e34b-451f-8ba2-df931eb5f69d.jpg)
「taisukef.github.io - GitHub」
プロフィールにも追記しました。ゲームの敵キャラとかにも使える、オープンデータです。
おもしろい使用例あれば、ご連絡ください。
![](https://img.sabae.cc/data/2059/674f9302-2b00-4d41-874c-d3291b8b0a85.jpg)
3Dモデルにボーン(骨)を入れると自由に動けかせるはず!
![](https://img.sabae.cc/data/2059/45d86d81-4a55-435d-8bf4-16a28ddc0e3d.jpg)
4台揃ったARデバイス。電脳メガネ密度、サイバーバレー内できっとトップ!
![](https://img.sabae.cc/data/2059/202fd4e4-4ee3-411b-9985-8c205022edb9.jpg)
ARで表示されるスーパーカーに乗ってる図!
![](https://img.sabae.cc/data/2059/030a6279-799a-4090-8d51-441760cd47ee.jpg)
はんだづけタイムアタック!
![](https://img.sabae.cc/data/2059/e132ac92-9876-4575-bc49-0e967e298ea0.jpg)
21分で組み上げるもはんだブリッジが発覚、28分で組み上げた方の勝ち!
![](https://img.sabae.cc/data/2059/5bae0264-8628-447f-a175-fc543c523879.jpg)
越前がにロボコンに向けたロボット製作も!
![](https://img.sabae.cc/data/2049/d6aca2b3-f370-4f23-a75b-78f931129b6c.jpg)
「『守る環境ハッカソンin鯖江』~次世代に残そう美味しい越前ガニ~ | Peatix」
越前がにロボコン見学付き、温泉でハッカソン、参加者募集中!
創ろう!