I got this problem with Babylon js 4.2 and TS:
Super frustrating cause in the package AbstractMesh does have renderOutline setup.
Or I’m I doing something wrong?
If I cast it to be AbstractMesh I got the same thing.
Regards
Peter
I got this problem with Babylon js 4.2 and TS:
Super frustrating cause in the package AbstractMesh does have renderOutline setup.
Or I’m I doing something wrong?
If I cast it to be AbstractMesh I got the same thing.
Regards
Peter
can you repro in the PG?
No, i cant
I added ignore TS and it works but it gives an error. for some reason.
When you check out this repo you should see it:
go to src/scenes/defaultWithTexture.ts
line 57 add:
sphere.renderOutline = true;
and you will have it.
This is to reproduce quickly.
We also started a new project to set up everything from scratch with the newest packages and TS, which gave the same result.
But with TS ignore works out of the box as it should, so the code is there, just TS is not finding it,
Peter
You need to add import '@babylonjs/core/Rendering/outlineRenderer';
at the beginning of your file.
The file extends the Mesh class with renderOutline
, …
That is a solution I actually figure it out the next day. Should actually add a comment with it. Sorry for not doing it and Thanks for the help