Creating primitives.

0

Implemented the creation of the basic primitives from the three.js library.

Changed the geometry creation code. Instead of a lot of switch-case, this code:

this.createGeometry = function( geometryType, params ){

	let geometry = new THREE[ geometryType ]();

	this.checkParams( params, geometry.parameters );

	let paramsArray = Object.values( params );

	geometry = new THREE[ geometryType ]( ...paramsArray );

	return geometry;

}

I’m currently studying IndexedDB. The created scene must be saved and exported. In editor three.js (https://threejs.org/editor/) this is implemented, maybe I’ll take part of the implementation from there

0