src/systems/geometry.js
function createGeometry (data) {
  var geometryType = data.primitive;
  var GeometryClass = geometries[geometryType] && geometries[geometryType].Geometry;
  var geometryInstance = new GeometryClass();

  if (!GeometryClass) { throw new Error('Unknown geometry `' + geometryType + '`'); }

  geometryInstance.init(data);
  return toBufferGeometry(geometryInstance.geometry, data.buffer);
}
function createGeometry (data) {
  var geometryType = data.primitive;
  var GeometryClass = geometries[geometryType] && geometries[geometryType].Geometry;
  var geometryInstance = new GeometryClass();

  if (!GeometryClass) { throw new Error('Unknown geometry `' + geometryType + '`'); }

  geometryInstance.init(data);
  return toBufferGeometry(geometryInstance.geometry, data.buffer);
}
function createGeometry ( data ) { var geometryType = data . primitive ; var GeometryClass = geometries [ geometryType ] && geometries [ geometryType ] . Geometry ; var geometryInstance = new GeometryClass ( ) ; if ( ! GeometryClass ) { throw new Error ( 'Unknown geometry `' + geometryType + '`' ) ; } geometryInstance . init ( data ) ; return toBufferGeometry ( geometryInstance . geometry , data . buffer ) ; }
Create geometry using component data.

@param {object} data - Component data.
@returns {object} Geometry.
Create geometry using component data .