Skip to content

Latest commit

 

History

History
78 lines (55 loc) · 2.15 KB

README.md

File metadata and controls

78 lines (55 loc) · 2.15 KB

aframe-gltf-exporter-component

NOTE: This component requires the latest version of A-Frame (master) or 0.7.0 that will be released at the beginning of september.

Version License

A GLTF Exporter component for A-Frame.

For A-Frame.

API

Property Description Default Value
verbose Log the glTF output to the console false

Installation

Browser

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
  <script src="https://unpkg.com/aframe-gltf-exporter-component/dist/aframe-gltf-exporter-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity gltf-exporter></a-entity>
  </a-scene>
</body>

Usage on your component:

sceneEl.systems['gltf-exporter'].export(input, options);  

The function accepts severals different input values:

  • None (export the whole scene)
  • One entity
  • An array of entities
  • NodeList (eg: the result from a querySelectorAll)

More information about the component and its options could be found on the three.js GLTFExporter

npm

Install via npm:

npm install aframe-gltf-exporter-component

Then require and use.

require('aframe');
require('aframe-gltf-exporter-component');