I wanted to report an issue with version 5.0.0-alpha.63.
I am trying to create the headless version of Babylon using NullEngine but I get the following error :
TypeError: e._getDrawWrapper is not a function
Worth noting that it worked with the latest stable version, I recently upgraded to try the WebGPU port.
It’s tough to provide a repro but should be fairly easy to reproduce. It always gives the error if the scene has at least one mesh and it fails on the first render call.
I was able to reproduce when it happens but I doubt it needs to be tested on Node.
So basically the issue comes up when adding a render outline like this :
Obviously you don’t need an outline serverside but I am using shared components thus the issue. I wasn’t able to reproduce it in the playground as well.
Yup, I suspect it doesn’t break the playground since it still renders on a browser. Maybe if it’s tested in a NodeJS environment would be easier to replicate.
Would it be possible for you to create a tiny repro on Github ? This would be amazingly helpful to troubleshoot. I am not able to repro in our unit tests and the only places I am seeing _getDrawWrapper in the outline do not make much senses
Actually this does not fail on node:
import { NullEngine, Scene, FreeCamera, Vector3, HemisphericLight, MeshBuilder, Color3 } from '@babylonjs/core'
const engine = new NullEngine()
const scene = new Scene(engine);
new FreeCamera("camera1", new Vector3(0, 5, -10), scene);
new HemisphericLight("light", new Vector3(0, 1, 0), scene);
MeshBuilder.CreateGround("ground", {width: 6, height: 6}, scene);
const sphere = MeshBuilder.CreateSphere("sphere", {diameter: 2, segments: 32}, scene);
sphere.renderOutline = true;
sphere.outlineWidth = 0.02;
sphere.outlineColor = Color3.Black();
engine.runRenderLoop(() => {
scene.render();
});
Hey there, nope, I did a workaround by removing the outline in the Server side. Repro is tough given that I would need to provide the whole webpack based solution together with the wrapper I have used for Bjs.