I didn’t use it because I could imagine a situation where the user wants to implement mouse over highlighting of the line just by changing the colorMode to SET from other modes and as you said previously recompilation of the shader is a heavy task. What’s your opinion?
Indeed, in this case, passing the colorMode as a uniform variable and testing all 3 values is the best solution. Branching when the condition involves only uniform variables is normally not very expensive.
how can I ensure that my tree shakeable single functions from Misc/greasedLineTools.ts are put not directly under the BABYLON namespace, but under BABYLON.GreasedLineTools?
EDIT: I’ve tried namespacing the functions or export * as GreasedLineTools from “./greasedLine” in index.ts but I could get it working in Playground. Actually it was OK, just the intellisense didn’t work
EDIT: If i don’t use class methods I don’t get intellisens at all:
I think I am ready for the first PR. However the intellisense issue is still a thing. Should I refactor to static class methods?
EDIT: I need to be hospitalized for a few days. I started to feel better, but today suddenly I started to feel much worse, I was at the doctors in the morning and just got a call from the doc that I’ve a bacterial infection of the respiratory system and that sucker seems to ATB resistent + I was COVID possitive… So… Fuck me dead… I’ll hopefully get back alive on Tuesday Just to be sure, current sources:
to ge tthe typing in UMD you will need to export your class and functions from a referenced index.ts. To allow tree-shaking in es6 you just need to be sure to not reference those functions from any other class.
But i’ll really need to see some code (if possible) to recommend the best way to go here.