Back to Agenda

11/14/2024 - 15:15

Creating an interactive Canvas using BabylonJS

Inter­ac­tive can­vas­es are the cen­tral ele­ment of many tech­ni­cal or engi­neer­ing appli­ca­tions. Cre­at­ing such a can­vas using DOM ele­ments usu­al­ly leads to bad per­for­mance if the num­ber of items or the require­ments of the visu­al­iza­tion increase.

This talk shows how the 3D engine Baby­lon­JS can be used to cre­ate such an inter­ac­tive can­vas and explains what are the fun­da­men­tal dif­fer­ences between 3D graph­ics and a DOM-based approach. Two real world javascript appli­ca­tions with dif­fer­ent focus illus­trate the chal­lenges but also the oppor­tu­ni­ties in cre­at­ing cus­tom can­vas views:

  • A mobile robot­ics con­trol appli­ca­tion, show­ing a large num­ber of dif­fer­ent inter­act­ing items on a 2D canvas.
  • A sci­en­tif­ic 3D sim­u­la­tion with less but more com­plex items, uti­liz­ing the GPU for data processing.
    Both exam­ples offload of as much pro­cess­ing as pos­si­ble onto the GPU.

The talk fur­ther shows the inte­gra­tion of the can­vas view into a javascript UI frame­work. This includes mix­ing of DOM-based ele­ments with can­vas based items as well only repaint­ing the can­vas when the under­ly­ing data mod­el changes.

The cho­sen frame­works and tech­nolo­gies are exam­ples, the fun­da­men­tal tech­niques are eas­i­ly trans­fer­able to oth­er 3D engines and javascript frameworks.

Learning objectives

After the talk, the audience has an understanding how high performance visualization works in contrast to creating many DOM elements. The audience has the knowledge to decide wether their own visualization problem is a candidate for a custom canvas implemented using 3D graphics techniques.

Level

Expert

Prior knowledge

  • Interest in graphics.
  • Basic understanding of graphics programming
  • Intermediate experience in Javascript and/or Typescript.
  • Basic knowledge of WebGL or any other 3D graphics API is helpful but not required.
Axel Jäger creates user interfaces since his schooldays, focussing on complex technical or engineering applications, mostly with a custom central interactive canvas. After completing his PhD in electrical engineering in 2019, he works for arculus - a Jungheinrich company as teamlead for frontend. He is responsible for the user interface of a fleet manager of autonomous mobile robots, in particular for the visualization of robots and their sensor and mission data. You can find Axel at LinkedIn, X and on GitHub.