We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I register a geometry? Trying to use AFRAME.registerGeometry...
'AFRAME' is not defined
import 'aframe'; import 'aframe-extras'; import 'aframe-particle-system-component'; import 'aframe-gradient-sky'; import { Scene, Entity } from 'aframe-react'; import React, { Component, Fragment } from 'react'; import { BoxGeometry } from 'three'; AFRAME.registerGeometry('box', { schema: { depth: { default: 1, min: 0 }, height: { default: 1, min: 0 }, width: { default: 1, min: 0 }, segmentsHeight: { default: 1, min: 1, max: 20, type: 'int' }, segmentsWidth: { default: 1, min: 1, max: 20, type: 'int' }, segmentsDepth: { default: 1, min: 1, max: 20, type: 'int' } }, init: data => { this.geometry = new BoxGeometry(data.width, data.height, data.depth); } });
The text was updated successfully, but these errors were encountered:
include this at the top of your code: const AFRAME = window.AFRAME;
const AFRAME = window.AFRAME;
Sorry, something went wrong.
No branches or pull requests
How do I register a geometry? Trying to use AFRAME.registerGeometry...
The text was updated successfully, but these errors were encountered: