Physijs icon indicating copy to clipboard operation
Physijs copied to clipboard

Add support for AMD, commonjs and browser-only

Open dubspeed opened this issue 10 years ago • 5 comments

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

dubspeed avatar Nov 23 '14 15:11 dubspeed

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

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


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


jihoonbyun avatar Nov 23 '14 15:11 jihoonbyun

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

agilgur5 avatar May 11 '15 22:05 agilgur5

+1

hacksalot avatar May 11 '15 22:05 hacksalot

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

escapedcat avatar Jan 27 '16 10:01 escapedcat

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.

agilgur5 avatar Sep 16 '18 12:09 agilgur5