Accessing Decimator Directly

The section “Accessing the simplification class directly” in the documentation post:

talks about accessing the simplification class directly. However, this does not work:

var decimator = new QuadraticErrorSimplification(meshToDecimate);

and neither does

var decimator = new BABYLON.QuadraticErrorSimplification(meshToDecimate);

I am looking to simplify a mesh, regardless of distance and post TypeError: BABYLON.GUI.GUIImage is not a constructor - Questions & Answers - HTML5 Game Devs Forum covers precisely this - however the code does not seem to comply.

All simplification demos stopped working. I guess it’s no longer a part of the official API, thou I’m not 100% sure about it.

The class stopped being exported starting at commit 581d5053c9805ca369e77a542b63a5cfba4de864 on 2018/09/20: More code comments · BabylonJS/Babylon.js@581d505 · GitHub

The reason is unclear as the message of the commit is “More code comments” :slight_smile:

They are supposed to work :slight_smile:
@RaananW can you have a look (pretty please)?

Will do :slight_smile:

1 Like

Thanks a ton


Merged! you rock!

Still having an issue with this: Playground:

Lines 57-77

So much profit in one scene! :slight_smile:

(you forgot the BABYLON namespace)

Thank you - it’s fixed in the playground.

For my local project, all I did was add this import to my html file:

<script src=""></script>

Getting error:

TypeError: "BABYLON.QuadraticErrorSimplification is not a constructor"

you will need to use instead of


That did it. Thank you for all your help

1 Like