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

Add support for AMD, commonjs and browser-only #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add support for AMD, commonjs and browser-only #217

wants to merge 1 commit into from

Conversation

dubspeed
Copy link

Added a header to play nicely with commonjs, amd and classic window exports

Added a header to play nicely with commonjs, amd and classic window exports
@jihoonbyun
Copy link

NAVER - http://www.naver.com/

[email protected] 님께 보내신 메일 <[Physijs] Add support for AMD, commonjs and browser-only (#217)> 이 다음과 같은 이유로 전송 실패했습니다.


받는 사람이 회원님의 메일을 수신차단 하였습니다.


@agilgur5
Copy link

I believe full support should also take away the necessity of these statements:

// set worker and ammo 
Physijs.scripts.worker = 'static/plugins/physijs/physijs_worker.js';
Physijs.scripts.ammo = 'ammo.js';

Otherwise this also fixes #213

@hacksalot
Copy link

+1

@escapedcat
Copy link

Here's a browserify version, but general npm support would be awesome.

@escapedcat escapedcat mentioned this pull request Feb 1, 2016
@agilgur5
Copy link

So I forked the browserify version a few years ago and could never get it working with requires, without the scripts configuration, and without having to copy files around.

Randomly decided to pick it up this weekend and managed to create an auto-configured version for both webpack and browserify that's just a single require, no scripts configuration, no copying files, etc. See https://github.com/agilgur5/physijs-webpack

It only uses CommonJS right now, but given it's for Webpack etc, there shouldn't be a need to support anything else. Not quite the same what this PR does, but for a very related purpose.

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.

5 participants