aframe-google-poly-component

    2.0.0 • Public • Published

    aframe-google-poly-component

    Version License

    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/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>

    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!

    Install

    npm i aframe-google-poly-component

    DownloadsWeekly Downloads

    50

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    424 kB

    Total Files

    16

    Last publish

    Collaborators

    • avatar