Hi ,
I am creating custom a custom event display in which I would like to have three views : in addition to a perspective also top and side view. Unfortunately, I cannot set the view. Part of my code is below.
Cheers, Rok
gDivList= ["viewxyz","viewx","viewy"]
let geom_file = "belle2_geom.json";
async function draw_geometry_and_tracks( divlist ) {
let obj = await JSROOT.httpRequest(geom_file, "object");
let tracks = await getTracks(0);
divlist.forEach(function( view, index) {
console.log(view)
JSROOT.draw(view, obj).then( (painter)=>{
switch ( view ) {
case 'viewxyz' : painter.ctrl.highlight=0; break;
case 'viewx' : painter.setCameraPosition(0,0,0) ;break;
case 'viewy' : painter.ctrl.ortho_camera=true; break;
}
console.log(painter)
painter.drawExtras(tracks, "tracks");
});
});
}
draw_geometry_and_tracks(gDivList);
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided