A-frameとD3を組み合わせて使うサンプル。
localで動かしたいときは以下を。
$ git clone git@gist.github.com:2675d59f526a80b02d8db8c26ab0e45d.git
$ cd 2675d59f526a80b02d8db8c26ab0e45d
$ npm install
$ npm start
script.jsの中身を修正したい場合は、ビルドツールが使う依存モジュールのインストールが必要です。
$ npm run installDevtool
$ npm start
xxxxxxxxxx
<title>d3 & a-frame example1</title>
<link href='dist.css' rel='stylesheet' />
<script src="//unpkg.com/d3@4.12.2/build/d3.min.js"></script>
<script src="//unpkg.com/aframe@0.7.1/dist/aframe.js"></script>
<body>
<a-scene id="scene1" d3>
<a-sky radius="5000" color="skyblue"></a-sky>
<a-plane color="wheat" height="20" width="40" position="0 -1 0" rotation="270 0 0"></a-plane>
<a-entity camera look-controls wasd-controls cursor="rayOrigin: mouse" position="6 0 5">
</a-entity>
</a-scene>
<script src='dist.js'></script>
</body>
https://unpkg.com/d3@4.12.2/build/d3.min.js
https://unpkg.com/aframe@0.7.1/dist/aframe.js