Using extension "canvas2D"

Is the canvas2D extension still supported?

I’m working on a pre-existing project which uses the class BABYLON.Text2D. I’ve replaced an old version of Babylon.js with the most recent one (https://preview.babylonjs.com/babylon.js), in order to have support for WebXR. After the replacement, this error occurred:

Uncaught TypeError: BABYLON.Text2D is not a constructor

So I’ve included the canvas2D extension (LINK). After that, this error occurred:

Uncaught TypeError: engine.getOrAddExternalDataWithFactory is not a function

So I concatenated the three files “babylon.js”, “split.js” and “babylon.canvas2d.js”, so that the file “babylon.canvas2d.js” can see the engine in the file “babylon.js”, but the same error appeared:

Uncaught TypeError: engine.getOrAddExternalDataWithFactory is not a function

I’ve seen that the last preview release of this extension is of date Oct 22 2017. Is it still compatible with current Babylon.js?

It is not. The author (which was a community member) had to stop working on it for personal reasons

I highly encourage you to switch to Babylon GUI which is maintained by the core team

1 Like

Then I’ll switch to Babylon GUI. Thank you!

1 Like