Skip to content

Commit

Permalink
add workaround for issue kripken#28
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken committed Nov 8, 2012
1 parent 99a6447 commit 140c06c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ void btConeTwistConstraint::calcAngleInfo2(const btTransform& transA, const btTr
btVector3 twistAxis;
computeTwistLimitInfo(qABTwist, m_twistAngle, twistAxis);

if (m_twistAngle > m_twistSpan*m_limitSoftness)
if (m_twistAngle > m_twistSpan*m_limitSoftness + 0.0001) // XXX EMSCRIPTEN: add some fudge factor to get around ammo.js issue 28
{
m_solveTwistLimit = true;

Expand Down
14 changes: 5 additions & 9 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,15 @@
# Settings

'''
-O3 stuff:
Settings.INLINING_LIMIT = 0
Settings.DOUBLE_MODE = 0
Settings.PRECISE_I64_MATH = 0
Settings.CORRECT_SIGNS = 0
Settings.CORRECT_OVERFLOWS = 0
Settings.CORRECT_ROUNDINGS = 0
Settings.I64_MODE = 0
Settings.DOUBLE_MODE = 0
'''
# -O2 works
# -O3 -s I64_MODE=1 -s DOUBLE_MODE=1 -s CORRECT_SIGNS=1 works
# -O3 -s I64_MODE=1 -s DOUBLE_MODE=1 almost ok, but they stay active forever
# -O2 -s I64_MODE=0 -s DOUBLE_MODE=0 fails
# -O3 fails
emcc_args = sys.argv[1:] or '-O3 -s DOUBLE_MODE=1 -s CORRECT_SIGNS=1 -s INLINING_LIMIT=0'.split(' ')
#emcc_args = sys.argv[1:] or '-O3 --closure 0 -s DOUBLE_MODE=1 -s CORRECT_SIGNS=1 -s INLINING_LIMIT=0'.split(' ')
emcc_args = sys.argv[1:] or '-O2 -s INLINING_LIMIT=0 -s DOUBLE_MODE=0 -s PRECISE_I64_MATH=0 -s CORRECT_OVERFLOWS=0'.split(' ')

emcc_args += ['-s', 'TOTAL_MEMORY=52428800'] # default 50MB. Compile with ALLOW_MEMORY_GROWTH if you want a growable heap (slower though).

Expand Down

0 comments on commit 140c06c

Please sign in to comment.