Closed tovarisch closed 5 years ago
We have no plan to support canvas2d but we are totally open to community contributions :) So please submit a PR
The better way would be to wrap it with the UMD dependency pattern, which is safer than what you pasted. But technically, it should work.
Oh thank you!
what i'v done is after generating source edited it something like
`if (((typeof window != "undefined" && window.module) || (typeof module != "undefined")) && typeof module.exports != "undefined") { module.exports = function (BABYLON) { Canvas2D(BABYLON);
};`
and wrap all upper code in Canvas2D function.
Am i doing right? Is there any plans to make module or can i help somehow?