ScrollViewer not available in babylonjs-gui NPM package (3.3.0)?


#1

I’m using the latest NPM package for babylonjs-gui, but I can’t seem to find the ScrollViewer class. I’m using TS, and types are set up correctly, I can use all controls except the scrollviewer.

Also, I searched for ‘scrollviewer’ in node_modules/babylonjs-gui/babylon.gui.min.js and got no results.


#2

hello!
the scrollviewer is a new feature of 4.0:


#3

Sweet, thanks!


#4

Hmm, after upgrading to 4.0.0-alpha.22, I am getting this error on the first draw call:

Uncaught TypeError: Cannot read property 'registerStep' of undefined
    at e.register (babylon.js:16)
    at E../node_modules/babylonjs/babylon.js.E._registerTransientComponents (babylon.js:1)
    at E../node_modules/babylonjs/babylon.js.E.render (babylon.js:1)

The error goes away if I do not create the Dynamic texture, IE commenting out this line:
var advancedTexture = GUI.AdvancedDynamicTexture.CreateFullscreenUI('ui', true, scene);

Edit: I assume I would need to use the BabylonJS version 4.0.0 as well? Still using 3.3.0


#5

everything has to be on the same version: gui and bjs must be on the latest version


#6

Gotcha… although I’m a bit hesitant to use an alpha build. How stable is the latest alpha (of babylonjs)?


#7

We call them alpha not because of the quality but because of where we are in the dev cycle:

  • alpha: we add new features
  • beta: we document / fix potential issues / create demo
  • release: we package everything up

So you can blindly take the alpha version :slight_smile:


#8

Ok, thank you!