<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <title>Create, draw and update TH3 object</title>
   <script src="../scripts/JSRoot.core.js" type="text/javascript"></script>
</head>
<body>
   <div id="object_draw" style="width: 1200px; height: 800px"></div>

   <script type='text/javascript'>
      let cnt = 0;
      let histo = JSROOT.createHistogram("TH3I", 20, 20, 20);
      histo.fXaxis.fXmin = -10;
      histo.fXaxis.fXmax = 10;
      histo.fYaxis.fXmin = -10;
      histo.fYaxis.fXmax = 10;
      histo.fZaxis.fXmin = -10;
      histo.fZaxis.fXmax = 10;
      histo.fName = "generated";
      histo.fFillColor = 3;

      function updateGUI() {
         histo.fTitle = "Drawing " + cnt++;

         let angle1 = cnt*Math.PI/70, angle2 = cnt*Math.PI/10;

         histo.Fill(9*Math.sin(angle1), 9*Math.cos(angle2), 9*Math.sin(angle2));

         JSROOT.redraw('object_draw', histo, "box2");
      }

      updateGUI();
      setInterval(updateGUI, 300);
   </script>

</body>
</html>


Add demo with TH3 creation, draw and update
Add demo with TH3 creation, draw and update