updated NOTE:

*Modular bundling of multiple geometry definitions has some advantages, but also disadvantages if the overview and maintainability suffers.*

*Therefore I created newer geometry creations in extra files and collect them on Github at* GitHub - hofk/threejsResources: Resources for three.js *There are also extra posts about it here in the forum.*

**The THREEg addon is used to create special / extended geometries.**

The addon generates non indexed BufferGeometries. This allows an explosion representation.

The first geometry in THREEg is an enlarged sphere. It is made up of eight parts. Multi material is supported.

```
geometry = new THREE.BufferGeometry();
geometry.createMagicSphere = THREEg.createMagicSphere; // insert the methode from THREEg.js
geometry.createMagicSphere( parameters ); // apply the methode
// mesh
mesh = new THREE.Mesh( geometry, materials );
scene.add( mesh );
```

Example:

```
geometry = new THREE.BufferGeometry();
geometry.createMagicSphere = THREEg.createMagicSphere; // insert the methode from THREEg.js
geometry.createMagicSphere( {
equator: 8,
contourmode: 'bezier',
parts: [ 1, 1, 1, 0, 0, 1, 1, 1 ],
radius: function( t ){ return 1.2 * ( 0.3 + Math.abs( Math.sin( 0.4 * t ) ) ) },
pointX: function( t ){ return 0.6 * ( 1 + Math.sin( 0.4 * t) ) },
pointY: function( t ){ return 0.4 * ( 1 + Math.sin( 0.3 * t) ) },
} );
```

Since there are not as many parameters as THREEf and THREEp, I created a very simple sandbox.

On my side http://sandbox.threejs.hofk.de/ or directly http://sandboxthreeg.threejs.hofk.de/

Here you can add any number of parameter variants if you save the page locally. If you use Firefox, you get the textures locally without any manipulations. It is possible that parameters may still be retrofitted.

Further details are given on GitHub. GitHub - hofk/THREEg.js: three.js addon to create special or extended geometries. The addon generates indexed or non indexed BufferGeometries.

*More detailed information unfortunately only in German on*

_http://xprofan.net/intl/de/php,html,js/3d-grafik-webgl-mit-three-js/?q=94489&pg=-1#94489_

The next geometry in THREEg will be a magic box.