Help us understand the problem. What is going on with this article?

【A-Frame】AR-marker上に3DCGを出してみよう!

コード全体

https://github.com/i-am-ethan/aframe_tutorial_gltf-ARmarker

書いた日

2020年8月23日

書いた目的

WebARの業界を盛り上げたい

最低限これはできて欲しい

・前回の記事をみている
https://qiita.com/e_san_desuyo/items/5e1ab41553a8738e7693
・VSCodeをインストールしている

手順

前回の記事で解説したものとほとんど一緒です。

"Hiro"というマーカーの読み込みが新しい部分です。
完成イメージのGIFにでてくるマーカーです。

これはデフォルトのマーカーです。
なぜHiroなのかが気になる方はこちらの記事を読んでください。

https://note.com/e_san_note/n/n30ead6ce9a74

index.html
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Hello, WebVR! • A-Frame</title>
    <meta name="description" content="Hello, WebVR! • A-Frame">
    <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
    <script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
  </head>
  <body style="margin : 0px; overflow: hidden;">
    <a-scene embedded arjs>

      <!-- 3Dオブジェクト読み込む -->
      <a-assets>
        <a-asset-items id="bird" src="scene.gltf" ></a-asset-items>
      </a-assets>

      <!-- マーカーを読み込む -->
      <a-marker preset="hiro">
        <!-- <a-box position="0 0.5 0" wireframe="true"></a-box> -->
        <!-- 3Dオブジェクト配置-->
        <a-entity gltf-model="#bird" scale="0.0008 0.0008 0.0008"></a-entity>
      </a-marker>
      <a-entity camera>
      </a-entity>
    </a-scene>
  </body>
</html>


完成イメージ

20200823_125513.GIF

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした