Namespace: GEO

JSROOT. GEO

Methods

staticJSROOT.GEO.build(obj, opt){object}

Build three.js model for given geometry object

Name Type Description
obj Object

TGeo-related object

opt Object optional

options

Name Type Default Description
vislevel Number optional

visibility level like TGeoManager, when not specified - show all

numnodes Number 1000 optional

maximal number of visible nodes

numfaces Number 100000 optional

approx maximal number of created triangles

doubleside boolean false optional

use double-side material

wireframe boolean false optional

show wireframe for created shapes

dflt_colors boolean false optional

use default ROOT colors

Returns:
Type Description
object THREE.Object3D with created model
Example
JSROOT.require('geom')
      .then(geo => {
          let obj3d = geo.build(obj);
          // this is three.js object and can be now inserted in the scene
       });

staticJSROOT.GEO.produceRenderOrder(toplevel, origin, method)

Set rendering order for created hierarchy

depending from provided method sort differently objects

Name Type Description
toplevel

top element

origin

camera position used to provide sorting

method

name of sorting method like "pnt", "ray", "size", "dflt"