Experience-Monks / three-bmfont-text

renders BMFont files in ThreeJS with word-wrapping
http://jam3.github.io/three-bmfont-text/test/
MIT License
789 stars 171 forks source link

Make it compatible with cjs style of importing THREE #39

Open Alchemist0823 opened 4 years ago

Alchemist0823 commented 4 years ago

Because in my typescript project. three.js was included in a module. Calling THREE.BufferGeometry directly doesn't work.

What kind of change does this PR introduce? (check at least one)

Does this PR introduce a breaking change? (check one)

Did you test your solution?

Problem Description

Solution Description

Side Effects, Risks, Impact

Aditional comments:

hypervillain commented 3 years ago

What's root here?

Alchemist0823 commented 3 years ago

HI @hypervillain, I think it's the syntax in some module system i don't know. I copied this from the most popular threejs libraries. this is the way they use to include the library to make it compatible both on nodejs module import and directly include three.js.