2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【A-FRAME】a-skyをいじって360°をimageでうめてみよう

Posted at

#できあがりイメージ
WASDで移動可能でかつマウスコントロールで視点移動が可能です。
スクリーンショット 2020-09-15 7.03.41.png

#コード全部
https://github.com/i-am-ethan/aframe-a-sky

#360°画像のサイト
http://texturify.com/stock-photo/room-in-private-flat-10096.html

#やり方
githubからコードをダウンロードしていただければ完成なのですが簡単にコードを解説します。

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>atapra</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
aframeを使うためのライブラリ
    <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
  </head>
  <body>
    <a-scene>
      <a-assets>
imgを取り込むタグ
        <img id="sky" src="texture.jpg" />
      </a-assets>
360°表示するためのタグ(radiusを変更で半径が変わります)
      <a-sky id="image-360" radius="10" src="#sky"> </a-sky>
    </a-scene>
  </body>
</html>

以上。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?