Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Patch in ES6 Compatibility #249

Closed
wants to merge 2 commits into from
Closed

Conversation

zalo
Copy link
Contributor

@zalo zalo commented Mar 16, 2021

This allows LeapJS to be imported in an ES6 Module via import "../node_modules/leapjs/leap-1.1.0.js";

And used via window.Leap ala:
this.controller = new window.Leap.Controller({optimizeHMD: true}).connect();.

This isn't a true import, persay, but an import of side-effects (namely, the attachment of Leap to window, which is the standard for non-ES6 modules that want a modicum of ES6 interoperability.

The existing example apps appear to still work, so it should be a clean upgrade.

zalo and others added 2 commits March 16, 2021 14:09
This allows LeapJS to be imported via `import "../node_modules/leapjs/leap-1.1.0.js";`

And used via `window.Leap` ala:
`this.controller = new window.Leap.Controller({optimizeHMD: true}).connect();`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants