A Google Poly component for A-Frame.
For A-Frame.
Property | Description | Default Value |
---|---|---|
apiKey | Google Poly API Key | |
src | Google Poly Model Identifier | |
normalize | Scale the geometry to a unit of 1 and translate the geometry to 0 0 0 |
true |
cache | Cache or load the cached model using localforage to prevent downloading from Google Poly Servers | true |
Install and use by directly including the browser files:
<head>
<title>My A-Frame Scene</title>
<script src="https://aframe.io/releases/1.1.0/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-google-poly-component@2.0.0/dist/aframe-google-poly-component.min.js"></script>
</head>
<body>
<a-scene>
<a-entity google-poly="foo: bar"></a-entity>
</a-scene>
</body>
Install via npm:
npm install aframe-google-poly-component
Then require and use.
require('aframe');
require('aframe-google-poly-component');
The code is heavily inspired by the A-Frame GBlock Component! Thanks for that!