DEV Community


Discussion on: Building a 3D application with Electron and BabylonJS using TypeScript

suyuti profile image
Mehmet Suyuti Dindar

It gives an error. WebGl is supported by my Chome. I can run Babylon playground.

I found similar problem (js) decribed as :
"It's because your canvas is a JQuery element, instead of being a DOM element.
use this:
var canvas = $("#renderCanvas").get(0);"

How can I use in TS?

Uncaught Error: WebGL not supported
at new Engine (C:\sample\node_modules\babylonjs\dist\preview release\babylon.max.js:8138)
at Renderer.initialize (C:\sample\app\renderer.js:29)
at Object. (C:\sample\app\renderer.js:41)
at Object. (C:\sample\app\renderer.js:43)
at Module._compile (module.js:571)
at Object.Module._extensions..js (module.js:580)
at Module.load (module.js:488)
at tryModuleLoad (module.js:447)
at Function.Module._load (module.js:439)
at Module.require (module.js:498)

justinctlam profile image
Justin Lam Author

Can you file a GitHub issue?