aframe-google-poly-component
v2.0.0
Published
A Google Poly component for A-Frame.
Downloads
117
Maintainers
Readme
aframe-google-poly-component
A Google Poly component for A-Frame.
For A-Frame.
API
| 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
|
Installation
Browser
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/[email protected]/dist/aframe-google-poly-component.min.js"></script>
</head>
<body>
<a-scene>
<a-entity google-poly="foo: bar"></a-entity>
</a-scene>
</body>
npm
Install via npm:
npm install aframe-google-poly-component
Then require and use.
require('aframe');
require('aframe-google-poly-component');
Credits
The code is heavily inspired by the A-Frame GBlock Component! Thanks for that!