-
The examples are kinda insufficient ( only one ). Maybe it gets split up to highlight the individual features?
-
The documentation for new BABYLON.CustomOptimization is kind of lacking. For one, the use of the
priority
argument is never given;BABYLON.CustomOptimization(priority)
-
The class
BABYLON.CustomOptimization
is also not shown in any examples given.
- As I went through the API I read that the usage of
BABYLON.CustomOptimization
is;let mine = new BABYLON.CustomOptimization(2); mine.onApply = () => { console.log("My Optimization Called"); scene.shadowsEnabled( false ); }; mine.onGetDescription = () => { return "My Custom Optimization Called" }; options.addOptimization(mine);
- And that priority dictates in what order the
BABYLON.SceneOptimization
optimizations are executed in ascending order;let mine = new BABYLON.CustomOptimization(0.3); // executed first let mine2 = new BABYLON.CustomOptimization(1.2); // executed second let mine25 = new BABYLON.CustomOptimization(2); // executed third let mine3 = new BABYLON.CustomOptimization(3.5); // executed fourth let mineN = new BABYLON.CustomOptimization(n); // executed nth