Skip to content

Make it compatible with cjs style of importing THREE#39

Open
Alchemist0823 wants to merge 1 commit intoExperience-Monks:masterfrom
Alchemist0823:patch-1
Open

Make it compatible with cjs style of importing THREE#39
Alchemist0823 wants to merge 1 commit intoExperience-Monks:masterfrom
Alchemist0823:patch-1

Conversation

@Alchemist0823
Copy link

@Alchemist0823 Alchemist0823 commented Oct 18, 2020

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)

  • Bugfix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Code style update
  • Refactor (refactoring or adding test which isn't a fix or add a feature)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build-related changes
  • Other, please describe:

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

  • Yes
  • No

Did you test your solution?

  • I lightly tested it in one browser
  • I deeply tested it in several browsers
  • I wrote tests around it (unit tests, integration tests, E2E tests)

Problem Description

Solution Description

Side Effects, Risks, Impact

  • N/A

Aditional comments:

Because in my typescript project. three.js was included in a module. Calling THREE.BufferGeometry directly doesn't work.
@Alchemist0823 Alchemist0823 mentioned this pull request Oct 19, 2020
@hypervillain
Copy link

What's root here?

@Alchemist0823
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants