【发布时间】:2020-07-02 08:22:13
【问题描述】:
我尝试了 aframe GBlock 组件,我从 Google Poly 检索了我自己的 api 代码 https://github.com/archilogic-com/aframe-gblock 无法显示随机样本模型(出现在我的场景中) 所以我再次尝试使用 aframe google poly 组件https://github.com/mattrei/aframe-google-poly-component 这次是我自己的 Google Poly 艺术作品和我自己的 api
似乎都没有工作,下面的示例代码应该适用于它的两个版本
<!DOCTYPE html>
<html>
<head>
<title>My A-Frame Scene</title>
<script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-google-poly-component@1.0.0/dist/aframe-google-poly-component.min.js"></script>
<script src="https://cdn.rawgit.com/archilogic-com/aframe-gblock/6498b71d/dist/gblock.js"></script>
</head>
<body>
<a-scene>
<a-entity google-poly="apiKey: where api key goes; src: 0uYBSdP3NhE"
position="0 0 -3" scale="1 1 1"
></a-entity>
<a-entity gblock="https://poly.google.com/view/0uYBSdP3NhE?key=AIzaSyA4vpWo4AoLlbA2ecEIpA0T8CbDrlm_Nmw"
scale="1 1 1" position="25.806 14.071 -6.306" rotation="0 -38.73194695084365 0"></a-entity>
<a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
</a-scene>
</body>
</html>
【问题讨论】:
标签: aframe