4
3

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 5 years have passed since last update.

簡単!VRコンテンツ開発!

Posted at

はじめに

Oculus Questを買ったのでVRコンテンツにも手を出したいなーと思っていました。そこで、実際に始めてみたら初心者でも10分で実機確認までできました!簡単!

実機動作

こんな風にOculus QuestのブラウザでVRコンテンツがプレビューできます!

ezgif.com-video-to-gif.gif

それではさくっと環境構築していきましょう!

用意するもの

  • VScode
  • Live Server (VScode拡張機能)
  • ブラウザ搭載VR実機 (今回はOculus Quest)
  • 無線LAN環境
  • A-Frameのサンプルコード

まずはVScodeをインストールして、Live Serverという拡張機能を入れます。

【ゼロから!】Visual Studio Codeのインストールと使い方

VS Code:ライブリロード機能を備えた簡易ローカルサーバーを起動できる拡張機能「Live Server」 | NxWorld

次に今回使うWebVRのJavaScriptフレームワークであるA-Frameのソースコードを持ってきて、適当なhtmlファイルで保存しましょう。

aframe

そして、VScodeの右下にあるGo Liveを押せばローカルサーバーが立ち上がります。

コマンドプロンプト等で自分のIPアドレスも調べておきましょう。

自分のIPアドレスを調べてみる/コマンドライン | IPラーニング

あとは、同じ無線LAN環境に繋いだOculus Questのブラウザでアドレスを入力するだけで、簡単にVRコンテンツをプレビューできます!

自分のIP:5500

A-Frameの詳しい説明は以下を参照してください。
A-Frame – Make WebVR

A-Frameを使ってWebVRを実装してみよう | 福岡のホームページ制作会社・株式会社マグネッツ

4
3
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
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?