【发布时间】:2016-08-23 01:14:13
【问题描述】:
我想使用 a-frame 构建房屋游览。这所房子有 6 间可供您探索的房间。我读过我们可以在场景中使用画布。我想知道是否可以有多个画布,例如 canvas="canvas: scene1"、scene2 等。
这是我第一个场景的示例代码
<a-scene canvas="canvas: scene1">
<a-assets>
<img id="abtus" src="images/about.jpg">
<img id="led" src="images/2.jpg">
<img id="crt" src="images/3.jpg">
<img id="scm" src="images/4.jpg">
<img id="dev" src="images/5.jpg">
<a-mixin id="cube" geometry="primitive: box"></a-mixin>
<a-mixin id="black" material="color: black"></a-mixin>
<a-mixin id="yellow" material="color: #EB9C27"></a-mixin>
<a-mixin id="link" geometry="primitive: plane; width: 0.8; height: 0.8">
<a-mixin id="link-selected" geometry="primitive: plane; width: 1.4; height: 1.4">
</a-mixin>
</a-assets>
<!-- camera -->
<a-entity camera no-click look-controls>
<a-entity id="cursor" position="0 0 -3"
geometry="primitive: ring; radiusOuter: 0.1;
radiusInner: 0.05;"
material="color: green; shader: flat"
cursor="maxDistance: 900; fuse: true; timeout=1500">
<a-animation begin="click" easing="ease-in" attribute="scale"
fill="backwards" from="0.1 0.1 0.1" to="1 1 1" dur="150"></a-animation>
<a-animation begin="fusing" easing="ease-in" attribute="scale"
fill="forwards" from="1 1 1" to="0.1 0.1 0.1" dur="1500"></a-animation>
</a-entity>
</a-entity>
<a-entity
geometry="primitive:sphere;radius:5000;segmentsWidth:64;segmentsHeight:64"
material="shader:flat;color:#ffffff;fog:false;src:abtus"
scale="-1 1 1"
id="photosphere">
</a-entity>
</a-scene>
【问题讨论】:
-
使用 的 src
-
很久没有再摆弄aframe了。谢谢,我去看看
标签: aframe