2
0
Эх сурвалжийг харах

Merge branch 'dev' into zh_doc_20200806

gogoend 5 жил өмнө
parent
commit
5fbe29a1a6
100 өөрчлөгдсөн 6648 нэмэгдсэн , 15461 устгасан
  1. 0 7
      .github/CONTRIBUTING.md
  2. 464 477
      build/three.js
  3. 612 603
      build/three.min.js
  4. 206 227
      build/three.module.js
  5. 317 0
      docs/api/ar/animation/AnimationAction.html
  6. 130 0
      docs/api/ar/animation/AnimationClip.html
  7. 110 0
      docs/api/ar/animation/AnimationMixer.html
  8. 117 0
      docs/api/en/core/GLBufferAttribute.html
  9. 1 1
      docs/api/en/materials/Material.html
  10. 6 8
      docs/api/en/materials/ShaderMaterial.html
  11. 1 1
      docs/api/en/renderers/WebGLCubeRenderTarget.html
  12. 2 2
      docs/api/en/renderers/WebGLRenderTarget.html
  13. 2 1
      docs/api/en/scenes/Scene.html
  14. 5 5
      docs/api/en/textures/DepthTexture.html
  15. 117 0
      docs/api/zh/core/GLBufferAttribute.html
  16. 1 1
      docs/api/zh/materials/Material.html
  17. 2 0
      docs/api/zh/materials/MeshBasicMaterial.html
  18. 2 0
      docs/api/zh/materials/MeshLambertMaterial.html
  19. 2 0
      docs/api/zh/materials/MeshPhongMaterial.html
  20. 2 0
      docs/api/zh/materials/MeshStandardMaterial.html
  21. 6 4
      docs/api/zh/materials/ShaderMaterial.html
  22. 1 1
      docs/api/zh/renderers/WebGLCubeRenderTarget.html
  23. 2 2
      docs/api/zh/renderers/WebGLRenderTarget.html
  24. 6 6
      docs/api/zh/scenes/Scene.html
  25. 5 4
      docs/api/zh/textures/DepthTexture.html
  26. 8 1
      docs/index.html
  27. 47 0
      docs/list.js
  28. 241 0
      docs/manual/ar/buildTools/Testing-with-NPM.html
  29. 114 0
      docs/manual/ar/introduction/Animation-system.html
  30. 124 0
      docs/manual/ar/introduction/Browser-support.html
  31. 269 0
      docs/manual/ar/introduction/Creating-a-scene.html
  32. 111 0
      docs/manual/ar/introduction/Creating-text.html
  33. 64 0
      docs/manual/ar/introduction/Drawing-lines.html
  34. 57 0
      docs/manual/ar/introduction/FAQ.html
  35. 78 0
      docs/manual/ar/introduction/How-to-create-VR-content.html
  36. 100 0
      docs/manual/ar/introduction/How-to-dispose-of-objects.html
  37. 141 0
      docs/manual/ar/introduction/How-to-run-things-locally.html
  38. 241 0
      docs/manual/ar/introduction/How-to-update-things.html
  39. 98 0
      docs/manual/ar/introduction/How-to-use-post-processing.html
  40. 182 0
      docs/manual/ar/introduction/Installation.html
  41. 135 0
      docs/manual/ar/introduction/Loading-3D-models.html
  42. 66 0
      docs/manual/ar/introduction/Matrix-transformations.html
  43. 43 0
      docs/manual/ar/introduction/Typescript-setup.html
  44. 175 0
      docs/manual/ar/introduction/Useful-links.html
  45. 35 0
      docs/manual/ar/introduction/WebGL-compatibility-check.html
  46. 14 0
      docs/page.css
  47. 0 1
      editor/index.html
  48. 20 0
      editor/js/Loader.js
  49. 1 81
      editor/js/Menubar.Edit.js
  50. 1 1
      editor/js/Sidebar.Material.js
  51. 4 3
      editor/js/Strings.js
  52. 0 202
      editor/js/libs/glslprep.min.js
  53. 4 1
      editor/sw.js
  54. 21 1
      examples/css3d_orthographic.html
  55. 14 0
      examples/css3d_sandbox.html
  56. 5 3
      examples/files.js
  57. 2 1
      examples/index.html
  58. 3 3
      examples/js/animation/TimelinerController.js
  59. 2 2
      examples/js/exporters/ColladaExporter.js
  60. 1 1
      examples/js/exporters/MMDExporter.js
  61. 0 23
      examples/js/libs/ammo.js
  62. 822 0
      examples/js/libs/ammo.wasm.js
  63. BIN
      examples/js/libs/ammo.wasm.wasm
  64. 0 13687
      examples/js/libs/cannon.js
  65. 0 7
      examples/js/lights/RectAreaLightUniformsLib.js
  66. 1 1
      examples/js/loaders/3MFLoader.js
  67. 1 1
      examples/js/loaders/AMFLoader.js
  68. 2 2
      examples/js/loaders/AssimpLoader.js
  69. 1 1
      examples/js/loaders/BasisTextureLoader.js
  70. 1 1
      examples/js/loaders/DRACOLoader.js
  71. 107 10
      examples/js/loaders/EXRLoader.js
  72. 12 2
      examples/js/loaders/GLTFLoader.js
  73. 1 1
      examples/js/loaders/KMZLoader.js
  74. 1 1
      examples/js/loaders/MMDLoader.js
  75. 1 1
      examples/js/loaders/TTFLoader.js
  76. 0 1
      examples/js/misc/GPUComputationRenderer.js
  77. 0 3
      examples/js/misc/Ocean.js
  78. 1 2
      examples/js/objects/Fire.js
  79. 1 2
      examples/js/objects/Reflector.js
  80. 1 2
      examples/js/objects/Refractor.js
  81. 1 2
      examples/js/objects/Water.js
  82. 1 2
      examples/js/postprocessing/BokehPass.js
  83. 1 2
      examples/js/postprocessing/EffectComposer.js
  84. 0 2
      examples/js/postprocessing/SMAAPass.js
  85. 1 1
      examples/js/postprocessing/SavePass.js
  86. 3 3
      examples/jsm/animation/TimelinerController.js
  87. 2 2
      examples/jsm/exporters/ColladaExporter.js
  88. 1 1
      examples/jsm/exporters/MMDExporter.js
  89. 0 23
      examples/jsm/libs/cannon.module.min.js
  90. 8 0
      examples/jsm/libs/rhino3dm/rhino3dm.js
  91. BIN
      examples/jsm/libs/rhino3dm/rhino3dm.wasm
  92. 0 8
      examples/jsm/lights/RectAreaLightUniformsLib.js
  93. 16 0
      examples/jsm/loaders/3DMLoader.d.ts
  94. 1008 0
      examples/jsm/loaders/3DMLoader.js
  95. 1 1
      examples/jsm/loaders/3MFLoader.js
  96. 1 1
      examples/jsm/loaders/AMFLoader.js
  97. 2 2
      examples/jsm/loaders/AssimpLoader.js
  98. 1 1
      examples/jsm/loaders/BasisTextureLoader.js
  99. 1 1
      examples/jsm/loaders/DRACOLoader.js
  100. 107 10
      examples/jsm/loaders/EXRLoader.js

+ 0 - 7
.github/CONTRIBUTING.md

@@ -56,13 +56,6 @@ The next most important script runs all the appropriate testing.
 The linting is there to keep a consistent code-style across the all of the code and the testing is
 there to help catch bugs and check that the code behaves as expected. It is important that
 neither of these steps comes up with any errors due to your changes.
-* If you’d like the linter to fix any errors that it can change, make the following addition to the “test-lint” script.
-        
-        {
-        ...
-        "test-lint": "eslint src --ext js --ext ts --fix && tsc -p utils/build/tsconfig.lint.json"
-        ...
-        }
 
 If you’d like to make a minified version of the build files i.e. ‘build/three.min.js’ run:
         

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 464 - 477
build/three.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 612 - 603
build/three.min.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 206 - 227
build/three.module.js


+ 317 - 0
docs/api/ar/animation/AnimationAction.html

@@ -0,0 +1,317 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>[name]</h1>
+
+		<p class="desc">
+			تقوم AnimationActions بجدولة أداء الرسوم المتحركة المخزنة في [page:AnimationClip AnimationClips].
+			<br /><br />
+
+			ملاحظة: يمكن ربط معظم أساليب AnimationAction.<br /><br />
+
+			للحصول على نظرة عامة حول العناصر المختلفة لنظام الرسوم المتحركة three.js ، راجع مقالة "نظام الحركات" في قسم "الخطوات التالية" من الدليل.
+		</p>
+
+
+		<h2>المنشئ (Constructor)</h2>
+
+
+		<h3>[name]( [param:AnimationMixer mixer], [param:AnimationClip clip], [param:Object3D localRoot] )</h3>
+		<p>
+			[page:AnimationMixer mixer] هو *AnimationMixer* الذي يتحكم فيه هذا الإجراء.<br />
+			[page:AnimationClip clip] هو *AnimationClip* الذي يحتفظ ببيانات الرسوم المتحركة لهذا الإجراء.<br />
+			[page:Object3D localRoot] هو الكائن الجذر الذي يتم تنفيذ هذا الإجراء عليه.<br /><br />
+
+			ملاحظة: بدلاً من استدعاء هذا المُنشئ مباشرةً ، يجب إنشاء AnimationAction برقم [page:AnimationMixer.clipAction] نظرًا لأن هذه الطريقة توفر التخزين المؤقت للحصول على أداء أفضل.
+		</p>
+
+
+		<h2>الخصائص (Properties)</h2>
+
+
+		<h3>[property:Boolean clampWhenFinished]</h3>
+		<p>
+			إذا تم ضبط *clampWhenFinished* على true ، فسيتم تلقائيًا إيقاف [page:.paused paused] للرسوم المتحركة مؤقتًا في إطارها الأخير.<br /><br />
+
+			إذا تم ضبط *clampWhenFinished* على false ، فسيتم تحويل [page:.enabled enabled] تلقائيًا إلى false عند انتهاء آخر حلقة من الإجراء ، بحيث لا يكون لهذا الإجراء أي تأثير آخر.<br /><br />
+
+			القيمة الافتراضية هو خطأ (false).<br /><br />
+
+			ملاحظة: *clampWhenFinished* ليس له أي تأثير إذا تم مقاطعة الإجراء (يكون له تأثير فقط إذا انتهت الحلقة الأخيرة بالفعل).
+		</p>
+
+		<h3>[property:Boolean enabled]</h3>
+		<p>
+			يؤدي تعيين *enabled* إلى *false* إلى تعطيل هذا الإجراء ، بحيث لا يكون له أي تأثير. الافتراضي هو *true*.<br /><br />
+
+			عند إعادة تمكين الإجراء ، يستمر الرسم المتحرك من وقته الحالي [page:.time time] (الإعداد *enabled* إلى *false* لا يعيد تعيين الإجراء).<br /><br />
+
+			ملاحظة: لا يؤدي إعداد *enabled* إلى *true* إلى إعادة تشغيل الرسوم المتحركة تلقائيًا. سيؤدي ضبط *enabled* إلى *true* إلى إعادة تشغيل الرسوم المتحركة فورًا فقط إذا تم استيفاء الشرط التالي:
+			[page:.paused paused] تحتوي قيمة *false* ، لم يتم إلغاء تنشيط هذا الإجراء في هذه الأثناء (بتنفيذ أمر [page:.stop stop] أو [page:.reset reset]) ، وليس [page:.weight weight] أو [page:.timeScale timeScale] يساوي 0.
+		</p>
+
+		<h3>[property:Number loop]</h3>
+		<p>
+			وضع التكرار (يمكن تغييره بـ [page:.setLoop setLoop]). الافتراضي هو [page:Animation THREE.LoopRepeat] (مع عدد لا نهائي من [page:.repetitions repetitions])<br /><br />
+
+			يجب أن يكون أحد هذه الثوابت:<br /><br />
+			[page:Animation THREE.LoopOnce] - تشغيل المقطع مرة واحدة ،<br />
+			[page:Animation THREE.LoopRepeat] - تشغيل المقطع مع العدد المختار من *التكرارات* ،
+			في كل مرة تقفز من نهاية المقطع مباشرة إلى بدايته ،<br />
+			[page:Animation THREE.LoopPingPong] - تشغيل المقطع مع العدد المختار من *التكرارات* ، بدلاً من التشغيل للأمام والخلف.
+		</p>
+
+		<h3>[property:Boolean paused]</h3>
+		<p>
+			يؤدي تعيين *paused* إلى *true* إلى إيقاف تنفيذ الإجراء مؤقتًا عن طريق تعيين مقياس الوقت الفعال على 0. الافتراضي هو *false*.<br /><br />
+		</p>
+
+		<h3>[property:Number repetitions]</h3>
+		<p>
+			عدد التكرارات التي تم إجراؤها [page:AnimationClip] على مدار هذا الإجراء. يمكن تعيينه عبر [page:.setLoop setLoop]. الافتراضي هو *Infinity*.<br /><br />
+			ضبط هذا الرقم ليس له أي تأثير ، إذا تم ضبط [page:.loop loop mode] على [page:Animation THREE.LoopOnce].
+		</p>
+
+		<h3>[property:Number time]</h3>
+		<p>
+			the local time of this action (in seconds, starting with 0).<br /><br />
+
+			يتم تثبيت القيمة أو لفها إلى 0 ... مدة المقطع (وفقًا لحالة الحلقة).
+			يمكن تغير قيمتها بالنسبة إلى وقت لخالط الحركات الرئيسي عن طريق تغيير [page:.timeScale timeScale] (باستخدام [page:.setEffectiveTimeScale setEffectiveTimeScale] أو [page:.setDuration setDuration]).<br />
+		</p>
+
+		<h3>[property:Number timeScale]</h3>
+		<p>
+			Sعامل التحجيم للوقت [page:.time time]. تؤدي القيمة 0 إلى توقف الرسوم المتحركة مؤقتًا. تؤدي القيم السالبة إلى تشغيل الرسوم المتحركة بشكل عكسي. الافتراضي هو 1.<br /><br />
+			الخصائص / الطرق المتعلقة *timeScale* (على التوالي *time*) هم:
+			[page:.getEffectiveTimeScale getEffectiveTimeScale],
+			[page:.halt halt],
+			[page:.paused paused],
+			[page:.setDuration setDuration],
+			[page:.setEffectiveTimeScale setEffectiveTimeScale],
+			[page:.stopWarping stopWarping],
+			[page:.syncWith syncWith],
+			[page:.warp warp].
+		</p>
+
+		<h3>[property:Number weight]</h3>
+		<p>
+			درجة تأثير هذا الإجراء (في المجال القائم بين [0 ، 1]). يمكن استخدام القيم بين 0 (بدون تأثير) و 1 (تأثير كامل) للمزج بين عدة إجراءات. الافتراضي هو 1. <br /><br />
+			الخصائص / الطرق المتعلقة *weight* هي:
+			[page:.crossFadeFrom crossFadeFrom],
+			[page:.crossFadeTo crossFadeTo],
+			[page:.enabled enabled],
+			[page:.fadeIn fadeIn],
+			[page:.fadeOut fadeOut],
+			[page:.getEffectiveWeight getEffectiveWeight],
+			[page:.setEffectiveWeight setEffectiveWeight],
+			[page:.stopFading stopFading].
+		</p>
+
+		<h3>[property:Boolean zeroSlopeAtEnd]</h3>
+		<p>
+			يتيح تشغيل السلس بدون مقاطع منفصلة للبداية والحلقة والنهاية. الافتراضي هو *true*.
+		</p>
+
+		<h3>[property:Boolean zeroSlopeAtStart]</h3>
+		<p>
+			يتيح تشغيل السلس بدون مقاطع منفصلة للبداية والحلقة والنهاية. الافتراضي هو *true*.
+		</p>
+
+
+		<h2>الوظائف (Methods)</h2>
+
+
+		<h3>[method:AnimationAction crossFadeFrom]( [param:AnimationAction fadeOutAction], [param:Number durationInSeconds], [param:Boolean warpBoolean] )</h3>
+		<p>
+			يؤدي هذا الإجراء إلى تلاشي [page:.fadeIn fade in] ، مما يؤدي إلى تلاشي إجراء آخر في نفس الوقت ، خلال الفترة الزمنية المنقضية. يمكن تقييد هذه الطريقة.<br /><br />
+
+			إذا كانت warpBoolean تحمل قيمة true ، فسيتم تطبيق [page:.warp warping] إضافيًا (تغييرات تدريجية في المقاييس الزمنية).<br /><br />
+
+			ملاحظة: كما هو الحال مع *fadeIn*/*fadeOut* ، يبدأ / ينتهي التلاشي بوزن 1.
+
+		</p>
+
+		<h3>[method:AnimationAction crossFadeTo]( [param:AnimationAction fadeInAction], [param:Number durationInSeconds], [param:Boolean warpBoolean] )</h3>
+		<p>
+			يؤدي هذا الإجراء إلى تلاشي [page:.fadeOut fade out] ، يتلاشى في إجراء آخر في وقت واحد ، خلال الفترة الزمنية المنقضية. يمكن تقييد هذه الطريقة ضمن سلسلة.<br /><br />
+			إذا كانت warpBoolean صحيحة ، فسيتم تطبيق [page:.warp warping] إضافيًا (تغييرات تدريجية في المقاييس الزمنية).<br /><br />
+
+			ملاحظة: كما هو الحال مع *fadeIn*/*fadeOut* ، يبدأ / ينتهي التلاشي بوزن 1.
+		</p>
+
+		<h3>[method:AnimationAction fadeIn]( [param:Number durationInSeconds] )</h3>
+		<p>
+			يزيد [page:.weight weight] هذا الإجراء تدريجياً من 0 إلى 1 ، خلال الفترة الزمنية المنقضية. يمكن تقييد هذه الطريقة ضمن سلسلة.
+		</p>
+
+		<h3>[method:AnimationAction fadeOut]( [param:Number durationInSeconds] )</h3>
+		<p>
+			يقلل [page:.weight weight] هذا الإجراء تدريجيًا من 1 إلى 0 ، خلال الفترة الزمنية المنقضية. يمكن تقييد هذه الطريقة ضمن سلسلة.
+		</p>
+
+		<h3>[method:Number getEffectiveTimeScale]()</h3>
+		<p>
+			تُرجع مقياس الوقت الفعال (مع الأخذ في الاعتبار حالات التواء و قيمة [page:.paused paused] الحالية).
+		</p>
+
+		<h3>[method:number getEffectiveWeight]()</h3>
+		<p>
+			تُرجع الوزن الفعال (مع الأخذ في الاعتبار حالات التلاشي الحالية و [page:.enabled enabled]).
+		</p>
+
+		<h3>[method:AnimationClip getClip]()</h3>
+		<p>
+			تُرجع المقطع الذي يحتوي على بيانات الرسوم المتحركة لهذا الإجراء.
+		</p>
+
+		<h3>[method:AnimationMixer getMixer]()</h3>
+		<p>
+			تُرجع الخالط المسؤول عن تشغيل هذا الإجراء.
+		</p>
+
+		<h3>[method:Object3D getRoot]()</h3>
+		<p>
+			تُرجع الكائن الجذر الذي تم تنفيذ هذا الإجراء عليه.
+		</p>
+
+		<h3>[method:AnimationAction halt]( [param:Number durationInSeconds] )</h3>
+		<p>
+			تعمل على إبطاء سرعة هذه الرسوم المتحركة إلى 0 من خلال إنقاص [page:.timeScale timeScale] تدريجيًا (بدءًا من قيمتها الحالية) ، خلال الفترة الزمنية المنقضية. يمكن تقييد هذه الطريقة ضمن سلسلة.
+		</p>
+
+		<h3>[method:Boolean isRunning]()</h3>
+		<p>
+			تُرجع true إذا كان الإجراء [page:.time time] قيد التشغيل حاليًا.<br /><br />
+
+			بالإضافة إلى تفعيله في الخالط (انظر [page:.isScheduled isScheduled]) ، يجب استيفاء الشروط التالية:
+			<br/>
+			[page:.paused paused] يساوي false ،<br/> [page:.enabled enabled] يساوي true ،
+			<br/>
+			[page:.timeScale timeScale] يختلف عن 0 ، ولا توجد جدولة لبدء متأخر ([page:.startAt startAt]).<br /><br />
+
+			ملاحظة: لا يعني كون *isRunning* تحمل قيمة *true* أنه يمكن رؤية الرسوم المتحركة بالفعل. هذا هو الحال فقط ، إذا تم تعيين [page:.weight weight] بشكل إضافي على قيمة غير صفرية.
+		</p>
+
+		<h3>[method:Boolean isScheduled]()</h3>
+		<p>
+			تُرجع قيمة *true* ، إذا تم تنشيط هذا الإجراء في الخالط.<br /><br />
+			ملاحظة: هذا لا يعني بالضرورة أن الرسوم المتحركة تعمل بالفعل (قارن الشروط الإضافية لـ [page:.isRunning isRunning]).
+		</p>
+
+		<h3>[method:AnimationAction play]()</h3>
+		<p>
+			يعلم الخالط بضرورة البدء في تنشيط الحدث (action). يمكن تقييد هذه الطريقة ضمن سلسلة. <br /><br />
+
+			ملاحظة: لا يعني تنشيط هذا الإجراء بالضرورة أن الرسوم المتحركة تبدأ على الفور: إذا كان الإجراء قد انتهى بالفعل من قبل (من خلال الوصول إلى نهاية الحلقة الأخيرة) ، أو إذا تم تعيين وقت لبدء متأخر (عبر [page:.startAt startAt]) ،
+			يجب تنفيذ [page:.reset reset] أولاً. يمكن لبعض الإعدادات الأخرى ([page:.paused paused]=true, [page:.enabled enabled]=false,
+			[page:.weight weight]=0, [page:.timeScale timeScale]=0) منع تشغيل الرسوم المتحركة أيضًا.
+		</p>
+
+		<h3>[method:AnimationAction reset]()</h3>
+		<p>
+			يتم إعادة الحدث إلى وضع البداية. يمكن تقييد هذه الطريقة ضمن سلسلة.<br /><br />
+
+			تقوم هذه الطريقة بتعيين [page:.paused paused] إلى false ، و [page:.enabled enabled] إلى true ، ومن [page:.time time] إلى 0 ، وتقطع أي تزييف مجدول ، وتزيل عدد الحلقات الداخلية وجدولة البدء المتأخر.<br /><br />
+
+			ملاحظة: يتم استدعاء. *reset* دائمًا بواسطة [page:.stop stop] ، ولكن *reset* لا يتصل بـ *stop* نفسه.
+			هذا يعني: إذا كنت تريد كلاهما ، reset وstop ، لا تتصل بـ *reset* بل إتصل بـ *stop* بدلا من ذلك.
+		</p>
+
+		<h3>[method:AnimationAction setDuration]( [param:Number durationInSeconds] )</h3>
+		<p>
+			يضبط المدة لحلقة واحدة من هذا الإجراء (بضبط [page:.timeScale timeScale] وإيقاف أي إلتفاف مجدول). يمكن تقييد هذه الطريقة ضمن سلسلة.
+		</p>
+
+		<h3>[method:AnimationAction setEffectiveTimeScale]( [param:Number timeScale] )</h3>
+		<p>
+			يضبط [page:.timeScale timeScale] ويوقف أي إلتفاف مجدول. يمكن تقييد هذه الطريقة ضمن سلسلة. <br /><br />
+
+			إذا كانت القيمة [page:.paused paused] تحمل false ، فسيتم أيضًا تعيين المقياس الزمني الفعال (خاصية داخلية) على هذه القيمة ؛
+			وإلا فسيتم تعيين النطاق الزمني الفعال (الذي يؤثر بشكل مباشر على الرسم المتحرك في هذه اللحظة) على 0.<br /><br />
+
+			ملاحظة: *paused* لن يتم تحويله إلى *true* تلقائيًا ، إذا تم ضبط *timeScale* على 0 بهذه الطريقة.
+		</p>
+
+		<h3>[method:AnimationAction setEffectiveWeight]( [param:Number weight] )</h3>
+		<p>
+			تضبط [page:.weight weight] وتوقف أي تضاؤل مجدول. يمكن تقييد هذه الطريقة ضمن سلسلة. <br /><br />
+
+			إذا كانت قيمة [page:.enabled enabled] هي true ، فسيتم أيضًا تعيين الوزن الفعال (خاصية داخلية) على هذه القيمة ؛
+			وإلا فسيتم تعيين الوزن الفعال (الذي يؤثر بشكل مباشر على الرسم المتحرك في هذه اللحظة) على 0.<br /><br />
+
+			ملاحظة: لن يتم تحويل *enabled* إلى false تلقائيًا ، إذا تم ضبط *weight* على 0 بهذه الطريقة.
+		</p>
+
+		<h3>[method:AnimationAction setLoop]( [param:Number loopMode], [param:Number repetitions] )</h3>
+		<p>
+			يعين [page:.loop loop mode] وعدد [page:.repetitions repetitions]. يمكن تقييد هذه الطريقة ضمن سلسلة
+		</p>
+
+		<h3>[method:AnimationAction startAt]( [param:Number startTimeInSeconds] )</h3>
+		<p>
+			يحدد وقت البداية المتأخرة (عادةً ما يتم تمريره كـ [page:AnimationMixer.time] + deltaTimeInSeconds). يمكن تقييد هذه الطريقة ضمن سلسلة. <br /><br />
+
+			ملاحظة: ستبدأ الرسوم المتحركة فقط في الوقت المحدد ، إذا تم ربط *startAt* بـ [page:.play play] ،
+			أو إذا تم بالفعل تنشيط الإجراء في الخالط (عن طريق استدعاء سابق لـ. *play* ، دون إيقافه أو إعادة تعيينه في هذه الأثناء).
+		</p>
+
+		<h3>[method:AnimationAction stop]()</h3>
+		<p>
+			يخبر الخالط بإلغاء تنشيط هذا الإجراء. يمكن تقييد هذه الطريقة ضمن سلسلة. <br /><br />
+
+			سيتم إيقاف الإجراء على الفور وإعادة تعيين [page:.reset reset] بالكامل.<br /><br />
+
+			ملاحظة: يمكنك إيقاف جميع الإجراءات النشطة على نفس الخالط دفعة واحدة عبر [page:AnimationMixer.stopAllAction mixer.stopAllAction].
+		</p>
+
+		<h3>[method:AnimationAction stopFading]()</h3>
+		<p>
+			يوقف أي [page:.fadeIn fading] مجدولًا يتم تطبيقه على هذا الحدث. يمكن تقييد هذه الطريقة ضمن سلسلة.
+		</p>
+
+		<h3>[method:AnimationAction stopWarping]()</h3>
+		<p>
+			يوقف أي [page:.warp warping] مجدولًا يتم تطبيقه على هذا الحدث. يمكن تقييد هذه الوظيفة ضمن سلسلة.
+		</p>
+
+		<h3>[method:AnimationAction syncWith]( [param:AnimationAction otherAction] )</h3>
+		<p>
+			يزامن هذا الإجراء مع الإجراء الآخر الذي تم تمريره. يمكن تقييد هذه الوظيفة ضمن سلسلة. <br /><br />
+
+			تتم المزامنة عن طريق تعيين قيم [page:.time time] و [page:.timeScale timeScale] لهذا الإجراء على القيم المقابلة للإجراء الآخر (إيقاف أي التواء مجدول).<br /><br />
+
+			ملاحظة: لن يتم الكشف عن التغييرات المستقبلية في *time* و *timeScale* للإجراء الآخر.
+		</p>
+
+		<h3>[method:AnimationAction warp]( [param:Number startTimeScale], [param:Number endTimeScale], [param:Number durationInSeconds] )</h3>
+		<p>
+			يغير سرعة التشغيل ، خلال الفترة الزمنية المنقضية ، عن طريق تعديل [page:.timeScale timeScale] تدريجيًا من *startTimeScale* إلى *endTimeScale*.يمكن تقييد هذه الوظيفة ضمن سلسلة.
+		</p>
+
+
+		<h2>الأحداث (Events)</h2>
+
+
+		<p class="desc">
+			هناك حدثان يشيران عند انتهاء حلقة واحدة من الإجراء على التوالي. يمكنك الرد عليهم من خلال:
+		</p>
+		<code>
+		mixer.addEventListener( 'loop', function( e ) { …} ); // properties of e: type, action and loopDelta
+		mixer.addEventListener( 'finished', function( e ) { …} ); // properties of e: type, action and direction
+		</code>
+
+		<h2>المصدر (Source)</h2>
+
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		</p>
+	</body>
+</html>

+ 130 - 0
docs/api/ar/animation/AnimationClip.html

@@ -0,0 +1,130 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>[name]</h1>
+
+		<p class="desc">
+			AnimationClip عبارة عن مجموعة قابلة لإعادة الاستخدام من مسارات الإطارات الرئيسية التي تمثل رسمًا متحركًا.<br /><br />
+
+			للحصول على نظرة عامة حول العناصر المختلفة لنظام الرسوم المتحركة three.js ، راجع مقالة "نظام الحركات" في قسم "الخطوات التالية" من الدليل.
+		</p>
+
+
+		<h2>المنشئ (Constructor)</h2>
+
+
+		<h3>[name]( [param:String name], [param:Number duration], [param:Array tracks] )</h3>
+		<p>
+			[page:String name] - اسم لهذا المقطع.<br />
+			[page:Number duration] - مدة هذا المقطع (بالثواني). إذا تم تمرير قيمة سالبة ، فسيتم حساب المدة من *tracks* التي تم تمريرها.<br />
+			[page:Array tracks] - مجموعة (جدول) من [page:KeyframeTrack KeyframeTracks].<br /><br />
+
+			ملاحظة: بدلاً من إنشاء AnimationClip مباشرةً مع المُنشئ ، يمكنك استخدام إحدى طرقه الثابتة لإنشاء AnimationClips: من JSON ([page:.parse parse]) ، من تسلسلات الهدف التحويلية ([page:.CreateFromMorphTargetSequence CreateFromMorphTargetSequence] ،
+			[page:.CreateClipsFromMorphTargetSequences CreateClipsFromMorphTargetSequences]) أو من التسلسلات الهرمية للرسوم المتحركة ([page:.parseAnimation parseAnimation]) - إذا كان النموذج الخاص بك لا يحتوي بالفعل على AnimationClips في مجموعة الرسوم المتحركة الخاصة بهندسة.
+		</p>
+
+
+		<h2>الخصائص (Properties)</h2>
+
+
+		<h3>[property:Number duration]</h3>
+		<p>
+			مدة هذا المقطع (بالثواني). يمكن حساب ذلك من مجموعة [page:.tracks tracks]  عبر [page:.resetDuration resetDuration].
+		</p>
+
+		<h3>[property:String name]</h3>
+		<p>
+			اسم لهذا المقطع. يمكن البحث عن مقطع معين طريق بإستعمال [page:.findByName findByName].
+		</p>
+
+		<h3>[property:Array tracks]</h3>
+		<p>
+			جدول يحتوي على [page:KeyframeTrack] لكل خاصية يتم تحريكها بواسطة هذا المقطع.
+		</p>
+
+		<h3>[property:String uuid]</h3>
+		<p>
+			[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] لهذا المقطع. يتم تعيينه تلقائيًا ولا يجب تحريره.
+		</p>
+
+
+		<h2>الوظائف (Methods)</h2>
+
+
+		<h3>[method:AnimationClip clone]()</h3>
+		<p>
+			إرجاع نسخة من هذا المقطع.
+		</p>
+
+		<h3>[method:this optimize]()</h3>
+		<p>
+			يحسن من أداء كل مسار عن طريق إزالة المفاتيح المتسلسلة المتكررة (الشائعة في تسلسلات هدف التحويل - morph target sequences).
+		</p>
+
+		<h3>[method:this resetDuration]()</h3>
+		<p>
+			يضبط [page:.duration duration] للمقطع على أطول مدة [page:KeyframeTrack] ممكنة.
+		</p>
+
+		<h3>[method:this trim]()</h3>
+		<p>
+			اقتطاع كل المسارات حسب مدة المقطع.
+		</p>
+
+		<h3>[method:Boolean validate]()</h3>
+		<p>
+			يقوم بتأدية الحد الأدنى من التحقق من الصحة على كل مسار في المقطع. إرجاع *true* إذا كانت جميع المسارات صالحة.
+		</p>
+
+
+		<h2>الوظائف الساكنة (Static Methods)</h2>
+
+
+		<h3>[method:Array CreateClipsFromMorphTargetSequences]( [param:String name], [param:Array morphTargetSequence], [param:Number fps], [param:Boolean noLoop] )</h3>
+		<p>
+			تُرجع مصفوفة من AnimationClips الجديدة التي تم إنشاؤها من [page:Geometry.morphTargets morph target sequences] من الشكل الهندسي ، في محاولة لفرز أسماء الأهداف التحويلية إلى أنماط قائمة على مجموعة الرسوم المتحركة مثل "Walk_001 ، Walk_002 ، Run_001 ، Run_002 ...".
+		</p>
+
+		<h3>[method:AnimationClip CreateFromMorphTargetSequence]( [param:String name], [param:Array morphTargetSequence], [param:Number fps], [param:Boolean noLoop] )</h3>
+		<p>
+			يُرجع مقطع رسوم متحركة جديدًا من [page:Geometry.morphTargets morph targets array] تم تمريره لشكل هندسي ، مع أخذ اسم وعدد الإطارات في الثانية.<br /><br />
+
+			ملاحظة: قيمة fps مطلوبة و ضرورية ، ولكن يمكن إعادة ضبظ سرعة الرسوم المتحركة في *AnimationAction* عبر [page:AnimationAction.setDuration animationAction.setDuration].
+		</p>
+
+		<h3>[method:AnimationClip findByName]( [param:Object objectOrClipArray], [param:String name] )</h3>
+		<p>
+			يبحث عن AnimationClip بالاسم ، مع الأخذ كقيمة إما مصفوفة من AnimationClips ، أو شبكة أو شكل هندسي يحتوي على جدول مسمى "animations".
+		</p>
+
+		<h3>[method:AnimationClip parse]( [param:Object json] )</h3>
+		<p>
+			يترجم تمثيل JSON لمقطع ويعيد AnimationClip.
+		</p>
+
+		<h3>[method:AnimationClip parseAnimation]( [param:Object animation], [param:Array bones] )</h3>
+		<p>
+			يوزع تنسيق animation.hierarchy ويعيد AnimationClip.
+		</p>
+
+		<h3>[method:Object toJSON]( [param:AnimationClip clip] )</h3>
+		<p>
+			يأخذ AnimationClip ويعيد كائن JSON.
+		</p>
+
+
+		<h2>المصدر (Source)</h2>
+
+
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		</p>
+	</body>
+</html>

+ 110 - 0
docs/api/ar/animation/AnimationMixer.html

@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>[name]</h1>
+
+		<p class="desc">
+			AnimationMixer هو مشغل للرسوم المتحركة على كائن معين في المشهد. عندما يتم تحريك كائنات متعددة في المشهد بشكل مستقل ، يمكن استخدام AnimationMixer واحد لكل كائن.<br /><br />
+
+			للحصول على نظرة عامة حول العناصر المختلفة لنظام الرسوم المتحركة three.js ، راجع مقالة "نظام الحركات" في قسم "الخطوات التالية" من الدليل.
+		</p>
+
+
+		<h2>المنشئ (Constructor)</h2>
+
+
+		<h3>[name]( [param:Object3D rootObject] )</h3>
+		<p>
+			[page:Object3D rootObject] - الكائن الذي سيتم تشغيل رسومه المتحركة بواسطة هذا الخالط.<br />
+		</p>
+
+
+		<h2>الخصائص (Properties)</h2>
+
+
+		<h3>[property:Number time]</h3>
+		<p>
+			وقت الخالط الكامل (بالثواني ؛ بدءًا من 0 عند إنشاء الخالط).
+		</p>
+
+		<h3>[property:Number timeScale]</h3>
+		<p>
+			عامل تحجيم لـ [page:.time mixer time].<br /><br />
+
+			ملاحظة: يأدي ضبط مقياس وقت الخلاط على 0 والعودة لاحقًا إلى 1 إلى إمكانية إيقاف / إلغاء إيقاف مؤقت لجميع الإجراءات التي يتحكم فيها هذا الخالط.
+		</p>
+
+
+		<h2>الوظائف (Methods)</h2>
+
+
+		<h3>[method:AnimationAction clipAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
+		<p>
+			إرجاع [page:AnimationAction] للمقطع الذي تم تمريره ، اختيارياً باستخدام كائن جذر مختلف عن الجذر الافتراضي لجهاز المزج. يمكن أن تكون القيمة الأولى إما كائن [page:AnimationClip] أو اسم AnimationClip.<br /><br />
+
+			إذا لم يكن هناك إجراء يلائم المقطع ومعلمات الجذر ، فسيتم إنشاؤه بهذه الطريقة. استدعاء هذه الطريقة عدة مرات مع نفس المقطع ومعلمات الجذر يؤدي دائمًا إلى إرجاع نفس مثيل المقطع.
+		</p>
+
+		<h3>[method:AnimationAction existingAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
+		<p>
+			إرجاع [page:AnimationAction] موجود للمقطع الذي تم تمريره ، اختيارياً باستخدام كائن جذر مختلف عن الجذر الافتراضي لجهاز الخالط.<br /><br />
+
+			يمكن أن تكون القيمة الأولى إما كائن [page:AnimationClip] أو اسم AnimationClip.
+		</p>
+
+		<h3>[method:Object3D getRoot]()</h3>
+		<p>
+			إرجاع جذركائن الخالط.
+		</p>
+
+		<h3>[method:AnimationMixer stopAllAction]()</h3>
+		<p>
+			يقوم بإلغاء تنشيط كافة الإجراءات المجدولة مسبقًا على هذا الخالط.
+		</p>
+
+		<h3>[method:AnimationMixer update]([param:Number deltaTimeInSeconds]) </h3>
+		<p>
+			يعمل على تقدم وقت الخالط العالمي وتحديث الرسوم المتحركة.<br /><br />
+
+			يتم ذلك عادةً في حلقة العرض ، حيث يتم تمرير [page:Clock.getDelta clock.getDelta] مقياسًا بواسطة جهاز الخلاط [page:.timeScale timeScale]).
+		</p>
+
+		<h3>[method:AnimationMixer setTime]([param:Number timeInSeconds]) </h3>
+		<p>
+			يضبط الخالط العام على وقت محدد ويقوم بتحديث الرسوم المتحركة وفقًا لذلك.<br /><br />
+
+			يكون هذا مفيدًا عندما تحتاج إلى الانتقال إلى وقت محدد في رسم متحرك. سيتم قياس القيمة المدخلة حسب مقياس الوقت لجهاز الخالط [page:.timeScale timeScale].
+		</p>
+
+		<h3>[method:null uncacheClip]([param:AnimationClip clip])</h3>
+
+		<p>
+			إلغاء تخصيص كل موارد الذاكرة لمقطع.
+		</p>
+
+		<h3>[method:null uncacheRoot]([param:Object3D root]) </h3>
+		<p>
+			إلغاء تخصيص كافة موارد الذاكرة لكائن جذر.
+		</p>
+
+		<h3>[method:null uncacheAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
+		<p>
+			إلغاء تخصيص كل موارد الذاكرة لإجراء ما.
+		</p>
+
+
+		<h2>المصدر (Source)</h2>
+
+
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		</p>
+	</body>
+</html>

+ 117 - 0
docs/api/en/core/GLBufferAttribute.html

@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body>
+		<h1>[name]</h1>
+
+		<p class="desc">
+			This buffer attribute class does not construct a VBO. Instead, it uses
+			whatever VBO is passed in constructor and can later be altered via the
+			*buffer* property.<br /><br />
+			It is required to pass additional params alongside the VBO. Those are:
+			the GL context, the GL data type, the number of components per vertex,
+			the number of bytes per component, and the number of vertices.<br /><br />
+			The most common use case for this class is when some kind of GPGPU
+			calculation interferes or even produces the VBOs in question.
+		</p>
+
+		<h2>Constructor</h2>
+		<h3>[name]( [param:WebGLBuffer buffer], [param:GLenum type], [param:Integer itemSize], [param:Integer elementSize], [param:Integer count] )</h3>
+		<p>
+		*buffer* — Must be a <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer" target="_blank">WebGLBuffer</a>.
+		<br />
+		*type* — One of <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Data_types" target="_blank">WebGL Data Types</a>.
+		<br />
+		*itemSize* — The number of values of the array that should be associated with
+		a particular vertex. For instance, if this
+		attribute is storing a 3-component vector (such as a position, normal, or color), then itemSize should be 3.
+		<br />
+		*elementSize* — 1, 2 or 4. The corresponding size (in bytes) for the given "type" param.
+		<ul>
+			<li>gl.FLOAT: 4</li>
+			<li>gl.UNSIGNED_SHORT: 2</li>
+			<li>gl.SHORT: 2</li>
+			<li>gl.UNSIGNED_INT: 4</li>
+			<li>gl.INT: 4</li>
+			<li>gl.BYTE: 1</li>
+			<li>gl.UNSIGNED_BYTE: 1</li>
+		</ul>
+		*count* — The expected number of vertices in VBO.
+		</p>
+
+		<h2>Properties</h2>
+
+		<h3>[property:WebGLBuffer buffer]</h3>
+		<p>
+			The current <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer" target="_blank">WebGLBuffer</a> instance.
+		</p>
+
+		<h3>[property:Integer count]</h3>
+		<p>
+			The expected number of vertices in VBO.
+		</p>
+
+		<h3>[property:Integer itemSize]</h3>
+		<p>
+			How many values make up each item (vertex).
+		</p>
+
+		<h3>[property:Integer elementSize]</h3>
+		<p>
+			Stores the corresponding size in bytes for the current *type* property value.
+		</p>
+		<p>
+			See above (constructor) for a list of known type sizes.
+		</p>
+
+		<h3>[property:GLenum type]</h3>
+		<p>
+			A <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Data_types" target="_blank">WebGL Data Type</a>
+			describing the underlying VBO contents.
+		</p>
+		<p>
+			Set this property together with *elementSize*. The recommended way is
+			using the *setType* method.
+		</p>
+
+		<h3>[property:Boolean isGLBufferAttribute]</h3>
+		<p>
+			Read-only. Always *true*.
+		</p>
+
+		<h2>Methods</h2>
+
+		<h3>[method:null setBuffer]( buffer ) </h3>
+		<p>Sets the *buffer* property.</p>
+
+		<h3>[method:null setType]( type, elementSize ) </h3>
+		<p>Sets the both *type* and *elementSize* properties.</p>
+
+		<h3>[method:null setItemSize]( itemSize ) </h3>
+		<p>Sets the *itemSize* property.</p>
+
+		<h3>[method:null setCount]( count ) </h3>
+		<p>Sets the *count* property.</p>
+
+		<h3>[property:Integer version]</h3>
+		<p>
+		A version number, incremented every time the needsUpdate property is set to true.
+		</p>
+
+		<h3>[property:Boolean needsUpdate]</h3>
+		<p>
+		Default is *false*. Setting this to true increments [page:GLBufferAttribute.version version].
+		</p>
+
+		<h2>Source</h2>
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		</p>
+	</body>
+</html>

+ 1 - 1
docs/api/en/materials/Material.html

@@ -211,7 +211,7 @@
 		<h3>[property:Boolean premultipliedAlpha]</h3>
 		<p>
 		Whether to premultiply the alpha (transparency) value.
-		See [Example:webgl_materials_physical_transparency WebGL / Materials / Physical / Transparency] for an example of the difference.
+		See [Example:webgl_materials_physical_transmission WebGL / Materials / Physical / Transmission] for an example of the difference.
 		Default is *false*.
 		</p>
 

+ 6 - 8
docs/api/en/materials/ShaderMaterial.html

@@ -346,6 +346,12 @@ this.extensions = {
 		as a string directly or loaded via AJAX instead.
 		</p>
 
+		<h3>[property:String glslVersion]</h3>
+		<p>
+		Defines the GLSL version of custom shader code. Only relevant for WebGL 2 in order to define whether to specify
+		GLSL 3.0 or not. Valid values are *THREE.GLSL1* or *THREE.GLSL3*. Default is *null*.
+		</p>
+
 		<h3>[property:String index0AttributeName]</h3>
 		<p>
 			If set, this calls [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation gl.bindAttribLocation]
@@ -378,19 +384,11 @@ this.extensions = {
 		When set to true, morph normal attributes are available in the vertex shader. Default is *false*.
 		</p>
 
-
-		<h3>[property:WebGLProgram program]</h3>
-		<p>
-		The compiled shader program associated with this material, generated by [page:WebGLRenderer].
-		You should not need to access this property.
-		</p>
-
 		<h3>[property:Boolean flatShading]</h3>
 		<p>
 		Define whether the material is rendered with flat shading. Default is false.
 		</p>
 
-
 		<h3>[property:Boolean skinning]</h3>
 		<p>
 		Define whether the material uses skinning; true to pass skinning attributes to the shader. Default is false.

+ 1 - 1
docs/api/en/renderers/WebGLCubeRenderTarget.html

@@ -42,7 +42,7 @@
 		[page:Number anisotropy] - default is *1*. See [page:Texture.anistropy]<br />
 		[page:Constant encoding] - default is [page:Textures LinearEncoding]. <br />
 		[page:Boolean depthBuffer] - default is *true*. Set this to false if you don't need it. <br />
-		[page:Boolean stencilBuffer] - default is *true*. Set this to false if you don't need it.<br /><br />
+		[page:Boolean stencilBuffer] - default is *false*. Set this to true if you need it.<br /><br />
 
 		Creates a new [name]
 		</p>

+ 2 - 2
docs/api/en/renderers/WebGLRenderTarget.html

@@ -41,7 +41,7 @@
 		[page:Number anisotropy] - default is *1*. See [page:Texture.anisotropy]<br />
 		[page:Constant encoding] - default is [page:Textures LinearEncoding]. <br />
 		[page:Boolean depthBuffer] - default is *true*. Set this to false if you don't need it. <br />
-		[page:Boolean stencilBuffer] - default is *true*. Set this to false if you don't need it.<br /><br />
+		[page:Boolean stencilBuffer] - default is *false*. Set this to true if you need it.<br /><br />
 
 		Creates a new [name]
 		</p>
@@ -85,7 +85,7 @@
 
 		<h3>[property:boolean stencilBuffer]</h3>
 		<p>
-		Renders to the stencil buffer. Default is true.
+		Renders to the stencil buffer. Default is false.
 		</p>
 
 		<h3>[property:DepthTexture depthTexture]</h3>

+ 2 - 1
docs/api/en/scenes/Scene.html

@@ -33,7 +33,8 @@
 
 		<h3>[property:Object background]</h3>
 		<p>
-		If not null, sets the background used when rendering the scene, and is always rendered first. Can be set to a [page:Color] which sets the clear color, a [page:Texture] covering the canvas, or a cubemap as a [page:CubeTexture] or [page:WebGLCubeRenderTarget]. Default is null.
+		If not null, sets the background used when rendering the scene, and is always rendered first.
+		Can be set to a [page:Color] which sets the clear color, a [page:Texture] covering the canvas, a cubemap as a [page:CubeTexture] or [page:WebGLCubeRenderTarget] or an equirectangular as a [page:Texture] . Default is null.
 		</p>
 
 		<h3>[property:Texture environment]</h3>

+ 5 - 5
docs/api/en/textures/DepthTexture.html

@@ -13,8 +13,8 @@
 		<h1>[name]</h1>
 
 		<p class="desc">
-		Creates a texture for use as a Depth Texture. Require support for the
-	[link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture] extension.
+		This class can be used to automatically save the depth information of a rendering into a texture.
+		When using a WebGL 1 rendering context, [name] requires support for the [link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture] extension.
 		</p>
 
 		<h2>Examples</h2>
@@ -31,11 +31,11 @@
 
 		[page:Number height] -- height of the texture.<br />
 
-		[page:Constant type] -- Default is [page:Textures THREE.UnsignedShortType].
+		[page:Constant type] -- Default is [page:Textures THREE.UnsignedShortType] when unsing [page:Textures DepthFormat] and [page:Textures THREE.UnsignedInt248Type] when using  [page:Textures DepthStencilFormat].
 		See [page:Textures type constants] for other choices.<br />
 
 		[page:Constant mapping] --
-		See [page:Textures type constants] for details.<br />
+		See [page:Textures mapping mode constants] for details.<br />
 
 		[page:Constant wrapS] -- The default is [page:Textures THREE.ClampToEdgeWrapping].
 		See [page:Textures wrap mode constants] for other choices.<br />
@@ -73,7 +73,7 @@
 
 		<h3>[page:Texture.type .type]</h3>
 		<p>
-		Default is [page:Textures THREE.UnsignedShortType].
+		Default is [page:Textures THREE.UnsignedShortType] when unsing [page:Textures DepthFormat] and [page:Textures THREE.UnsignedInt248Type] when using [page:Textures DepthStencilFormat].
 		See [page:Textures format constants] for details.<br />
 		</p>
 

+ 117 - 0
docs/api/zh/core/GLBufferAttribute.html

@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body>
+		<h1>[name]</h1>
+
+		<p class="desc">
+			This buffer attribute class does not construct a VBO. Instead, it uses
+			whatever VBO is passed in constructor and can later be altered via the
+			*buffer* property.<br /><br />
+			It is required to pass additional params alongside the VBO. Those are:
+			the GL context, the GL data type, the number of components per vertex,
+			the number of bytes per component, and the number of vertices.<br /><br />
+			The most common use case for this class is when some kind of GPGPU
+			calculation interferes or even produces the VBOs in question.
+		</p>
+
+		<h2>Constructor</h2>
+		<h3>[name]( [param:WebGLBuffer buffer], [param:GLenum type], [param:Integer itemSize], [param:Integer elementSize], [param:Integer count] )</h3>
+		<p>
+		*buffer* — Must be a <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer" target="_blank">WebGLBuffer</a>.
+		<br />
+		*type* — One of <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Data_types" target="_blank">WebGL Data Types</a>.
+		<br />
+		*itemSize* — The number of values of the array that should be associated with
+		a particular vertex. For instance, if this
+		attribute is storing a 3-component vector (such as a position, normal, or color), then itemSize should be 3.
+		<br />
+		*elementSize* — 1, 2 or 4. The corresponding size (in bytes) for the given "type" param.
+		<ul>
+			<li>gl.FLOAT: 4</li>
+			<li>gl.UNSIGNED_SHORT: 2</li>
+			<li>gl.SHORT: 2</li>
+			<li>gl.UNSIGNED_INT: 4</li>
+			<li>gl.INT: 4</li>
+			<li>gl.BYTE: 1</li>
+			<li>gl.UNSIGNED_BYTE: 1</li>
+		</ul>
+		*count* — The expected number of vertices in VBO.
+		</p>
+
+		<h2>Properties</h2>
+
+		<h3>[property:WebGLBuffer buffer]</h3>
+		<p>
+			The current <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer" target="_blank">WebGLBuffer</a> instance.
+		</p>
+
+		<h3>[property:Integer count]</h3>
+		<p>
+			The expected number of vertices in VBO.
+		</p>
+
+		<h3>[property:Integer itemSize]</h3>
+		<p>
+			How many values make up each item (vertex).
+		</p>
+
+		<h3>[property:Integer elementSize]</h3>
+		<p>
+			Stores the corresponding size in bytes for the current *type* property value.
+		</p>
+		<p>
+			See above (constructor) for a list of known type sizes.
+		</p>
+
+		<h3>[property:GLenum type]</h3>
+		<p>
+			A <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Data_types" target="_blank">WebGL Data Type</a>
+			describing the underlying VBO contents.
+		</p>
+		<p>
+			Set this property together with *elementSize*. The recommended way is
+			using the *setType* method.
+		</p>
+
+		<h3>[property:Boolean isGLBufferAttribute]</h3>
+		<p>
+			Read-only. Always *true*.
+		</p>
+
+		<h2>Methods</h2>
+
+		<h3>[method:null setBuffer]( buffer ) </h3>
+		<p>Sets the *buffer* property.</p>
+
+		<h3>[method:null setType]( type, elementSize ) </h3>
+		<p>Sets the both *type* and *elementSize* properties.</p>
+
+		<h3>[method:null setItemSize]( itemSize ) </h3>
+		<p>Sets the *itemSize* property.</p>
+
+		<h3>[method:null setCount]( count ) </h3>
+		<p>Sets the *count* property.</p>
+
+		<h3>[property:Integer version]</h3>
+		<p>
+		A version number, incremented every time the needsUpdate property is set to true.
+		</p>
+
+		<h3>[property:Boolean needsUpdate]</h3>
+		<p>
+		Default is *false*. Setting this to true increments [page:GLBufferAttribute.version version].
+		</p>
+
+		<h2>Source</h2>
+		<p>
+			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		</p>
+	</body>
+</html>

+ 1 - 1
docs/api/zh/materials/Material.html

@@ -182,7 +182,7 @@ Which stencil operation to perform when the comparison function returns true and
 </p>
 
 <h3>[property:Boolean premultipliedAlpha]</h3>
-<p> 是否预乘alpha(透明度)值。有关差异的示例,请参阅[Example:webgl_materials_physical_transparency WebGL / Materials / Physical / Transparency]。
+<p> 是否预乘alpha(透明度)值。有关差异的示例,请参阅[Example:webgl_materials_physical_transmission WebGL / Materials / Physical / Transmission]。
 	默认值为*false*。
 </p>
 

+ 2 - 0
docs/api/zh/materials/MeshBasicMaterial.html

@@ -94,6 +94,8 @@
 		<h3>[property:Float refractionRatio]</h3>
 		<p> 空气的折射率(IOR)(约为1)除以材质的折射率。它与环境映射模式[page:Textures THREE.CubeRefractionMapping]
 			和[page:Textures THREE.EquirectangularRefractionMapping]一起使用。
+			The index of refraction (IOR) of air (approximately 1) divided by the index of refraction of the material.
+			It is used with environment mapping mode [page:Textures THREE.CubeRefractionMapping].
 			折射率不应超过1。默认值为*0.98*。
 		</p>
 

+ 2 - 0
docs/api/zh/materials/MeshLambertMaterial.html

@@ -115,6 +115,8 @@
 		<h3>[property:Float refractionRatio]</h3>
 		<p>空气的折射率(IOR)(约为1)除以材质的折射率。它与环境映射模式[page:Textures THREE.CubeRefractionMapping]
 			和[page:Textures THREE.EquirectangularRefractionMapping]一起使用。
+			The index of refraction (IOR) of air (approximately 1) divided by the index of refraction of the material.
+			It is used with environment mapping mode [page:Textures THREE.CubeRefractionMapping].
 			折射率不应超过1。默认值为*0.98*。
 		</p>
 

+ 2 - 0
docs/api/zh/materials/MeshPhongMaterial.html

@@ -153,6 +153,8 @@
 		<h3>[property:Float refractionRatio]</h3>
 		<p> 空气的折射率(IOR)(约为1)除以材质的折射率。它与环境映射模式[page:Textures THREE.CubeRefractionMapping]
 			和[page:Textures THREE.EquirectangularRefractionMapping]一起使用。
+			The index of refraction (IOR) of air (approximately 1) divided by the index of refraction of the material.
+			It is used with environment mapping mode [page:Textures THREE.CubeRefractionMapping].
 			折射率不应超过1。默认值为*0.98*。
 		</p>
 

+ 2 - 0
docs/api/zh/materials/MeshStandardMaterial.html

@@ -190,6 +190,8 @@
 		<h3>[property:Float refractionRatio]</h3>
 		<p> 空气的折射率(IOR)(约为1)除以材质的折射率。它与环境映射模式[page:Textures THREE.CubeRefractionMapping]
 			和[page:Textures THREE.EquirectangularRefractionMapping]一起使用。
+			The index of refraction (IOR) of air (approximately 1) divided by the index of refraction of the material.
+			It is used with environment mapping mode [page:Textures THREE.CubeRefractionMapping].
 			折射率不应超过1。默认值为*0.98*。
 		</p>
 

+ 6 - 4
docs/api/zh/materials/ShaderMaterial.html

@@ -310,6 +310,12 @@ this.extensions = {
 			它也可以作为一个字符串直接传递或者通过AJAX加载。
 		</p>
 
+		<h3>[property:String glslVersion]</h3>
+		<p>
+		Defines the GLSL version of custom shader code. Only relevant for WebGL 2 in order to define whether to specify
+		GLSL 3.0 or not. Valid values are *THREE.GLSL1* or *THREE.GLSL3*. Default is *null*.
+		</p>
+
 		<h3>[property:String index0AttributeName]</h3>
 		<p> 如果设置,则调用[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation gl.bindAttribLocation]
 			将通用顶点索引绑定到属性变量。默认值未定义。
@@ -333,10 +339,6 @@ this.extensions = {
 		<p> When set to true, morph normal attributes are available in the vertex shader. Default is *false*.
 		</p>
 
-		<h3>[property:WebGLProgram program]</h3>
-		<p> 与此材质相关联的编译后的shader程序,由[page:WebGLRenderer]生成。您应该不需要访问此属性。
-		</p>
-
 		<h3>[property:Boolean flatShading]</h3>
 		<p> 定义材质是否使用平面着色进行渲染。默认值为false。
 		</p>

+ 1 - 1
docs/api/zh/renderers/WebGLCubeRenderTarget.html

@@ -39,7 +39,7 @@
 		[page:Number anisotropy] - 默认是 *1*. 参见[page:Texture.anistropy]<br />
 		[page:Constant encoding] - 默认是[page:Textures LinearEncoding]. <br />
 		[page:Boolean depthBuffer] - 默认是*true*.如果不需要就设为false <br />
-		[page:Boolean stencilBuffer] - 默认是*true*.如果不需要就设为false<br /><br />
+		[page:Boolean stencilBuffer] - default is *false*. Set this to true if you need it.<br /><br />
 
 		创建一个新[name]
 		</p>

+ 2 - 2
docs/api/zh/renderers/WebGLRenderTarget.html

@@ -37,7 +37,7 @@
 		[page:Number anisotropy] - 默认是*1*. 参见[page:Texture.anisotropy]<br />
 		[page:Constant encoding] - 默认是[page:Textures LinearEncoding]. <br />
 		[page:Boolean depthBuffer] - 默认是*true*. 如果不需要就设为false <br />
-		[page:Boolean stencilBuffer] - 默认是*true*. 如果不需要就设为false <br /><br />
+		[page:Boolean stencilBuffer] - default is *false*. Set this to true if you need it.<br /><br />
 
 		创建一个新[name]
 		</p>
@@ -81,7 +81,7 @@
 
 		<h3>[property:boolean stencilBuffer]</h3>
 		<p>
-		渲染到模板缓冲区。默认true.
+		Renders to the stencil buffer. Default is false.
 		</p>
 
 		<h3>[property:DepthTexture depthTexture]</h3>

+ 6 - 6
docs/api/zh/scenes/Scene.html

@@ -12,7 +12,7 @@
 		<h1>场景([name])</h1>
 
 		<p class="desc">
-			场景允许你在什么地方、摆放什么东西来交给three.js来渲染,这是你放置物体、灯光和摄像机的地方。</p>
+			场景能够让你在什么地方、摆放什么东西来交给three.js来渲染,这是你放置物体、灯光和摄像机的地方。</p>
 
 
 		<h2>构造器</h2>
@@ -34,15 +34,15 @@
 
 		<h3>[property:Object background]</h3>
 		<p>
-			若不为空,在渲染场景的时候将设置背景,且背景总是首先被渲染的。
-			可以设置一个用于的“clear”的[page:Color](颜色)、一个覆盖canvas的[page:Texture](纹理),
-			或是一个 cubemap as a [page:CubeTexture] or [page:WebGLCubeRenderTarget]。默认值为null。
+		若不为空,在渲染场景的时候将设置背景,且背景总是首先被渲染的。
+		可以设置一个用于的“clear”的[page:Color](颜色)、一个覆盖canvas的[page:Texture](纹理),
+		或是 a cubemap as a [page:CubeTexture] or [page:WebGLCubeRenderTarget] or an equirectangular as a [page:Texture]。默认值为null。
 		</p>
 
 		<h3>[property:Texture environment]</h3>
 		<p>
-		If not null, this texture is set as the environment map for all physical materials in the scene.
-		However, it's not possible to overwrite an existing texture assigned to [page:MeshStandardMaterial.envMap]. Default is null.
+    若该值不为null,则该纹理贴图将会被设为场景中所有物理材质的环境贴图。
+    然而,该属性不能够覆盖已存在的、已分配给 [page:MeshStandardMaterial.envMap] 的贴图。默认为null。
 		</p>
 
 		<h3>[property:Fog fog]</h3>

+ 5 - 4
docs/api/zh/textures/DepthTexture.html

@@ -13,7 +13,8 @@
 		<h1>深度纹理([name])</h1>
 
 		<p class="desc">
-		创建一个作为深度纹理贴图来使用的纹理。需要支持[link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture]扩展。
+		This class can be used to automatically save the depth information of a rendering into a texture.
+		When using a WebGL 1 rendering context, [name] requires support for the [link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture] extension.
 		</p>
 
 		<h2>例子</h2>
@@ -29,11 +30,11 @@
 
 		[page:Number height] -- 纹理的高度。<br />
 
-		[page:Constant type] -- 默认值是[page:Textures THREE.UnsignedShortType]。
+		[page:Constant type] -- Default is [page:Textures THREE.UnsignedShortType] when unsing [page:Textures DepthFormat] and [page:Textures THREE.UnsignedInt248Type] when using  [page:Textures DepthStencilFormat].
 		请参阅[page:Textures type constants](类型常量)来了解其他选项。<br />
 
 		[page:Constant mapping] --
-		请参阅[page:Textures mapping constants](映射模式常量)来了解其他选项。<br />
+		请参阅[page:Textures mapping mode constants](映射模式常量)来了解其他选项。<br />
 
 		[page:Constant wrapS] -- 默认值是[page:Textures THREE.ClampToEdgeWrapping].
 		请参阅[page:Textures wrap mode constants](包裹模式常量)来了解其他选项。<br />
@@ -71,7 +72,7 @@
 
 		<h3>[page:Texture.type .type]</h3>
 		<p>
-		默认值是[page:Textures THREE.UnsignedShortType]。
+		Default is [page:Textures THREE.UnsignedShortType] when unsing [page:Textures DepthFormat] and [page:Textures THREE.UnsignedInt248Type] when using [page:Textures DepthStencilFormat].
 		请参阅[page:Textures format constants]来了解详细信息。<br />
 		</p>
 

+ 8 - 1
docs/index.html

@@ -31,6 +31,7 @@
 					<div id="exitSearchButton"></div>
 					<select id="language">
 						<option value="en">en</option>
+						<option value="ar">ar</option>
 						<option value="zh">中文</option>
 					</select>
 				</div>
@@ -53,7 +54,7 @@
 
 			if ( /^(api|manual|examples)/.test( hash ) ) {
 
-				var hashLanguage = /^(api|manual|examples)\/(en|zh)\//.exec( hash );
+				var hashLanguage = /^(api|manual|examples)\/(en|ar|zh)\//.exec( hash );
 
 				if ( hashLanguage === null ) {
 
@@ -203,6 +204,12 @@
 				navigation = document.createElement( 'div' );
 				content.appendChild( navigation );
 
+				if ( language === 'ar' ) {
+
+					navigation.style.direction = 'rtl';
+
+				}
+
 				var localList = list[ language ];
 
 				for ( var section in localList ) {

+ 47 - 0
docs/list.js

@@ -89,6 +89,7 @@ var list = {
 				"EventDispatcher": "api/en/core/EventDispatcher",
 				"Face3": "api/en/core/Face3",
 				"Geometry": "api/en/core/Geometry",
+				"GLBufferAttribute": "api/en/core/GLBufferAttribute",
 				"InstancedBufferAttribute": "api/en/core/InstancedBufferAttribute",
 				"InstancedBufferGeometry": "api/en/core/InstancedBufferGeometry",
 				"InstancedInterleavedBuffer": "api/en/core/InstancedInterleavedBuffer",
@@ -461,6 +462,51 @@ var list = {
 
 	},
 
+	"ar": {
+
+		"الكتيب": {
+
+			"البدء": {
+				"إنشاء مشهد": "manual/ar/introduction/Creating-a-scene",
+				"التثبيت": "manual/ar/introduction/Installation",
+				"دعم المتصفح": "manual/ar/introduction/Browser-support",
+				"فحص توافق WebGL": "manual/ar/introduction/WebGL-compatibility-check",
+				"كيف تدير الأشياء محليًا": "manual/ar/introduction/How-to-run-things-locally",
+				"إعدادات Typescript": "manual/ar/introduction/Typescript-setup",
+				"رسم خطوط": "manual/ar/introduction/Drawing-lines",
+				"إنشاء نص": "manual/ar/introduction/Creating-text",
+				"تحميل نماذج ثلاثية الأبعاد": "manual/ar/introduction/Loading-3D-models",
+				"الأسئلة الشائعة": "manual/ar/introduction/FAQ",
+				"روابط مفيدة": "manual/ar/introduction/Useful-links"
+			},
+
+			"الخطوات التالية": {
+				"كيفية تحديث الأشياء": "manual/ar/introduction/How-to-update-things",
+				"كيفية التخلص من الأشياء": "manual/ar/introduction/How-to-dispose-of-objects",
+				"كيفية إنشاء محتوى VR": "manual/ar/introduction/How-to-create-VR-content",
+				"كيفية استخدام المعالجة اللاحقة (post-processing)": "manual/ar/introduction/How-to-use-post-processing",
+				"تحولات المصفوفة (Matrix transformations)": "manual/ar/introduction/Matrix-transformations",
+				"نظام الحركات": "manual/ar/introduction/Animation-system"
+			},
+
+			"أدوات البناء": {
+				"الاختبار مع NPM": "manual/ar/buildTools/Testing-with-NPM"
+			}
+
+		},
+
+		"المرجع": {
+
+			"الحركات": {
+				"AnimationAction": "api/ar/animation/AnimationAction",
+				"AnimationClip": "api/ar/animation/AnimationClip",
+				"AnimationMixer": "api/ar/animation/AnimationMixer"
+			}
+
+		}
+
+	},
+
 	"zh": {
 
 		"手册": {
@@ -550,6 +596,7 @@ var list = {
 				"EventDispatcher": "api/zh/core/EventDispatcher",
 				"Face3": "api/zh/core/Face3",
 				"Geometry": "api/zh/core/Geometry",
+				"GLBufferAttribute": "api/zh/core/GLBufferAttribute",
 				"InstancedBufferAttribute": "api/zh/core/InstancedBufferAttribute",
 				"InstancedBufferGeometry": "api/zh/core/InstancedBufferGeometry",
 				"InstancedInterleavedBuffer": "api/zh/core/InstancedInterleavedBuffer",

+ 241 - 0
docs/manual/ar/buildTools/Testing-with-NPM.html

@@ -0,0 +1,241 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>الاختبار مع NPM</h1>
+
+		<p class="desc">
+			يوضح هذه المقال كيفية الحصول على three.js في بيئة [link:https://nodejs.org/en/ node.js] حتى تتمكن من تنفيذ الاختبارات الآلية. يمكن إجراء الاختبارات على سطر الأوامر ، أو بواسطة أدوات CI الآلية مثل [link:https://travis-ci.org/ Travis].
+		</p>
+
+		<h2>النسخة القصيرة</h2>
+
+		<p>
+			إذا كنت مرتاحًا مع node و npm ،
+			<code>
+				$ npm install three --save-dev
+			</code>
+			و من ثم قم بإضافة
+		<code>
+			var THREE = require('three');
+		</code>
+			للاختبار الخاص بك.
+		</p>
+
+		<h2>إنشاء مشروع قابلة للاختبار من الصفر</h2>
+		<p>
+			إذا لم تكن معتادًا على هذه الأدوات ، فإليك دليلًا سريعًا (بالنسبة لنظام التشغيل Linux ، ستكون عملية التثبيت مختلفة قليلاً باستخدام windows ، لكن أوامر NPM متطابقة).
+		</p>
+
+		<h3>الإعدادات الأساسية</h3>
+		<div>
+			<ol>
+				<li>
+					قم بتثبيت [link:https://www.npmjs.org/ npm] و nodejs. عادةً ما يبدو أقصر طريق كالأتي
+					<code>
+$ sudo apt-get install -y npm nodejs-legacy
+# fix any problems with SSL in the default registry URL
+$ npm config set registry http://registry.npmjs.org/
+					</code>
+				</li>
+
+				<li>
+					أنشئ دليل مشروع جديد
+					<code>
+						 $ mkdir test-example; cd test-example
+					</code>
+				</li>
+
+				<li>
+					اطلب من npm إنشاء ملف مشروع جديد لك:
+					<code>
+					 $ npm init
+					</code>
+					 واقبل جميع الإعدادات الافتراضية عن طريق الضغط على Enter في جميع المطالبات ، سيؤدي هذا إلى إنشاء package.json.
+				</li><br />
+
+				<li>
+					جرب وابدأ اختبار الميزة بـ
+					<code>
+$ npm test
+					</code>
+					هذا سيفشل ، وهو أمر متوقع. إذا نظرت في package.json ، فإن تعريف البرنامج النصي للاختبار هو
+					<code>
+						"test": "echo \"Error: no test specified\" && exit 1"
+					</code>
+				</li>
+
+			</ol>
+		</div>
+
+		<h2>إضافة mocha</h2>
+		<div>
+			سنقوم بإستخدام [link:https://mochajs.org/ mocha].
+
+			<ol>
+				<li>
+					تثبيت mocha من خلال
+					<code>
+$ npm install mocha --save-dev
+					</code>
+					لاحظ أنه تم إنشاء node_modules/ وتظهر تبعياتك هناك. لاحظ أيضًا أنه تم تحديث package.json: تمت إضافة خاصية devDependencies وتحديثها باستخدام --save-dev.
+				</li><br />
+
+				<li>
+					قم بتحرير package.json لاستخدام mocha للاختبار. عندما يتم استدعاء الاختبار ، نريد فقط تشغيل المخاوي وتحديد مراسل مطول. بشكل افتراضي ، سيؤدي هذا إلى تشغيل أي شيء في test (لا يمكن تشغيل الدليل test في npm ERR! ، قم بإنشائه عبر اختبار mkdir)
+					<code>
+						"test": "mocha --reporter list"
+					</code>
+				</li>
+
+				<li>
+					أعد الاختبار باستخدام
+					<code>
+						$ npm test
+					</code>
+
+					يجب أن ينجح هذا الآن ، حيث يتم الإبلاغ عن 0 تمرير (1 جزء من الثانية) أو ما شابه.
+				</li>
+
+			</ol>
+		</div>
+
+		<h2>أضف three.js</h2>
+		<div>
+			<ol>
+				<li>
+					دعنا نسحب تبعية three.js لدينا مع
+					<code>
+$ npm install three --save-dev
+					</code>
+					<ul>
+						<li>
+							إذا كنت بحاجة إلى إصدار مختلف ، فاستخدم
+							<code>
+								$ npm show three versions
+							</code>
+							لمعرفة ما هو متاح. لإخبار npm بالقيمة الصحيحة ، استخدم
+							<code>
+ $ npm install [email protected] --save
+							</code>
+							(0.84.0 في هذا المثال). - حفظ يجعل هذا تبعية لهذا المشروع ، بدلاً من dev تبعية. انظر المستندات هنا [link:https://www.npmjs.org/doc/json.html here] لمزيد من المعلومات.
+						</li>
+					</ul>
+				</li>
+
+				<li>
+					سيبحث Mocha عن الاختبارات في test/ ، لذلك دعونا
+					<code>
+					$ mkdir test
+					</code>
+				</li>
+
+				<li>
+					أخيرًا ، نحتاج بالفعل إلى اختبار JS للتشغيل. دعنا نضيف اختبارًا بسيطًا للتحقق من أن الكائن three.js متاح ويعمل. أنشئ test/verify-three.js تحتوي على:
+<code>
+var THREE = require('three');
+var assert = require("assert");
+
+describe('The THREE object', function() {
+  it('should have a defined BasicShadowMap constant', function() {
+    assert.notEqual('undefined', THREE.BasicShadowMap);
+  }),
+
+  it('should be able to construct a Vector3 with default of x=0', function() {
+    var vec3 = new THREE.Vector3();
+    assert.equal(0, vec3.x);
+  })
+})
+</code>
+				</li>
+
+				<li>
+				أخيرًا ، دعنا نختبر مرة أخرى باستخدام $ npm اختبار. يجب أن يؤدي هذا إلى إجراء الاختبارات أعلاه وأن ينجح ، ويظهر شيئًا مثل:
+				<code>
+The THREE object should have a defined BasicShadowMap constant: 0ms
+The THREE object should be able to construct a Vector3 with default of x=0: 0ms
+2 passing (8ms)
+				</code>
+				</li>
+			</ol>
+		</div>
+
+		<h2>أضف الرمز الخاص بك</h2>
+		<div>
+			<p>عليك القيام بثلاثة أشياء:</p>
+
+			<ol>
+				<li>
+					اكتب اختبارًا للسلوك المتوقع لشفرتك ، وضعه تحت test/.
+					هنا مثال من مشروع حقيقي
+					[link:https://github.com/air/encounter/blob/master/test/Physics-test.js Here].
+				</li>
+
+				<li>
+					قم بتصدير الكود الوظيفي الخاص بك بطريقة يمكن للعقدة js رؤيتها ، لاستخدامها مع طلب.
+					شاهده هنا [link:https://github.com/air/encounter/blob/master/js/Physics.js here].
+				</li>
+
+				<li>
+					اطلب الكود الخاص بك في ملف الاختبار ، بنفس الطريقة التي فعلنا بها require('three')  في المثال أعلاه.
+				</li>
+			</ol>
+
+			<p>
+				سيختلف البندان 2 و 3 بناءً على كيفية إدارتك للرمز. في مثال Physics.js الموضح أعلاه ، يكون جزء التصدير في النهاية. نقوم بتعيين كائن إلى module.exports:
+			</p>
+			<code>
+//=============================================================================
+// make available in nodejs
+//=============================================================================
+if (typeof exports !== 'undefined')
+{
+  module.exports = Physics;
+}
+			</code>
+		</div>
+
+		<h2>التعامل مع التبعيات (dependencies)</h2>
+		<div>
+			<p>
+				إذا كنت تستخدم بالفعل شيئًا ذكيًا مثل request.js أو browserify فتخط هذا الجزء.
+			</p>
+			<p>
+				عادةً ما يتم تشغيل مشروع three.js في المتصفح. يتم تحميل الوحدة النمطية عن طريق المتصفح الذي يقوم بتنفيذ مجموعة من علامات البرنامج النصي. فبالنسبة لملفاتك الفردية فلا داعي للقلق بشأن التبعيات. ومع ذلك ، في سياق nodejs ، لا يوجد index.html يربط كل شيء معًا ، لذلك يجب أن تكون واضحًا.
+			</p>
+			<p>
+				إذا كنت تقوم بتصدير وحدة تعتمد على ملفات أخرى ، فسيتعين عليك إخبار العقدة بتحميلها.
+				إليك طريقة واحدة:
+			</p>
+			<ol>
+				<li>
+					في بداية الوحدة النمطية الخاصة بك ، تحقق لمعرفة ما إذا كنت في بيئة nodejs.
+				</li>
+				<li>
+					إذا كان هذا هو الحال، فيتوجب عليك أن تعلن عن التبعيات الخاصة بك.
+				</li>
+				<li>
+					إذا لم يكن الأمر كذلك ، فمن المحتمل أنك في متصفح لذلك لا تحتاج إلى القيام بأي شيء آخر.
+				</li>
+			</ol>
+			مثال لإستعمال Physics.js:
+			<code>
+//=============================================================================
+// setup for server-side testing
+//=============================================================================
+if (typeof require === 'function') // test for nodejs environment
+{
+  var THREE = require('three');
+  var MY3 = require('./MY3.js');
+}
+			</code>
+		</div>
+
+	</body>
+</html>

+ 114 - 0
docs/manual/ar/introduction/Animation-system.html

@@ -0,0 +1,114 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>نظام الحركات</h1>
+
+		<h2>نظرة عامة</h2>
+
+		<p class="desc">
+			يضمن نظام الرسوم المتحركة three.js ، إمكانية تحريك الخصائص المختلفة لنماذجك: عظام [page:SkinnedMesh skinned and rigged model] ، [page:Geometry.morphTargets morph targets] ، خصائص مادة مختلفة (ألوان ، عتامة ، منطقية) ، الرؤية والتحولات. يمكن أن تتلاشى الخصائص المتحركة، أو تتلاشى وتتشوه. يمكن تغيير مقاييس الوزن والوقت للرسوم المتحركة المتزامنة المختلفة على نفس الكائن وكذلك على كائنات مختلفة بشكل مستقل. يمكن مزامنة الرسوم المتحركة المختلفة على نفس الشيء وعلى كائنات مختلفة.
+			<br /><br />
+
+			لتحقيق كل هذا في نظام واحد متجانس ، نظام الرسوم المتحركة three.js شعد تغييرا هامًا في عام [link:https://github.com/mrdoob/three.js/issues/6881 2015] (احذر من المعلومات القديمة!) ، ولديه الآن بنية مشابهة لـ Unity / Unreal Engine 4. تقدم هذه الصفحة لمحة موجزة عن المكونات الرئيسية للنظام وكيف تعمل معًا.
+
+		</p>
+
+		<h3>مقاطع الحركات</h3>
+
+		<p class="desc">
+
+			إذا قمت باستيراد كائن ثلاثي الأبعاد متحرك بنجاح (لا يهم ما إذا كان يحتوي على عظام أو أهداف تشكيل أو كليهما) - على سبيل المثال تصديره من Blender مع [link:https://github.com/KhronosGroup/glTF-Blender-IO glTF Blender exporter] وتحميله في مشهد three.js باستخدام 333 - يضمن أن توجد مصفوفة تسمى "الرسوم المتحركة" ، تحتوي على 444 لهذا النموذج (انظر قائمة برامج التحميل المتوفرة أدناه).
+			<br /><br />
+
+			يحتفظ كل مقطع *AnimationClip* عادةً ببيانات نشاط معين للكائن. إذا كانت الشبكة عبارة عن شخصية ، على سبيل المثال ، فقد يكون هناك مقطع Animation واحد للمشي ، وثاني للقفز ، وثالث للتنقل وما إلى ذلك.
+
+		</p>
+
+		<h3>مسارات الإطار الأساسي (Keyframe tracks)</h3>
+
+		<p class="desc">
+
+			داخل ملف *AnimationClip* ، يتم تخزين البيانات الخاصة بكل خاصية متحركة في [page:KeyframeTrack]. بافتراض أن كائن حرف له هيكل عظمي [page:Skeleton skeleton] ، يمكن لمسار إطار رئيسي واحد تخزين البيانات لتغييرات موضع عظم الذراع السفلي بمرور الوقت ، وهو أمر مختلف تتبع البيانات الخاصة بتغييرات دوران نفس العظم ، وثلث موضع المسار ، دوران أو تحجيم عظم آخر ، وما إلى ذلك. يجب أن يكون واضحًا ، أن AnimationClip يمكن أن يتكون من الكثير من هذه المسارات.
+			<br /><br />
+
+			بافتراض أن النموذج يحتوي على [page:Geometry.morphTargets morph targets] (على سبيل المثال ، أحد أهداف التشكيل يظهر وجهًا ودودًا والآخر يظهر وجهًا غاضبًا) ، فإن كل مسار يحمل المعلومات المتعلقة بكيفية تغيير الرقم [page:Mesh.morphTargetInfluences influence] لهدف تشكيل معين أثناء أداء المقطع.
+
+		</p>
+
+		<h3>خالط الحركات (Animation Mixer)</h3>
+
+		<p class="desc">
+
+			تشكل البيانات المخزنة أساس الرسوم المتحركة فقط - يتم التحكم في التشغيل الفعلي بواسطة [page:AnimationMixer]. يمكنك تخيل هذا ليس فقط كمشغل للرسوم المتحركة ، ولكن ك كجهاز أو مثل وحدة التحكم في المزج الحقيقي ، والتي يمكنها التحكم في العديد من الرسوم المتحركة في وقت واحد ومزجها ودمجها.
+
+		</p>
+
+		<h3>أحداث الحركات (Animation Actions)</h3>
+
+		<p class="desc">
+
+			يحتوي *AnimationMixer* نفسه على عدد قليل جدًا من الخصائص والطرق (العامة) ، لأنه يمكن التحكم فيه بواسطة [page:AnimationAction AnimationActions]. من خلال تكوين *AnimationAction* يمكنك تحديد وقت تشغيل *AnimationClip* معين أو إيقافه مؤقتًا أو إيقاف تشغيله أحد الخلاطات ، إذا كان يجب تكرار المقطع وعدد مرات تكرارها ، سواء كان يجب إجراؤه بتلاشي أو مقياس زمني ، وبعض الأشياء الإضافية ، مثل التلاشي أو التزامن.
+
+		</p>
+
+		<h3>تحريك مجموعة من النماذج</h3>
+
+		<p class="desc">
+
+			إذا كنت تريد أن تطبق على مجموعة من الكائنات حالة حركة مشتركة ، يمكنك استخدام [page:AnimationObjectGroup]..
+
+		</p>
+
+		<h3>التنسيقات و عناصر التحميل المدعومة</h3>
+
+		<p class="desc">
+			لاحظ أنه لا تتضمن جميع تنسيقات النماذج الرسوم المتحركة (لا سيما OBJ) ، وأن بعض أدوات تحميل three.js فقط تدعم [page:AnimationClip AnimationClip] تسلسلًا. العديد منها يدعم هذا النوع من الرسوم المتحركة:
+		</p>
+
+			<ul>
+				<li>[page:ObjectLoader THREE.ObjectLoader]</li>
+				<li>THREE.BVHLoader</li>
+				<li>THREE.ColladaLoader</li>
+				<li>THREE.FBXLoader</li>
+				<li>[page:GLTFLoader THREE.GLTFLoader]</li>
+				<li>THREE.MMDLoader</li>
+			</ul>
+
+		<p class="desc">
+			لاحظ أن 3ds max و Maya لا يمكنهم حاليًا تصدير العديد من الرسوم المتحركة (بمعنى الرسوم المتحركة غير الموجودة في نفس المخطط الزمني) مباشرةً إلى ملف واحد.
+		</p>
+
+		<h2>مثال</h2>
+
+		<code>
+		var mesh;
+
+		// Create an AnimationMixer, and get the list of AnimationClip instances
+		var mixer = new THREE.AnimationMixer( mesh );
+		var clips = mesh.animations;
+
+		// Update the mixer on each frame
+		function update () {
+			mixer.update( deltaSeconds );
+		}
+
+		// Play a specific animation
+		var clip = THREE.AnimationClip.findByName( clips, 'dance' );
+		var action = mixer.clipAction( clip );
+		action.play();
+
+		// Play all animations
+		clips.forEach( function ( clip ) {
+			mixer.clipAction( clip ).play();
+		} );
+		</code>
+
+	</body>
+</html>

+ 124 - 0
docs/manual/ar/introduction/Browser-support.html

@@ -0,0 +1,124 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>([name]) دعم المتصفح</h1>
+
+		<h2>نظرة عامة</h2>
+		<div>
+			<p>
+				يمكن لـ Three.js استخدام WebGL لعرض المشاهد الخاصة بك على جميع المتصفحات الحديثة. بالنسبة إلى المتصفحات الأقدم ، وخاصة Internet Explorer 10 والإصدارات الأقدم ، قد تضطر إلى الرجوع إلى أحد المستعرضات الأخرى [link:https://github.com/mrdoob/three.js/tree/master/examples/jsm/renderers renderers] (CSS2DRenderer و CSS3DRenderer و SVGRenderer). بالإضافة إلى ذلك ، قد تضطر إلى تضمين بعض polyfills ، بالأخص إذا كنت تستخدم ملفات من المجلد [link:https://github.com/mrdoob/three.js/tree/master/examples /examples].
+			</p>
+			<p>
+				ملاحظة: إذا لم تكن بحاجة إلى دعم هذه المتصفحات القديمة ، فلا يوصى باستخدام برامج العارض الأخرى لأنها أبطأ وتدعم ميزات أقل من WebGLRenderer.
+			</p>
+		</div>
+
+		<h2>المتصفحات التي تدعم WebGL</h2>
+		<div>
+			<p>
+				Google Chrome 9+, Firefox 4+, Opera 15+, Safari 5.1+, Internet Explorer 11 و Microsoft Edge.<br/>
+				يمكنك العثور على المتصفحات التي تدعم WebGL في [link:https://caniuse.com/#feat=webgl Can I use WebGL].
+			</p>
+		</div>
+
+		<h2>ميزات لغة JavaScript أو واجهات الويب البرمجية المستخدمة في three.js</h2>
+		<div>
+			<p>
+				فيما يلي بعض الميزات المستخدمة في three.js. قد يتطلب بعض منهم polyfills إضافية.
+			</p>
+			<table>
+				<thead>
+					<tr>
+						<th>الخاصية</th>
+						<th>نطاق الاستخدم</th>
+						<th>الوحدات</th>
+					</tr>
+				</thead>
+				<tbody>
+					<tr>
+						<td>Typed Arrays</td>
+						<td>Source</td>
+						<td>BufferAttribute, BufferGeometry, etc.</td>
+					</tr>
+					<tr>
+						<td>Web Audio API</td>
+						<td>Source</td>
+						<td>Audio, AudioContext, AudioListener, etc.</td>
+					</tr>
+					<tr>
+						<td>WebXR Device API</td>
+						<td>Source</td>
+						<td>WebXRManager</td>
+					</tr>
+					<tr>
+						<td>Blob</td>
+						<td>Source</td>
+						<td>FileLoader, etc.</td>
+					</tr>
+					<tr>
+						<td>Promise</td>
+						<td>Examples</td>
+						<td>GLTFLoader, DRACOLoader, BasisTextureLoader, GLTFExporter, VRButton, ARButton, etc.</td>
+					</tr>
+					<tr>
+						<td>Fetch</td>
+						<td>Examples</td>
+						<td>ImageBitmapLoader, etc.</td>
+					</tr>
+					<tr>
+						<td>File API</td>
+						<td>Examples</td>
+						<td>GLTFExporter, etc.</td>
+					</tr>
+					<tr>
+						<td>URL API</td>
+						<td>Examples</td>
+						<td>GLTFLoader, etc.</td>
+					</tr>
+					<tr>
+						<td>Pointer Lock API</td>
+						<td>Examples</td>
+						<td>PointerLockControls</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
+
+		<h2>Polyfills</h2>
+		<div>
+			<p>فقط قم باستيراد polyfills بناءً على متطلباتك. إذا أخذنا IE9 كمثال ، فأنت بحاجة إلى ملء هذه الميزات على الأقل:</p>
+			<ul>
+				<li>Typed Arrays</li>
+				<li>Blob</li>
+			</ul>
+		</div>
+
+		<h3>مقترح polyfills</h3>
+		<div>
+			<ul>
+				<li>
+					[link:https://github.com/zloirock/core-js core-js]
+				</li>
+				<li>
+					[link:https://github.com/inexorabletash/polyfill/blob/master/typedarray.js typedarray.js]
+				</li>
+				<li>
+					[link:https://github.com/stefanpenner/es6-promise/ ES6-Promise]
+				</li>
+				<li>
+					[link:https://github.com/eligrey/Blob.js Blob.js]
+				</li>
+				<li>
+					[link:https://github.com/github/fetch fetch]
+				</li>
+			</ul>
+		</div>
+	</body>
+</html>

+ 269 - 0
docs/manual/ar/introduction/Creating-a-scene.html

@@ -0,0 +1,269 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>إنشاء مشهد([name])</h1>
+
+		<p>الهدف من هذا القسم هو تقديم لمحة وجيزة عن كيفية عمل المكتبة. سنبدأ بتحضير مشهد يتمثل في مكعب ثلاثي الأبعاد .الصفحة مرفوقة بمثال أسفلها في حالة واجهتك بعض المشاكل وإحتجت إلى المساعدة.</p>
+
+		<h2>قبل أن نبدأ</h2>
+
+		<p>
+			قبل أن يمكنك إستعمال المكتبة, يجب أن توفر مكان لإظهار المشهد. قم بإنشاء ملف HTML يحتوي الشفرة البرمجية التالية
+        	بصحبة نسخة من المكتبة [link:https://threejs.org/build/three.js three.js] في مجلد سمه js و من ثم فم بفتح الصفحة في المتصفح.
+		</p>
+
+		<code>
+		&lt;!DOCTYPE html&gt;
+		&lt;html&gt;
+			&lt;head&gt;
+				&lt;meta charset="utf-8"&gt;
+				&lt;title&gt;My first three.js app&lt;/title&gt;
+				&lt;style&gt;
+					body { margin: 0; }
+					canvas { display: block; }
+				&lt;/style&gt;
+			&lt;/head&gt;
+			&lt;body&gt;
+				&lt;script src="js/three.js"&gt;&lt;/script&gt;
+				&lt;script&gt;
+					// Our Javascript will go here.
+				&lt;/script&gt;
+			&lt;/body&gt;
+		&lt;/html&gt;
+		</code>
+
+		<p>
+			هذا كل شيء. بقية الأوامر البرمجية ستكون محتوات في وسم &lt;script&gt; الفارغ حاليا.
+		</p>
+
+		<h2>إنشاء مشهد</h2>
+
+		<p>
+			لنتمكن من إظهار أي شيء بإستهمال three.js، نحتاج ثلاثة عناصر أساسية: المسرح (Scene)، الكاميرا (Camera)، و العارض
+			(Renderer).
+		</p>
+
+		<code>
+		var scene = new THREE.Scene();
+		var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
+
+		var renderer = new THREE.WebGLRenderer();
+		renderer.setSize( window.innerWidth, window.innerHeight );
+		document.body.appendChild( renderer.domElement );
+		</code>
+
+		<p>
+			لنتمهل لحظة من أجل توضيح ما يحصل هنا. لقد قمنا بتحضير كل من المسرح، الكاميرا، و العارض.
+		</p>
+
+		<p>
+			توفر مكتبة three.js العديد من الخيارات بخصوص نوع الكاميرا. للوقت الراهن، سنستعمل
+			<strong>PerspectiveCamera</strong>.
+		</p>
+
+		<p>
+			أول ميزة هي <strong>مجال الرؤية - Field of view</strong>. يمكن التعبير عنها بإستعمال إختصارها كالأتي FOV. هذه
+			القيمة تمثل مجال
+			المشاهدة المتاح في أي وقت
+			من العرض. وحده قيسها هي الدرجة (degrees)
+		</p>
+
+		<p>
+			القيمة الثانية هي <strong>نسبة العرض إلى الارتفاع - aspect ratio</strong>. من المستحسن إستعمال نتيجة قسمة عرض و
+			طول العنصر الحاوي، و إلا ستحصل على تجربة مماثلة
+			لمشاهدة فيلم قديم على تلفاز عريض حيث ستكون الصورة متغيرة.
+		</p>
+
+		<p>
+			القيمتين المتبقيتين هما <strong>أقرب</strong> و <strong>أبعد</strong> سطح فاصل. نقصد بدلك أن أي عنصر في المشهد
+			أبعد من السطح الفاصل البعيد بالنسبة
+			للكاميرا أو أقرب من السطح الفاصل القريب لن يتم عرضه.
+			أنت لست مطالب بالقلق حيال هذا، و لكن من الممكن أن تريد إستعمال قيم أخرى من أجل الحصول على أداء أفضل.
+		</p>
+
+		<p>
+			نصل الأن إلى العارض. هنا أين يكمن السحر. بالإضافة لإستعمال WebGLRenderer، المكتبة تتكفل بتمكين بعض المتصفحات
+			القديمة التي لا
+			تدعم WebGL لسبب ما من الخصائص المفقودة.
+		</p>
+
+		<p>
+			إلي جانب إنشاء نموذج من مكون عارض، نحن مطالبون بتوفير قياس المشهد المراد عرضه. إنها لا فكرة جيدة أن نستعمل عرض و
+			طول المنطقة التي نريد ملأها في الصفحة. في هذه الحالة إستعملنا عرض و طول نافدة المتصفح. بالنسبة لتطبيقات عالية
+			الأداء، يمكنك توفير قيم أقل مثل <strong>window.innerWidth/2</strong> و <strong>window.innerHeight/2</strong>،
+			التي
+			ستجعل المشهد يعرض أسرع بنصف المدة السابقة.
+		</p>
+
+		<p>
+			على سبيل المثال إلغاء قيمة <strong>updateStyle</strong> كالأتي:
+			<br />
+			<strong>setSize(window.innerWidth/2, window.innerHeight/2, false)</strong>
+			<br />
+			ستجعل المشهد يعرض بدقة أقل بنصف
+			الدرجة القديمة، مع العلم أن < canvas>
+				الخاصة بك تم إمدادها ب100% في كلا الطول و العرض.
+		</p>
+
+		<p>
+			أخيرا و ليس أخرا، سنقوم بإضافة <strong>العارض</strong> إلى ملف الـHTML.
+			<br />
+			< canvas> هو وسم يستعمله العارض لإظهار المشهد من خلاله.
+		</p>
+
+		<p>
+			<em>"كل شيء جيد، و لكن أي المكعب الذي وعدتنا به؟"</em> لنقم بإضافته الأن.
+		</p>
+
+		<code>
+		var geometry = new THREE.BoxGeometry();
+		var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
+		var cube = new THREE.Mesh( geometry, material );
+		scene.add( cube );
+
+		camera.position.z = 5;
+		</code>
+
+		<p>
+			لكي نقوم بإنشاء مكعب، نحتاج مكون <strong>BoxGeometry</strong>. هذا الأخير مسؤول عن حفض أماكن كل النقاط
+			(<strong>vertices</strong>) و تعبئة كل الأوجه
+			(<strong>faces</strong>) المكونة للمكعب. سنقوم بالتعمق في هذا الموضوع مستقبلا.
+		</p>
+
+		<p>
+			بالإضافة إلى الهندسة الخاصة بالمكعب، نحتاج المادة المكونة له لتعطيه لون. Three.js تأتي مع العديد من المواد،
+			و
+			لكن سنكتفي بإستعمال <strong>MeshBasicMaterial</strong> للوقت الراهن. كل المواد تأخذ مجموعة من القيم ستطبق
+			عليها
+			من أجل الوصول إلى النتيجة المرادة. لإبقاء الأشياء بسيطة، قمنا بإرفاق قيمة اللون التي تحمل
+			<strong>0x00ff00</strong>، و الذي يمثل اللون الأخضر. كيفية إحتساب القيمة هي نفسها كإستعمال CSS أو Photoshop
+			(<strong>hex colors</strong>).
+		</p>
+
+		<p>
+			الخطوة التالية هي إنشاء جسم <strong>Mesh</strong>. نقصد به الشيء الذي سيتكفل بالتعامل مع هندسة الشكل و
+			تطبيقها
+			على المادة المرفوقة، و من ثم يمكننا إدخال الشكل الجسم النهائي إلى المشهد، و التحرك بحرية حوله.
+		</p>
+
+		<p>
+			عند إستعمال أمر <strong>()scene.add</strong>، الشيء المراد إضافته للمشهد سيضاف في الإحداثيات التالية
+			(<strong>0,0,0</strong>). هذا يمكن له أن يشكل بعض المشاكل كون الكاميرا في هذه الحالة وسط المكعب. لتجنب هذا
+			نقوم
+			ببساطة بإبعاد الكاميرا قليلا.
+		</p>
+
+		<h2>عرض المشهد</h2>
+
+		<p>
+			إن قمت بنسخ الأوامر البرمجية الموجودة أعله وسط ملف HTML الذي قمنا بإنشائه مسبقا، لم تتمكن من رؤية أي شيء حتى
+			الأن. هذا بسبب أننا لم نقم بعرض أي شيء حتى اللحظة. لذلك، ما نحتاجه يدعى العرض (<strong>render</strong>) أو
+			حلقة
+			الحركات (<strong>animation loop</strong>).
+		</p>
+
+		<code>
+		function animate() {
+			requestAnimationFrame( animate );
+			renderer.render( scene, camera );
+		}
+		animate();
+		</code>
+
+		<p>
+			هذه الشفرة البرمجية تقوم بإنشاء حلقة تجعل العارض يعيد تحديث المشهد كل مرة يحدث فيها تغيير في الصفحة (أو نظريا
+			هذا يعني 60
+			مرة
+			خلال كل ثانية). إن كنت لا تملك تجربة مسبقة في صناعة ألعاب المتصفح، ستتسائل <em>"لماذا لا نستعمل
+				setInterval؟"</em> الحقيقة أننا بإمكاننا ذلك و لكن <strong>requestAnimationFrame</strong> تقدم لنا
+			العديد من
+			المزايا. من أهما أنها تقوم بإيقاف العمل عندما يقوم المستعمل بتغيير الصفحة، بالإضافة لعدم إستهلاك قدرة
+			الحاسب الخاص بالجهاز و عمر البطارية.
+		</p>
+
+		<h2>تحريك المكعب</h2>
+
+		<p>
+			إن قمت بإضافة الأوامر البرمجية السابقة للملف الخاص بك، من الأرجح أنك ترى الأن مكعبا أخضر اللون. لنقم بجعله
+			أكثر
+			جذابية من خلال تدويره.
+		</p>
+
+		<p>
+			قم بإضافة الشفرة التالية فوق السطر الذي يحتوي أمر <strong>renderer.render</strong> في الوظيفة
+			(<strong>animate</strong>):
+		</p>
+
+		<code>
+		cube.rotation.x += 0.01;
+		cube.rotation.y += 0.01;
+		</code>
+
+		<p>
+			هذه الأوامر سيتم تشغيلها في كل إطار (frame). ما يعني 60 مرة في الثانية تقريبا، و بذلك ستمكن المكعب من الدوران.
+			في
+			الأساس، أي شيء تريد تحريكه أو تغيره خلال فترة عمل التطبيق يستوجب أن تكون الأوامر الخاصة بذلك قد تم تشغيلها
+			داخل
+			حلقة الحركات. يمكنك بالتأكيد مناداة وظائف أخرى، لكي لا ينتهي بك المطاف بوظيفة واحدة تحتوي على مئات السطور.
+		</p>
+
+		<h2>النتيجة</h2>
+		<p>
+			تهانينا! لقد قمت بإكمال أول تطبيق three.js لك. الأمر ليس معقدا، يجب عليك فقد البدأ بشيء ما.
+		</p>
+
+		<p>
+			الشفرة البرمجية الكاملة في الأسفل إلى جانب محرر مباشر [link:https://jsfiddle.net/mkba0ecu/ live example].
+			أنت
+			مدعو للعب بالأوامر البرمجية لكي تصبح صورة كيفية عملها أوضح من قبل.
+		</p>
+
+		<code>
+		&lt;html&gt;
+			&lt;head&gt;
+				&lt;title&gt;My first three.js app&lt;/title&gt;
+				&lt;style&gt;
+					body { margin: 0; }
+					canvas { display: block; }
+				&lt;/style&gt;
+			&lt;/head&gt;
+			&lt;body&gt;
+				&lt;script src="js/three.js"&gt;&lt;/script&gt;
+				&lt;script&gt;
+					var scene = new THREE.Scene();
+					var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
+
+					var renderer = new THREE.WebGLRenderer();
+					renderer.setSize( window.innerWidth, window.innerHeight );
+					document.body.appendChild( renderer.domElement );
+
+					var geometry = new THREE.BoxGeometry();
+					var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
+					var cube = new THREE.Mesh( geometry, material );
+					scene.add( cube );
+
+					camera.position.z = 5;
+
+					var animate = function () {
+						requestAnimationFrame( animate );
+
+						cube.rotation.x += 0.01;
+						cube.rotation.y += 0.01;
+
+						renderer.render( scene, camera );
+					};
+
+					animate();
+				&lt;/script&gt;
+			&lt;/body&gt;
+		&lt;/html&gt;
+		</code>
+	</body>
+</html>

+ 111 - 0
docs/manual/ar/introduction/Creating-text.html

@@ -0,0 +1,111 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>إنشاء نص ([name])</h1>
+		<div>
+			<p>
+				غالبًا ما تحتاج إلى استخدام نص في تطبيق three.js الخاص بك - إليك طريقتان يمكنك القيام بذلك.
+			</p>
+		</div>
+
+		<h2>1. DOM + CSS</h2>
+		<div>
+			<p>
+				يعد استخدام HTML بشكل عام أسهل وأسرع طريقة لإضافة نص. هذه هي الطريقة المستخدمة للتراكبات الوصفية في معظم الأمثلة الثلاثة.
+			</p>
+			<p>يمكنك إضافة محتوى إلى ملف</p>
+			<code>&lt;div id="info"&gt;Description&lt;/div&gt;</code>
+
+			<p>
+				وإستخدم ترميز CSS لوضع موضع مطلق (position absolutely) في موضع فوق كل المواقع الأخرى باستخدام z-index  بالأخاص إذا كنت تقوم بتشغيل على كامل الشاشة three.js.
+			</p>
+
+			<code>
+#info {
+	position: absolute;
+	top: 10px;
+	width: 100%;
+	text-align: center;
+	z-index: 100;
+	display:block;
+}
+			</code>
+
+		</div>
+
+
+
+		<h2>2. ارسم نصًا على (canvas) واستخدمه كـ [page:Texture]</h2>
+		<div>
+			<p>استخدم هذه الطريقة إذا كنت ترغب في رسم نص بسهولة على سطح في مشهد three.js.</p>
+		</div>
+
+
+		<h2>3. قم بإنشاء نموذج في التطبيق ثلاثي الأبعاد المفضل لديك وقم بتصديره إلى three.js</h2>
+		<div>
+			<p>إستخدم هذه الطريقة إذا كنت تفضل العمل مع تطبيقاتك ثلاثية الأبعاد وإستيراد النماذج إلى three.js</p>
+		</div>
+
+
+
+		<h2>4. هندسة النص الإجرائي (Procedural Text Geometry)</h2>
+		<div>
+			<p>
+				إذا كنت تفضل العمل فقط في THREE.js أو إنشاء أشكال هندسية إجرائية وديناميكية للنص ثلاثي الأبعاد ، فيمكنك إنشاء شبكة تعتبر هندستها مثيلًا لـ THREE.TextGeometry:
+			</p>
+			<p>
+				<code>new THREE.TextGeometry( text, parameters );</code>
+			</p>
+			<p>
+				لكي يعمل هذا، ستحتاج Text Geometry إلى نموذج من THREE.Font لتعيينه لجعله إعداد "الخط" الخاصة به.
+
+				راجع صفحة [page:TextGeometry] للحصول على مزيد من المعلومات حول كيفية القيام بذلك ، و وصف كل الخيارات المتاحة ، وقائمة بخطوط JSON التي تأتي مع توزيع THREE.js نفسه.
+			</p>
+
+			<h3>أمثلة</h3>
+
+			<p>
+				[example:webgl_geometry_text WebGL / geometry / text]<br />
+				[example:webgl_shadowmap WebGL / shadowmap]
+			</p>
+
+			<p>
+				إذا كان Typeface معطلاً ، أو كنت تريد استخدام خط غير موجود ، فهناك برنامج تعليمي مع برنامج نصي بايثون لـ bender يسمح لك بتصدير النص إلى Three.js بتنسيق JSON:
+				<br/>
+				[link:http://www.jaanga.com/2012/03/blender-to-threejs-create-3d-text-with.html]
+			</p>
+
+		</div>
+
+
+
+		<h2>5. خطوط نقطية (Bitmap Fonts)</h2>
+		<div>
+			<p>
+				تسمح BMFonts (الخطوط النقطية) بدمج الصور الرمزية في BufferGeometry واحد. يدعم عرض BMFont التفاف الكلمات ، وتباعد الأحرف ، وتقنين الأحرف ، وحقول المسافة الموقعة مع المشتقات القياسية ، وحقول المسافة الموقعة متعددة القنوات ، والخطوط متعددة الأنسجة ، والمزيد.
+				انظر [link:https://github.com/Jam3/three-bmfont-text three-bmfont-text].
+			</p>
+			<p>
+				تتوفر الخطوط في مشاريع مثل [link:https://github.com/etiennepinchon/aframe-fonts A-Frame Fonts] ، أو يمكنك إنشاء خطوطك الخاصة من أي خط .TTF ، مع التحسين لتضمين الأحرف المطلوبة  للمشروع.
+			</p>
+			<p>
+				بعض الأدوات المفيدة
+			</p>
+			<ul>
+				<li>[link:http://msdf-bmfont.donmccurdy.com/ msdf-bmfont-web] <i>(على شبكة الإنترنت)</i></li>
+				<li>[link:https://github.com/soimy/msdf-bmfont-xml msdf-bmfont-xml] <i>(سطر الأوامر)</i></li>
+				<li>[link:https://github.com/libgdx/libgdx/wiki/Hiero hiero] <i>(تطبيق سطح مكتب)</i></li>
+			</ul>
+		</div>
+
+
+
+	</body>
+</html>

+ 64 - 0
docs/manual/ar/introduction/Drawing-lines.html

@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>رسم خطوط ([name])</h1>
+		<div>
+			<p>
+				لنفترض أنك تريد رسم خط أو دائرة ، وليس إطارًا سلكيًا [page:Mesh]. نحتاج أولاً إلى إعداد العارض [page:WebGLRenderer renderer] ، المسرح [page:Scene scene] والكاميرا (انظر صفحة إنشاء مشهد).
+			</p>
+
+			<p>هذا هو الكود الذي سنستخدمه:</p>
+			<code>
+var renderer = new THREE.WebGLRenderer();
+renderer.setSize( window.innerWidth, window.innerHeight );
+document.body.appendChild( renderer.domElement );
+
+var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 500 );
+camera.position.set( 0, 0, 100 );
+camera.lookAt( 0, 0, 0 );
+
+var scene = new THREE.Scene();
+			</code>
+			<p>الشيء التالي الذي سنفعله هو تحديد المادة. بالنسبة للخطوط ، يتعين علينا استخدام [page:LineBasicMaterial] أو [page:LineDashedMaterial].</p>
+			<code>
+//create a blue LineBasicMaterial
+var material = new THREE.LineBasicMaterial( { color: 0x0000ff } );
+			</code>
+
+			<p>
+				بعد إختيار المادة سنحتاج إلى الهندسة الخاصة بها التي تحتوي بعض القمم(vertices):
+			</p>
+
+			<code>
+var points = [];
+points.push( new THREE.Vector3( - 10, 0, 0 ) );
+points.push( new THREE.Vector3( 0, 10, 0 ) );
+points.push( new THREE.Vector3( 10, 0, 0 ) );
+
+var geometry = new THREE.BufferGeometry().setFromPoints( points );
+			</code>
+
+			<p>لاحظ أنه تم رسم الخطوط بين كل زوج متتالي من الرؤوس ، ولكن ليس بين الأول والأخير (الخط غير مغلق).</p>
+
+			<p>الآن بعد أن أصبح لدينا نقاط لخطين ومادة ، يمكننا تجميعها معًا لتشكيل خط.</p>
+			<code>
+var line = new THREE.Line( geometry, material );
+			</code>
+			<p>كل ما تبقى هو إضافته إلى المشهد و إستعمال أمر العرض [page:WebGLRenderer.render render].</p>
+
+			<code>
+scene.add( line );
+renderer.render( scene, camera );
+			</code>
+
+			<p>يجب أن ترى الآن سهمًا يشير إلى الأعلى ، مكون من خطين أزرقين.</p>
+		</div>
+	</body>
+</html>

+ 57 - 0
docs/manual/ar/introduction/FAQ.html

@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>الأسئلة الشائعة ([name])</h1>
+
+		<h2>ما هو أفضل تنسيق النموذج ثلاثي الأبعاد الذي تدعمه المكتبة؟</h2>
+		<div>
+			<p>
+				التنسيق الموصى به لاستيراد المجسمات وتصديرها هو glTF (GL Transmission Format). نظرًا لأن glTF يركز على تسليم أصول وقت التشغيل ، فهو مضغوط للإرسال وسريع التحميل.
+			</p>
+			<p>
+				توفر three.js أدوات تحميل للعديد من التنسيقات الشائعة الأخرى مثل FBX أو Collada أو OBJ أيضًا. ومع ذلك ، يجب أن تحاول دائمًا إنشاء سير عمل قائم على glTF في مشاريعك. لمزيد من المعلومات ، انظر [link:#manual/introduction/Loading-3D-models loading 3D models].
+			</p>
+		</div>
+
+		<h2>لماذا توجد علامات meta viewport في الأمثلة؟</h2>
+		<div>
+				<code>&lt;meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"&gt;</code>
+
+				<p>تتحكم هذه العلامات في حجم منفذ العرض ومقياسه لمتصفحات الجوال (حيث يمكن عرض محتوى الصفحة بحجم مختلف عن إطار العرض المرئي).</p>
+
+				<p>[link:https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html Safari: Using the Viewport]</p>
+
+				<p>[link:https://developer.mozilla.org/en/Mobile/Viewport_meta_tag MDN: Using the viewport meta tag]</p>
+		</div>
+
+		<h2>كيف يمكن الحفاظ على مقياس المشهد عند تغيير الحجم؟</h2>
+		<p>
+			نريد أن تظهر جميع النماذج ، بغض النظر عن بعدها عن الكاميرا ، بالحجم نفسه ، حتى عندما يتم تغيير حجم النافذة.
+
+			المعادلة الأساسية لحل هذه المعادلة هي معادلة الارتفاع المرئي على مسافة معينة:
+
+			<code>
+visible_height = 2 * Math.tan( ( Math.PI / 180 ) * camera.fov / 2 ) * distance_from_camera;
+			</code>
+			إذا قمنا بزيادة ارتفاع النافذة بنسبة معينة ، فإن ما نريده هو زيادة الارتفاع المرئي في جميع المسافات بنفس النسبة المئوية.
+
+			لا يمكن القيام بذلك عن طريق تغيير موضع الكاميرا. بل ما يجب أن تفعله هو تغيير مجال رؤية الكاميرا.
+			[link:http://jsfiddle.net/Q4Jpu/ Example].
+		</p>
+
+		<h2>لماذا جزء من نموذجي غير مرئي؟</h2>
+		<p>
+			يمكن أن يكون هدا بسبب إعدام الوجه, فالأوجه التي تبني النموذج لها إتجاه معين من خلاله يتم تقرير ما يتم إضهار. و هده الظاهرة تقوم بإلغاء الوجه الخلفي في الحالات العادية.
+			لمعرفة ما إذا كانت هذه هي مشكلتك ، قم بتغيير جانب المادة إلى THREE.DoubleSide.
+
+			<code>material.side = THREE.DoubleSide</code>
+		</p>
+	</body>
+</html>

+ 78 - 0
docs/manual/ar/introduction/How-to-create-VR-content.html

@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html lang="ar">
+
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+
+	<body class="rtl">
+		<h1>كيفية إنشاء محتوى VR</h1>
+
+		<p>
+			يقدم هذا الدليل لمحة موجزة عن المكونات الأساسية لتطبيق VR مخصص للويب بإستعمال three.js.
+		</p>
+
+		<h2>سير العمل</h2>
+
+		<p>
+			أولاً ، عليك ضم [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/webxr/VRButton.js VRButton.js] في مشروعك.
+		</p>
+
+		<code>
+import { VRButton } from 'three/examples/jsm/webxr/VRButton.js';
+		</code>
+
+		<p>
+			*VRButton.createButton()* يقوم بأمرين مهمين: أولا يقوم بإنشاء زر يشير إلى توافق الواقع الافتراضي. إلى جانب ذلك ، يبدأ جلسة VR إذا قام المستخدم بتنشيط الزر. كل ما عليك فعله هو إضافة السطر التالي من التعليمات البرمجية إلى تطبيقك.
+		</p>
+
+		<code>
+document.body.appendChild( VRButton.createButton( renderer ) );
+		</code>
+
+		<p>
+			بعد ذلك ، عليك توجيه نموذج *WebGLRenderer* لتمكين عرض XR.
+		</p>
+
+		<code>
+renderer.xr.enabled = true;
+		</code>
+
+		<p>
+			أخيرًا ، يجب عليك ضبط حلقة الرسوم المتحركة لأننا لا نستطيع استخدام وظيفة *window.requestAnimationFrame()* المعروفة لدينا. بالنسبة لمشاريع الواقع الافتراضي ، نستخدم [page:WebGLRenderer.setAnimationLoop setAnimationLoop].
+			يبدو الحد الأدنى من الكود كما يلي:
+		</p>
+
+		<code>
+renderer.setAnimationLoop( function () {
+
+	renderer.render( scene, camera );
+
+} );
+		</code>
+
+		<h2>الخطوات التالية</h2>
+
+		<p>
+			ألق نظرة على أحد أمثلة WebVR الرسمية لرؤية سير العمل.<br /><br />
+
+			[example:webxr_vr_ballshooter WebXR / VR / ballshooter]<br />
+			[example:webxr_vr_cubes WebXR / VR / cubes]<br />
+			[example:webxr_vr_dragging WebXR / VR / dragging]<br />
+			[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]<br />
+			[example:webxr_vr_paint WebXR / VR / paint]<br />
+			[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]<br />
+			[example:webxr_vr_panorama WebXR / VR / panorama]<br />
+			[example:webxr_vr_rollercoaster WebXR / VR / rollercoaster]<br />
+			[example:webxr_vr_sandbox WebXR / VR / sandbox]<br />
+			[example:webxr_vr_sculpt WebXR / VR / sculpt]<br />
+			[example:webxr_vr_video WebXR / VR / video]
+		</p>
+
+	</body>
+
+</html>

+ 100 - 0
docs/manual/ar/introduction/How-to-dispose-of-objects.html

@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<html lang="ar">
+
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+
+	<body class="rtl">
+		<h1>كيفية التخلص من الأشياء</h1>
+
+		<p>
+			أحد الجوانب المهمة لتحسين الأداء وتجنب تسرب الذاكرة في تطبيقك هو التخلص من كيانات المكتبة غير المستخدمة. عندما تقوم بإنشاء مثيل من النوع * three.js * ، فإنك تخصص قدرًا معينًا من الذاكرة.
+			ومع ذلك ، يُنشئ * three.js * كائنات محددة مثل الأشكال الهندسية أو المواد ، كيانات ذات صلة بـ WebGL مثل المخازن المؤقتة أو برامج التظليل الضرورية للعرض. من المهم إبراز أن هذه الكائنات لا يتم تحريرها تلقائيًا ، وبدلاً من ذلك ، يجب أن يستخدم التطبيق واجهة برمجة تطبيقات خاصة لتحرير هذه الموارد. يقدم هذا الدليل نظرة عامة موجزة حول كيفية استخدام واجهة برمجة التطبيقات هذه وما هي الكائنات ذات الصلة في هذا السياق.
+		</p>
+
+		<h2>الهندسة (Geometries)</h2>
+
+		<p>
+			تمثل الهندسة عادةً معلومات قمة الرأس تُعرَّف على أنها مجموعة من السمات. تنشئ * three.js * داخليًا كائنًا من النوع [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer WebGLBuffer] لكل سمة. يتم حذف هذه الكيانات فقط إذا اتصلت بـ [page:BufferGeometry.dispose](). إذا أصبحت الهندسة قديمة في التطبيق الخاص بك ، فقم بتنفيذ الطريقة لتحرير جميع الموارد ذات الصلة.
+		</p>
+
+		<h2>المواد (Materials)</h2>
+
+		<p>
+			تحدد المادة كيفية تجسيد الكائنات. يستخدم * three.js * معلومات تعريف المادة لإنشاء برنامج تظليل للعرض.
+	لا يمكن حذف برامج Shader إلا إذا تم التخلص من المواد المعنية. لأسباب تتعلق بالأداء ، يحاول * three.js * إعادة استخدام القائمة برامج تظليل إن أمكن. لذلك يتم حذف برنامج shader فقط إذا تم التخلص من جميع المواد ذات الصلة. يمكنك الإشارة إلى التخلص من مادة عن طريق تنفيذ [page:Material.dispose] ().
+		</p>
+
+		<h2>الأنسجة (Textures)</h2>
+
+		<p>
+			التخلص من المواد ليس له أي تأثير على القوام. يتم التعامل معها بشكل منفصل حيث يمكن استخدام نسيج واحد بواسطة مواد متعددة في نفس الوقت.
+			عندما تقوم بإنشاء مثيل [page:Texture] ، فإن three.js داخليًا تنشئ مثيلًا من [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLTexture WebGLTexture].
+			على غرار المخازن المؤقتة ، لا يمكن حذف هذا الكائن إلا عن طريق استدعاء [page:Texture.dispose]().
+		</p>
+
+		<h2>أهداف العرض</h2>
+
+		<p>
+			لا تقوم الكائنات من النوع [page:WebGLRenderTarget] فقط بتخصيص مثيل لـ [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLTexture WebGLTexture] ولكن أيضًا [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLFramebuffer WebGLFramebuffer]s و [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderbuffer WebGLRenderbuffer]s لتحقيق وجهات العرض المخصصة. لا يتم تخصيص هذه الكائنات إلا بتنفيذ [page:WebGLRenderTarget.dispose]().
+		</p>
+
+		<h2>متفرقات (Miscellaneous)</h2>
+
+		<p>
+			هناك فئات أخرى من دليل الأمثلة مثل الضوابط أو ممرات المعالجة اللاحقة التي توفر طرق * dispose () * من أجل إزالة مستمعي الأحداث الداخلية أو تقديم الأهداف. بشكل عام ، يوصى بالتحقق من واجهة برمجة التطبيقات أو وثائق الفصل الدراسي ومراقبة * dispose () *. إذا كان موجودًا ، يجب استخدامه عند تنظيف الأشياء.
+		</p>
+
+		<h2>الأسئلة الشائعة (FAQ)</h2>
+
+		<h3>لماذا لا يمكن لـ * three.js * التخلص من الكائنات تلقائيًا؟</h3>
+
+		<p>
+			تم طرح هذا السؤال عدة مرات من قبل المجتمع ، لذا من المهم توضيح هذا الأمر. الحقيقة هي أن * three.js * لا تعرف عمر أو نطاق الكيانات التي أنشأها المستخدم مثل الأشكال الهندسية أو المواد. هذه هي مسؤولية التطبيق. على سبيل المثال ، حتى إذا لم يتم استخدام مادة حاليًا للعرض ، فقد تكون ضرورية للإطار التالي. لذلك إذا قرر التطبيق أنه يمكن حذف كائن معين ، فيجب عليه إخبار المحرك عن طريق استدعاء طريقة *dispose()* المعنية.
+		</p>
+
+		<h3>هل تؤدي إزالة الشبكة من المشهد إلى التخلص من هندستها ومادتها أيضًا؟</h3>
+
+		<p>
+			لا ، يجب عليك التخلص صراحة من الهندسة والمواد عبر *dispose()*. ضع في اعتبارك أنه يمكن مشاركة الأشكال الهندسية والمواد بين الكائنات ثلاثية الأبعاد مثل الشبكات.
+		</p>
+
+		<h3>هل توفر * three.js * معلومات حول كمية العناصر المخزنة مؤقتًا؟</h3>
+
+		<p>
+			نعم. من الممكن تقييم [page:WebGLRenderer.info] ، وهي خاصية خاصة للعارض مع سلسلة من المعلومات الإحصائية حول ذاكرة لوحة الرسومات وعملية العرض. من بين أشياء أخرى ، تخبرك أن لديك العديد من القوام والهندسة وبرامج التظليل مخزنة داخليًا. إذا لاحظت وجود مشاكل في الأداء في التطبيق الخاص بك ، فمن الأفضل تصحيح هذه الخاصية من أجل التعرف بسهولة على تسرب الذاكرة.
+		</p>
+
+		<h3>ماذا يحدث عندما تستدعي * dispose () * على نسيج لكن الصورة لم يتم تحميلها بعد؟</h3>
+
+		<p>
+			يتم تخصيص الموارد الداخلية للنسيج فقط إذا تم تحميل الصورة بالكامل. إذا تخلصت من نسيج قبل تحميل الصورة ، فلن يحدث شيء. لم يتم تخصيص أي موارد لذلك ليست هناك حاجة للتنظيف.
+		</p>
+
+		<h3>ماذا يحدث عندما تستدعي * dispose () * ثم أستخدم النموذج المعني في وقت لاحق؟</h3>
+
+		<p>
+			سيتم إنشاء الموارد الداخلية المحذوفة مرة أخرى بواسطة المحرك. لذلك لن يحدث أي خطأ في وقت التشغيل ولكن قد تلاحظ تأثيرًا سلبيًا على الأداء للإطار الحالي ، خاصةً عندما يتعين تجميع برامج shader.
+		</p>
+
+		<h3>كيف يمكنني إدارة كائنات * three.js * في تطبيقي؟ متى أعرف كيف أتخلص من الأشياء؟</h3>
+
+		<p>
+			بشكل عام ، لا توجد توصية محددة لهذا الغرض. يعتمد الأمر بشكل كبير على حالة الاستخدام المحددة عندما يكون الاتصال بالرقم *dispose()* مناسبًا. من المهم إبراز أنه ليس من الضروري دائمًا التخلص من الأشياء طوال الوقت. وخير مثال على ذلك هو اللعبة التي تتكون من مستويات متعددة. مكان جيد للتخلص من الأشياء عند تبديل المستوى. يمكن للتطبيق اجتياز المشهد القديم والتخلص من جميع المواد والأشكال الهندسية والقوام المتقادمة. كما هو مذكور في القسم السابق ، لا ينتج عنه خطأ في وقت التشغيل إذا تخلصت من كائن لا يزال قيد الاستخدام بالفعل. أسوأ شيء يمكن أن يحدث هو انخفاض الأداء لإطار واحد.
+		</p>
+
+		<h2>أمثلة توضح استخدام dispose()</h2>
+
+		<p>
+			[example:webgl_test_memory WebGL / test / memory]<br />
+			[example:webgl_test_memory2 WebGL / test / memory2]<br />
+		</p>
+
+	</body>
+
+</html>

+ 141 - 0
docs/manual/ar/introduction/How-to-run-things-locally.html

@@ -0,0 +1,141 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>كيف تدير الأشياء محليًا</h1>
+		<p>
+			إذا كنت تستخدم الأشكال الهندسية الإجرائية فقط ولا تقوم بتحميل أي مواد ، فيجب أن تعمل صفحات الويب مباشرة من نظام الملفات ، فقط انقر نقرًا مزدوجًا فوق ملف HTML في مدير الملفات
+			يجب أن يعرض محتوى الصفحة في المتصفح (سترى <em>file:///yourFile.html</em> في شريط العناوين).
+		</p>
+
+		<h2>المحتوى الذي تم تحميله من ملفات خارجية</h2>
+		<div>
+			<p>
+				إذا قمت بتحميل نماذج وأنسجة من ملفات خارجية ، نظرًا لقيود أمان المتصفحات [link:http://en.wikipedia.org/wiki/Same_origin_policy same origin policy] ، فسيفشل التحميل من نظام الملفات مع استثناء أمان.
+		 	</p>
+
+			<p>هناك طريقتان لحل هذا:</p>
+
+			<ol>
+				<li>
+					قم بتغيير أمان الملفات المحلية في المستعرض. يتيح لك ذلك الوصول إلى صفحتك على النحو التالي: <code>file:///yourFile.html</code>
+				</li>
+				<li>
+					قم بتشغيل الملفات من خادم ويب محلي. يتيح لك هذا الوصول إلى صفحتك على النحو التالي: <code>http://localhost/yourFile.html</code>
+				</li>
+			</ol>
+
+			<p>
+				إذا كنت تستخدم الخيار 1 ، فاعلم أنك قد تفتح نفسك لبعض نقاط الضعف إذا كنت تستخدم نفس المتصفح لتصفح الويب. قد ترغب في إنشاء ملف تعريف / اختصار متصفح منفصل يستخدم فقط للتطور لتكون في مأمن. دعنا نمر إلى كل خيار على حدة.
+			</p>
+		</div>
+
+
+		<h2>قم بتشغيل خادم محلي</h2>
+		<div>
+			<p>
+				تحتوي العديد من لغات البرمجة على خوادم HTTP بسيطة مضمنة فيها. فهي ليست كاملة الميزات مثل خوادم الإنتاج مثل [link:https://www.apache.org/ Apache] أو [link:https://nginx.org NGINX] ، ولكن يجب أن تكون كافية لاختبار تطبيق three.js الخاص بك.
+			</p>
+
+			<h3>إضافات لمحررات الأكواد الأكثر إستعمالا</h3>
+			<div>
+				<p>تحتوي بعض برامج تحرير الأكواد على مكونات إضافية والتي ستنتج خادمًا بسيطًا عند الطلب.</p>
+				<ul>
+					<li>[link:https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer Live Server] لـ Visual Studio Code.</li>
+					<li>[link:https://atom.io/packages/atom-live-server Live Server] لـ Atom.</li>
+				</ul>
+			</div>
+
+			<h3>Servez</h3>
+			<div>
+				<p>
+					[link:https://greggman.github.io/servez Servez] هو خادم بسيط مع واجهة المستخدم.
+				</p>
+			</div>
+
+			<h3>Node.js http-server</h3>
+			<div>
+				<p>يحتوي Node.js على حزمة خادم HTTP بسيطة. لتثبيت:</p>
+				<code>npm install http-server -g</code>
+
+				<p>للتشغيل (من دليلك المحلي):</p>
+				<code>http-server . -p 8000</code>
+			</div>
+
+			<h3>خادم Python</h3>
+			<div>
+				<p>
+					إذا كان لديك [link:http://python.org/ Python] مثبتًا ، فيجب أن يكون كافيًا لتشغيل هذا من سطر أوامر (من دليل العمل الخاص بك):
+				</p>
+				<code>
+//Python 2.x
+python -m SimpleHTTPServer
+
+//Python 3.x
+python -m http.server
+				</code>
+
+				<p>سيخدم هذا الملفات من الدليل الحالي في المضيف المحلي تحت المنفذ 8000 ، كمثال في شريط العنوان اكتب:</p>
+
+				<code>http://localhost:8000/</code>
+			</div>
+
+			<h3>خادم Ruby</h3>
+			<div>
+				<p>إذا قمت بتثبيت Ruby ، فيمكنك الحصول على نفس النتيجة بتشغيل هذا بدلاً من ذلك:</p>
+				<code>
+ruby -r webrick -e "s = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start"
+				</code>
+			</div>
+
+			<h3>خادم PHP</h3>
+			<div>
+				<p>تحتوي PHP أيضًا على خادم ويب مدمج ، بدءًا من php 5.4.0:</p>
+				<code>php -S localhost:8000</code>
+			</div>
+
+			<h3>Lighttpd</h3>
+			<div>
+				<p>
+					Lighttpd هو خادم ويب خفيف الوزن للغاية للأغراض العامة. سنغطي تثبيته على OSX مع HomeBrew هنا. على عكس الخوادم الأخرى التي تمت مناقشتها هنا ، فإن lighttpd هو خادم جاهز للإنتاج الكامل.
+				</p>
+
+				<ol>
+					<li>
+						تثبيته بواسطة homebrew
+						<code>brew install lighttpd</code>
+					</li>
+					<li>
+						قم بإنشاء ملف ترتيب (configuration) يسمى lighttpd.conf في المجلد حيث تريد تشغيل خادم الويب الخاص بك. يوجد نموذج [link:http://redmine.lighttpd.net/projects/lighttpd/wiki/TutorialConfiguration here].
+					 </li>
+					<li>
+						في ملف conf ، قم بتغيير server.document-root إلى الدليل الذي تريد خدمة الملفات منه.
+					</li>
+					<li>
+						شغله من خلال الأمر التالي:
+						<code>lighttpd -f lighttpd.conf</code>
+					</li>
+					<li>
+						انتقل إلى http://localhost:3000 وسيخدم الملفات الثابتة من الدليل الذي تختاره.
+					</li>
+				</ol>
+			</div>
+			<h3>IIS</h3>
+			<div>
+				<p>إذا كنت تستخدم Microsoft IIS كخادم ويب. الرجاء إضافة إعدادات نوع MIME فيما يتعلق بامتداد .fbx قبل التحميل.</p>
+				<code>File name extension: fbx        MIME Type: text/plain</code>
+				<p>بشكل تلقائي ، يقوم IIS بحظر تنزيل ملفات .fbx و .obj. يجب عليك تعديل IIS لتمكين تنزيل هذا النوع من الملفات.</p>
+			</div>
+			<p>
+				تمت مناقشة البدائل البسيطة الأخرى هنا [link:http://stackoverflow.com/q/12905426/24874 here] على Stack Overflow.
+			</p>
+		</div>
+
+	</body>
+</html>

+ 241 - 0
docs/manual/ar/introduction/How-to-update-things.html

@@ -0,0 +1,241 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>كيفية تحديث الأشياء</h1>
+		<div>
+			<p>تقوم كل الكائنات بشكل ألي بتحديث حالتها تلقائيًا إذا تمت إضافتها إلى المشهد باستخدام</p>
+			<code>
+var object = new THREE.Object3D();
+scene.add( object );
+			</code>
+			<p>أو إذا كانوا أبناء كائن آخر تمت إضافته إلى المشهد:</p>
+			<code>
+var object1 = new THREE.Object3D();
+var object2 = new THREE.Object3D();
+
+object1.add( object2 );
+scene.add( object1 ); //object1 and object2 will automatically update their matrices
+			</code>
+		</div>
+
+		<p>ومع ذلك ، إذا كنت تعلم أن الكائن سيكون ثابتًا ، فيمكنك تعطيل هذا وتحديث وضيفة التحديث يدويًا عند الحاجة فقط.</p>
+
+		<code>
+object.matrixAutoUpdate  = false;
+object.updateMatrix();
+		</code>
+
+		<h2>BufferGeometry</h2>
+		<div>
+			<p>
+				يخزن BufferGeometries المعلومات (مثل مواضع الرأس ومؤشرات الوجه والعلامات والألوان وUVs وأي سمات مخصصة) في [page:BufferAttribute buffers] - أي ،
+				[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays typed arrays].
+				هذا يجعلها بشكل عام أسرع من الهندسة الأساسية (standard geometry) ، بحساب تكلفة العمل بها إلى حد ما.
+			</p>
+			<p>
+				فيما يتعلق بتحديث BufferGeometries ، فإن أهم شيء يجب فهمه هو أنه لا يمكنك تغيير حجم المخازن المؤقتة (هذا مكلف للغاية ، ويعادل بشكل أساسي إنشاء هندسة جديدة). ومع ذلك يمكنك تحديث محتوى المخازن المؤقتة.
+			</p>
+			<p>
+				هذا يعني أنك إذا كنت تعرف أن إحدى سمات BufferGeometry ستنمو ، لنقل عدد الرؤوس ، فيجب عليك تخصيص مخزن مؤقت كبير بما يكفي لاحتواء أي رؤوس جديدة قد يتم إنشاؤها. بالطبع ، هذا يعني أيضًا أنه سيكون هناك حد أقصى لحجم BufferGeometry - لا توجد طريقة لإنشاء BufferGeometry يمكن تمديده حجم غير محدود.
+			</p>
+			<p>
+				سنستخدم مثال السطر الذي سيتم تمديده في وقت العرض. سنخصص مساحة في المخزن المؤقت لـ 500 رأس لكننا نرسم اثنين فقط في البداية ، باستخدام [page:BufferGeometry.drawRange].
+			</p>
+			<code>
+var MAX_POINTS = 500;
+
+// geometry
+var geometry = new THREE.BufferGeometry();
+
+// attributes
+var positions = new Float32Array( MAX_POINTS * 3 ); // 3 vertices per point
+geometry.setAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
+
+// draw range
+var drawCount = 2; // draw the first 2 points, only
+geometry.setDrawRange( 0, drawCount );
+
+// material
+var material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
+
+// line
+var line = new THREE.Line( geometry,  material );
+scene.add( line );
+			</code>
+		 	<p>
+				بعد ذلك سنضيف نقاطًا بشكل عشوائي إلى الخط باستخدام نمط مثل:
+			</p>
+			<code>
+var positions = line.geometry.attributes.position.array;
+
+var x, y, z, index;
+x = y = z = index = 0;
+
+for ( var i = 0, l = MAX_POINTS; i < l; i ++ ) {
+
+    positions[ index ++ ] = x;
+    positions[ index ++ ] = y;
+    positions[ index ++ ] = z;
+
+    x += ( Math.random() - 0.5 ) * 30;
+    y += ( Math.random() - 0.5 ) * 30;
+    z += ( Math.random() - 0.5 ) * 30;
+
+}
+			</code>
+			<p>
+				إذا كنت تريد تغيير <em>عدد النقاط</em> التي تم إظهارها بعد العرض الأول ، فقم بما يلي:
+			</p>
+			<code>
+line.geometry.setDrawRange( 0, newValue );
+			</code>
+			<p>
+				إذا كنت تريد تغيير قيم بيانات الموضع بعد العرض الأول ، فأنت بحاجة إلى تعيين علامة needsUpdate على النحو التالي:
+			</p>
+			<code>
+line.geometry.attributes.position.needsUpdate = true; // required after the first render
+			</code>
+
+			<p>
+				إذا قمت بتغيير قيم بيانات الموقع بعد التصيير الأولي ، فقد تحتاج إلى استدعاء `` .computeBoundingSphere () 'لإعادة حساب المجال المحيط للهندسة.
+			</p>
+			<code>
+line.geometry.computeBoundingSphere();
+			</code>
+
+			<p>
+				هنا مثال يعرض خطًا متحركًا يمكن تكييفه مع حالة الاستخدام الخاصة بك.
+				[link:http://jsfiddle.net/w67tzfhx/ Here is a fiddle]
+			</p>
+
+			<h3>أمثلة</h3>
+
+			<p>
+				[example:webgl_custom_attributes WebGL / custom / attributes]<br />
+				[example:webgl_buffergeometry_custom_attributes_particles WebGL / buffergeometry / custom / attributes / particles]
+			</p>
+
+		</div>
+
+		<h2>الهندسة (Geometry)</h2>
+		<div>
+			<p>
+				تتحكم العلامات التالية في تحديث سمات الهندسة المختلفة. قم بتعيين العلامات فقط للسمات التي تحتاج إلى تحديثها ، فالتحديثات مكلفة. بمجرد تغيير المخازن المؤقتة ، يتم إعادة تعيين هذه العلامات تلقائيًا إلى false. تحتاج إلى الاستمرار في ضبطها على true إذا كنت تريد الاستمرار في تحديث المخازن المؤقتة. لاحظ أن هذا ينطبق فقط على [page:Geometry] وليس [page:BufferGeometry].
+			</p>
+			<code>
+var geometry = new THREE.Geometry();
+geometry.verticesNeedUpdate = true;
+geometry.elementsNeedUpdate = true;
+geometry.morphTargetsNeedUpdate = true;
+geometry.uvsNeedUpdate = true;
+geometry.normalsNeedUpdate = true;
+geometry.colorsNeedUpdate = true;
+geometry.tangentsNeedUpdate = true;
+			</code>
+
+			<p>
+				في الإصدارات السابقة لـ [link:https://github.com/mrdoob/three.js/releases/tag/r66 r66] ، تحتاج الشبكات أيضًا إلى تمكين العلامة  <em>الديناميكية</em> (للاحتفاظ بالمصفوفات المكتوبة داخليًا):
+			</p>
+
+			<code>
+	//removed after r66
+	geometry.dynamic = true;
+			</code>
+
+		</div>
+
+		<h2>المواد (Materials)</h2>
+		<div>
+			<p>يمكن تغيير جميع قيم الزي الرسمي بحرية (على سبيل المثال ، الألوان ، والأنسجة ، والعتامة ، وما إلى ذلك) ، ويتم إرسال القيم إلى الشادر (shader) في كل إطار.</p>
+
+			<p>يمكن أيضًا تغيير المعلمات ذات الصلة بـ GLstate في أي وقت (depthTest, blending, polygonOffset, etc).</p>
+
+			<p>لا يمكن تغيير الخصائص التالية بسهولة في وقت التشغيل (بمجرد تقديم المادة مرة واحدة على الأقل):</p>
+			<ul>
+				<li>numbers and types of uniforms</li>
+				<li>presence or not of
+					<ul>
+						<li>texture</li>
+						<li>fog</li>
+						<li>vertex colors</li>
+						<li>skinning</li>
+						<li>morphing</li>
+						<li>shadow map</li>
+						<li>alpha test</li>
+					</ul>
+				</li>
+			</ul>
+
+			<p>تتطلب التغييرات في هذه بناء برنامج شادر (shader) جديد. سوف تحتاج إلى ضبط</p>
+			<code>material.needsUpdate = true</code>
+
+			<p>ضع في اعتبارك أن هذا قد يكون بطيئًا للغاية ويؤدي إلى اهتزاز في معدل الإطارات (خاصة على Windows ، حيث أن التحويل البرمجي للشادر (shader) يكون أبطأ في DirectX منه في OpenGL).</p>
+
+			<p>للحصول على تجربة أكثر سلاسة ، يمكنك محاكاة التغييرات في هذه الميزات إلى حد ما من خلال الحصول على قيم "وهمية" مثل الأضواء صفر الكثافة أو الزخارف البيضاء أو الضباب الصفري.</p>
+
+			<p>يمكنك تغيير المواد المستخدمة في القطع الهندسية بحرية ، ولكن لا يمكنك تغيير كيفية تقسيم الكائن إلى أجزاء (وفقًا لمواد الوجه). </p>
+
+			<h3>إذا كنت بحاجة إلى تكوينات مختلفة من المواد أثناء وقت التشغيل:</h3>
+			<p>إذا كان عدد المواد / القطع الصغيرًة ، فيمكنك تقسيم الجسم مسبقًا (مثل الشعر / الوجه / الجسم / الملابس العلوية / السراويل للإنسان ، أمامي / جوانب / الجزء العلوي / الزجاج / الإطار / الجزء الداخلي للسيارة). </p>
+
+			<p>إذا كان الرقم كبيرًا (على سبيل المثال ، من المحتمل أن يكون كل وجه مختلفًا) ، ففكر في حل مختلف ، مثل استخدام السمات / القوام للحصول على مظهر مختلف لكل وجه.</p>
+
+			<h3>أمثلة</h3>
+			<p>
+				[example:webgl_materials_car WebGL / materials / car]<br />
+				[example:webgl_postprocessing_dof WebGL / webgl_postprocessing / dof]
+			</p>
+		</div>
+
+
+		<h2>النسيج (Textures)</h2>
+		<div>
+			<p>يجب أن يتم تعيين العلامات التالية في الصورة ، canvas والفيديو والبيانات إذا تم تغييرها:</p>
+			<code>
+				texture.needsUpdate = true;
+			</code>
+			<p>العرض يستهدف التحديث تلقائيا.</p>
+
+			<h3>أمثلة</h3>
+			<p>
+				[example:webgl_materials_video WebGL / materials / video]<br />
+				[example:webgl_rtt WebGL / rtt]
+			</p>
+
+		</div>
+
+
+		<h2>الكاميرات (Cameras)</h2>
+		<div>
+			<p>يتم تحديث موضع الكاميرا وهدفها تلقائيًا. إذا كنت بحاجة إلى التغيير</p>
+			<ul>
+				<li>
+					fov
+				</li>
+				<li>
+					aspect
+				</li>
+				<li>
+					near
+				</li>
+				<li>
+					far
+				</li>
+			</ul>
+			<p>
+				ثم ستحتاج إلى إعادة حساب مصفوفة الإسقاط(the projection matrix):
+			</p>
+			<code>
+camera.aspect = window.innerWidth / window.innerHeight;
+camera.updateProjectionMatrix();
+			</code>
+		</div>
+	</body>
+</html>

+ 98 - 0
docs/manual/ar/introduction/How-to-use-post-processing.html

@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>كيفية استخدام المعالجة اللاحقة<br/> (post-processing)</h1>
+
+		<p>
+			تعرض العديد من تطبيقات three.js كائناتها ثلاثية الأبعاد مباشرة على الشاشة. ومع ذلك ، في بعض الأحيان ، تريد تطبيق واحد أو أكثر من التأثيرات الرسومية مثل Depth-Of-Field أو Bloom أو Film Grain أو أنواع مختلفة من Anti-aliasing. المعالجة اللاحقة هي طريقة مستخدمة على نطاق واسع لتنفيذ مثل هذه التأثيرات. أولاً ، يتم تحويل المشهد إلى هدف عرض يمثل مخزنًا مؤقتًا في ذاكرة بطاقة الفيديو.
+			في الخطوة التالية ، تقوم واحدة أو أكثر من ممرات ما بعد المعالجة بتطبيق المرشحات والتأثيرات على المخزن المؤقت للصور قبل أن يتم عرضه في النهاية على الشاشة.
+		</p>
+		<p>
+			توفر three.js حلاً كاملاً لعملية المعالجة بتوفير [page:EffectComposer] الذي يتولى تنفيذ مثل هذه الأعمال.
+		</p>
+
+		<h2>سير العمل</h2>
+
+		<p>
+			الخطوة الأولى في العملية هي استيراد جميع الملفات الضرورية من دليل الأمثلة. يفترض الدليل أنك تستخدم الرقم الرسمي [link:https://www.npmjs.com/package/three npm package] من three.js. في العرض التوضيحي الأساسي في هذا الدليل ، نحتاج إلى الملفات التالية.
+		</p>
+
+		<code>
+		import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';
+		import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';
+		import { GlitchPass } from 'three/examples/jsm/postprocessing/GlitchPass.js';
+		</code>
+
+		<p>
+			بعد أن يتم استرداد جميع الملفات بنجاح ، يمكنك إنشاء الملحن الخاص بنا بتمرير نموذج من [page:WebGLRenderer].
+		</p>
+
+		<code>
+		var composer = new EffectComposer( renderer );
+		</code>
+
+		<p>
+			عند استخدام الملحن ، من الضروري تغيير حلقة الرسوم المتحركة للتطبيق. بدلاً من استدعاء طريقة العرض [page:WebGLRenderer] ، نستخدم الآن النظير الخاص بها [page:EffectComposer].
+		</p>
+
+		<code>
+		function animate() {
+
+			requestAnimationFrame( animate );
+
+			composer.render();
+
+		}
+		</code>
+
+		<p>
+			أصبح الملحن جاهزًا الآن ، لذا من الممكن تكوين سلسلة ممرات ما بعد المعالجة. هذه التمريرات مسؤولة عن إنشاء الإخراج المرئي النهائي للتطبيق. تتم معالجتها بترتيب الإضافة / الإدراج. في مثالنا ، تم تنفيذ *RenderPass* أولاً ثم *GlitchPass*. يتم عرض آخر تمرير تم تمكينه في السلسلة تلقائيًا على الشاشة. يبدو إعداد التصاريح كما يلي:
+		</p>
+
+		<code>
+		var renderPass = new RenderPass( scene, camera );
+		composer.addPass( renderPass );
+
+		var glitchPass = new GlitchPass();
+		composer.addPass( glitchPass );
+		</code>
+
+		<p>
+			يتم وضع *RenderPass* بشكل طبيعي في بداية السلسلة من أجل توفير المشهد الذي تم عرضه كمدخل لخطوة ما بعد المعالجة التالية. في حالتنا ، ستستخدم *GlitchPass* بيانات الصورة هذه لتطبيق تأثير خلل جامح. تحقق من هذا [link:https://threejs.org/examples/webgl_postprocessing_glitch live example] لتراها في العمل.
+		</p>
+
+		<h2>تصاريح مدمجة</h2>
+
+		<p>
+			يمكنك استخدام مجموعة واسعة من تصاريح ما بعد المعالجة التي يوفرها المحرك. يتم الاحتفاظ بها في الدليل [link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm/postprocessing postprocessing].
+		</p>
+
+		<h2>تصاريح مخصصة</h2>
+
+		<p>
+			في بعض الأحيان تريد كتابة تظليل مخصص للمعالجة اللاحقة وإدراجه في سلسلة ممرات ما بعد المعالجة. في هذا السيناريو ، يمكنك استخدام *ShaderPass*. بعد استيراد الملف والتظليل المخصص الخاص بك ، يمكنك استخدام الكود التالي لإعداد المرور.
+		</p>
+
+		<code>
+		import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js';
+		import { LuminosityShader } from 'three/examples/jsm/shaders/LuminosityShader.js';
+
+		// later in your init routine
+
+		var luminosityPass = new ShaderPass( LuminosityShader );
+		composer.addPass( luminosityPass );
+		</code>
+
+		<p>
+			يوفر المستودع ملفًا يسمى [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/shaders/CopyShader.js CopyShader] وهو رمز بداية جيد للتظليل المخصص الخاص بك. *CopyShader* فقط ينسخ محتويات الصورة من مخزن قراءة [page:EffectComposer] إلى مخزن الكتابة المؤقت الخاص به دون تطبيق أي تأثيرات.
+		</p>
+
+	</body>
+</html>

+ 182 - 0
docs/manual/ar/introduction/Installation.html

@@ -0,0 +1,182 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>التثبيت ([name])</h1>
+
+		<p>
+			يمكنك تنصيب three.js بإستعمال [link:https://www.npmjs.com/ npm] و وسائل البناء الحديثة، أو قم بالبدأ فقط
+        	بإستعمال إصدار ثابت متوفر عبر خدمة CDN.
+        	بالنسبة لأغلب المستخدمين تنصيب المكتبة بإستعمال npm هو الخيار الأفضل.
+		</p>
+
+		<p>
+			بغض النظر عن إختيارك، كن حريصا على أن تقوم بإستدعاء جميع الملفات التي تنتمي لنفس الإصدار. خلط ملفات من إصدارات
+			مختلفة قد ينتج منه بعض السلوكات الغير متوقعة.
+		</p>
+
+		<p>
+			جميع طرق تنصيب three.js بناءا على ES modules (شاهد
+			[link:https://eloquentjavascript.net/10_modules.html#h_hF2FmOVxw7 Eloquent JavaScript: ECMAScript Modules])،
+			التي تمكنك من إستدعاء أجزاء معينة من المكتبة دون الحاجة لإستدعاء المصدر كله.
+		</p>
+
+		<h2>التثبيت بإستعمال npm</h2>
+
+		<p>
+			لتنصيب وحدة (npm module) [link:https://www.npmjs.com/package/three three]، قم بفتح نافذة الأوامر في المجلد الخاص
+			بمشروعك و شغل الأمر التالي:
+		</p>
+
+		<code>
+		npm install --save three
+		</code>
+
+		<p>
+			سيتم تحميل الرزمة و تثبيتها. و من ثم تصبح مستعد لإستدعائها كالأتي:
+		</p>
+
+		<code>
+		///////////////////////////////////////////////////////
+		// Option 1: Import the entire three.js core library.
+		import * as THREE from 'three';
+
+		const scene = new THREE.Scene();
+
+
+		///////////////////////////////////////////////////////
+		// Option 2: Import just the parts you need.
+		import { Scene } from 'three';
+
+		const scene = new Scene();
+		</code>
+
+		<p>
+			خلال التنصيب بإستعمال npm، لقد قمت بشكل غير مباشر بإستعمال
+			[link:https://eloquentjavascript.net/10_modules.html#h_zWTXAU93DC bundling tool] لجمع كل الرزم التي يحتاجها
+			مشروعك في ملف JavaScript واحد.
+			بينما يمكن لأي جامع رزم حديث العمل مع three.js، يبقى الخيار الأكثر شيوعا هو
+			[link:https://webpack.js.org/ webpack].
+		</p>
+
+		<p>
+			لا يمكن الوصول لكل المزايا مباشرة من خلال رزمة <em>three</em> (بإستعمال bare import). بقية الأجزاء المستعملة
+			كثيرا من المكتبة مثل
+			الضوابط (controls)،
+			المحمل (loaders)، و آثار ما بعد المعالجة (post-processing effects)، يجب إستدعائهم من مجلد
+			[link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm examples/jsm]. لمعرفة المزيد، قم
+			بزيارة قسم
+			<em>الأمثلة</em>
+			بالأسفل.
+		</p>
+
+		<p>
+			لمعرفة المزيد عن وحدات npm.
+			قم بزيارة [link:https://eloquentjavascript.net/20_node.html#h_J6hW/SmL/a Eloquent JavaScript: Installing with npm].
+		</p>
+
+		<h2>التثبيت من CDN أو استضافة ثابتة</h2>
+
+		<p>
+			يمكن إستعمال مكتبة three.js دون الحاجة إلى نظام بناء، سواءا عبر تحميل الملفات إلى خادم الويب الخاص بك أو باستخدام CDN موجود. بسبب أن المكتبة تعتمد على وحدات ES (modules) يجب على أي شفرة برمجية تشير إليها أن تستخدام <em>type="module"</em> كما هو موضح أسفله:
+		</p>
+
+		<code>
+		&lt;script type="module">
+
+		  // Find the latest version by visiting https://unpkg.com/three. The URL will
+		  // redirect to the newest stable release.
+		  import * as THREE from 'https://unpkg.com/three@&lt;VERSION>/build/three.module.js';
+
+		  const scene = new THREE.Scene();
+
+		&lt;/script>
+		</code>
+
+		<p>
+			ليست كل المزايا يمكن الوصول لها عبر وحدة <em>build/three.module.js</em>. بعض المكونات الأخرى من المكتبة - مثل الضوابط (controls) وعناصر التحميل (loaders) وتأثيرات ما بعد المعالجة (post-processing effects) - يجب إستدعائهم من الملفات الثانوية [link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm examples/jsm].
+		</p>
+
+
+		<h2>أمثلة</h2>
+
+		<p>
+			يركز جوهر three.js على أهم المكونات المكونة لمحرك ثلاثي الأبعاد.  العديد من المكونات المفيدة الأخرى - مثل الضوابط ، عناصر التحميل ، وتأثيرات ما بعد المعالجة - هي جزء من المجلد [link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm examples/jsm]. .يشار إليها باسم "أمثلة" ، لأنه بينما يمكنك استخدامها ببساطة، من المفترض أيضًا إعادة دمجها وتخصيصها. هذه المكونات تضل  متزامنة مع المكتبة الأساسية
+			بينما يتم الاحتفاظ بحزم الجهات الخارجية المماثلة على npm بواسطة أشخاص مختلفين وقد لا تكون محدثة.
+		</p>
+
+		<p>
+			لا يلزم تثبيت الأمثلة بشكل منفصل ، ولكن يجب استيرادها بشكل منفصل. إذا تم تثبيت three.js بواسطة npm ، يمكنك إستدعاء مكون OrbitControls كالأتي:
+		</p>
+
+		<code>
+		import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
+
+		const controls = new OrbitControls();
+		</code>
+
+		<p>
+			إذا تم تثبيت three.js من CDN ، فمن المستحسن إستخدم نفس CDN لتثبيت المكونات الأخرى:
+		</p>
+
+		<code>
+		&lt;script type="module">
+
+		  // Find the latest version by visiting https://unpkg.com/three. The URL will
+		  // redirect to the newest stable release.
+		  import { OrbitControls } from 'https://unpkg.com/three@&lt;VERSION>/examples/jsm/controls/OrbitControls.js';
+
+		  const controls = new OrbitControls();
+
+		&lt;/script>
+		</code>
+
+		<p>
+			من المهم أن تستخدم جميع الملفات نفس الإصدار. لا تستورد أمثلة مختلفة من إصدارات مختلفة، أو تستخدم أمثلة من إصدارات مختلفة عن مكتبة three.js نفسها.
+		</p>
+
+		<h2>التوافق</h2>
+
+		<h3>واردات CommonJS</h3>
+
+		<p>
+			في حين أن معظم حِزم JavaScript الحديثة تدعم الآن وحدات ES افتراضيًا ، فقد لا تدعم بعض أدوات البناء القديمة.
+			في مثل هذه الحالات بإستطاعتك تعديل المجمع لفهم وحدات ES: <br/>
+			[link:http://browserify.org/ Browserify] يحتاج فقط إلى إضافة [link:https://github.com/babel/babelify babelify] على سبيل المثال.
+		</p>
+
+		<h3>خرائط الإستيراد</h3>
+
+		<p>
+			تختلف المسارات المستوردة عند التثبيت من npm ، مقارنة بالتثبيت من استضافة ثابتة أو CDN. نحن ندرك أن هذه مشكلة مريحة لكلا مجموعتي المستخدمين.
+			يفضل المطورون الذين لديهم أدوات إنشاء وحزم محددات الحزم المجردة (على سبيل المثال "three") بدلاً من المسارات النسبية ، وتستخدم الملفات في المجلد <em>examples/</em> مراجع نسبية إلى <em> three.module.js </em > التي لا تتبع هذا التوقع.
+				أولئك الذين لا يستخدمون أدوات الإنشاء - للنماذج الأولية السريعة أو التعلم أو التفضيل الشخصي - قد يكرهون بالمثل تلك الواردات النسبية ، والتي تتطلب هياكل مجلدات معينة وتكون أقل تسامحًا من مساحة الاسم <em> THREE. * </em> العام.
+		</p>
+
+		<p>
+			نأمل في إزالة هذه المسارات النسبية عندما يصبح [link:https://github.com/WICG/import-maps import maps] متاحًا على نطاق واسع ، واستبدالها بمحددات الحزمة المجردة إلى اسم الحزمة npm ، 'three'. يتطابق هذا مع توقعات أداة الإنشاء لحزم npm بشكل وثيق ، ويسمح لمجموعتي المستخدمين بكتابة نفس الرمز تمامًا عند استيراد ملف. بالنسبة للمستخدمين الذين يفضلون تجنب أدوات الإنشاء ، يمكن أن يوجه تعيين JSON البسيط جميع الواردات إلى CDN أو مجلد ملف ثابت. من الناحية التجريبية ، يمكنك محاولة استخدام عمليات استيراد أبسط اليوم مع تعبئة خريطة الاستيراد ، كما هو موضح في [link:https://glitch.com/edit/#!/three-import-map?path=index.html import map example].
+		</p>
+
+		<h3>Node.js</h3>
+
+		<p>
+			قد يكون استخدام three.js في Node.js أمرًا صعبًا ، وذلك لسببين:
+		</p>
+
+		<p>
+			أولاً ، نظرًا لأن three.js مصممة للويب ، فإنها تعتمد على المتصفح وواجهات برمجة تطبيقات DOM التي لا تتواجد دائمًا في Node.js. يمكن حل بعض هذه المشكلات باستخدام (shims) مثل [link:https://github.com/stackgl/headless-gl headless-gl]، أو عن طريق استبدال مكونات مثل [page: TextureLoader] ببدائل مخصصة. قد تتشابك واجهات برمجة تطبيقات DOM الأخرى بعمق مع الكود الذي يستخدمها ، وسيكون من الصعب حلها. نرحب بطلبات السحب البسيطة والقابلة للصيانة لتحسين دعم Node.js ، لكننا نوصي بفتح مشكلة لمناقشة التحسينات التي أجريتها أولاً.
+		</p>
+
+		<p>
+			ثانيًا ، دعم Node.js لوحدات ES ... معقد. بدءًا من الإصدار 12 من Node.js ، يمكن استيراد المكتبة الأساسية كوحدة نمطية CommonJS ، مع <em>require('three')</em>. ومع ذلك ، فإن معظم أمثلة المكونات في <em>examples/jsm</em> لا يمكنها ذلك.
+			قد تحل الإصدارات المستقبلية من Node.js هذه المشكلة ، ولكن في هذه الأثناء قد تحتاج إلى استخدام حلول بديلة مثل [link:https://github.com/standard-things/esm esm] لتمكين تطبيق Node.js الخاص بك من التعرف على وحدات ES.
+		</p>
+
+	</body>
+</html>

+ 135 - 0
docs/manual/ar/introduction/Loading-3D-models.html

@@ -0,0 +1,135 @@
+<!DOCTYPE html>
+<html lang="ar">
+
+<head>
+	<meta charset="utf-8">
+	<base href="../../../" />
+	<script src="list.js"></script>
+	<script src="page.js"></script>
+	<link type="text/css" rel="stylesheet" href="page.css" />
+</head>
+
+<body class="rtl">
+	<h1>تحميل نماذج ثلاثية الأبعاد</h1>
+
+	<p>
+		تتوفر النماذج ثلاثية الأبعاد في مئات من تنسيقات الملفات ، ولكل منها أغراض مختلفة وميزات متنوعة وتعقيد متفاوت. برغم من أن
+		<a href="https://github.com/mrdoob/three.js/tree/dev/examples/jsm/loaders" target="_blank" rel="noopener">
+		مكتبة three.js توفر العديد من عناصر التحميل</a>، فإن اختيار التنسيق المناسب وسير العمل سيوفر الوقت والإحباط لاحقًا. يصعب العمل مع بعض التنسيقات ، أو أنها غير فعالة في تجارب الوقت الفعلي ، أو ببساطة غير مدعومة بالكامل في هذا الوقت.
+	</p>
+
+	<p>
+		يوفر هذا الدليل سير عمل موصى به لمعظم المستخدمين ، واقتراحات لما يجب تجربته إذا لم تسير الأمور كما هو متوقع.
+	</p>
+
+	<h2>قبل أن نبدأ</h2>
+
+	<p>
+		إذا كنت جديدًا في تشغيل خادم محلي ، فابدأ بكيفية إدارة الأشياء محليًا [link:#manual/introduction/How-to-run-things-locally how to run things locally] أولاً. يمكن تجنب العديد من الأخطاء الشائعة أثناء عرض النماذج ثلاثية الأبعاد عن طريق استضافة الملفات بشكل صحيح.
+	</p>
+
+	<h2>سير العمل الموصى به</h2>
+
+	<p>
+		حيثما أمكن ، نوصي باستخدام glTF (تنسيق نقل GL). كلا النسختين <small> .GLB </small> و <small> .GLTF </small> من التنسيق مدعومة بشكل جيد. نظرًا لأن glTF يركز على تسليم أصول وقت التشغيل ، فهو مضغوط للإرسال وسريع التحميل. تتضمن الميزات الشبكات والمواد والأنسجة والجلود والهياكل العظمية والأهداف المتحولة والرسوم المتحركة والأضواء والكاميرات.
+	</p>
+
+	<p>
+		تتوفر ملفات glTF عامة على مواقع مثل
+		<a href="https://sketchfab.com/models?features=downloadable&sort_by=-likeCount&type=models" target="_blank" rel="noopener">
+		Sketchfab</a>، أو أدوات متنوعة تتضمن تصدير glTF:
+	</p>
+
+	<ul>
+		<li><a href="https://github.com/KhronosGroup/glTF-Blender-IO" target="_blank" rel="noopener">glTF-Blender-IO</a> بواسطة مجموعة Khronos</li>
+		<li><a href="https://github.com/KhronosGroup/COLLADA2GLTF" target="_blank" rel="noopener">COLLADA2GLTF</a> بواسطة مجموعة Khronos</li>
+		<li><a href="https://github.com/facebookincubator/FBX2glTF" target="_blank" rel="noopener">FBX2GLTF</a> بواسطة Facebook</li>
+		<li><a href="https://github.com/AnalyticalGraphicsInc/obj2gltf" target="_blank" rel="noopener">OBJ2GLTF</a> بواسطة Analytical Graphics Inc</li>
+		<li><a href="https://www.allegorithmic.com/products/substance-painter" target="_blank" rel="noopener">Substance Painter</a> بواسطة Allegorithmic</li>
+		<li><a href="https://www.foundry.com/products/modo" target="_blank" rel="noopener">Modo</a> بواسطة Foundry</li>
+		<li><a href="https://www.marmoset.co/toolbag/" target="_blank" rel="noopener">Toolbag</a> بواسطة Marmoset</li>
+		<li><a href="https://www.sidefx.com/products/houdini/" target="_blank" rel="noopener">Houdini</a> بواسطة SideFX</li>
+		<li><a href="https://labs.maxon.net/?p=3360" target="_blank" rel="noopener">Cinema 4D</a> بواسطة MAXON</li>
+		<li>و <a href="https://github.com/khronosgroup/gltf#gltf-tools" target="_blank" rel="noopener">المزيد&hellip;</a></li>
+	</ul>
+
+	<p>
+		إذا كانت أدواتك المفضلة لا تدعم glTF ، ففكر في طلب تصدير glTF من المؤلفين ، أو النشر على
+		<a href="https://github.com/KhronosGroup/glTF/issues/1051" target="_blank" rel="noopener">the glTF roadmap thread</a>.
+	</p>
+
+	<p>
+		عندما لا يكون glTF خيارًا ، تتوفر أيضًا التنسيقات الشائعة مثل FBX أو OBJ أو COLLADA ويتم صيانتها بانتظام.
+	</p>
+
+	<h2>التحميل</h2>
+
+	<p>
+		يتم تضمين عدد قليل فقط من عناصر التحميل (على سبيل المثال [page:ObjectLoader]) بشكل ألي مع
+		three.js - يجب عليك إضافة الآخرين إلى تطبيقك بشكل فردي.
+	</p>
+
+	<code>
+		import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
+	</code>
+
+	<p>
+		بمجرد قيامك باستيراد عنصر التحميل ، فأنت جاهز لإضافة نموذج إلى المشهد الخاص بك. يختلف بناء الجملة باختلاف عناصر التحميل - عند استخدام تنسيق آخر ، تحقق من الأمثلة والوثائق الخاصة بهذا المُحمل. بالنسبة إلى glTF ، سيكون الاستخدام مع البرامج النصية العامة:
+	</p>
+
+	<code>
+		var loader = new GLTFLoader();
+
+		loader.load( 'path/to/model.glb', function ( gltf ) {
+
+			scene.add( gltf.scene );
+
+		}, undefined, function ( error ) {
+
+			console.error( error );
+
+		} );
+	</code>
+
+	<p>
+		انظر [page:GLTFLoader GLTFLoader documentation] لمزيد من التفاصيل.
+	</p>
+
+	<h2>إستكشاف الأخطاء وإصلاحها</h2>
+
+	<p>
+		إن كنت قد أمضيت ساعات في تصميم تحفة فنية ، وقمت بتحميلها في صفحة الويب ، و- لا! 😭 إنه مشوه أو مفقود تمامًا. ابدأ بالخطوات التالية لاستكشاف الأخطاء وإصلاحها:
+	</p>
+
+	<ol>
+		<li>
+			تحقق من وحدة تحكم جافا سكريبت بحثًا عن أخطاء ، وتأكد من استخدام رد اتصال <em> onError </em> عند استدعاء <em> .load () </em> لتسجيل النتيجة.
+		</li>
+		<li>
+			اعرض النموذج في تطبيق آخر. بالنسبة إلى glTF ، تتوفر عارضات السحب والإفلات لـ
+			<a href="https://gltf-viewer.donmccurdy.com/" target="_blank" rel="noopener">three.js</a> و
+			<a href="http://sandbox.babylonjs.com/" target="_blank" rel="noopener">babylon.js</a>. إذا ظهر النموذج بشكل صحيح في تطبيق واحد أو أكثر ،
+			<a href="https://github.com/mrdoob/three.js/issues/new" target="_blank" rel="noopener">إرفع إعلان وجود خطأ ضد المكتبة</a>.
+			إذا تعذر عرض النموذج في أي تطبيق ، فإننا نشجع بشدة على تسجيل خطأ في التطبيق المستخدم لإنشاء النموذج.
+		</li>
+		<li>
+			حاول تكبير النموذج لأعلى أو لأسفل بعامل 1000. يتم قياس العديد من الأمثلة بشكل مختلف ، وقد لا تظهر الأمثلة الكبيرة إذا كانت الكاميرا داخل النموذج.
+		</li>
+		<li>
+			حاول إضافة مصدر ضوء وتحديد موضعه. قد يكون النموذج مخفيًا في الظلام.
+		</li>
+		<li>
+			ابحث عن طلبات النسيج الفاشلة في علامة تبويب الشبكة ، مثل <em>C:\\Path\To\Model\texture.jpg</em>. استخدم المسارات المتعلقة بنموذجك بدلاً من ذلك ، مثل <em> images/texture.jpg</em> - قد يتطلب ذلك تعديل ملف النموذج في محرر نصي.
+		</li>
+	</ol>
+
+	<h2>طلب المساعدة</h2>
+
+	<p>
+		إذا مررت بعملية استكشاف الأخطاء وإصلاحها أعلاه ولا يزال نموذجك لا يعمل ، فإن الطريقة الصحيحة لطلب المساعدة ستوصلك إلى حل بشكل أسرع. انشر سؤالاً على منتدى المكتبة
+		<a href="https://discourse.threejs.org/" target="_blank" rel="noopener">three.js forum</a> وحيثما أمكن ، قم بتضمين النموذج الخاص بك (أو نموذج أبسط بنفس المشكلة) بأي تنسيقات متوفرة لديك. قم بتضمين معلومات كافية لشخص آخر لإعادة إنتاج المشكلة بسرعة - من الناحية المثالية ، عرض توضيحي مباشر.
+	</p>
+
+</body>
+
+</html>

+ 66 - 0
docs/manual/ar/introduction/Matrix-transformations.html

@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>تحولات المصفوفة ([name])</h1>
+
+		<p>
+			يستخدم *Three.js* المصفوفات لتشفير عمليات التحويل ثلاثية الأبعاد --- الترجمات (الموضع) والتدوير والقياس. يحتوي كل مثيل [page:Object3D] على [page:Object3D.matrix matrix] يخزن موضع هذا الكائن وتدويره ومقياسه. تصف هذه الصفحة كيفية تحديث تحول الكائن.
+		</p>
+
+		<h2>خصائص الراحة و *matrixAutoUpdate*</h2>
+
+		<p>
+			هناك طريقتان لتحديث تحول الكائن(object):
+		</p>
+		<ol>
+			<li>
+				عدّل خصائص *position* و *quaternion* و *scale* الخاصة بالكائن ، واسمح لـ three.js بإعادة حساب مصفوفة الكائن من هذه الخصائص:
+				<code>
+object.position.copy( start_position );
+object.quaternion.copy( quaternion );
+				</code>
+				بشكل افتراضي ، يتم تعيين الخاصية *matrixAutoUpdate* على "true" ، وستتم إعادة حساب المصفوفة تلقائيًا. إذا كان الكائن ثابتًا ، أو كنت ترغب في التحكم يدويًا عند حدوث إعادة الحساب ، فيمكن الحصول على أداء أفضل من خلال تعيين الخاصية false:
+				<code>
+object.matrixAutoUpdate = false;
+				</code>
+				وبعد تغيير أي خصائص ، قم بتحديث المصفوفة يدويًا:
+				<code>
+object.updateMatrix();
+				</code>
+			</li>
+			<li>
+				قم بتعديل مصفوفة الكائن مباشرة. تحتوي فئة [page:Matrix4] على طرق مختلفة لتعديل المصفوفة:
+				<code>
+object.matrix.setRotationFromQuaternion( quaternion );
+object.matrix.setPosition( start_position );
+object.matrixAutoUpdate = false;
+				</code>
+				لاحظ أنه <em>يجب</em> ضبط *matrixAutoUpdate* على *false* في هذه الحالة ، ويجب عليك التأكد من <em>عدم</em> استدعاء *updateMatrix*. سيؤدي استدعاء *updateMatrix* إلى إعاقة التغييرات اليدوية التي تم إجراؤها على المصفوفة ، وإعادة حساب المصفوفة من *position* ، *scale* ، وما إلى ذلك.
+			</li>
+		</ol>
+
+		<h2>مصفوفات وعالم الكائن</h2>
+		<p>
+		يخزن [page:Object3D.matrix matrix] كائن تحويل الكائن <em>بالنسبة</em> إلى [page:Object3D.parent parent] الكائن ؛ للحصول على تحول الكائن في إحداثيات <em>العالم</em> ، يجب عليك الوصول إلى [page:Object3D.matrixWorld] الكائن.
+		</p>
+		<p>
+		عندما تتغير حالة الكائن الأصل أو الكائن الفرعي ، يمكنك طلب تحديث [page:Object3D.matrixWorld matrixWorld] الكائن الفرعي عن طريق استدعاء [page:Object3D.updateMatrixWorld updateMatrixWorld]().
+		</p>
+
+		<h2>الدوران و Quaternion</h2>
+		<p>
+			يوفر Three.js طريقتين لتمثيل التدوير ثلاثي الأبعاد: [page:Euler Euler angles] و [page:Quaternion Quaternions] ، بالإضافة إلى طرق التحويل بين الاثنين. تخضع زوايا أويلر لمشكلة تسمى "gimballock" ، حيث يمكن أن تفقد بعض التكوينات درجة من الحرية (تمنع تدوير الكائن حول محور واحد). لهذا السبب ، يتم تخزين استدارة الكائن <em>دائمًا</em> في [page:Object3D.quaternion quaternion].
+		</p>
+		<p>
+			تضمنت الإصدارات السابقة من المكتبة خاصية *useQuaternion* والتي ، عند ضبطها على false ، ستؤدي إلى حساب [page:Object3D.matrix matrix] للكائن من زاوية أويلر. تم إيقاف هذه الممارسة - بدلاً من ذلك ، يجب عليك استخدام طريقة [page:Object3D.setRotationFromEuler setRotationFromEuler] ، والتي ستعمل على تحديث الرباعية.
+		</p>
+
+	</body>
+</html>

+ 43 - 0
docs/manual/ar/introduction/Typescript-setup.html

@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>Typescript إعدادات</h1>
+
+		<p>
+			three.js هي مكتبة قائمة على JavaScript. ومع ذلك ، من الممكن استخدامه في مشروع TypeScript ، حيث تعرض المكتبة [link:https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html Declaration Files] ملفات التصريح (ملفات * d.ts *).
+		</p>
+
+		<p>
+			الحد الأدنى من التكوين المطلوب لكي يتمكن برنامج التحويل البرمجي TypeScript من
+			اكتشف أنواع three.js.
+			<br>
+			ستحتاج إلى ضبط الخيار [link:https://www.typescriptlang.org/docs/handbook/module-resolution.html moduleResolution] على *node* ، وخيار [link:https://www.typescriptlang.org/docs/handbook/compiler-options.html target] على *es6* أو  ما هو أحدث.
+		</p>
+
+		<code>
+		// Example of minimal `tsconfig.json` file
+		{
+			"compilerOptions": {
+				"target": "es6",
+				"moduleResolution": "node",
+			},
+			"include": [ "./src/**/*.ts" ],
+		}
+		</code>
+
+		<p>
+			ملاحظة: اعتبارًا من اليوم ، ليس من الممكن استخدام كتابة three.js بدون استخدام هذين الخيارين.
+		</p>
+
+		<p>
+			ملاحظة: يحدث أن بعض التصريحات غير صحيحة و / أو مفقودة. تُعد المساهمة في ملفات التصريح مفيدة حقًا للمجتمع ، مما يجعل كتابات three.js أفضل وأكثر دقة.
+		</p>
+	</body>
+</html>

+ 175 - 0
docs/manual/ar/introduction/Useful-links.html

@@ -0,0 +1,175 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>روابط مفيدة</h1>
+
+		<p class="desc">
+			فيما يلي مجموعة من الروابط التي قد تجدها مفيدة عند تعلم three.js.<br />
+			إذا وجدت شيئًا ما ترغب في إضافته هنا ، أو تعتقد أن أحد الروابط أدناه لم يعد مناسبًا أو يعمل ، فلا تتردد في النقر فوق الزر "تحرير" في الجزء السفلي الأيسر وإجراء بعض التغييرات!<br /><br />
+
+			لاحظ أيضًا أنه نظرًا لأن موقع three.js قيد التطوير السريع ، فإن الكثير من هذه الروابط سيحتوي على معلومات قديمة - إذا كان هناك شيء لا يعمل كما تتوقع أو كما يقول أحد هذه الروابط ، تحقق من وحدة تحكم المتصفح  للتحذيرات أو الأخطاء. تحقق أيضًا من صفحات المستندات ذات الصلة.
+		</p>
+
+		<h2>منتديات المساعدة</h2>
+		<p>
+			يستخدم Three.js رسميًا [link:https://discourse.threejs.org/ forum] و [link:http://stackoverflow.com/tags/three.js/info Stack Overflow] لطلبات المساعدة. إذا كنت بحاجة إلى مساعدة في شيء ما ، فهذا هو المكان المناسب لك. لا تفتح مشكلة على Github لطلبات المساعدة.
+		</p>
+
+		<h2>الدروس والدورات</h2>
+
+		<h3>الشروع في العمل مع three.js</h3>
+		<ul>
+			<li>
+				[link:https://threejsfundamentals.org/threejs/lessons/threejs-fundamentals.html Three.js Fundamentals starting lesson]
+			</li>
+			<li>
+				[link:https://codepen.io/rachsmith/post/beginning-with-3d-webgl-pt-1-the-scene Beginning with 3D WebGL] بواسطة [link:https://codepen.io/rachsmith/ Rachel Smith].
+			</li>
+			<li>
+				[link:https://www.august.com.au/blog/animating-scenes-with-webgl-three-js/ Animating scenes with WebGL and three.js]
+			</li>
+		</ul>
+
+		<h3>مقالات ودورات أكثر شمولاً / متقدمة</h3>
+		<ul>
+			<li>
+				[link:https://discoverthreejs.com/ Discover three.js]
+			</li>
+			<li>
+				[link:https://threejsfundamentals.org/ Three.js Fundamentals]
+			</li>
+			<li>
+				[link:http://blog.cjgammon.com/ Collection of tutorials] by [link:http://www.cjgammon.com/ CJ Gammon].
+			</li>
+			<li>
+				[link:https://medium.com/soffritti.pierfrancesco/glossy-spheres-in-three-js-bfd2785d4857 Glossy spheres in three.js].
+			</li>
+		 <li>
+			 [link:https://www.udacity.com/course/cs291 Interactive 3D Graphics] - دورة مجانية على Udacity تُعلِّم أساسيات الرسومات ثلاثية الأبعاد ، وتستخدم three.js كأداة تشفير لها.
+		 </li>
+		 <li>
+			[Link:https://aerotwist.com/tutorials/ Aerotwist] tutorials by [link:https://github.com/paullewis/ Paul Lewis].
+		 </li>
+			 <li>
+			 [link:http://learningthreejs.com/ Learning Three.js] – مدونة تحتوي على مقالات مخصصة لتدريس three.js
+		 </li>
+		 <li>
+			 [link:https://discourse.threejs.org/t/three-js-bookshelf/2468 Three.js Bookshelf] - هل تبحث عن مزيد من الموارد حول three.js أو رسومات الكمبيوتر بشكل عام؟ تحقق من اختيار الأدبيات التي أوصى بها مجتمع المكتبة.
+		 </li>
+		</ul>
+
+		<h2>الأخبار والتحديثات</h2>
+		<ul>
+			<li>
+				[link:https://twitter.com/hashtag/threejs Three.js on Twitter]
+			</li>
+			<li>
+				[link:http://www.reddit.com/r/threejs/ Three.js on reddit]
+			</li>
+			<li>
+				[link:http://www.reddit.com/r/webgl/ WebGL on reddit]
+			</li>
+			<li>
+				[link:http://learningwebgl.com/blog/ Learning WebGL Blog] – مصدر الأخبار الموثوق لـ WebGL.
+			</li>
+		</ul>
+
+		<h2>أمثلة</h2>
+		<ul>
+			<li>
+				[link:https://github.com/edwinwebb/three-seed/ three-seed] - three.js starter مع ES6 و Webpack
+			</li>
+			<li>
+				[link:http://stemkoski.github.io/Three.js/index.html Professor Stemkoskis Examples] - مجموعة من الأمثلة الصديقة للمبتدئين التي تم إنشاؤها باستخدام three.js r60.
+			</li>
+			<li>
+				[link:https://threejs.org/examples/ Official three.js examples] - يتم الاحتفاظ بهذه الأمثلة كجزء من مستودع three.js ، ودائمًا ما تستخدم أحدث إصدار من three.js.
+			</li>
+			<li>
+				[link:https://raw.githack.com/mrdoob/three.js/dev/examples/ Official three.js dev branch examples]  -
+				كما هو مذكور أعلاه ، باستثناء هذه تستخدم فرع dev من three.js ، وتُستخدم للتحقق من أن كل شيء يعمل كما تم تطوير three.js.
+			</li>
+		</ul>
+
+	 <h2>أدوات</h2>
+	 <ul>
+		 <li>
+			[link:http://www.physgl.org/ physgl.org] - واجهة JavaScript الأمامية مع أغلفة لـ three.js ، لجلب رسومات WebGL للطلاب الذين يتعلمون الفيزياء والرياضيات.
+		 </li>
+		 <li>
+			 [link:https://whs.io/ Whitestorm.js] – إطار عمل modular three.js مع البرنامج المساعد AmmoNext للفيزياء.
+		 </li>
+
+		<li>
+			[link:http://zz85.github.io/zz85-bookmarklets/threelabs.html Three.js Inspector]
+		</li>
+		<li>
+			[link:http://idflood.github.io/ThreeNodes.js/ ThreeNodes.js].
+		</li>
+		<li>
+			[link:https://marketplace.visualstudio.com/items?itemName=bierner.comment-tagged-templates comment-tagged-templates] - VSCode extension syntax highlighting for tagged template strings, like: glsl.js.
+		</li>
+		<li>
+			[link:https://github.com/MozillaReality/WebXR-emulator-extension WebXR-emulator-extension]
+		</li>
+	 </ul>
+
+	<h2>مراجع WebGL</h2>
+	 <ul>
+		 <li>
+			[link:https://www.khronos.org/files/webgl/webgl-reference-card-1_0.pdf webgl-reference-card.pdf] - مراجع لجميع الكلمات الرئيسية والمصطلحات والنحو والتعريفات في WebGL و GLSL.
+		 </li>
+	 </ul>
+
+	 <h2>الروابط القديمة</h2>
+	 <p>
+		يتم الاحتفاظ بهذه الروابط لأغراض تاريخية - قد لا تزال تجدها مفيدة ، ولكن حذر من أنها قد تحتوي على معلومات تتعلق بالإصدارات القديمة جدًا من three.js.
+	 </p>
+
+	 <ul>
+		<li>
+			<a href="https://www.youtube.com/watch?v=Dir4KO9RdhM" target="_blank">AlterQualia at WebGL Camp 3</a>
+		</li>
+		<li>
+			[link:http://yomotsu.github.io/threejs-examples/ Yomotsus Examples] - مجموعة من الأمثلة باستخدام three.js r45.
+		</li>
+		<li>
+			[link:http://fhtr.org/BasicsOfThreeJS/#1 Introduction to Three.js] 	بواسطة [link:http://github.com/kig/ Ilmari Heikkinen] (slideshow).
+		</li>
+		<li>
+			[link:http://www.slideshare.net/yomotsu/webgl-and-threejs WebGL and Three.js] 	بواسطة [link:http://github.com/yomotsu Akihiro Oyamada] (slideshow).
+		</li>
+		<li>
+			[link:http://bkcore.com/blog/general/adobe-user-group-nl-talk-video-hexgl.html Fast HTML5 game development using three.js] 	بواسطة [link:https://github.com/BKcore BKcore] (video).
+		</li>
+		<li>
+			<a href="https://www.youtube.com/watch?v=VdQnOaolrPA" target="_blank">Trigger Rally</a>  	بواسطة [link:https://github.com/jareiko jareiko] (video).
+		</li>
+		<li>
+			[link:http://blackjk3.github.io/threefab/ ThreeFab] - محرر مشاهد ،  تم دعم إصداراته حتى حوالي three.js r50.
+		</li>
+		<li>
+			[link:http://bkcore.com/blog/3d/webgl-three-js-workflow-tips.html Max to Three.js workflow tips and tricks] بواسطة [link:https://github.com/BKcore BKcore]
+		</li>
+		<li>
+			[link:http://12devsofxmas.co.uk/2012/01/webgl-and-three-js/ A whirlwind look at Three.js]
+			بواسطة [link:http://github.com/nrocy Paul King]
+		</li>
+		<li>
+			[link:http://bkcore.com/blog/3d/webgl-three-js-animated-selective-glow.html Animated selective glow in Three.js]
+			بواسطة [link:https://github.com/BKcore BKcore]
+		</li>
+		<li>
+			[link:http://www.natural-science.or.jp/article/20120220155529.php Building A Physics Simulation Environment] -  أمثلة تعليمية باللغة اليابانية
+		</li>
+	 </ul>
+
+	</body>
+</html>

+ 35 - 0
docs/manual/ar/introduction/WebGL-compatibility-check.html

@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html lang="ar">
+	<head>
+		<meta charset="utf-8">
+		<base href="../../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body class="rtl">
+		<h1>فحص توافق WebGL</h1>
+		<p>
+			على الرغم من أن هذه المشكلة أصبحت أقل وأقل ، إلا أن بعض الأجهزة أو المتصفحات قد لا تدعم WebGL.
+			تتيح لك الطريقة التالية التحقق مما إذا كانت مدعومة وعرض رسالة للمستخدم إذا لم تكن مدعومة.
+		</p>
+
+		<p>
+			أضف [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/WebGL.js] إلى جافا سكريبت الخاص بك وقم بتشغيل ما يلي قبل محاولة تقديم أي شيء.
+		</p>
+
+		<code>
+		if ( WEBGL.isWebGLAvailable() ) {
+
+			// Initiate function or other initializations here
+			animate();
+
+		} else {
+
+			var warning = WEBGL.getWebGLErrorMessage();
+			document.getElementById( 'container' ).appendChild( warning );
+
+		}
+		</code>
+	</body>
+</html>

+ 14 - 0
docs/page.css

@@ -64,6 +64,20 @@ body {
 	word-break: break-word;
 }
 
+body.rtl h1,
+body.rtl h2,
+body.rtl h3,
+body.rtl h4,
+body.rtl p,
+body.rtl ul,
+body.rtl ol,
+body.rtl table {
+	direction: rtl !important;
+}
+body.rtl code {
+	direction: ltr !important;
+}
+
 a {
 	color: var(--color-blue);
 	cursor: pointer;

+ 0 - 1
editor/index.html

@@ -21,7 +21,6 @@
 
 		<script src="js/libs/esprima.js"></script>
 		<script src="js/libs/jsonlint.js"></script>
-		<script src="js/libs/glslprep.min.js"></script>
 
 		<link rel="stylesheet" href="js/libs/codemirror/addon/dialog.css">
 		<link rel="stylesheet" href="js/libs/codemirror/addon/show-hint.css">

+ 20 - 0
editor/js/Loader.js

@@ -16,6 +16,7 @@ import { SVGLoader } from '../../examples/jsm/loaders/SVGLoader.js';
 import { TDSLoader } from '../../examples/jsm/loaders/TDSLoader.js';
 import { VTKLoader } from '../../examples/jsm/loaders/VTKLoader.js';
 import { VRMLLoader } from '../../examples/jsm/loaders/VRMLLoader.js';
+import { Rhino3dmLoader } from '../../examples/jsm/loaders/3DMLoader.js';
 
 import { TGALoader } from '../../examples/jsm/loaders/TGALoader.js';
 
@@ -94,6 +95,25 @@ function Loader( editor ) {
 
 		switch ( extension ) {
 
+			case '3dm':
+
+				reader.addEventListener( 'load', function ( event ) {
+
+					var contents = event.target.result;
+
+					var loader = new Rhino3dmLoader();
+					loader.setLibraryPath( '../examples/jsm/libs/rhino3dm/' );
+					loader.parse( contents, function ( object ) {
+
+						editor.execute( new AddObjectCommand( editor, object ) );
+
+					} );
+
+				}, false );
+				reader.readAsArrayBuffer( file );
+
+				break;
+
 			case '3ds':
 
 				reader.addEventListener( 'load', function ( event ) {

+ 1 - 81
editor/js/Menubar.Edit.js

@@ -2,8 +2,6 @@ import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js';
 
 import { AddObjectCommand } from './commands/AddObjectCommand.js';
 import { RemoveObjectCommand } from './commands/RemoveObjectCommand.js';
-import { MultiCmdsCommand } from './commands/MultiCmdsCommand.js';
-import { SetMaterialValueCommand } from './commands/SetMaterialValueCommand.js';
 
 function MenubarEdit( editor ) {
 
@@ -123,85 +121,7 @@ function MenubarEdit( editor ) {
 	} );
 	options.add( option );
 
-	// Minify shaders
-
-	var option = new UIRow();
-	option.setClass( 'option' );
-	option.setTextContent( strings.getKey( 'menubar/edit/minify_shaders' ) );
-	option.onClick( function () {
-
-		var root = editor.selected || editor.scene;
-
-		var errors = [];
-		var nMaterialsChanged = 0;
-
-		var path = [];
-
-		function getPath( object ) {
-
-			path.length = 0;
-
-			var parent = object.parent;
-			if ( parent !== undefined ) getPath( parent );
-
-			path.push( object.name || object.uuid );
-
-			return path;
-
-		}
-
-		var cmds = [];
-		root.traverse( function ( object ) {
-
-			var material = object.material;
-
-			if ( material !== undefined && material.isShaderMaterial ) {
-
-				try {
-
-					var shader = glslprep.minifyGlsl( [
-						material.vertexShader, material.fragmentShader ] );
-
-					cmds.push( new SetMaterialValueCommand( editor, object, 'vertexShader', shader[ 0 ] ) );
-					cmds.push( new SetMaterialValueCommand( editor, object, 'fragmentShader', shader[ 1 ] ) );
-
-					++ nMaterialsChanged;
-
-				} catch ( e ) {
-
-					var path = getPath( object ).join( "/" );
-
-					if ( e instanceof glslprep.SyntaxError )
-
-						errors.push( path + ":" +
-								e.line + ":" + e.column + ": " + e.message );
-
-					else {
-
-						errors.push( path +
-								": Unexpected error (see console for details)." );
-
-						console.error( e.stack || e );
-
-					}
-
-				}
-
-			}
-
-		} );
-
-		if ( nMaterialsChanged > 0 ) {
-
-			editor.execute( new MultiCmdsCommand( editor, cmds ), 'Minify Shaders' );
-
-		}
-
-		window.alert( nMaterialsChanged +
-				" material(s) were changed.\n" + errors.join( "\n" ) );
-
-	} );
-	options.add( option );
+	//
 
 	options.add( new UIHorizontalRule() );
 

+ 1 - 1
editor/js/Sidebar.Material.js

@@ -48,7 +48,7 @@ function SidebarMaterial( editor ) {
 
 	var materialSlotRow = new UIRow();
 
-	materialSlotRow.add( new UIText( 'Slot' ).setWidth( '90px' ) );
+	materialSlotRow.add( new UIText( strings.getKey( 'sidebar/material/slot' ) ).setWidth( '90px' ) );
 
 	var materialSlotSelect = new UISelect().setWidth( '170px' ).setFontSize( '12px' ).onChange( update );
 	materialSlotSelect.setOptions( { 0: '' } ).setValue( 0 );

+ 4 - 3
editor/js/Strings.js

@@ -29,7 +29,6 @@ function Strings( config ) {
 			'menubar/edit/clear_history': 'Clear History',
 			'menubar/edit/clone': 'Clone',
 			'menubar/edit/delete': 'Delete (Del)',
-			'menubar/edit/minify_shaders': 'Minify Shaders',
 			'menubar/edit/fixcolormaps': 'Fix Color Maps',
 
 			'menubar/add': 'Add',
@@ -224,6 +223,7 @@ function Strings( config ) {
 			'sidebar/material/new': 'New',
 			'sidebar/material/copy': 'Copy',
 			'sidebar/material/paste': 'Paste',
+			'sidebar/material/slot': 'Slot',
 			'sidebar/material/type': 'Type',
 			'sidebar/material/uuid': 'UUID',
 			'sidebar/material/name': 'Name',
@@ -348,7 +348,6 @@ function Strings( config ) {
 			'menubar/edit/clear_history': 'Supprimer Historique',
 			'menubar/edit/clone': 'Cloner',
 			'menubar/edit/delete': 'Supprimer (Supp)',
-			'menubar/edit/minify_shaders': 'Minimiser les Shaders',
 			'menubar/edit/fixcolormaps': 'Correction des couleurs',
 
 			'menubar/add': 'Ajouter',
@@ -543,6 +542,7 @@ function Strings( config ) {
 			'sidebar/material/new': 'Nouveau',
 			'sidebar/material/copy': 'Copier',
 			'sidebar/material/paste': 'Coller',
+			'sidebar/material/slot': 'Slot',
 			'sidebar/material/type': 'Type',
 			'sidebar/material/uuid': 'UUID',
 			'sidebar/material/name': 'Nom',
@@ -667,7 +667,6 @@ function Strings( config ) {
 			'menubar/edit/clear_history': '清空历史记录',
 			'menubar/edit/clone': '拷贝',
 			'menubar/edit/delete': '删除 (Del)',
-			'menubar/edit/minify_shaders': '压缩着色器',
 			'menubar/edit/fixcolormaps': '修复颜色贴图',
 
 			'menubar/add': '添加',
@@ -849,6 +848,7 @@ function Strings( config ) {
 			'sidebar/material/new': '更新',
 			'sidebar/material/copy': '复制',
 			'sidebar/material/paste': '粘贴',
+			'sidebar/material/slot': '插槽',
 			'sidebar/material/type': '类型',
 			'sidebar/material/uuid': '识别码',
 			'sidebar/material/name': '名称',
@@ -867,6 +867,7 @@ function Strings( config ) {
 			'sidebar/material/vertexcolors': '顶点颜色',
 			'sidebar/material/vertextangents': '顶点切线',
 			'sidebar/material/skinning': '皮肤',
+			'sidebar/material/matcap': '材质捕获',
 			'sidebar/material/map': '贴图',
 			'sidebar/material/alphamap': '透明贴图',
 			'sidebar/material/bumpmap': '凹凸贴图',

+ 0 - 202
editor/js/libs/glslprep.min.js

@@ -1,202 +0,0 @@
-/* Copyright 2011-2015 Roy Williams, Tobias Schwinger and the Closure team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-(function(){var aa=this;function da(c){return void 0!==c}
-function ea(c){var f=typeof c;if("object"==f)if(c){if(c instanceof Array)return"array";if(c instanceof Object)return f;var k=Object.prototype.toString.call(c);if("[object Window]"==k)return"object";if("[object Array]"==k||"number"==typeof c.length&&"undefined"!=typeof c.splice&&"undefined"!=typeof c.propertyIsEnumerable&&!c.propertyIsEnumerable("splice"))return"array";if("[object Function]"==k||"undefined"!=typeof c.call&&"undefined"!=typeof c.propertyIsEnumerable&&!c.propertyIsEnumerable("call"))return"function"}else return"null";
-else if("function"==f&&"undefined"==typeof c.call)return"object";return f}function fa(c,f,k){return c.call.apply(c.bind,arguments)}function ga(c,f,k){if(!c)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var g=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(g,n);return c.apply(f,g)}}return function(){return c.apply(f,arguments)}}
-function ia(c,f,k){ia=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa:ga;return ia.apply(null,arguments)}function ka(c,f){var k=c.split("."),n=aa;k[0]in n||!n.execScript||n.execScript("var "+k[0]);for(var g;k.length&&(g=k.shift());)!k.length&&da(f)?n[g]=f:n[g]?n=n[g]:n=n[g]={}}
-function v(c,f){function k(){}k.prototype=f.prototype;c.Ma=f.prototype;c.prototype=new k;c.prototype.constructor=c;c.La=function(c,g,k){for(var B=Array(arguments.length-2),q=2;q<arguments.length;q++)B[q-2]=arguments[q];return f.prototype[g].apply(c,B)}};var la={};
-function z(c,f){function k(b){var a=b.charCodeAt(0),e;255>=a?(b="x",e=2):(b="u",e=4);var d=a.toString(16).toUpperCase(),a=d;e-=d.length;for(d=0;d<e;d++)a="0"+a;return"\\"+b+a}function n(b){return'"'+b.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,k)+'"'}function g(c){b<ta||(b>ta&&(ta=b,ob=[]),ob.push(c))}function u(){var w="newLine@"+b,a=p[w];if(a)return b=
-a.b,a.result;var e;e=b;/^[\n]/.test(c.charAt(b))?(a=c.charAt(b),b++):(a=null,0===l&&g("[\\n]"));null!==a&&(a="\n");null===a&&(b=e);p[w]={b:b,result:a};return a}function B(){var w="EOF@"+b,a=p[w];if(a)return b=a.b,a.result;var e;e=b;l++;c.length>b?(a=c.charAt(b),b++):(a=null,0===l&&g("any character"));l--;null===a?a="":(a=null,b=e);p[w]={b:b,result:a};return a}function q(){var w="_@"+b,a=p[w];if(a)return b=a.b,a.result;var e;l++;e=u();null===e&&(/^[\\\n]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,
-0===l&&g("[\\\\\\n]")),null===e&&(/^[\r\t\f\x0B ]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[\\r\\t\\f\\x0B ]")),null===e&&(e=C())));if(null!==e)for(a=[];null!==e;)a.push(e),e=u(),null===e&&(/^[\\\n]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[\\\\\\n]")),null===e&&(/^[\r\t\f\x0B ]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[\\r\\t\\f\\x0B ]")),null===e&&(e=C())));else a=null;l--;0===l&&null===a&&g("whitespace");p[w]={b:b,result:a};return a}function x(){var w=
-"noNewlineComment@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,t;m=b;"/*"===c.substr(b,2)?(a="/*",b+=2):(a=null,0===l&&g('"/*"'));if(null!==a){e=[];h=t=b;l++;"*/"===c.substr(b,2)?(d="*/",b+=2):(d=null,0===l&&g('"*/"'));l--;null===d?d="":(d=null,b=h);null!==d?(c.length>b?(h=c.charAt(b),b++):(h=null,0===l&&g("any character")),null!==h?d=[d,h]:(d=null,b=t)):(d=null,b=t);for(;null!==d;)e.push(d),h=t=b,l++,"*/"===c.substr(b,2)?(d="*/",b+=2):(d=null,0===l&&g('"*/"')),l--,null===d?d="":(d=null,b=h),
-null!==d?(c.length>b?(h=c.charAt(b),b++):(h=null,0===l&&g("any character")),null!==h?d=[d,h]:(d=null,b=t)):(d=null,b=t);null!==e?("*/"===c.substr(b,2)?(d="*/",b+=2):(d=null,0===l&&g('"*/"')),null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)}else a=null,b=m;if(null===a)if(m=b,"//"===c.substr(b,2)?(a="//",b+=2):(a=null,0===l&&g('"//"')),null!==a){e=[];/^[^\n]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[^\\n]"));for(;null!==d;)e.push(d),/^[^\n]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,
-0===l&&g("[^\\n]"));null!==e?a=[a,e]:(a=null,b=m)}else a=null,b=m;p[w]={b:b,result:a};return a}function ha(){var w="noNewlineWhitespace@"+b,a=p[w];if(a)return b=a.b,a.result;var e;/^[\r\t\f\x0B ]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[\\r\\t\\f\\x0B ]"));null===e&&(e=x());if(null!==e)for(a=[];null!==e;)a.push(e),/^[\r\t\f\x0B ]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[\\r\\t\\f\\x0B ]")),null===e&&(e=x());else a=null;p[w]={b:b,result:a};return a}function C(){var w=
-"comment@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,t;l++;m=b;"/*"===c.substr(b,2)?(a="/*",b+=2):(a=null,0===l&&g('"/*"'));if(null!==a){e=[];h=t=b;l++;"*/"===c.substr(b,2)?(d="*/",b+=2):(d=null,0===l&&g('"*/"'));l--;null===d?d="":(d=null,b=h);null!==d?(c.length>b?(h=c.charAt(b),b++):(h=null,0===l&&g("any character")),null!==h?d=[d,h]:(d=null,b=t)):(d=null,b=t);for(;null!==d;)e.push(d),h=t=b,l++,"*/"===c.substr(b,2)?(d="*/",b+=2):(d=null,0===l&&g('"*/"')),l--,null===d?d="":(d=null,b=h),null!==
-d?(c.length>b?(h=c.charAt(b),b++):(h=null,0===l&&g("any character")),null!==h?d=[d,h]:(d=null,b=t)):(d=null,b=t);null!==e?("*/"===c.substr(b,2)?(d="*/",b+=2):(d=null,0===l&&g('"*/"')),null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)}else a=null,b=m;if(null===a)if(m=b,"//"===c.substr(b,2)?(a="//",b+=2):(a=null,0===l&&g('"//"')),null!==a){e=[];/^[^\n]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[^\\n]"));for(;null!==d;)e.push(d),/^[^\n]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&
-g("[^\\n]"));null!==e?(d=u(),null===d&&(d=B()),null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)}else a=null,b=m;l--;0===l&&null===a&&g("comment");p[w]={b:b,result:a};return a}function A(){var w="semicolon@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h;h=b;a=q();a=null!==a?a:"";null!==a?(59===c.charCodeAt(b)?(e=";",b+=1):(e=null,0===l&&g('";"')),null!==e?(d=q(),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=h)):(a=null,b=h)):(a=null,b=h);p[w]={b:b,result:a};return a}function H(){var w="comma@"+b,a=p[w];
-if(a)return b=a.b,a.result;var e,d,h;h=b;a=q();a=null!==a?a:"";null!==a?(44===c.charCodeAt(b)?(e=",",b+=1):(e=null,0===l&&g('","')),null!==e?(d=q(),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=h)):(a=null,b=h)):(a=null,b=h);p[w]={b:b,result:a};return a}function ua(){var w="left_bracket@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h;h=b;a=q();a=null!==a?a:"";null!==a?(91===c.charCodeAt(b)?(e="[",b+=1):(e=null,0===l&&g('"["')),null!==e?(d=q(),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=h)):(a=null,
-b=h)):(a=null,b=h);p[w]={b:b,result:a};return a}function va(){var w="right_bracket@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h;h=b;a=q();a=null!==a?a:"";null!==a?(93===c.charCodeAt(b)?(e="]",b+=1):(e=null,0===l&&g('"]"')),null!==e?(d=q(),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=h)):(a=null,b=h)):(a=null,b=h);p[w]={b:b,result:a};return a}function cc(){var w="equals@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h;h=b;a=q();a=null!==a?a:"";null!==a?(61===c.charCodeAt(b)?(e="=",b+=1):(e=null,
-0===l&&g('"="')),null!==e?(d=q(),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=h)):(a=null,b=h)):(a=null,b=h);p[w]={b:b,result:a};return a}function ba(){var w="left_paren@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h;h=b;a=q();a=null!==a?a:"";null!==a?(40===c.charCodeAt(b)?(e="(",b+=1):(e=null,0===l&&g('"("')),null!==e?(d=q(),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=h)):(a=null,b=h)):(a=null,b=h);p[w]={b:b,result:a};return a}function ca(){var w="right_paren@"+b,a=p[w];if(a)return b=a.b,a.result;
-var e,d,h;h=b;a=q();a=null!==a?a:"";null!==a?(41===c.charCodeAt(b)?(e=")",b+=1):(e=null,0===l&&g('")"')),null!==e?(d=q(),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=h)):(a=null,b=h)):(a=null,b=h);p[w]={b:b,result:a};return a}function pb(){var w="left_brace@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h;h=b;a=q();a=null!==a?a:"";null!==a?(123===c.charCodeAt(b)?(e="{",b+=1):(e=null,0===l&&g('"{"')),null!==e?(d=q(),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=h)):(a=null,b=h)):(a=null,b=h);p[w]={b:b,
-result:a};return a}function qb(){var w="right_brace@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h;h=b;a=q();a=null!==a?a:"";null!==a?(125===c.charCodeAt(b)?(e="}",b+=1):(e=null,0===l&&g('"}"')),null!==e?(d=q(),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=h)):(a=null,b=h)):(a=null,b=h);p[w]={b:b,result:a};return a}function ja(){var c="external_statement_list@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,a=b;e=[];for(d=rb();null!==d;)e.push(d),d=rb();if(null!==e){d=new y({type:"root",C:[]});for(var h=
-0;h<e.length;h++)e[h]&&(d.C=d.C.concat(e[h]));e=d}null===e&&(b=a);p[c]={b:b,result:e};return e}function rb(){var c="external_statement@"+b,a=p[c];if(a)return b=a.b,a.result;var e;e=b;a=dc();null===a&&(a=ec());null===a&&(b=e);null===a&&(e=b,a=q(),null!==a&&(a=""),null===a&&(b=e));p[c]={b:b,result:a};return a}function ec(){var c="external_declaration@"+b,a=p[c];if(a)return b=a.b,a.result;a=fc();null===a&&(a=gc(),null===a&&(a=sb(),null===a&&(a=tb(),null===a&&(a=hc(),null===a&&(a=Oa())))));p[c]={b:b,
-result:a};return a}function tb(){var w="preprocessor_operator@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,t,f,k;f=t=b;35===c.charCodeAt(b)?(a="#",b+=1):(a=null,0===l&&g('"#"'));if(null!==a)if("undef"===c.substr(b,5)?(e="undef",b+=5):(e=null,0===l&&g('"undef"')),null===e&&("pragma"===c.substr(b,6)?(e="pragma",b+=6):(e=null,0===l&&g('"pragma"')),null===e&&("version"===c.substr(b,7)?(e="version",b+=7):(e=null,0===l&&g('"version"')),null===e&&("error"===c.substr(b,5)?(e="error",b+=5):(e=null,0===
-l&&g('"error"')),null===e&&("extension"===c.substr(b,9)?(e="extension",b+=9):(e=null,0===l&&g('"extension"')),null===e&&("line"===c.substr(b,4)?(e="line",b+=4):(e=null,0===l&&g('"line"'))))))),null!==e)if(d=q(),null!==d){k=b;h=[];/^[^\n]/.test(c.charAt(b))?(m=c.charAt(b),b++):(m=null,0===l&&g("[^\\n]"));for(;null!==m;)h.push(m),/^[^\n]/.test(c.charAt(b))?(m=c.charAt(b),b++):(m=null,0===l&&g("[^\\n]"));null!==h&&(h=h.join(""));null===h&&(b=k);null!==h?(m=u(),null===m&&(m=B()),null!==m?a=[a,e,d,h,m]:
-(a=null,b=f)):(a=null,b=f)}else a=null,b=f;else a=null,b=f;else a=null,b=f;null!==a&&(a=new y({type:"preprocessor",B:"#"+a[1],value:a[3]}));null===a&&(b=t);p[w]={b:b,result:a};return a}function na(){var w="macro_identifier@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m;m=h=b;/^[A-Za-z_]/.test(c.charAt(b))?(a=c.charAt(b),b++):(a=null,0===l&&g("[A-Za-z_]"));if(null!==a){e=[];/^[A-Za-z_0-9]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[A-Za-z_0-9]"));for(;null!==d;)e.push(d),/^[A-Za-z_0-9]/.test(c.charAt(b))?
-(d=c.charAt(b),b++):(d=null,0===l&&g("[A-Za-z_0-9]"));null!==e?a=[a,e]:(a=null,b=m)}else a=null,b=m;null!==a&&(a=new y({type:"identifier",name:a[0]+a[1].join("")}));null===a&&(b=h);p[w]={b:b,result:a};return a}function ic(){var w="preprocessor_parameter_list@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,t,f,k;f=t=b;40===c.charCodeAt(b)?(a="(",b+=1):(a=null,0===l&&g('"("'));if(null!==a)if(e=na(),e=null!==e?e:"",null!==e){d=[];k=b;h=H();null!==h?(m=na(),null!==m?h=[h,m]:(h=null,b=k)):(h=null,b=
-k);for(;null!==h;)d.push(h),k=b,h=H(),null!==h?(m=na(),null!==m?h=[h,m]:(h=null,b=k)):(h=null,b=k);null!==d?(h=ca(),null!==h?a=[a,e,d,h]:(a=null,b=f)):(a=null,b=f)}else a=null,b=f;else a=null,b=f;null!==a&&(a=function(a,b){return a?[a].concat(b.map(function(a){return a[1]})):[]}(a[1],a[2]));null===a&&(b=t);p[w]={b:b,result:a};return a}function ub(){var w="macro_paren_parameter@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,t,f,k,r;f=t=b;a=ba();if(null!==a){r=k=b;e=[];/^[^()]/.test(c.charAt(b))?
-(d=c.charAt(b),b++):(d=null,0===l&&g("[^()]"));for(;null!==d;)e.push(d),/^[^()]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[^()]"));if(null!==e)if(d=ub(),d=null!==d?d:"",null!==d){h=[];/^[^()]/.test(c.charAt(b))?(m=c.charAt(b),b++):(m=null,0===l&&g("[^()]"));for(;null!==m;)h.push(m),/^[^()]/.test(c.charAt(b))?(m=c.charAt(b),b++):(m=null,0===l&&g("[^()]"));null!==h?e=[e,d,h]:(e=null,b=r)}else e=null,b=r;else e=null,b=r;null!==e&&(e=e[0].join("")+e[1]+e[2].join(""));null===e&&(b=k);null!==
-e?(d=ca(),null!==d?a=[a,e,d]:(a=null,b=f)):(a=null,b=f)}else a=null,b=f;null!==a&&(a="("+a[1]+")");null===a&&(b=t);p[w]={b:b,result:a};return a}function Pa(){var w="macro_call_parameter@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,a=ub();if(null===a){d=b;a=[];/^[^,)]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[^,)]"));for(;null!==e;)a.push(e),/^[^,)]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[^,)]"));null!==a&&(a=a.join(""));null===a&&(b=d)}p[w]={b:b,result:a};return a}
-function Oa(){var w="macro_call@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,t,f;f=a=b;e=na();null!==e?(d=q(),d=null!==d?d:"",null!==d?(h=ba(),null!==h?(m=vb(),m=null!==m?m:"",null!==m?(41===c.charCodeAt(b)?(t=")",b+=1):(t=null,0===l&&g('")"')),null!==t?e=[e,d,h,m,t]:(e=null,b=f)):(e=null,b=f)):(e=null,b=f)):(e=null,b=f)):(e=null,b=f);null!==e&&(d=e[3],e=new y({type:"macro_call",oa:e[0],l:d}),d||(e.l=[]));null===e&&(b=a);p[w]={b:b,result:e};return e}function sb(){var w="preprocessor_define@"+
-b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,t,f,k,r,n,x,A;x=n=b;35===c.charCodeAt(b)?(a="#",b+=1):(a=null,0===l&&g('"#"'));if(null!==a)if(e=q(),e=null!==e?e:"",null!==e)if("define"===c.substr(b,6)?(d="define",b+=6):(d=null,0===l&&g('"define"')),null!==d)if(h=q(),null!==h)if(m=na(),null!==m)if(t=ic(),t=null!==t?t:"",null!==t){f=[];/^[ \t]/.test(c.charAt(b))?(k=c.charAt(b),b++):(k=null,0===l&&g("[ \\t]"));for(;null!==k;)f.push(k),/^[ \t]/.test(c.charAt(b))?(k=c.charAt(b),b++):(k=null,0===l&&g("[ \\t]"));
-if(null!==f){A=b;k=[];/^[^\n]/.test(c.charAt(b))?(r=c.charAt(b),b++):(r=null,0===l&&g("[^\\n]"));for(;null!==r;)k.push(r),/^[^\n]/.test(c.charAt(b))?(r=c.charAt(b),b++):(r=null,0===l&&g("[^\\n]"));null!==k&&(k=k.join(""));null===k&&(b=A);null!==k?(r=u(),null===r&&(r=B()),null!==r?a=[a,e,d,h,m,t,f,k,r]:(a=null,b=x)):(a=null,b=x)}else a=null,b=x}else a=null,b=x;else a=null,b=x;else a=null,b=x;else a=null,b=x;else a=null,b=x;else a=null,b=x;null!==a&&(a=new y({type:"preprocessor",B:"#define",identifier:a[4].name,
-pa:a[7],l:a[5]||null}));null===a&&(b=n);p[w]={b:b,result:a};return a}function wb(){var w="preprocessor_if@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,t,f,k,r;k=f=b;35===c.charCodeAt(b)?(a="#",b+=1):(a=null,0===l&&g('"#"'));if(null!==a)if(e=q(),e=null!==e?e:"",null!==e)if("ifdef"===c.substr(b,5)?(d="ifdef",b+=5):(d=null,0===l&&g('"ifdef"')),null===d&&("ifndef"===c.substr(b,6)?(d="ifndef",b+=6):(d=null,0===l&&g('"ifndef"')),null===d&&("if"===c.substr(b,2)?(d="if",b+=2):(d=null,0===l&&g('"if"')))),
-null!==d)if(h=q(),null!==h){r=b;m=[];/^[^\n]/.test(c.charAt(b))?(t=c.charAt(b),b++):(t=null,0===l&&g("[^\\n]"));for(;null!==t;)m.push(t),/^[^\n]/.test(c.charAt(b))?(t=c.charAt(b),b++):(t=null,0===l&&g("[^\\n]"));null!==m&&(m=m.join(""));null===m&&(b=r);null!==m?(t=u(),null===t&&(t=B()),null!==t?a=[a,e,d,h,m,t]:(a=null,b=k)):(a=null,b=k)}else a=null,b=k;else a=null,b=k;else a=null,b=k;else a=null,b=k;null!==a&&(a=new y({type:"preprocessor",B:"#"+a[2],value:a[4]}));null===a&&(b=f);p[w]={b:b,result:a};
-return a}function wa(){var w="preprocessor_else_if@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,t,f,k,r;k=f=b;35===c.charCodeAt(b)?(a="#",b+=1):(a=null,0===l&&g('"#"'));if(null!==a)if(e=q(),e=null!==e?e:"",null!==e)if("elif"===c.substr(b,4)?(d="elif",b+=4):(d=null,0===l&&g('"elif"')),null!==d)if(h=q(),null!==h){r=b;m=[];/^[^\n]/.test(c.charAt(b))?(t=c.charAt(b),b++):(t=null,0===l&&g("[^\\n]"));for(;null!==t;)m.push(t),/^[^\n]/.test(c.charAt(b))?(t=c.charAt(b),b++):(t=null,0===l&&g("[^\\n]"));
-null!==m&&(m=m.join(""));null===m&&(b=r);null!==m?(t=u(),null===t&&(t=B()),null!==t?a=[a,e,d,h,m,t]:(a=null,b=k)):(a=null,b=k)}else a=null,b=k;else a=null,b=k;else a=null,b=k;else a=null,b=k;null!==a&&(a=new y({type:"preprocessor",B:"#elif",value:a[4]}));null===a&&(b=f);p[w]={b:b,result:a};return a}function xb(){var w="preprocessor_else@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,f,k;k=f=b;35===c.charCodeAt(b)?(a="#",b+=1):(a=null,0===l&&g('"#"'));null!==a?(e=q(),e=null!==e?e:"",null!==e?("else"===
-c.substr(b,4)?(d="else",b+=4):(d=null,0===l&&g('"else"')),null!==d?(h=ha(),h=null!==h?h:"",null!==h?(m=u(),null!==m?a=[a,e,d,h,m]:(a=null,b=k)):(a=null,b=k)):(a=null,b=k)):(a=null,b=k)):(a=null,b=k);null!==a&&(a=new y({type:"preprocessor",B:"#else"}));null===a&&(b=f);p[w]={b:b,result:a};return a}function yb(){var w="preprocessor_end@"+b,a=p[w];if(a)return b=a.b,a.result;var e,d,h,m,f,k;k=b;35===c.charCodeAt(b)?(a="#",b+=1):(a=null,0===l&&g('"#"'));null!==a?(e=q(),e=null!==e?e:"",null!==e?("endif"===
-c.substr(b,5)?(d="endif",b+=5):(d=null,0===l&&g('"endif"')),null!==d?(h=ha(),h=null!==h?h:"",null!==h?(m=u(),null===m&&(m=B()),null!==m?(f=q(),f=null!==f?f:"",null!==f?a=[a,e,d,h,m,f]:(a=null,b=k)):(a=null,b=k)):(a=null,b=k)):(a=null,b=k)):(a=null,b=k)):(a=null,b=k);p[w]={b:b,result:a};return a}function dc(){var c="preprocessor_external_branch@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m,g,f;f=g=m=b;a=wb();null!==a?(e=ja(),null!==e?a=[a,e]:(a=null,b=f)):(a=null,b=f);if(null!==a){e=[];f=b;d=wa();
-null!==d?(h=ja(),null!==h?d=[d,h]:(d=null,b=f)):(d=null,b=f);for(;null!==d;)e.push(d),f=b,d=wa(),null!==d?(h=ja(),null!==h?d=[d,h]:(d=null,b=f)):(d=null,b=f);null!==e?(f=b,d=xb(),null!==d?(h=ja(),null!==h?d=[d,h]:(d=null,b=f)):(d=null,b=f),d=null!==d?d:"",null!==d?(h=yb(),null!==h?a=[a,e,d,h]:(a=null,b=g)):(a=null,b=g)):(a=null,b=g)}else a=null,b=g;null!==a&&(a=jc(a[0],a[1],a[2]));null===a&&(b=m);p[c]={b:b,result:a};return a}function zb(){var c="preprocessor_statement_branch@"+b,a=p[c];if(a)return b=
-a.b,a.result;var e,d,h,m,g,f;f=g=m=b;a=wb();null!==a?(e=oa(),null!==e?a=[a,e]:(a=null,b=f)):(a=null,b=f);if(null!==a){e=[];f=b;d=wa();null!==d?(h=oa(),null!==h?d=[d,h]:(d=null,b=f)):(d=null,b=f);for(;null!==d;)e.push(d),f=b,d=wa(),null!==d?(h=oa(),null!==h?d=[d,h]:(d=null,b=f)):(d=null,b=f);null!==e?(f=b,d=xb(),null!==d?(h=oa(),null!==h?d=[d,h]:(d=null,b=f)):(d=null,b=f),d=null!==d?d:"",null!==d?(h=yb(),null!==h?a=[a,e,d,h]:(a=null,b=g)):(a=null,b=g)):(a=null,b=g)}else a=null,b=g;null!==a&&(a=jc(a[0],
-a[1],a[2]));null===a&&(b=m);p[c]={b:b,result:a};return a}function fc(){var c="function_definition@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h;h=d=b;a=Ab();null!==a?(e=Qa(),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(e=a[0],a=L=new y({type:"function_declaration",name:e.name,ma:e.ma,l:e.l,body:a[1]}));null===a&&(b=d);p[c]={b:b,result:a};return a}function Qa(){var c="compound_statement@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m;m=a=b;e=pb();null!==e?(d=oa(),d=null!==d?d:"",null!==
-d?(h=qb(),null!==h?e=[e,d,h]:(e=null,b=m)):(e=null,b=m)):(e=null,b=m);null!==e&&(e=e[1],L=new y({type:"scope",C:[]}),e&&e.C&&(L.C=e.C),e=L);null===e&&(b=a);p[c]={b:b,result:e};return e}function oa(){var c="statement_list@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m;m=h=b;a=q();a=null!==a?a:"";if(null!==a){e=[];for(d=xa();null!==d;)e.push(d),d=xa();null!==e?(d=q(),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)}else a=null,b=m;null!==a&&(a={C:a[1]});null===a&&(b=h);p[c]={b:b,result:a};
-return a}function xa(){var c="statement_no_new_scope@"+b,a=p[c];if(a)return b=a.b,a.result;a=Qa();null===a&&(a=Bb(),null===a&&(a=zb()));p[c]={b:b,result:a};return a}function Ra(){var c="statement_with_scope@"+b,a=p[c];if(a)return b=a.b,a.result;a=Qa();null===a&&(a=Bb(),null===a&&(a=zb()));p[c]={b:b,result:a};return a}function Bb(){var c="simple_statement@"+b,a=p[c];if(a)return b=a.b,a.result;var e;e=b;a=Sa();null===a&&(a=Cb(),null===a&&(a=kc(),null===a&&(a=lc(),null===a&&(a=mc(),null===a&&(a=sb(),
-null===a&&(a=tb(),null===a&&(a=Oa())))))));null===a&&(b=e);p[c]={b:b,result:a};return a}function kc(){var f="selection_statement@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,t,k,n,r,u,x;u=r=b;"if"===c.substr(b,2)?(a="if",b+=2):(a=null,0===l&&g('"if"'));null!==a?(e=ba(),null!==e?(d=S(),null!==d?(h=ca(),null!==h?(m=Ra(),null!==m?(x=b,"else"===c.substr(b,4)?(t="else",b+=4):(t=null,0===l&&g('"else"')),null!==t?(k=q(),k=null!==k?k:"",null!==k?(n=Ra(),null!==n?t=[t,k,n]:(t=null,b=x)):(t=null,b=x)):
-(t=null,b=x),t=null!==t?t:"",null!==t?a=[a,e,d,h,m,t]:(a=null,b=u)):(a=null,b=u)):(a=null,b=u)):(a=null,b=u)):(a=null,b=u)):(a=null,b=u);null!==a&&(e=a[5],L=new y({type:"if_statement",F:a[2],body:a[4]}),e&&(L.M=e[2]),a=L);null===a&&(b=r);p[f]={b:b,result:a};return a}function nc(){var f="for_loop@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,t,k,q,r,n;n=r=b;"for"===c.substr(b,3)?(a="for",b+=3):(a=null,0===l&&g('"for"'));null!==a?(e=ba(),null!==e?(d=Cb(),null===d&&(d=Sa()),null!==d?(h=Db(),h=null!==
-h?h:"",null!==h?(m=A(),null!==m?(t=S(),t=null!==t?t:"",null!==t?(k=ca(),null!==k?(q=xa(),null!==q?a=[a,e,d,h,m,t,k,q]:(a=null,b=n)):(a=null,b=n)):(a=null,b=n)):(a=null,b=n)):(a=null,b=n)):(a=null,b=n)):(a=null,b=n)):(a=null,b=n);null!==a&&(a=new y({type:"for_statement",H:a[2],F:a[3],Fa:a[5],body:a[7]}));null===a&&(b=r);p[f]={b:b,result:a};return a}function Eb(){var f="while_statement@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,t;t=m=b;"while"===c.substr(b,5)?(a="while",b+=5):(a=null,0===l&&
-g('"while"'));null!==a?(e=ba(),null!==e?(d=Db(),null!==d?(h=ca(),null!==h?a=[a,e,d,h]:(a=null,b=t)):(a=null,b=t)):(a=null,b=t)):(a=null,b=t);null!==a&&(a={F:a[2]});null===a&&(b=m);p[f]={b:b,result:a};return a}function oc(){var c="while_loop@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h;h=d=b;a=Eb();null!==a?(e=xa(),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a=new y({type:"while_statement",F:a[0].F,body:a[1]}));null===a&&(b=d);p[c]={b:b,result:a};return a}function pc(){var f="do_while@"+
-b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m;m=h=b;"do"===c.substr(b,2)?(a="do",b+=2):(a=null,0===l&&g('"do"'));null!==a?(e=Ra(),null!==e?(d=Eb(),null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)):(a=null,b=m);null!==a&&(a=new y({type:"do_statement",F:a[2].F,body:a[1]}));null===a&&(b=h);p[f]={b:b,result:a};return a}function lc(){var c="iteration_statement@"+b,a=p[c];if(a)return b=a.b,a.result;a=oc();null===a&&(a=pc(),null===a&&(a=nc()));p[c]={b:b,result:a};return a}function mc(){var f="jump_statement@"+
-b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,t;t=m=b;"return"===c.substr(b,6)?(a="return",b+=6):(a=null,0===l&&g('"return"'));null!==a?(e=q(),e=null!==e?e:"",null!==e?(d=S(),null!==d?(h=A(),null!==h?a=[a,e,d,h]:(a=null,b=t)):(a=null,b=t)):(a=null,b=t)):(a=null,b=t);null!==a&&(a=new y({type:"return",value:a[2]}));null===a&&(b=m);null===a&&(t=m=b,"continue"===c.substr(b,8)?(a="continue",b+=8):(a=null,0===l&&g('"continue"')),null!==a?(e=A(),null!==e?a=[a,e]:(a=null,b=t)):(a=null,b=t),null===a&&(t=
-b,"break"===c.substr(b,5)?(a="break",b+=5):(a=null,0===l&&g('"break"')),null!==a?(e=A(),null!==e?a=[a,e]:(a=null,b=t)):(a=null,b=t),null===a&&(t=b,"return"===c.substr(b,6)?(a="return",b+=6):(a=null,0===l&&g('"return"')),null!==a?(e=A(),null!==e?a=[a,e]:(a=null,b=t)):(a=null,b=t),null===a&&(h=d=t=b,a="fs"==ya?"":null,null!==a?("discard"===c.substr(b,7)?(e="discard",b+=7):(e=null,0===l&&g('"discard"')),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h),null!==a&&(a="discard"),null===a&&(b=d),null!==a?(e=A(),
-null!==e?a=[a,e]:(a=null,b=t)):(a=null,b=t)))),null!==a&&(a=new y({type:a[0]})),null===a&&(b=m));p[f]={b:b,result:a};return a}function Cb(){var c="expression_statement@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h;h=d=b;a=S();a=null!==a?a:"";null!==a?(e=A(),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a=new y({type:"expression",N:a[0]}));null===a&&(b=d);p[c]={b:b,result:a};return a}function Sa(){var f="declaration@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,t,k,n,r,u;l++;r=n=b;a=
-Ab();null!==a?(e=A(),null!==e?a=[a,e]:(a=null,b=r)):(a=null,b=r);null!==a&&(a=a[0]);null===a&&(b=n);if(null===a&&(r=n=b,a=za(),null!==a?(e=q(),null!==e?(d=Fb(),null!==d?(h=A(),null!==h?a=[a,e,d,h]:(a=null,b=r)):(a=null,b=r)):(a=null,b=r)):(a=null,b=r),null!==a&&(a=new y({type:"declarator",w:a[0],A:a[2]})),null===a&&(b=n),null===a)){r=n=b;a="vs"==ya?"":null;if(null!==a)if("invariant"===c.substr(b,9)?(e="invariant",b+=9):(e=null,0===l&&g('"invariant"')),null!==e)if(d=q(),null!==d)if(h=Q(),null!==h){m=
-[];u=b;t=H();null!==t?(k=Q(),null!==k?t=[t,k]:(t=null,b=u)):(t=null,b=u);for(;null!==t;)m.push(t),u=b,t=H(),null!==t?(k=Q(),null!==k?t=[t,k]:(t=null,b=u)):(t=null,b=u);null!==m?(t=A(),null!==t?a=[a,e,d,h,m,t]:(a=null,b=r)):(a=null,b=r)}else a=null,b=r;else a=null,b=r;else a=null,b=r;else a=null,b=r;null!==a&&(a=function(a,b){var d=[a].concat(b.map(function(a){return a[1]}));return new y({type:"invariant",Ea:d})}(a[3],a[4]));null===a&&(b=n);null===a&&(r=n=b,"precision"===c.substr(b,9)?(a="precision",
-b+=9):(a=null,0===l&&g('"precision"')),null!==a?(e=q(),null!==e?(d=Ta(),null!==d?(h=q(),null!==h?(m=Aa(),null!==m?(t=A(),null!==t?a=[a,e,d,h,m,t]:(a=null,b=r)):(a=null,b=r)):(a=null,b=r)):(a=null,b=r)):(a=null,b=r)):(a=null,b=r),null!==a&&(a=new y({type:"precision",precision:a[2],typeName:a[4]})),null===a&&(b=n))}l--;0===l&&null===a&&g("declaration");p[f]={b:b,result:a};return a}function gc(){var c="global_declaration@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m,f,a=Sa();null===a&&(f=m=b,a=qc(),
-null!==a?(e=q(),null!==e?(d=Fb(),null!==d?(h=A(),null!==h?a=[a,e,d,h]:(a=null,b=f)):(a=null,b=f)):(a=null,b=f)):(a=null,b=f),null!==a&&(a=new y({type:"declarator",w:a[0],A:a[2]})),null===a&&(b=m),null===a&&(f=m=b,a=rc(),null!==a?(e=q(),null!==e?(d=sc(),null!==d?(h=A(),null!==h?a=[a,e,d,h]:(a=null,b=f)):(a=null,b=f)):(a=null,b=f)):(a=null,b=f),null!==a&&(a=new y({type:"declarator",w:a[0],A:a[2]})),null===a&&(b=m)));p[c]={b:b,result:a};return a}function tc(){var f="function_prototype_parameter_list@"+
-b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,t,k;"void"===c.substr(b,4)?(a="void",b+=4):(a=null,0===l&&g('"void"'));if(null===a){t=m=b;a=Ua();if(null!==a){e=[];k=b;d=H();null!==d?(h=Ua(),null!==h?d=[d,h]:(d=null,b=k)):(d=null,b=k);for(;null!==d;)e.push(d),k=b,d=H(),null!==d?(h=Ua(),null!==h?d=[d,h]:(d=null,b=k)):(d=null,b=k);null!==e?a=[a,e]:(a=null,b=t)}else a=null,b=t;null!==a&&(a=function(a,b){return[a].concat(b.map(function(a){return a[1]}))}(a[0],a[1]));null===a&&(b=m)}p[f]={b:b,result:a};
-return a}function Ab(){var c="function_prototype@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m,f,g,k;k=g=b;a=uc();null===a&&(a=Ba());null!==a?(e=q(),null!==e?(d=Q(),null!==d?(h=ba(),null!==h?(m=tc(),m=null!==m?m:"",null!==m?(f=ca(),null!==f?a=[a,e,d,h,m,f]:(a=null,b=k)):(a=null,b=k)):(a=null,b=k)):(a=null,b=k)):(a=null,b=k)):(a=null,b=k);null!==a&&(e=a[4],L=new y({type:"function_prototype",name:a[2].name,ma:a[0],l:e}),"void"!=e&&e||(L.l=[]),a=L);null===a&&(b=g);p[c]={b:b,result:a};return a}function vc(){var f=
-"parameter_qualifier@"+b,a=p[f];if(a)return b=a.b,a.result;"inout"===c.substr(b,5)?(a="inout",b+=5):(a=null,0===l&&g('"inout"'));null===a&&("in"===c.substr(b,2)?(a="in",b+=2):(a=null,0===l&&g('"in"')),null===a&&("out"===c.substr(b,3)?(a="out",b+=3):(a=null,0===l&&g('"out"'))));p[f]={b:b,result:a};return a}function Ua(){var c="parameter_declaration@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m,f,g,k,l,n,u,x;x=u=a=b;e=Va();null!==e?(d=q(),null!==d?e=[e,d]:(e=null,b=x)):(e=null,b=x);e=null!==e?e:
-"";null!==e?(x=b,d=vc(),null!==d?(h=q(),null!==h?d=[d,h]:(d=null,b=x)):(d=null,b=x),d=null!==d?d:"",null!==d?(x=b,h=Ta(),null!==h?(m=q(),null!==m?h=[h,m]:(h=null,b=x)):(h=null,b=x),h=null!==h?h:"",null!==h?(m=Aa(),null!==m?(f=q(),null!==f?(g=Q(),null!==g?(x=b,k=ua(),null!==k?(l=pa(),null!==l?(n=va(),null!==n?k=[k,l,n]:(k=null,b=x)):(k=null,b=x)):(k=null,b=x),k=null!==k?k:"",null!==k?e=[e,d,h,m,f,g,k]:(e=null,b=u)):(e=null,b=u)):(e=null,b=u)):(e=null,b=u)):(e=null,b=u)):(e=null,b=u)):(e=null,b=u);
-null!==e&&(d=e[0],h=e[1],m=e[2],f=e[6],e=new y({type:"parameter",Ka:e[3],name:e[5].name}),d&&(e.qa=d[0]),h&&(e.la=h[0]),m&&(e.precision=m[0]),f&&(e.$=f[1]),e=e.qa&&e.la&&"in"!=e.la?null:e);null===e&&(b=a);p[c]={b:b,result:e};return e}function Fb(){var c="init_declarator_list@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m,f,g;f=m=b;a=Wa();if(null!==a){e=[];g=b;d=H();null!==d?(h=Wa(),null!==h?d=[d,h]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)e.push(d),g=b,d=H(),null!==d?(h=Wa(),null!==h?d=[d,h]:
-(d=null,b=g)):(d=null,b=g);null!==e?a=[a,e]:(a=null,b=f)}else a=null,b=f;null!==a&&(a=function(a,b){return[a].concat(b.map(function(a){return a[1]}))}(a[0],a[1]));null===a&&(b=m);p[c]={b:b,result:a};return a}function wc(){var c="declarator_list@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m,f,g;f=m=b;a=Ca();if(null!==a){e=[];g=b;d=H();null!==d?(h=Ca(),null!==h?d=[d,h]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)e.push(d),g=b,d=H(),null!==d?(h=Ca(),null!==h?d=[d,h]:(d=null,b=g)):(d=null,b=g);null!==
-e?a=[a,e]:(a=null,b=f)}else a=null,b=f;null!==a&&(a=function(a,b){return[a].concat(b.map(function(a){return a[1]}))}(a[0],a[1]));null===a&&(b=m);p[c]={b:b,result:a};return a}function sc(){var c="declarator_list_no_array@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m,f,g;f=m=b;a=Da();if(null!==a){e=[];g=b;d=H();null!==d?(h=Da(),null!==h?d=[d,h]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)e.push(d),g=b,d=H(),null!==d?(h=Da(),null!==h?d=[d,h]:(d=null,b=g)):(d=null,b=g);null!==e?a=[a,e]:(a=null,b=f)}else a=
-null,b=f;null!==a&&(a=function(a,b){return[a].concat(b.map(function(a){return a[1]}))}(a[0],a[1]));null===a&&(b=m);p[c]={b:b,result:a};return a}function Gb(){var c="declarator_list_arrays_have_size@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m,f,g;f=m=b;a=Ea();if(null!==a){e=[];g=b;d=H();null!==d?(h=Ea(),null!==h?d=[d,h]:(d=null,b=g)):(d=null,b=g);for(;null!==d;)e.push(d),g=b,d=H(),null!==d?(h=Ea(),null!==h?d=[d,h]:(d=null,b=g)):(d=null,b=g);null!==e?a=[a,e]:(a=null,b=f)}else a=null,b=f;null!==
-a&&(a=function(a,b){return[a].concat(b.map(function(a){return a[1]}))}(a[0],a[1]));null===a&&(b=m);p[c]={b:b,result:a};return a}function Da(){var c="declarator_no_array@"+b,a=p[c];if(a)return b=a.b,a.result;var e;e=b;a=Q();null!==a&&(a=new y({type:"declarator_item",name:a}));null===a&&(b=e);p[c]={b:b,result:a};return a}function Ea(){var c="declarator_array_with_size@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m,f;f=m=b;a=Q();null!==a?(e=ua(),null!==e?(d=pa(),null!==d?(h=va(),null!==h?a=[a,e,d,
-h]:(a=null,b=f)):(a=null,b=f)):(a=null,b=f)):(a=null,b=f);null!==a&&(a=new y({type:"declarator_item",name:a[0],$:a[2],isArray:!0}));null===a&&(b=m);null===a&&(a=Da());p[c]={b:b,result:a};return a}function Ca(){var c="declarator@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m;m=h=b;a=Q();null!==a?(e=ua(),null!==e?(d=va(),null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)):(a=null,b=m);null!==a&&(a=new y({type:"declarator_item",name:a[0],isArray:!0}));null===a&&(b=h);null===a&&(a=Ea());p[c]={b:b,result:a};
-return a}function Wa(){var c="init_declarator@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m;m=h=b;a=Q();null!==a?(e=cc(),null!==e?(d=pa(),null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)):(a=null,b=m);null!==a&&(a=new y({type:"declarator_item",name:a[0],H:a[2]}));null===a&&(b=h);null===a&&(a=Ca());p[c]={b:b,result:a};return a}function xc(){var c="member_list@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m,f,g;g=f=b;e=za();null!==e?(d=q(),null!==d?(h=Gb(),null!==h?(m=A(),null!==m?e=[e,d,h,m]:(e=
-null,b=g)):(e=null,b=g)):(e=null,b=g)):(e=null,b=g);if(null!==e)for(a=[];null!==e;)a.push(e),g=b,e=za(),null!==e?(d=q(),null!==d?(h=Gb(),null!==h?(m=A(),null!==m?e=[e,d,h,m]:(e=null,b=g)):(e=null,b=g)):(e=null,b=g)):(e=null,b=g);else a=null;null!==a&&(a=function(a){return a.map(function(a){return new y({type:"declarator",w:a[0],A:a[2]})})}(a));null===a&&(b=f);p[c]={b:b,result:a};return a}function hc(){var f="struct_definition@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,k,n,u,r,x;k=x=a=b;e=Hb();
-null===e&&(e=Ib());null!==e?(d=q(),null!==d?e=[e,d]:(e=null,b=k)):(e=null,b=k);e=null!==e?e:"";null!==e?("struct"===c.substr(b,6)?(d="struct",b+=6):(d=null,0===l&&g('"struct"')),null!==d?(k=b,h=q(),null!==h?(m=Q(),null!==m?h=[h,m]:(h=null,b=k)):(h=null,b=k),h=null!==h?h:"",null!==h?(m=pb(),null!==m?(k=xc(),null!==k?(n=qb(),null!==n?(u=wc(),u=null!==u?u:"",null!==u?(r=A(),null!==r?e=[e,d,h,m,k,n,u,r]:(e=null,b=x)):(e=null,b=x)):(e=null,b=x)):(e=null,b=x)):(e=null,b=x)):(e=null,b=x)):(e=null,b=x)):
-(e=null,b=x);null!==e&&(d=e[0],h=e[2],m=e[6],e=new y({type:"struct_definition",Ia:e[4]}),d&&(e.qualifier=d[0]),h&&(e.name=h[1].name,yc[e.name]=e),m&&(e.A=m));null===e&&(b=a);p[f]={b:b,result:e};return e}function Ba(){var c="precision_type@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m;m=h=a=b;e=Ta();null!==e?(d=q(),null!==d?e=[e,d]:(e=null,b=m)):(e=null,b=m);e=null!==e?e:"";null!==e?(d=Aa(),null!==d?e=[e,d]:(e=null,b=h)):(e=null,b=h);null!==e&&(d=e[0],e=new y({type:"type",name:e[1]}),d&&(e.precision=
-d[0]));null===e&&(b=a);p[c]={b:b,result:e};return e}function za(){var c="locally_specified_type@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m;l++;m=h=a=b;e=Va();null!==e?(d=q(),null!==d?e=[e,d]:(e=null,b=m)):(e=null,b=m);e=null!==e?e:"";null!==e?(d=Ba(),null!==d?e=[e,d]:(e=null,b=h)):(e=null,b=h);null!==e&&(d=e[0],e=e[1],d&&(e.qualifier=d[0]));null===e&&(b=a);l--;0===l&&null===e&&g("locally specified type");p[c]={b:b,result:e};return e}function Ib(){var f="attribute_qualifier@"+b,a=p[f];if(a)return b=
-a.b,a.result;var e,d,h;h=d=b;a="vs"==ya?"":null;null!==a?("attribute"===c.substr(b,9)?(e="attribute",b+=9):(e=null,0===l&&g('"attribute"')),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a="attribute");null===a&&(b=d);p[f]={b:b,result:a};return a}function rc(){var c="attribute_type@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m;l++;m=h=b;a=Ib();null!==a?(e=q(),null!==e?(d=Ba(),null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)):(a=null,b=m);null!==a&&(e=a[2],e.qualifier=a[0],a=e);null===a&&
-(b=h);l--;0===l&&null===a&&g("locally specified type");p[c]={b:b,result:a};return a}function qc(){var c="fully_specified_type@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,m;l++;m=h=a=b;e=Hb();null!==e?(d=q(),null!==d?e=[e,d]:(e=null,b=m)):(e=null,b=m);e=null!==e?e:"";null!==e?(d=Ba(),null!==d?e=[e,d]:(e=null,b=h)):(e=null,b=h);null!==e&&(d=e[0],e=e[1],d&&(e.qualifier=d[0]));null===e&&(b=a);l--;0===l&&null===e&&g("fully specified type");p[c]={b:b,result:e};return e}function Ta(){var f="precision_qualifier@"+
-b,a=p[f];if(a)return b=a.b,a.result;l++;"highp"===c.substr(b,5)?(a="highp",b+=5):(a=null,0===l&&g('"highp"'));null===a&&("mediump"===c.substr(b,7)?(a="mediump",b+=7):(a=null,0===l&&g('"mediump"')),null===a&&("lowp"===c.substr(b,4)?(a="lowp",b+=4):(a=null,0===l&&g('"lowp"'))));l--;0===l&&null===a&&g("precision qualifier");p[f]={b:b,result:a};return a}function Va(){var f="const_qualifier@"+b,a=p[f];if(a)return b=a.b,a.result;"const"===c.substr(b,5)?(a="const",b+=5):(a=null,0===l&&g('"const"'));p[f]=
-{b:b,result:a};return a}function Hb(){var f="type_qualifier@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m;l++;a=Va();null===a&&("varying"===c.substr(b,7)?(a="varying",b+=7):(a=null,0===l&&g('"varying"')),null===a&&(m=h=b,"invariant"===c.substr(b,9)?(a="invariant",b+=9):(a=null,0===l&&g('"invariant"')),null!==a?(e=q(),null!==e?("varying"===c.substr(b,7)?(d="varying",b+=7):(d=null,0===l&&g('"varying"')),null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)):(a=null,b=m),null!==a&&(a="invariant varying"),
-null===a&&(b=h),null===a&&("uniform"===c.substr(b,7)?(a="uniform",b+=7):(a=null,0===l&&g('"uniform"')))));l--;0===l&&null===a&&g("type qualifier");p[f]={b:b,result:a};return a}function uc(){var f="void_type@"+b,a=p[f];if(a)return b=a.b,a.result;var e;l++;e=b;"void"===c.substr(b,4)?(a="void",b+=4):(a=null,0===l&&g('"void"'));null!==a&&(a=new y({type:"type",name:"void"}));null===a&&(b=e);l--;0===l&&null===a&&g("void");p[f]={b:b,result:a};return a}function Aa(){var f="type_name@"+b,a=p[f];if(a)return b=
-a.b,a.result;var e;l++;"float"===c.substr(b,5)?(a="float",b+=5):(a=null,0===l&&g('"float"'));null===a&&("int"===c.substr(b,3)?(a="int",b+=3):(a=null,0===l&&g('"int"')),null===a&&("bool"===c.substr(b,4)?(a="bool",b+=4):(a=null,0===l&&g('"bool"')),null===a&&("sampler2D"===c.substr(b,9)?(a="sampler2D",b+=9):(a=null,0===l&&g('"sampler2D"')),null===a&&("samplerCube"===c.substr(b,11)?(a="samplerCube",b+=11):(a=null,0===l&&g('"samplerCube"')),null===a&&(a=Jb(),null===a&&(a=Kb(),null===a&&(e=b,a=Q(),null!==
-a&&(a=a.name in yc?a.name:null),null===a&&(b=e))))))));l--;0===l&&null===a&&g("type name");p[f]={b:b,result:a};return a}function Q(){var f="identifier@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,k;l++;d=k=m=b;l++;h=b;a=zc();null!==a?(/^[^A-Za-z_0-9]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[^A-Za-z_0-9]")),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);l--;null===a?a="":(a=null,b=d);if(null!==a)if(/^[A-Za-z_]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[A-Za-z_]")),
-null!==e){d=[];/^[A-Za-z_0-9]/.test(c.charAt(b))?(h=c.charAt(b),b++):(h=null,0===l&&g("[A-Za-z_0-9]"));for(;null!==h;)d.push(h),/^[A-Za-z_0-9]/.test(c.charAt(b))?(h=c.charAt(b),b++):(h=null,0===l&&g("[A-Za-z_0-9]"));null!==d?a=[a,e,d]:(a=null,b=k)}else a=null,b=k;else a=null,b=k;null!==a&&(a=new y({type:"identifier",name:a[1]+a[2].join("")}));null===a&&(b=m);l--;0===l&&null===a&&g("identifier");p[f]={b:b,result:a};return a}function zc(){var f="keyword@"+b,a=p[f];if(a)return b=a.b,a.result;l++;"attribute"===
-c.substr(b,9)?(a="attribute",b+=9):(a=null,0===l&&g('"attribute"'));null===a&&("const"===c.substr(b,5)?(a="const",b+=5):(a=null,0===l&&g('"const"')),null===a&&("bool"===c.substr(b,4)?(a="bool",b+=4):(a=null,0===l&&g('"bool"')),null===a&&("float"===c.substr(b,5)?(a="float",b+=5):(a=null,0===l&&g('"float"')),null===a&&("int"===c.substr(b,3)?(a="int",b+=3):(a=null,0===l&&g('"int"')),null===a&&("break"===c.substr(b,5)?(a="break",b+=5):(a=null,0===l&&g('"break"')),null===a&&("continue"===c.substr(b,8)?
-(a="continue",b+=8):(a=null,0===l&&g('"continue"')),null===a&&("do"===c.substr(b,2)?(a="do",b+=2):(a=null,0===l&&g('"do"')),null===a&&("else"===c.substr(b,4)?(a="else",b+=4):(a=null,0===l&&g('"else"')),null===a&&("for"===c.substr(b,3)?(a="for",b+=3):(a=null,0===l&&g('"for"')),null===a&&("if"===c.substr(b,2)?(a="if",b+=2):(a=null,0===l&&g('"if"')),null===a&&("discard"===c.substr(b,7)?(a="discard",b+=7):(a=null,0===l&&g('"discard"')),null===a&&("return"===c.substr(b,6)?(a="return",b+=6):(a=null,0===
-l&&g('"return"')),null===a&&(a=Jb(),null===a&&(a=Kb(),null===a&&("in"===c.substr(b,2)?(a="in",b+=2):(a=null,0===l&&g('"in"')),null===a&&("out"===c.substr(b,3)?(a="out",b+=3):(a=null,0===l&&g('"out"')),null===a&&("inout"===c.substr(b,5)?(a="inout",b+=5):(a=null,0===l&&g('"inout"')),null===a&&("uniform"===c.substr(b,7)?(a="uniform",b+=7):(a=null,0===l&&g('"uniform"')),null===a&&("varying"===c.substr(b,7)?(a="varying",b+=7):(a=null,0===l&&g('"varying"')),null===a&&("sampler2D"===c.substr(b,9)?(a="sampler2D",
-b+=9):(a=null,0===l&&g('"sampler2D"')),null===a&&("samplerCube"===c.substr(b,11)?(a="samplerCube",b+=11):(a=null,0===l&&g('"samplerCube"')),null===a&&("struct"===c.substr(b,6)?(a="struct",b+=6):(a=null,0===l&&g('"struct"')),null===a&&("void"===c.substr(b,4)?(a="void",b+=4):(a=null,0===l&&g('"void"')),null===a&&("while"===c.substr(b,5)?(a="while",b+=5):(a=null,0===l&&g('"while"')),null===a&&("highp"===c.substr(b,5)?(a="highp",b+=5):(a=null,0===l&&g('"highp"')),null===a&&("mediump"===c.substr(b,7)?
-(a="mediump",b+=7):(a=null,0===l&&g('"mediump"')),null===a&&("lowp"===c.substr(b,4)?(a="lowp",b+=4):(a=null,0===l&&g('"lowp"')),null===a&&("true"===c.substr(b,4)?(a="true",b+=4):(a=null,0===l&&g('"true"')),null===a&&("false"===c.substr(b,5)?(a="false",b+=5):(a=null,0===l&&g('"false"')))))))))))))))))))))))))))))));l--;0===l&&null===a&&g("keyword");p[f]={b:b,result:a};return a}function Jb(){var f="vector@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m;m=h=b;/^[bi]/.test(c.charAt(b))?(a=c.charAt(b),
-b++):(a=null,0===l&&g("[bi]"));a=null!==a?a:"";null!==a?("vec"===c.substr(b,3)?(e="vec",b+=3):(e=null,0===l&&g('"vec"')),null!==e?(/^[234]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[234]")),null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)):(a=null,b=m);null!==a&&(a=a.join(""));null===a&&(b=h);p[f]={b:b,result:a};return a}function Kb(){var f="matrix@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h;h=d=b;"mat"===c.substr(b,3)?(a="mat",b+=3):(a=null,0===l&&g('"mat"'));null!==a?(/^[234]/.test(c.charAt(b))?
-(e=c.charAt(b),b++):(e=null,0===l&&g("[234]")),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a=a.join(""));null===a&&(b=d);p[f]={b:b,result:a};return a}function Lb(){var f="single_underscore_identifier@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m;m=b;a=[];/^[A-Za-z0-9]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[A-Za-z0-9]"));for(;null!==e;)a.push(e),/^[A-Za-z0-9]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[A-Za-z0-9]"));if(null!==a)if(95===c.charCodeAt(b)?
-(e="_",b+=1):(e=null,0===l&&g('"_"')),null!==e){/^[A-Za-z0-9]/.test(c.charAt(b))?(h=c.charAt(b),b++):(h=null,0===l&&g("[A-Za-z0-9]"));if(null!==h)for(d=[];null!==h;)d.push(h),/^[A-Za-z0-9]/.test(c.charAt(b))?(h=c.charAt(b),b++):(h=null,0===l&&g("[A-Za-z0-9]"));else d=null;null!==d?a=[a,e,d]:(a=null,b=m)}else a=null,b=m;else a=null,b=m;p[f]={b:b,result:a};return a}function Ac(){var f="int_constant@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,k;k=m=b;/^[1-9]/.test(c.charAt(b))?(a=c.charAt(b),b++):
-(a=null,0===l&&g("[1-9]"));if(null!==a){e=[];/^[0-9]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[0-9]"));for(;null!==d;)e.push(d),/^[0-9]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[0-9]"));null!==e?a=[a,e]:(a=null,b=k)}else a=null,b=k;null!==a&&(a=new y({type:"int",value:parseInt([a[0]].concat(a[1]).join(""),10)}));null===a&&(b=m);if(null===a){k=m=b;48===c.charCodeAt(b)?(a="0",b+=1):(a=null,0===l&&g('"0"'));if(null!==a)if(/^[Xx]/.test(c.charAt(b))?(e=c.charAt(b),b++):
-(e=null,0===l&&g("[Xx]")),null!==e){/^[0-9A-Fa-f]/.test(c.charAt(b))?(h=c.charAt(b),b++):(h=null,0===l&&g("[0-9A-Fa-f]"));if(null!==h)for(d=[];null!==h;)d.push(h),/^[0-9A-Fa-f]/.test(c.charAt(b))?(h=c.charAt(b),b++):(h=null,0===l&&g("[0-9A-Fa-f]"));else d=null;null!==d?a=[a,e,d]:(a=null,b=k)}else a=null,b=k;else a=null,b=k;null!==a&&(a=new y({type:"int",value:parseInt(a[2].join(""),16)}));null===a&&(b=m);if(null===a){k=m=b;48===c.charCodeAt(b)?(a="0",b+=1):(a=null,0===l&&g('"0"'));if(null!==a){/^[0-7]/.test(c.charAt(b))?
-(d=c.charAt(b),b++):(d=null,0===l&&g("[0-7]"));if(null!==d)for(e=[];null!==d;)e.push(d),/^[0-7]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[0-7]"));else e=null;null!==e?a=[a,e]:(a=null,b=k)}else a=null,b=k;null!==a&&(a=new y({type:"int",value:parseInt(a[1].join(""),8)}));null===a&&(b=m);null===a&&(m=b,48===c.charCodeAt(b)?(a="0",b+=1):(a=null,0===l&&g('"0"')),null!==a&&(a=new y({type:"int",value:0})),null===a&&(b=m))}}p[f]={b:b,result:a};return a}function Bc(){var f="float_constant@"+
-b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,k;k=a=b;e=[];/^[0-9]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[0-9]"));for(;null!==d;)e.push(d),/^[0-9]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[0-9]"));if(null!==e)if(46===c.charCodeAt(b)?(d=".",b+=1):(d=null,0===l&&g('"."')),null!==d){/^[0-9]/.test(c.charAt(b))?(m=c.charAt(b),b++):(m=null,0===l&&g("[0-9]"));if(null!==m)for(h=[];null!==m;)h.push(m),/^[0-9]/.test(c.charAt(b))?(m=c.charAt(b),b++):(m=null,0===l&&g("[0-9]"));
-else h=null;null!==h?(m=Xa(),m=null!==m?m:"",null!==m?e=[e,d,h,m]:(e=null,b=k)):(e=null,b=k)}else e=null,b=k;else e=null,b=k;if(null===e){k=b;/^[0-9]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[0-9]"));if(null!==d)for(e=[];null!==d;)e.push(d),/^[0-9]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[0-9]"));else e=null;if(null!==e)if(46===c.charCodeAt(b)?(d=".",b+=1):(d=null,0===l&&g('"."')),null!==d){h=[];/^[0-9]/.test(c.charAt(b))?(m=c.charAt(b),b++):(m=null,0===l&&g("[0-9]"));
-for(;null!==m;)h.push(m),/^[0-9]/.test(c.charAt(b))?(m=c.charAt(b),b++):(m=null,0===l&&g("[0-9]"));null!==h?(m=Xa(),m=null!==m?m:"",null!==m?e=[e,d,h,m]:(e=null,b=k)):(e=null,b=k)}else e=null,b=k;else e=null,b=k}null!==e&&(e[0]=e[0].join(""),e[2]=e[2].join(""),e=new y({type:"float",value:parseFloat(e.join(""))}));null===e&&(b=a);if(null===e){k=a=b;/^[0-9]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[0-9]"));if(null!==d)for(e=[];null!==d;)e.push(d),/^[0-9]/.test(c.charAt(b))?(d=c.charAt(b),
-b++):(d=null,0===l&&g("[0-9]"));else e=null;null!==e?(d=Xa(),null!==d?e=[e,d]:(e=null,b=k)):(e=null,b=k);null!==e&&(e=new y({type:"float",value:parseFloat(e[0].join("")+e[1])}));null===e&&(b=a)}p[f]={b:b,result:e};return e}function Xa(){var f="float_exponent@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,k;k=m=b;/^[Ee]/.test(c.charAt(b))?(a=c.charAt(b),b++):(a=null,0===l&&g("[Ee]"));if(null!==a)if(/^[+\-]/.test(c.charAt(b))?(e=c.charAt(b),b++):(e=null,0===l&&g("[+\\-]")),e=null!==e?e:"",null!==
-e){/^[0-9]/.test(c.charAt(b))?(h=c.charAt(b),b++):(h=null,0===l&&g("[0-9]"));if(null!==h)for(d=[];null!==h;)d.push(h),/^[0-9]/.test(c.charAt(b))?(h=c.charAt(b),b++):(h=null,0===l&&g("[0-9]"));else d=null;null!==d?a=[a,e,d]:(a=null,b=k)}else a=null,b=k;else a=null,b=k;null!==a&&(a=["e",a[1]].concat(a[2]).join(""));null===a&&(b=m);p[f]={b:b,result:a};return a}function Cc(){var c="paren_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,f;f=h=b;a=ba();null!==a?(e=S(),null!==e?(d=ca(),null!==
-d?a=[a,e,d]:(a=null,b=f)):(a=null,b=f)):(a=null,b=f);null!==a&&(a=a[1]);null===a&&(b=h);p[c]={b:b,result:a};return a}function Dc(){var f="bool_constant@"+b,a=p[f];if(a)return b=a.b,a.result;var e;e=b;"true"===c.substr(b,4)?(a="true",b+=4):(a=null,0===l&&g('"true"'));null===a&&("false"===c.substr(b,5)?(a="false",b+=5):(a=null,0===l&&g('"false"')));null!==a&&(a=new y({type:"bool",value:"true"==a}));null===a&&(b=e);p[f]={b:b,result:a};return a}function Ec(){var c="primary_expression@"+b,a=p[c];if(a)return b=
-a.b,a.result;a=Fc();null===a&&(a=Q(),null===a&&(a=Bc(),null===a&&(a=Ac(),null===a&&(a=Dc(),null===a&&(a=Cc())))));p[c]={b:b,result:a};return a}function Fa(){var c="index_accessor@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,f;f=h=b;a=ua();null!==a?(e=S(),null!==e?(d=va(),null!==d?a=[a,e,d]:(a=null,b=f)):(a=null,b=f)):(a=null,b=f);null!==a&&(a=new y({type:"accessor",index:a[1]}));null===a&&(b=h);p[c]={b:b,result:a};return a}function Ga(){var f="field_selector@"+b,a=p[f];if(a)return b=a.b,a.result;
-var e,d,h;h=d=b;46===c.charCodeAt(b)?(a=".",b+=1):(a=null,0===l&&g('"."'));null!==a?(e=Q(),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a=new y({type:"field_selector",selection:a[1].name}));null===a&&(b=d);p[f]={b:b,result:a};return a}function Gc(){var c="postfix_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,f;f=a=b;e=Ec();if(null!==e){d=[];h=Ga();for(null===h&&(h=Fa());null!==h;)d.push(h),h=Ga(),null===h&&(h=Fa());null!==d?e=[e,d]:(e=null,b=f)}else e=null,b=f;if(null!==e)for(d=
-e[1],e=e[0],h=0;h<d.length;h++)e=new y({type:"postfix",j:d[h],N:e});null===e&&(b=a);p[c]={b:b,result:e};return e}function Hc(){var f="postfix_expression_no_repeat@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,k,n;n=a=b;e=Gc();if(null!==e)if(d=q(),d=null!==d?d:"",null!==d)if("++"===c.substr(b,2)?(h="++",b+=2):(h=null,0===l&&g('"++"')),null===h&&("--"===c.substr(b,2)?(h="--",b+=2):(h=null,0===l&&g('"--"'))),h=null!==h?h:"",null!==h){m=[];k=Ga();for(null===k&&(k=Fa());null!==k;)m.push(k),k=Ga(),
-null===k&&(k=Fa());null!==m?e=[e,d,h,m]:(e=null,b=n)}else e=null,b=n;else e=null,b=n;else e=null,b=n;if(null!==e)for(h=e[2],d=e[3],e=e[0],h&&(e=new y({type:"postfix",j:new y({id:Ic++,type:"operator",j:h}),N:e})),h=0;h<d.length;h++)e=new y({type:"postfix",j:d[h],N:e});null===e&&(b=a);p[f]={b:b,result:e};return e}function vb(){var f="parameter_list@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m,k,n;m=b;"void"===c.substr(b,4)?(a="void",b+=4):(a=null,0===l&&g('"void"'));null!==a&&(a=[]);null===a&&
-(b=m);if(null===a){k=m=b;a=S();if(null!==a){e=[];n=b;d=H();null!==d?(h=S(),null!==h?d=[d,h]:(d=null,b=n)):(d=null,b=n);for(;null!==d;)e.push(d),n=b,d=H(),null!==d?(h=S(),null!==h?d=[d,h]:(d=null,b=n)):(d=null,b=n);null!==e?a=[a,e]:(a=null,b=k)}else a=null,b=k;null!==a&&(a=function(a,b){return[a].concat(b.map(function(a){return a[1]}))}(a[0],a[1]));null===a&&(b=m)}p[f]={b:b,result:a};return a}function Fc(){var c="function_call@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,f,g;g=a=b;e=Jc();null!==
-e?(d=ba(),null!==d?(h=vb(),h=null!==h?h:"",null!==h?(f=ca(),null!==f?e=[e,d,h,f]:(e=null,b=g)):(e=null,b=g)):(e=null,b=g)):(e=null,b=g);null!==e&&(d=e[2],e=new y({type:"function_call",I:e[0],l:d}),d||(e.l=[]));null===e&&(b=a);p[c]={b:b,result:e};return e}function Jc(){var c="function_identifier@"+b,a=p[c];if(a)return b=a.b,a.result;var e;e=b;a=Q();null!==a&&(a=a.name);null===a&&(b=e);null===a&&(a=Aa());p[c]={b:b,result:a};return a}function Ya(){var f="unary_expression@"+b,a=p[f];if(a)return b=a.b,
-a.result;var e,d,h,m;m=h=b;"++"===c.substr(b,2)?(a="++",b+=2):(a=null,0===l&&g('"++"'));null===a&&("--"===c.substr(b,2)?(a="--",b+=2):(a=null,0===l&&g('"--"')),null===a&&(33===c.charCodeAt(b)?(a="!",b+=1):(a=null,0===l&&g('"!"')),null===a&&(126===c.charCodeAt(b)?(a="~",b+=1):(a=null,0===l&&g('"~"')),null===a&&(43===c.charCodeAt(b)?(a="+",b+=1):(a=null,0===l&&g('"+"')),null===a&&(45===c.charCodeAt(b)?(a="-",b+=1):(a=null,0===l&&g('"-"')))))));a=null!==a?a:"";null!==a?(e=q(),e=null!==e?e:"",null!==
-e?(d=Hc(),null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)):(a=null,b=m);null!==a&&(e=a[0],L=a[2],e&&(L=new y({type:"unary",N:L,j:new y({type:"operator",j:e})})),a=L);null===a&&(b=h);p[f]={b:b,result:a};return a}function Mb(){var f="multiplicative_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m;h=d=b;42===c.charCodeAt(b)?(a="*",b+=1):(a=null,0===l&&g('"*"'));null===a&&(47===c.charCodeAt(b)?(a="/",b+=1):(a=null,0===l&&g('"/"')),null===a&&(37===c.charCodeAt(b)?(a="%",b+=1):(a=null,0===l&&g('"%"'))));
-null!==a?(m=b,l++,61===c.charCodeAt(b)?(e="=",b+=1):(e=null,0===l&&g('"="')),l--,null===e?e="":(e=null,b=m),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a=new y({type:"operator",j:a[0]}));null===a&&(b=d);p[f]={b:b,result:a};return a}function Za(){var c="multiplicative_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,f,g,k,l,n;l=k=b;a=Ya();if(null!==a){e=[];n=b;d=q();d=null!==d?d:"";null!==d?(h=Mb(),null!==h?(f=q(),f=null!==f?f:"",null!==f?(g=Ya(),null!==g?d=[d,h,f,g]:(d=null,b=
-n)):(d=null,b=n)):(d=null,b=n)):(d=null,b=n);for(;null!==d;)e.push(d),n=b,d=q(),d=null!==d?d:"",null!==d?(h=Mb(),null!==h?(f=q(),f=null!==f?f:"",null!==f?(g=Ya(),null!==g?d=[d,h,f,g]:(d=null,b=n)):(d=null,b=n)):(d=null,b=n)):(d=null,b=n);null!==e?a=[a,e]:(a=null,b=l)}else a=null,b=l;null!==a&&(a=X(a[0],a[1]));null===a&&(b=k);p[c]={b:b,result:a};return a}function Nb(){var f="additive_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m;h=d=b;43===c.charCodeAt(b)?(a="+",b+=1):(a=null,0===l&&g('"+"'));
-null!==a?(m=b,l++,43===c.charCodeAt(b)?(e="+",b+=1):(e=null,0===l&&g('"+"')),null===e&&(61===c.charCodeAt(b)?(e="=",b+=1):(e=null,0===l&&g('"="'))),l--,null===e?e="":(e=null,b=m),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a=new y({type:"operator",j:"+"}));null===a&&(b=d);null===a&&(h=d=b,45===c.charCodeAt(b)?(a="-",b+=1):(a=null,0===l&&g('"-"')),null!==a?(m=b,l++,45===c.charCodeAt(b)?(e="-",b+=1):(e=null,0===l&&g('"-"')),null===e&&(61===c.charCodeAt(b)?(e="=",b+=1):(e=null,0===l&&g('"="'))),
-l--,null===e?e="":(e=null,b=m),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h),null!==a&&(a=new y({type:"operator",j:"-"})),null===a&&(b=d));p[f]={b:b,result:a};return a}function $a(){var c="additive_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,f,g,k,l,n;l=k=b;a=Za();if(null!==a){e=[];n=b;d=q();d=null!==d?d:"";null!==d?(h=Nb(),null!==h?(f=q(),f=null!==f?f:"",null!==f?(g=Za(),null!==g?d=[d,h,f,g]:(d=null,b=n)):(d=null,b=n)):(d=null,b=n)):(d=null,b=n);for(;null!==d;)e.push(d),n=b,d=q(),d=
-null!==d?d:"",null!==d?(h=Nb(),null!==h?(f=q(),f=null!==f?f:"",null!==f?(g=Za(),null!==g?d=[d,h,f,g]:(d=null,b=n)):(d=null,b=n)):(d=null,b=n)):(d=null,b=n);null!==e?a=[a,e]:(a=null,b=l)}else a=null,b=l;null!==a&&(a=X(a[0],a[1]));null===a&&(b=k);p[c]={b:b,result:a};return a}function Ob(){var f="shift_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m;h=d=b;"<<"===c.substr(b,2)?(a="<<",b+=2):(a=null,0===l&&g('"<<"'));null===a&&(">>"===c.substr(b,2)?(a=">>",b+=2):(a=null,0===l&&g('">>"')));null!==
-a?(m=b,l++,61===c.charCodeAt(b)?(e="=",b+=1):(e=null,0===l&&g('"="')),l--,null===e?e="":(e=null,b=m),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a=new y({type:"operator",j:a[0]}));null===a&&(b=d);p[f]={b:b,result:a};return a}function ab(){var c="shift_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,f,g,k,l,n;l=k=b;a=$a();if(null!==a){e=[];n=b;d=q();d=null!==d?d:"";null!==d?(h=Ob(),null!==h?(f=q(),f=null!==f?f:"",null!==f?(g=$a(),null!==g?d=[d,h,f,g]:(d=null,b=n)):(d=null,b=n)):
-(d=null,b=n)):(d=null,b=n);for(;null!==d;)e.push(d),n=b,d=q(),d=null!==d?d:"",null!==d?(h=Ob(),null!==h?(f=q(),f=null!==f?f:"",null!==f?(g=$a(),null!==g?d=[d,h,f,g]:(d=null,b=n)):(d=null,b=n)):(d=null,b=n)):(d=null,b=n);null!==e?a=[a,e]:(a=null,b=l)}else a=null,b=l;null!==a&&(a=X(a[0],a[1]));null===a&&(b=k);p[c]={b:b,result:a};return a}function Pb(){var f="relational_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m;m=h=b;60===c.charCodeAt(b)?(a="<",b+=1):(a=null,0===l&&g('"<"'));null!==
-a?(d=b,l++,60===c.charCodeAt(b)?(e="<",b+=1):(e=null,0===l&&g('"<"')),l--,null===e?e="":(e=null,b=d),null!==e?(61===c.charCodeAt(b)?(d="=",b+=1):(d=null,0===l&&g('"="')),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)):(a=null,b=m);null!==a&&(a=new y({type:"operator",j:"<"+a[2]}));null===a&&(b=h);null===a&&(m=h=b,62===c.charCodeAt(b)?(a=">",b+=1):(a=null,0===l&&g('">"')),null!==a?(d=b,l++,62===c.charCodeAt(b)?(e=">",b+=1):(e=null,0===l&&g('">"')),l--,null===e?e="":(e=null,b=d),null!==
-e?(61===c.charCodeAt(b)?(d="=",b+=1):(d=null,0===l&&g('"="')),d=null!==d?d:"",null!==d?a=[a,e,d]:(a=null,b=m)):(a=null,b=m)):(a=null,b=m),null!==a&&(a=new y({type:"operator",j:">"+a[2]})),null===a&&(b=h));p[f]={b:b,result:a};return a}function bb(){var c="relational_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,h,f,g,k,l,n;l=k=b;a=ab();if(null!==a){e=[];n=b;d=q();d=null!==d?d:"";null!==d?(h=Pb(),null!==h?(f=q(),f=null!==f?f:"",null!==f?(g=ab(),null!==g?d=[d,h,f,g]:(d=null,b=n)):(d=null,
-b=n)):(d=null,b=n)):(d=null,b=n);for(;null!==d;)e.push(d),n=b,d=q(),d=null!==d?d:"",null!==d?(h=Pb(),null!==h?(f=q(),f=null!==f?f:"",null!==f?(g=ab(),null!==g?d=[d,h,f,g]:(d=null,b=n)):(d=null,b=n)):(d=null,b=n)):(d=null,b=n);null!==e?a=[a,e]:(a=null,b=l)}else a=null,b=l;null!==a&&(a=X(a[0],a[1]));null===a&&(b=k);p[c]={b:b,result:a};return a}function Qb(){var f="equality_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e;e=b;"=="===c.substr(b,2)?(a="==",b+=2):(a=null,0===l&&g('"=="'));null===a&&
-("!="===c.substr(b,2)?(a="!=",b+=2):(a=null,0===l&&g('"!="')));null!==a&&(a=new y({type:"operator",j:a}));null===a&&(b=e);p[f]={b:b,result:a};return a}function cb(){var c="equality_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,f,g,k,l,n,r;n=l=b;a=bb();if(null!==a){e=[];r=b;d=q();d=null!==d?d:"";null!==d?(f=Qb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=bb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);for(;null!==d;)e.push(d),r=b,d=q(),d=null!==d?d:"",null!==
-d?(f=Qb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=bb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);null!==e?a=[a,e]:(a=null,b=n)}else a=null,b=n;null!==a&&(a=X(a[0],a[1]));null===a&&(b=l);p[c]={b:b,result:a};return a}function Rb(){var f="bitwise_and_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,m;h=d=b;38===c.charCodeAt(b)?(a="&",b+=1):(a=null,0===l&&g('"&"'));null!==a?(m=b,l++,61===c.charCodeAt(b)?(e="=",b+=1):(e=null,0===l&&g('"="')),null===e&&(38===
-c.charCodeAt(b)?(e="&",b+=1):(e=null,0===l&&g('"&"'))),l--,null===e?e="":(e=null,b=m),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a=new y({type:"operator",j:"&"}));null===a&&(b=d);p[f]={b:b,result:a};return a}function db(){var c="bitwise_and_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,f,g,k,l,n,r;n=l=b;a=cb();if(null!==a){e=[];r=b;d=q();d=null!==d?d:"";null!==d?(f=Rb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=cb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,
-b=r)):(d=null,b=r);for(;null!==d;)e.push(d),r=b,d=q(),d=null!==d?d:"",null!==d?(f=Rb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=cb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);null!==e?a=[a,e]:(a=null,b=n)}else a=null,b=n;null!==a&&(a=X(a[0],a[1]));null===a&&(b=l);p[c]={b:b,result:a};return a}function Sb(){var f="bitwise_xor_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,k;h=d=b;94===c.charCodeAt(b)?(a="^",b+=1):(a=null,0===l&&g('"^"'));null!==a?(k=b,
-l++,61===c.charCodeAt(b)?(e="=",b+=1):(e=null,0===l&&g('"="')),null===e&&(94===c.charCodeAt(b)?(e="^",b+=1):(e=null,0===l&&g('"^"'))),l--,null===e?e="":(e=null,b=k),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a=new y({type:"operator",j:"^"}));null===a&&(b=d);p[f]={b:b,result:a};return a}function eb(){var c="bitwise_xor_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,f,g,k,l,n,r;n=l=b;a=db();if(null!==a){e=[];r=b;d=q();d=null!==d?d:"";null!==d?(f=Sb(),null!==f?(g=q(),g=null!==g?
-g:"",null!==g?(k=db(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);for(;null!==d;)e.push(d),r=b,d=q(),d=null!==d?d:"",null!==d?(f=Sb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=db(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);null!==e?a=[a,e]:(a=null,b=n)}else a=null,b=n;null!==a&&(a=X(a[0],a[1]));null===a&&(b=l);p[c]={b:b,result:a};return a}function Tb(){var f="bitwise_or_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,k;h=
-d=b;124===c.charCodeAt(b)?(a="|",b+=1):(a=null,0===l&&g('"|"'));null!==a?(k=b,l++,61===c.charCodeAt(b)?(e="=",b+=1):(e=null,0===l&&g('"="')),null===e&&(124===c.charCodeAt(b)?(e="|",b+=1):(e=null,0===l&&g('"|"'))),l--,null===e?e="":(e=null,b=k),null!==e?a=[a,e]:(a=null,b=h)):(a=null,b=h);null!==a&&(a=new y({type:"operator",j:"|"}));null===a&&(b=d);p[f]={b:b,result:a};return a}function fb(){var c="bitwise_or_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,f,g,k,l,n,r;n=l=b;a=eb();if(null!==
-a){e=[];r=b;d=q();d=null!==d?d:"";null!==d?(f=Tb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=eb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);for(;null!==d;)e.push(d),r=b,d=q(),d=null!==d?d:"",null!==d?(f=Tb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=eb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);null!==e?a=[a,e]:(a=null,b=n)}else a=null,b=n;null!==a&&(a=X(a[0],a[1]));null===a&&(b=l);p[c]={b:b,result:a};return a}function Ub(){var f=
-"logical_and_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e;e=b;"&&"===c.substr(b,2)?(a="&&",b+=2):(a=null,0===l&&g('"&&"'));null!==a&&(a=new y({type:"operator",j:"&&"}));null===a&&(b=e);p[f]={b:b,result:a};return a}function gb(){var c="logical_and_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,f,g,k,l,n,r;n=l=b;a=fb();if(null!==a){e=[];r=b;d=q();d=null!==d?d:"";null!==d?(f=Ub(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=fb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,
-b=r)):(d=null,b=r);for(;null!==d;)e.push(d),r=b,d=q(),d=null!==d?d:"",null!==d?(f=Ub(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=fb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);null!==e?a=[a,e]:(a=null,b=n)}else a=null,b=n;null!==a&&(a=X(a[0],a[1]));null===a&&(b=l);p[c]={b:b,result:a};return a}function Vb(){var f="logical_xor_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e;e=b;"^^"===c.substr(b,2)?(a="^^",b+=2):(a=null,0===l&&g('"^^"'));null!==a&&(a=new y({type:"operator",
-j:"^^"}));null===a&&(b=e);p[f]={b:b,result:a};return a}function hb(){var c="logical_xor_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,f,g,k,l,n,r;n=l=b;a=gb();if(null!==a){e=[];r=b;d=q();d=null!==d?d:"";null!==d?(f=Vb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=gb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);for(;null!==d;)e.push(d),r=b,d=q(),d=null!==d?d:"",null!==d?(f=Vb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=gb(),null!==k?d=[d,f,g,k]:(d=null,
-b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);null!==e?a=[a,e]:(a=null,b=n)}else a=null,b=n;null!==a&&(a=X(a[0],a[1]));null===a&&(b=l);p[c]={b:b,result:a};return a}function Wb(){var f="logical_or_operator@"+b,a=p[f];if(a)return b=a.b,a.result;var e;e=b;"||"===c.substr(b,2)?(a="||",b+=2):(a=null,0===l&&g('"||"'));null!==a&&(a=new y({type:"operator",j:"||"}));null===a&&(b=e);p[f]={b:b,result:a};return a}function Kc(){var c="logical_or_expression@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,f,g,k,
-l,n,r;n=l=b;a=hb();if(null!==a){e=[];r=b;d=q();d=null!==d?d:"";null!==d?(f=Wb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=hb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);for(;null!==d;)e.push(d),r=b,d=q(),d=null!==d?d:"",null!==d?(f=Wb(),null!==f?(g=q(),g=null!==g?g:"",null!==g?(k=hb(),null!==k?d=[d,f,g,k]:(d=null,b=r)):(d=null,b=r)):(d=null,b=r)):(d=null,b=r);null!==e?a=[a,e]:(a=null,b=n)}else a=null,b=n;null!==a&&(a=X(a[0],a[1]));null===a&&(b=l);p[c]={b:b,result:a};
-return a}function pa(){var f="conditional_expression@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,k,n,u,x,r,B,A,C;A=a=b;e=Kc();null!==e?(C=b,d=q(),d=null!==d?d:"",null!==d?(63===c.charCodeAt(b)?(h="?",b+=1):(h=null,0===l&&g('"?"')),null!==h?(k=q(),k=null!==k?k:"",null!==k?(n=S(),null!==n?(u=q(),u=null!==u?u:"",null!==u?(58===c.charCodeAt(b)?(x=":",b+=1):(x=null,0===l&&g('":"')),null!==x?(r=q(),r=null!==r?r:"",null!==r?(B=S(),null!==B?d=[d,h,k,n,u,x,r,B]:(d=null,b=C)):(d=null,b=C)):(d=null,b=C)):
-(d=null,b=C)):(d=null,b=C)):(d=null,b=C)):(d=null,b=C)):(d=null,b=C),d=null!==d?d:"",null!==d?e=[e,d]:(e=null,b=A)):(e=null,b=A);null!==e&&(d=e[0],e=e[1],L=d,e&&(L=new y({type:"ternary",F:d,Ha:e[3],Ga:e[7]})),e=L);null===e&&(b=a);p[f]={b:b,result:e};return e}function S(){var f="assignment_expression@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,k,n,u;u=n=b;a=pa();null!==a?(e=q(),e=null!==e?e:"",null!==e?(61===c.charCodeAt(b)?(d="=",b+=1):(d=null,0===l&&g('"="')),null===d&&("*="===c.substr(b,2)?
-(d="*=",b+=2):(d=null,0===l&&g('"*="')),null===d&&("/="===c.substr(b,2)?(d="/=",b+=2):(d=null,0===l&&g('"/="')),null===d&&("%="===c.substr(b,2)?(d="%=",b+=2):(d=null,0===l&&g('"%="')),null===d&&("+="===c.substr(b,2)?(d="+=",b+=2):(d=null,0===l&&g('"+="')),null===d&&("-="===c.substr(b,2)?(d="-=",b+=2):(d=null,0===l&&g('"-="')),null===d&&("<<="===c.substr(b,3)?(d="<<=",b+=3):(d=null,0===l&&g('"<<="')),null===d&&(">>="===c.substr(b,3)?(d=">>=",b+=3):(d=null,0===l&&g('">>="')),null===d&&("&="===c.substr(b,
-2)?(d="&=",b+=2):(d=null,0===l&&g('"&="')),null===d&&("^="===c.substr(b,2)?(d="^=",b+=2):(d=null,0===l&&g('"^="')),null===d&&("|="===c.substr(b,2)?(d="|=",b+=2):(d=null,0===l&&g('"|="')))))))))))),null!==d?(h=q(),h=null!==h?h:"",null!==h?(k=S(),null!==k?a=[a,e,d,h,k]:(a=null,b=u)):(a=null,b=u)):(a=null,b=u)):(a=null,b=u)):(a=null,b=u);null!==a&&(e=a[0],d=a[4],a=new y({type:"binary",j:new y({type:"operator",j:a[2]}),left:e,right:d}));null===a&&(b=n);null===a&&(a=pa());p[f]={b:b,result:a};return a}
-function Db(){var f="condition@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,k,n,u,x;x=b;a=za();null!==a?(e=q(),null!==e?(d=Q(),null!==d?(h=q(),h=null!==h?h:"",null!==h?(61===c.charCodeAt(b)?(k="=",b+=1):(k=null,0===l&&g('"="')),null!==k?(n=q(),n=null!==n?n:"",null!==n?(u=S(),null!==u?a=[a,e,d,h,k,n,u]:(a=null,b=x)):(a=null,b=x)):(a=null,b=x)):(a=null,b=x)):(a=null,b=x)):(a=null,b=x)):(a=null,b=x);null===a&&(a=S());p[f]={b:b,result:a};return a}function nd(){var f;a:{f=ob;f.sort();for(var a=null,
-e=[],d=0;d<f.length;d++)f[d]!==a&&(e.push(f[d]),a=f[d]);switch(e.length){case 0:f="end of input";break a;case 1:f=e[0];break a;default:f=e.slice(0,e.length-1).join(", ")+" or "+e[e.length-1]}}a=Math.max(b,ta);a=a<c.length?n(c.charAt(a)):"end of input";return"Expected "+f+" but "+a+" found."}function Lc(){for(var f=1,a=1,e=!1,d=0;d<Math.max(b,ta);d++){var g=c.charAt(d);"\n"===g?(e||f++,a=1,e=!1):"\r"===g||"\u2028"===g||"\u2029"===g?(f++,a=1,e=!0):(a++,e=!1)}return{ka:f,Da:a}}function y(b){this.id=
-Ic++;this.ka=Lc().ka;for(var a in b)b.hasOwnProperty(a)&&(this[a]=b[a])}function X(b,a){for(var c=b,d=0;d<a.length;d++)c=new y({type:"binary",j:a[d][1],left:c,right:a[d][3]});return c}function jc(b,a,c){c&&(a=a.concat([c]));c=b[0];c.ia=b[1].C;b=c;for(var d=0;d<a.length;d++)b.M=a[d][0],b.M.ia=a[d][1].C,b=b.M;return c}var Mc={EOF:B,_:q,additive_expression:$a,additive_operator:Nb,assignment_expression:S,attribute_qualifier:Ib,attribute_type:rc,bitwise_and_expression:db,bitwise_and_operator:Rb,bitwise_or_expression:fb,
-bitwise_or_operator:Tb,bitwise_xor_expression:eb,bitwise_xor_operator:Sb,bool_constant:Dc,comma:H,comment:C,compound_statement:Qa,condition:Db,conditional_expression:pa,const_qualifier:Va,declaration:Sa,declarator:Ca,declarator_array_with_size:Ea,declarator_list:wc,declarator_list_arrays_have_size:Gb,declarator_list_no_array:sc,declarator_no_array:Da,do_while:pc,equality_expression:cb,equality_operator:Qb,equals:cc,expression_statement:Cb,external_declaration:ec,external_statement:rb,external_statement_list:ja,
-field_selector:Ga,float_constant:Bc,float_exponent:Xa,for_loop:nc,fragment_start:function(){var c="fragment_start@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,f;f=d=b;ya="fs";a="";null!==a?(e=ja(),null!==e?a=[a,e]:(a=null,b=f)):(a=null,b=f);null!==a&&(a=a[1]);null===a&&(b=d);p[c]={b:b,result:a};return a},fully_specified_type:qc,function_call:Fc,function_definition:fc,function_identifier:Jc,function_prototype:Ab,function_prototype_parameter_list:tc,global_declaration:gc,identifier:Q,index_accessor:Fa,
-init_declarator:Wa,init_declarator_list:Fb,int_constant:Ac,iteration_statement:lc,jump_statement:mc,keyword:zc,left_brace:pb,left_bracket:ua,left_paren:ba,locally_specified_type:za,logical_and_expression:gb,logical_and_operator:Ub,logical_or_expression:Kc,logical_or_operator:Wb,logical_xor_expression:hb,logical_xor_operator:Vb,macro_call:Oa,macro_call_line:function(){var f="macro_call_line@"+b,a=p[f];if(a)return b=a.b,a.result;var e,d,h,k;k=h=b;a=Oa();a=null!==a?a:"";if(null!==a){e=[];/^[^\n]/.test(c.charAt(b))?
-(d=c.charAt(b),b++):(d=null,0===l&&g("[^\\n]"));for(;null!==d;)e.push(d),/^[^\n]/.test(c.charAt(b))?(d=c.charAt(b),b++):(d=null,0===l&&g("[^\\n]"));null!==e?a=[a,e]:(a=null,b=k)}else a=null,b=k;null!==a&&(a={aa:a[0],Ja:a[1].join("")});null===a&&(b=h);p[f]={b:b,result:a};return a},macro_call_parameter:Pa,macro_call_parameter_list:function(){var c="macro_call_parameter_list@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,f,g,k,l;k=g=b;a=Pa();if(null!==a){e=[];l=b;d=H();null!==d?(f=Pa(),null!==f?d=[d,
-f]:(d=null,b=l)):(d=null,b=l);for(;null!==d;)e.push(d),l=b,d=H(),null!==d?(f=Pa(),null!==f?d=[d,f]:(d=null,b=l)):(d=null,b=l);null!==e?a=[a,e]:(a=null,b=k)}else a=null,b=k;null!==a&&(a=function(a,b){return[a].concat(b.map(function(a){return a[1]}))}(a[0],a[1]));null===a&&(b=g);p[c]={b:b,result:a};return a},macro_identifier:na,macro_paren_parameter:ub,matrix:Kb,member_list:xc,multiplicative_expression:Za,multiplicative_operator:Mb,newLine:u,noNewlineComment:x,noNewlineWhitespace:ha,parameter_declaration:Ua,
-parameter_list:vb,parameter_qualifier:vc,paren_expression:Cc,postfix_expression:Gc,postfix_expression_no_repeat:Hc,precision_qualifier:Ta,precision_type:Ba,preprocessor_define:sb,preprocessor_else:xb,preprocessor_else_if:wa,preprocessor_end:yb,preprocessor_external_branch:dc,preprocessor_if:wb,preprocessor_operator:tb,preprocessor_parameter_list:ic,preprocessor_statement_branch:zb,primary_expression:Ec,relational_expression:bb,relational_operator:Pb,reserved:function(){var f="reserved@"+b,a=p[f];
-if(a)return b=a.b,a.result;var e,d,h,k;l++;k=b;a=[];for(e=Lb();null!==e;)a.push(e),e=Lb();if(null!==a)if("__"===c.substr(b,2)?(e="__",b+=2):(e=null,0===l&&g('"__"')),null!==e){d=[];/^[A-Za-z_0-9]/.test(c.charAt(b))?(h=c.charAt(b),b++):(h=null,0===l&&g("[A-Za-z_0-9]"));for(;null!==h;)d.push(h),/^[A-Za-z_0-9]/.test(c.charAt(b))?(h=c.charAt(b),b++):(h=null,0===l&&g("[A-Za-z_0-9]"));null!==d?a=[a,e,d]:(a=null,b=k)}else a=null,b=k;else a=null,b=k;l--;0===l&&null===a&&g("reserved name");p[f]={b:b,result:a};
-return a},right_brace:qb,right_bracket:va,right_paren:ca,selection_statement:kc,semicolon:A,shift_expression:ab,shift_operator:Ob,simple_statement:Bb,single_underscore_identifier:Lb,statement_list:oa,statement_no_new_scope:xa,statement_with_scope:Ra,struct_definition:hc,type_name:Aa,type_qualifier:Hb,unary_expression:Ya,vector:Jb,vertex_start:function(){var c="vertex_start@"+b,a=p[c];if(a)return b=a.b,a.result;var e,d,f;f=d=b;ya="vs";a="";null!==a?(e=ja(),null!==e?a=[a,e]:(a=null,b=f)):(a=null,b=
-f);null!==a&&(a=a[1]);null===a&&(b=d);p[c]={b:b,result:a};return a},void_type:uc,while_loop:oc,while_statement:Eb};if(void 0!==f){if(void 0===Mc[f])throw Error("Invalid rule name: "+n(f)+".");}else f="external_statement_list";var b=0,l=0,ta=0,ob=[],p={},yc={},Ic=0,ya="vs",L=Mc[f]();if(null===L||b!==c.length){var Nc=Lc();throw new la.SyntaxError(nd(),Nc.ka,Nc.Da);}return L}la.SyntaxError=function(c,f,k){this.name="SyntaxError";this.message=c;this.line=f;this.column=k};la.SyntaxError.prototype=Error.prototype;function ma(c){return c.split(/_/g).map(function(c){return c.slice(0,1).toUpperCase()+c.slice(1).toLowerCase()}).join("")}["varying mediump vec4 gl_FragCoord;","varying bool gl_FrontFacing;","varying mediump vec2 gl_PointCoord;"].map(function(c){return z(c,"global_declaration")});var qa=Array.prototype,D=qa.forEach?function(c,f,k){qa.forEach.call(c,f,k)}:function(c,f,k){for(var n=c.length,g="string"==typeof c?c.split(""):c,u=0;u<n;u++)u in g&&f.call(k,g[u],u,c)};function ra(c,f,k){for(var n="string"==typeof c?c.split(""):c,g=c.length-1;0<=g;--g)g in n&&f.call(k,n[g],g,c)}var sa=qa.every?function(c,f,k){return qa.every.call(c,f,k)}:function(c,f,k){for(var n=c.length,g="string"==typeof c?c.split(""):c,u=0;u<n;u++)if(u in g&&!f.call(k,g[u],u,c))return!1;return!0};
-function Ha(c){var f=c.length;if(0<f){for(var k=Array(f),n=0;n<f;n++)k[n]=c[n];return k}return[]};function Ia(){}Ia.prototype.i=function(c){return this["beforeVisit"+ma(c.type)]};Ia.prototype.u=function(c){return this["afterVisit"+ma(c.type)]};Ia.prototype.m=function(c){return this["visit"+ma(c.type)]};function E(c,f){if(f&&f.type){var k=c.i(f);k&&k.apply(c,[f]);(k=c.m(f))?k.apply(c,[f]):Ja(c,f);(k=c.u(f))&&k.apply(c,[f])}}function Ka(c,f){D(f,function(c){E(this,c)},c)}
-function Ja(c,f){for(var k in f){var n=f[k];if("array"==ea(n))Ka(c,n);else{var g=typeof n;("object"==g&&null!=n||"function"==g)&&n.type&&E(c,n)}}};function F(c,f){this.c=c||"\n";this.h=!!f;this.a="";this.f=0}v(F,Ia);ka("glslunit.Generator",F);function G(c,f,k){this.a=c;this.c=f||0;this.f=k||2}
-var La={function_call:new G(0,2),identifier:new G(0,2),"float":new G(0,2),"int":new G(0,2),bool:new G(0,2),postfix:new G(1,0,1),unary:new G(2,1,1),"*":new G(3,0),"/":new G(3),"%":new G(3),"+":new G(4,0),"-":new G(4),"<<":new G(5),">>":new G(5),"<":new G(6),">":new G(6),"<=":new G(6),">=":new G(6),"==":new G(7),"!=":new G(7),"&":new G(8,0),"^":new G(9,0),"|":new G(10,0),"&&":new G(11,0),"^^":new G(12,0),"||":new G(13,0),ternary:new G(14,1,3),"=":new G(15),"-=":new G(15),"+=":new G(15),"*=":new G(15),
-"/=":new G(15),"%=":new G(15),"<<=":new G(15),">>=":new G(15),"&=":new G(15),"^=":new G(15),"|=":new G(15)};function I(c,f,k){f=new F(f,k);E(f,c);return f.a}function Ma(c,f,k){return f?c+f+k:""}function Na(c,f,k){for(var n=0;n<f.length;n++)0!=n&&(c.a+=k),E(c,f[n])}function ib(c){c.h&&(c.a+=c.c+Array(c.f+1).join("  "))}function jb(c){c.h&&"  "==c.a.slice(-2)&&(c.a=c.a.slice(0,-2))}
-F.prototype.za=function(c){this.a+=Ma("",c.qualifier," ");this.a+="struct";this.a+=Ma(" ",c.name,"");this.a+="{";this.f++;Na(this,c.Ia,"");this.f--;jb(this);this.a+="}";c.A&&Na(this,c.A,",");this.a+=";";ib(this)};F.prototype.visitStructDefinition=F.prototype.za;F.prototype.ya=function(c){this.a+="{";this.f++;ib(this);Na(this,c.C,"");this.f--;jb(this);this.a+="}";ib(this)};F.prototype.visitScope=F.prototype.ya;F.prototype.va=function(c){this.a+="precision "+c.precision+" "+c.typeName+";";ib(this)};
-F.prototype.visitPrecision=F.prototype.va;F.prototype.ha=function(c){this.a+="invariant ";Na(this,c.Ea,",");this.a+=";";ib(this)};F.prototype.visitInvariant=F.prototype.ha;F.prototype.ta=function(c){this.a+=Ma("",c.qa," ");this.a+=Ma("",c.la," ");this.a+=Ma("",c.precision," ");this.a+=c.Ka+" "+c.name;c.$&&(this.a+="[",E(this,c.$),this.a+="]")};F.prototype.visitParameter=F.prototype.ta;function kb(c,f){E(c,f.ma);c.a+=" "+f.name+"(";Na(c,f.l,",");c.a+=")"}
-F.prototype.da=function(c){kb(this,c);this.a+=";";ib(this)};F.prototype.visitFunctionPrototype=F.prototype.da;F.prototype.ca=function(c){kb(this,c);E(this,c.body)};F.prototype.visitFunctionDeclaration=F.prototype.ca;
-F.prototype.wa=function(c){var f=this.a.slice(-1*this.c.length);f&&f!=this.c&&(this.a+=this.c);this.a+=c.B;"#define"==c.B?(this.a+=" "+c.identifier,c.l&&(this.a+="(",Na(this,c.l,","),this.a+=")"),this.a+=Ma(" ",c.pa,"")):this.a+=Ma(" ",c.value,"");this.a+=this.c;c.ia&&(Na(this,c.ia,""),c.M&&E(this,c.M),"#if"==c.B.slice(0,3)&&(f=this.a.slice(-1*this.c.length),f!=this.c&&(this.a+=this.c),this.a+="#endif"+this.c))};F.prototype.visitPreprocessor=F.prototype.wa;
-function lb(c,f){c.a+="while(";E(c,f.F);c.a+=")"}F.prototype.U=function(c){this.a+="do";"scope"!=c.body.type&&(this.a+=" ");E(this,c.body);lb(this,c)};F.prototype.visitDoStatement=F.prototype.U;F.prototype.Ca=function(c){lb(this,c);E(this,c.body)};F.prototype.visitWhileStatement=F.prototype.Ca;F.prototype.ba=function(c){this.a+="for(";E(this,c.H);E(this,c.F);this.a+=";";E(this,c.Fa);this.a+=")";E(this,c.body)};F.prototype.visitForStatement=F.prototype.ba;
-F.prototype.fa=function(c){this.a+="if(";E(this,c.F);this.a+=")";E(this,c.body);c.M&&(this.a+="else","scope"!=c.M.type&&(this.a+=" "),E(this,c.M))};F.prototype.visitIfStatement=F.prototype.fa;F.prototype.S=function(c){E(this,c.name);c.isArray&&(this.a+="[",c.$&&E(this,c.$),this.a+="]");c.H&&(this.a+="=",E(this,c.H))};F.prototype.visitDeclaratorItem=F.prototype.S;F.prototype.K=function(c){E(this,c.w);this.a+=" ";Na(this,c.A,",");this.a+=";";ib(this)};F.prototype.visitDeclarator=F.prototype.K;
-F.prototype.Ba=function(c){this.a+=Ma("",c.qualifier," ");this.a+=Ma("",c.precision," ");this.a+=c.name};F.prototype.visitType=F.prototype.Ba;F.prototype.X=function(c){E(this,c.N);this.a+=";";ib(this)};F.prototype.visitExpression=F.prototype.X;F.prototype.g=function(c){this.a+=c.type;c.value&&(this.a+=" ",E(this,c.value));this.a+=";";ib(this)};F.prototype.visitJump=F.prototype.g;F.prototype.xa=F.prototype.g;F.prototype.visitReturn=F.prototype.xa;F.prototype.W=F.prototype.g;
-F.prototype.visitBreak=F.prototype.W;F.prototype.T=F.prototype.g;F.prototype.visitDiscard=F.prototype.T;F.prototype.J=F.prototype.g;F.prototype.visitContinue=F.prototype.J;F.prototype.ra=function(c){this.a.slice(-1)==c.j.j&&(this.a+=" ");E(this,c.j);mb(this,c.N,c,0)};F.prototype.visitUnary=F.prototype.ra;F.prototype.ua=function(c){mb(this,c.N,c,0);E(this,c.j)};F.prototype.visitPostfix=F.prototype.ua;F.prototype.sa=function(c){this.a+=c.j};F.prototype.visitOperator=F.prototype.sa;
-F.prototype.Y=function(c){this.a+="."+c.selection};F.prototype.visitFieldSelector=F.prototype.Y;F.prototype.D=function(c){this.a+="[";E(this,c.index);this.a+="]"};F.prototype.visitAccessor=F.prototype.D;F.prototype.v=function(c){this.a+=c.I+"(";Na(this,c.l,",");this.a+=")"};F.prototype.visitFunctionCall=F.prototype.v;F.prototype.ea=function(c){this.a+=c.name};F.prototype.visitIdentifier=F.prototype.ea;
-function nb(c){function f(c){return c.toLowerCase().replace(/^0*|\+/g,"").replace(/(?:(\.[1-9]+)|\.)0*e/g,"$1e")}if(0==c)return"0.";var k=f(""+c);c=f(c.toExponential());-1==k.indexOf(".")&&-1==k.indexOf("e")&&(k+=".");return k.length<=c.length?k:c}F.prototype.Z=function(c){this.a+=nb(c.value)};F.prototype.visitFloat=F.prototype.Z;F.prototype.o=function(c){this.a+=c.value};F.prototype.visitValue=F.prototype.o;
-F.prototype.ga=function(c){var f=c.value;c=f.toString(10);f=(0>f?"-":"")+"0x"+Math.abs(f).toString(16).toLowerCase();this.a+=c.length<=f.length?c:f};F.prototype.visitInt=F.prototype.ga;F.prototype.P=F.prototype.o;F.prototype.visitBool=F.prototype.P;F.prototype.O=function(c){mb(this,c.left,c,0);E(this,c.j);mb(this,c.right,c,1)};F.prototype.visitBinary=F.prototype.O;F.prototype.Aa=function(c){mb(this,c.F,c,0);this.a+="?";mb(this,c.Ha,c,1);this.a+=":";mb(this,c.Ga,c,2)};F.prototype.visitTernary=F.prototype.Aa;
-function mb(c,f,k,n){var g=La["binary"==f.type?f.j.j:f.type];k=La["binary"==k.type?k.j.j:k.type];var u=!1;if(u=g.a>k.a?!0:g.a==k.a?0==k.c&&0==n||1==k.c&&n==k.f-1?!1:!0:!1)c.a+="(";E(c,f);u&&(c.a+=")")};function J(c,f){this.U=c||null;this.o=!!f;this.D={};this.h=[];this.a=[];this.v={};this.c=[]}v(J,Ia);ka("glslunit.VariableScopeVisitor",J);function Xb(c){var f={};ra(c.h.concat([c.a]),function(c){D(c,function(c){"declarator"==c.type?D(c.A,function(g){da(f[g.name.name])||(f[g.name.name]=c)},this):"parameter"==c.type&&(f[c.name]=c)},this)},c);return f}J.prototype.g=function(){this.h.push(this.a);this.a=[];[].push.apply(this.a,this.c);this.c=[]};J.prototype.beforeVisitScope=J.prototype.g;
-J.prototype.f=function(c){this.v[c.id]=this.a;c==this.U&&(this.D=Xb(this));this.a=this.h.pop()};J.prototype.afterVisitScope=J.prototype.f;J.prototype.K=J.prototype.g;J.prototype.beforeVisitRoot=J.prototype.K;J.prototype.O=function(c){this.o||this.f(c)};J.prototype.afterVisitPreprocessor=J.prototype.O;J.prototype.J=function(){this.o||this.g()};J.prototype.beforeVisitPreprocessor=J.prototype.J;J.prototype.P=J.prototype.f;J.prototype.afterVisitRoot=J.prototype.P;J.prototype.W=function(c){this.a.push(c)};
-J.prototype.beforeVisitDeclarator=J.prototype.W;J.prototype.T=function(c){this.c=c.l};J.prototype.beforeVisitFunctionDeclaration=J.prototype.T;J.prototype.S=function(){this.c=[]};J.prototype.afterVisitFunctionDeclaration=J.prototype.S;function Yb(c){var f=new J;E(f,c);return f.v}J.getScopeToDeclarationMap=Yb;function Zb(c,f){var k=new J(f,!0);E(k,c);return k.D};function $b(c){this.c=[];this.a=[];this.f=c}v($b,Ia);$b.prototype.g=function(c){this.f(c,this.a.slice(0,-1))&&this.c.push(c);Ja(this,c)};$b.prototype.i=function(){return ia(Array.prototype.push,this.a)};$b.prototype.u=function(){return ia(Array.prototype.pop,this.a)};$b.prototype.m=function(){return this.g};function ac(c,f){var k=new $b(f);E(k,c);return k.c};function K(){this.a={};this.a[bc]=[];this.c=bc}v(K,Ia);var bc="#";K.prototype.g=function(c){c.name in this.a||(this.a[c.name]=[]);this.c=c.name};K.prototype.beforeVisitFunctionDeclaration=K.prototype.g;K.prototype.f=function(){this.c=bc};K.prototype.afterVisitFunctionDeclaration=K.prototype.f;K.prototype.h=function(c){this.a[this.c].push(c.I);Ja(this,c)};K.prototype.visitFunctionCall=K.prototype.h;function Oc(c){c=ac(c,function(c,f){return"declarator"==c.type&&"struct_definition"==f.slice(-1)[0].type});var f=[];D(c,function(c){f[c.id]=!0});return f};function M(c){var f={},k;for(k in c)f[k]=c[k];return f};function N(){this.c=[]}var Pc=-1;function O(c){c=M(c);c.id=Pc--;return c}N.prototype.W=function(c){return this["transform"+ma(c.type)]};function Qc(c,f,k,n){var g=c[k+ma(f.type)];return ia(function(c){D(this.c,function(f){var g=n(f).apply(f,[c]);g&&g.apply(f,[c])});g&&g.apply(this,[c])},c)}N.prototype.P=function(c){return Qc(this,c,"beforeTransform",function(c){return c.i})};N.prototype.O=function(c){return Qc(this,c,"afterTransform",function(c){return c.u})};
-function P(c,f){var k=!1,n=c.P(f);n&&n.apply(c,[f]);var n=O(f),g;for(g in f){var u=f[g];if("array"==ea(u)){n[g]=[];for(var B=0;B<u.length;B++){var q=u[B],x=P(c,q);x!=q&&(k=!0);null!=x&&Array.prototype.push.apply(n[g],"array"==ea(x)?x:[x])}}else u&&u.type&&(x=P(c,u),x!=u&&(k=!0,null!=x?n[g]=x:delete n[g]))}g=c.W(f);n=k?n:f;g&&(n=g.apply(c,[n,f]));(k=c.O(f))&&k.apply(c,[f,n]);return n};function Rc(c,f,k,n,g){this.c=[];this.u=g;this.i=c;this.a=f;this.h=k;this.f=n}v(Rc,N);ka("glslunit.SpliceTransformer",Rc);Rc.prototype.g=function(c){if(c==this.i){c=O(c);if("array"==ea(c[this.a])){var f=this.u.map(O);c[this.a]=Ha(c[this.a]);[].splice.apply(c[this.a],[this.h,this.f].concat(f));return c}throw this.a+" wasn't an array.";}return c};Rc.prototype.W=function(){return this.g};function Sc(){this.s=this.a="";this.c=[]}Sc.prototype.clone=function(){var c=M(this);c.c=Ha(this.c);return c};function Tc(){this.f=this.s="";this.c=this.a=this.g=0}function Uc(){this.type=this.a=this.s=""}function R(){this.i=[];this.f=[];this.h={};this.L={};this.R={};this.g=[];this.a={};this.c={};this.u={}}
-R.prototype.clone=function(){var c=M(this);c.L=M(this.L);c.R=M(this.R);c.h=M(this.h);c.i=Ha(this.i);c.u=M(this.u);c.f=this.f.map(function(c){return M(c)});c.g=this.g.map(function(c){return c.clone()});return c};R.prototype.P=function(c){return I(this.c,c||"\\n",!1)};R.prototype.getVertexSource=R.prototype.P;R.prototype.o=function(c){return I(this.a,c||"\\n",!1)};R.prototype.getFragmentSource=R.prototype.o;R.prototype.v=function(c){return"".replace(/\n/g,c||"\\n").replace(/'/g,"\\'")};
-R.prototype.getOriginalFragmentSource=R.prototype.v;R.prototype.D=function(c){return"".replace(/\n/g,c||"\\n").replace(/'/g,"\\'")};R.prototype.getOriginalVertexSource=R.prototype.D;R.prototype.m=function(){var c=[],f;for(f in this.L)c.push(this.L[f]);0<c.length&&(c[c.length-1].last=!0);return c};R.prototype.getAttributes=R.prototype.m;R.prototype.O=function(){var c=[],f;for(f in this.R)c.push(this.R[f]);0<c.length&&(c[c.length-1].last=!0);return c};R.prototype.getUniforms=R.prototype.O;
-function Vc(c){D(c.f,function(c){""==c.s&&(c.s=c.a)});var f={},k;for(k in c.L){var n=c.L[k];f[n.s]=n}k={};for(var g in c.R)n=c.R[g],k[n.s]=n;Wc(c,c.c,f,k);Wc(c,c.a,f,k)}
-function Wc(c,f,k,n){f=ac(f,function(c){return"declarator"==c.type&&("attribute"==c.w.qualifier||"uniform"==c.w.qualifier)});D(f,function(c){D(c.A,function(f){f=f.name.name;var B=c.w.name;if("attribute"==c.w.qualifier){var q=k[f];if(!q){q=new Tc;q.s=f;q.f=f;var x=I(c),ha="".search(x),B=parseInt(B.slice(3,4),10);q.g=isNaN(B)?1:B;q.a=ha;q.c=x.length;this.L[f]=q}}else q=n[f],q||(q=new Uc,q.s=f,q.a=f,q.type=B,this.R[f]=q)},this)},c)};function T(){this.c=[];this.a=[]}v(T,N);var Xc={vec2:2,vec3:3,vec4:4,bvec2:2,bvec3:3,bvec4:4,ivec2:2,ivec3:3,ivec4:4,mat2:4,mat3:9,mat4:16,"float":1,"int":1,bool:1};T.prototype.P=function(){return ia(Array.prototype.push,this.a)};T.prototype.O=function(){return ia(Array.prototype.pop,this.a)};function Yc(c){c=c.a.slice(-2)[0];return"function_call"==c.type&&c.I in Xc}
-T.prototype.i=function(c){if(Yc(this)&&65536>Math.abs(c.value)&&c.value==Math.round(c.value)){var f=O(c);f.type="int";f.value=Number(c.value);return f}return c};T.prototype.o=T.prototype.i;T.prototype.transformFloat=T.prototype.o;T.prototype.m=T.prototype.i;T.prototype.transformBool=T.prototype.m;
-T.prototype.h=function(c){var f=Xc[c.I];if(f){if(Yc(this)&&c.l.length==f)return c.l;if(c.l&&1<c.l.length){var k=I(c.l[0]),n=!1;if("mat"==c.I.slice(0,3)){if(c.l.length==f){for(var f=!0,g=parseInt(c.I.slice(-1),10),u=0;u<g&&f;u++)for(var B=0;B<g&&f;B++)f=I(c.l[u*g+B])==(u==B?k:"0");f&&(n=!0)}}else sa(c.l,function(c){return I(c)==k})&&(n=!0);if(n)return n=O(c),n.l=[c.l[0]],n}}return c};T.prototype.transformFunctionCall=T.prototype.h;T.prototype.f=function(){return"ConstructorMinifier"};
-T.prototype.g=function(){return[]};T.prototype.u=function(c,f){var k=new T;f.c=P(new T,f.c);f.a=P(k,f.a);return[]};function U(){this.c=[]}v(U,N);function Zc(c,f){var k=c[f],n=c;k&&"scope"==k.type&&1==k.C.length&&(n=O(c),n[f]=k.C[0]);return n}U.prototype.h=function(c){c=Zc(c,"body");return Zc(c,"elseBody")};U.prototype.transformIfStatement=U.prototype.h;U.prototype.m=function(c){return Zc(c,"body")};U.prototype.transformWhileStatement=U.prototype.m;U.prototype.a=function(c){return Zc(c,"body")};U.prototype.transformDoStatement=U.prototype.a;U.prototype.i=function(c){return Zc(c,"body")};
-U.prototype.transformForStatement=U.prototype.i;U.prototype.f=function(){return"BraceReducer"};U.prototype.g=function(){return[]};U.prototype.u=function(c,f){var k=new U;f.c=P(new U,f.c);f.a=P(k,f.a);return[]};function V(){this.c=[];this.a={}}v(V,N);V.prototype.h=function(c){var f=new K;E(f,c);c=f.a;this.a={};for(var k in c)this.a[k]=!1;$c(this,"main",c);$c(this,bc,c)};V.prototype.beforeTransformRoot=V.prototype.h;function $c(c,f,k){f in c.a&&!c.a[f]&&(c.a[f]=!0,D(k[f],function(c){$c(this,c,k)},c))}V.prototype.i=function(c){return this.a[c.name]?c:null};V.prototype.transformFunctionDeclaration=V.prototype.i;V.prototype.m=V.prototype.i;V.prototype.transformFunctionPrototype=V.prototype.m;V.prototype.f=function(){return"DeadFunctionRemover"};
-V.prototype.g=function(){return[]};V.prototype.u=function(c,f){var k=new V;f.c=P(new V,f.c);f.a=P(k,f.a);return[]};function W(c){this.c=[];this.J={};this.h=null;this.a=[];this.o=[];this.v=[];this.i=c}v(W,N);W.prototype.X=function(c){var f=ac(c,function(c){return"for_statement"==c.type});D(f,function(c){this.o[c.H.id]=!0},this);this.v=Oc(c);var f=Yb(c),k;for(k in f){var n={};D(f[+k],function(f){if("declarator"==f.type&&ad(this,f,k==c.id)){var u=I(f.w);n[u]||(n[u]=[]);D(f.A,function(c){var f=c;f.H&&(f=O(c),delete f.H);n[u].push(f)},this)}},this);this.J[+k]=n}this.m(c)};W.prototype.beforeTransformRoot=W.prototype.X;
-W.prototype.U=function(c){this.h=c};W.prototype.beforeTransformDeclarator=W.prototype.U;W.prototype.T=function(){this.h=null};W.prototype.afterTransformDeclarator=W.prototype.T;W.prototype.m=function(c){this.a.push(this.J[c.id])};W.prototype.beforeTransformScope=W.prototype.m;W.prototype.S=W.prototype.m;W.prototype.beforeTransformPreprocessor=W.prototype.S;W.prototype.D=function(){this.a.pop()};W.prototype.afterTransformScope=W.prototype.D;W.prototype.K=W.prototype.D;
-W.prototype.afterTransformPreprocessor=W.prototype.K;function ad(c,f,k){var n=I(f.w),g=null;0<c.a.length&&(g=c.a.slice(-1)[0][n]);return null!=f&&(c.i||"attribute"!=f.w.qualifier)&&"const"!=f.w.qualifier&&(!g||1<g.length)&&!(f.id in c.o)&&!(f.id in c.v)&&!(k&&!sa(f.A,function(c){return!da(c.H)}))}W.prototype.Z=function(c){return ad(this,this.h,1==this.a.length)?c.H?{id:Pc--,type:"expression",N:{id:Pc--,type:"binary",j:{id:Pc--,type:"operator",j:"="},left:c.name,right:c.H}}:null:c};
-W.prototype.transformDeclaratorItem=W.prototype.Z;W.prototype.Y=function(c){if(!ad(this,c,1==this.a.length))return c;var f=[],k=I(c.w),n=this.a.slice(-1)[0],g=n[k];g&&(f=O(c),f.A=g,f=[f],delete n[k]);c.A&&0!=c.A.length&&Array.prototype.push.apply(f,c.A);return f};W.prototype.transformDeclarator=W.prototype.Y;W.prototype.f=function(){return"DeclarationConsolidation"};W.prototype.g=function(){return[]};W.prototype.u=function(c,f){var k=new W(this.i);f.c=P(new W(this.i),f.c);f.a=P(k,f.a);return[]};function bd(c){this.a={};this.i=c;this.f={};this.c={};D(cd,function(c){this.a[c]=[]},this)}var cd=[0,1];function dd(c,f){c.c[f.f()]=f;c.a[1].push(f)}function ed(c){D(cd,function(c){D(this.a[c],function(c){fd(this,c,[])},this)},c);return c.i}function fd(c,f,k){var n=f.f(),g=k.concat(n);if(-1!=k.indexOf(n))throw"Circular dependcy in compiler steps.  "+g.join("->");n in c.f||(D(f.g(),function(c){c in this.c&&fd(this,this.c[c],g)},c),c.f[n]=f.u(c.f,c.i))};function gd(){this.c={};this.g={};this.f=this.a=0}function hd(c){var f="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[c%52];for(c=Math.floor(c/52);0<c;)--c,f+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"[c%62],c=Math.floor(c/62);return f}function id(c){return"_"+hd(c)}function jd(c,f){if(c.c[f])return c.c[f];for(var k=null;!k||k in c.g;)k=hd(c.a++);c.g[k]=!0;return c.c[f]=k}function kd(c,f){return c.c[f]||f}
-gd.prototype.clone=function(){var c=new gd;c.c=M(this.c);c.g=M(this.g);c.a=this.a;c.f=this.f;return c};function Y(c){this.c=[];this.K=[];this.a=new gd;this.h=null;this.m=0;this.D=c;this.J=[]}v(Y,N);function ld(c,f){if(!f)return!1;var k=f.w.qualifier;return(c.D||"uniform"!=k&&"attribute"!=k)&&!(f.id in c.J)}Y.prototype.ea=function(c){this.J=Oc(c);var f=[];c=Zb(c,c);for(var k in c){var n=c[k];ld(this,n)&&(n=n.w.qualifier,"varying"==n||"uniform"==n?jd(this.a,k):f.push(k))}this.v();D(f,function(c){jd(this.a,c)},this)};Y.prototype.beforeTransformRoot=Y.prototype.ea;Y.prototype.ba=function(c){this.h=c};
-Y.prototype.beforeTransformDeclarator=Y.prototype.ba;Y.prototype.Y=function(){this.h=null};Y.prototype.afterTransformDeclarator=Y.prototype.Y;Y.prototype.ha=function(c){var f=O(c);f.name=jd(this.a,c.name);return f};Y.prototype.transformParameter=Y.prototype.ha;Y.prototype.v=function(){this.K.push(this.a);this.a=this.a.clone()};Y.prototype.o=function(){this.m=Math.max(this.m,this.a.a);this.a=this.K.pop()};Y.prototype.fa=Y.prototype.v;Y.prototype.beforeTransformScope=Y.prototype.fa;Y.prototype.Z=Y.prototype.o;
-Y.prototype.afterTransformScope=Y.prototype.Z;Y.prototype.U=Y.prototype.o;Y.prototype.afterTransformRoot=Y.prototype.U;Y.prototype.ca=Y.prototype.v;Y.prototype.beforeTransformFunctionDeclaration=Y.prototype.ca;Y.prototype.S=Y.prototype.o;Y.prototype.afterTransformFunctionDeclaration=Y.prototype.S;Y.prototype.da=Y.prototype.v;Y.prototype.beforeTransformFunctionPrototype=Y.prototype.da;Y.prototype.T=Y.prototype.o;Y.prototype.afterTransformFunctionPrototype=Y.prototype.T;
-Y.prototype.X=function(c){var f=c.name.name,k;this.h&&(k=this.h.w.qualifier);ld(this,this.h)&&(f=jd(this.a,c.name.name));this.i&&this.h&&("attribute"==k?this.i.L[c.name.name].s=f:"uniform"==k&&(this.i.R[c.name.name].s=f));return c};Y.prototype.beforeTransformDeclaratorItem=Y.prototype.X;Y.prototype.ga=function(c){var f=kd(this.a,c.name);c.name!=f&&(c=O(c),c.name=f);return c};Y.prototype.transformIdentifier=Y.prototype.ga;Y.prototype.f=function(){return"VariableMinifier"};Y.prototype.g=function(){return[]};
-Y.prototype.u=function(c,f){var k=new Y(this.D);k.i=f;f.c=P(k,f.c);var n=new Y(this.D);n.i=f;n.a=k.a;f.a=P(n,f.a);return{vertexMaxId:k.m,fragmentMaxId:n.m}};function Z(){this.c=[];this.a=new gd}v(Z,N);var md={main:!0};Z.prototype.i=function(c){c.name in md||jd(this.a,c.name)};Z.prototype.beforeTransformFunctionDeclaration=Z.prototype.i;Z.prototype.h=function(c){var f=kd(this.a,c.name);f!=c.name&&(c=O(c),c.name=f);return c};Z.prototype.transformFunctionDeclaration=Z.prototype.h;Z.prototype.o=function(c){var f=kd(this.a,c.I);f!=c.I&&(c=O(c),c.I=f);return c};Z.prototype.transformFunctionCall=Z.prototype.o;Z.prototype.m=Z.prototype.i;
-Z.prototype.beforeTransformFunctionPrototype=Z.prototype.m;Z.prototype.v=Z.prototype.h;Z.prototype.transformFunctionPrototype=Z.prototype.v;Z.prototype.f=function(){return"Function Minifier"};Z.prototype.g=function(){return["VariableMinifier"]};Z.prototype.u=function(c,f){var k=0,n=0;"VariableMinifier"in c&&(k=c.VariableMinifier.vertexMaxId,n=c.VariableMinifier.fragmentMaxId);var g=new Z;g.a.a=k;k=new Z;f.c=P(g,f.c);k.a.a=n;f.a=P(k,f.a);return[]};function od(c,f,k,n){this.c=c;this.a=f;this.i=k;this.h=n}function pd(c){this.c=[];this.f=!1;this.g=c;this.a=!0}v(pd,N);function qd(c,f){c.a&&(c.a=0==ac(f,ia(function(c,f){if("function_call"==c.type||"operator"==c.type||"int"==c.type||"binary"==c.type||"unary"==c.type)return!1;if("identifier"==c.type){var g=this.g[c.name];if(g=da(g)&&g.a)this.f=!0;return!(g||0<f.length&&"function_call"==f.slice(-1)[0].type)}return!0},c)).length)}
-function rd(c,f){var k=z(c,"condition"),n=new pd(f),k=P(n,k),g="";n.a&&(g=sd(I(k),f),k=z(g,"condition"),qd(n,k));g={ja:n.a,G:n.f,value:0,na:g};if(n.a&&!n.f)try{g.value=Number(eval(I(k)))}catch(u){g.ja=!1}return g}var td=/([\.=;,\(\)\[\]{}\+\-:?!\|&<>\/\*]|[ \t\n]+)/g,ud=/[A-Za-z_][A-Za-z_0-9]*/g;function vd(c,f){this.name=c.identifier;this.arguments=c.l?c.l.map(function(c){return c.name}):null;this.c=c.pa.split(td).filter(function(c){return 0<c.length});this.a=f||null}
-function wd(c,f,k){if(c in k)return c;var n=f[c],g=c;if(da(n))if(n.a)g=n.a.s||n.name;else if(!n.arguments){var u=M(k);u[c]=!0;g=n.c.map(function(c){return wd(c,f,u)}).join("")}return g}
-function xd(c,f,k,n){for(var g in c){var u=f[c[g]];if(da(u)&&u.arguments){var B=c.slice(g).join(""),B=z(B,"macro_call_line");if(B.aa&&B.aa.l.length==u.arguments.length&&!(B.aa.oa.name in n)){var q=B.aa,x=M(n);x[B.aa.oa.name]=!0;var q=q.l.map(function(c){return sd(I(c),f,k,x)}),ha={},C;for(C in u.arguments)ha[u.arguments[C]]=q[C];u=sd(u.c.join(""),f,ha,x);B=sd(B.Ja,f,k,n);return sd(c.slice(0,g).join("")+u+B,f,k,n)}}}return c.join("")}
-function sd(c,f,k,n){k=k||{};n=n||{};var g=M(f),u;for(u in k)g[u]=new vd(z("#define "+u+" "+k[u],"preprocessor_define"));c=c.split(td).filter(function(c){return 0<c.length}).map(function(c){return wd(c,g,{})});return xd(c,f,k,n)}function yd(c,f,k){this.status=c;this.V=f;this.G=k}
-function zd(c,f,k){var n={};D(f,function(c){var f=z("#define "+c.a,"preprocessor_define");n[c.a]=new vd(f,c);c.s&&(f=z("#define "+c.s,"preprocessor_define"),n[c.s]=new vd(f,c))});c=I(c);var g=[new yd(1,!0,!1)],u=0,B=[];D(c.split(/\n/g),function(c){var f=g.slice(-1)[0],k=0==f.status;if(0!=c.search("#define")||k)if(0!=c.search("#undef")||k)if(0==c.search("#if")){f=c;c=z(f,"preprocessor_if");if(k)g.push(new yd(0,!1,!1)),f=!1;else{var C=!1,A=!1;if("#ifdef"==c.B||"#ifndef"==c.B){var H=c.value.match(ud)[0];
-if(!da(H))throw"Invalid "+c.B+": "+f;H=n[H];da(H)&&H.a?(C=!0,f=c.B+" "+(H.a.s||H.name)):A=da(H)==("#ifndef"==c.B)}else{A=rd(c.value,n);if(!A.ja)throw"Invalid "+c.B+": "+f;f="#if "+A.na;C=A.G;A=0==A.value}C?g.push(new yd(2,!1,!0)):g.push(new yd(A?0:1,!A,!1));C&&B.push(f);f=C}u+=f&&!k}else if(0==c.search("#else"))k=!1,0!=g.slice(-2,-1)[0].status&&(f.G&&!f.V?(k=!0,C=1,A=f.V,f=!0):0!=f.status||f.V?(C=0,A=!0,f=f.G):(C=1,A=!0,f=!1),g[g.length-1]=new yd(C,A,f)),k&&B.push(c);else if(0==c.search("#elif")){k=
-c;c=!1;if(0!=g.slice(-2,-1)[0].status){A=z(k,"preprocessor_else_if");C=rd(A.value,n);if(!C.ja)throw"Invalid "+A.B+": "+k;k="#elif "+C.na;A=0==C.value;f.G&&!f.V?(f=!0,C.G?(C=2,A=!1):A?(C=0,A=!1):(k="#else",C=1,A=!0)):f.V?(C=0,A=f.V,f=f.G):C.G?(k=k.replace(/^#elif/,"#if"),C=2,A=!1,c=f=!0):(C=A?0:1,A=!A,f=f.G);g[g.length-1]=new yd(C,A,f);f&&0!=C&&B.push(k)}u+=c}else 0==c.search("#endif")?(g.pop(),f.G&&(u--,B.push(c))):k||(f=sd(c,n),B.push(f));else{if(0<u)throw"Definitions can not be changed inside of Modes: "+
-c;f=z(c,"preprocessor_operator");delete n[f.value]}else{if(0<u)throw"Definitions can not be changed inside of Modes: "+c;f=z(c,"preprocessor_define");f=new vd(f);n[f.name]=f}});return z(B.join("\n"),k)}od.prototype.f=function(){return"Preprocessor"};od.prototype.g=function(){return["VariableMinifier"]};function Ad(c,f){var k="statements";for(k in c)if(c[k]===c.C)break;return P(new Rc(c,k,0,0,f.C),c)}
-od.prototype.u=function(c,f){var k=this.a,n=new gd;if(this.h)for(var g in f.g){var u=id(n.f++);f.g[g].s=u}if(this.i)for(g in f.f)u=id(n.f++),k.push(f.f[g].a+" "+u),f.f[g].s=u;n=this.c.map(function(c){var f=new Sc;f.a=c;return f}).concat(f.g);k=z(k.map(function(c){return"#define "+c}).join("\n"));f.c=zd(Ad(f.c,k),n,"vertex_start");f.a=zd(Ad(f.a,k),n,"fragment_start");return[]};var Bd={};ka("glslprep.SyntaxError",la.SyntaxError);ka("glslprep.Shader",Bd);Bd.VERTEX=0;Bd.FRAGMENT=1;ka("glslprep.parseGlsl",function(c,f){return z(c,0===f?"vertex_start":"fragment_start")});
-ka("glslprep.minifyGlsl",function(c,f){var k=new R;k.c=z(c[0],"vertex_start");k.a=z(c[1],"fragment_start");Vc(k);k=new bd(k);if(null!=f){var n=["GL_ES 1"],g=[],u;for(u in f){var B=f[u];null!=B?n.push(u+" "+B):g.push(u)}dd(k,new od(g,n,!1,!1))}dd(k,new V);dd(k,new W(!0));dd(k,new Y(!1));dd(k,new Z);dd(k,new U);dd(k,new T);k=ed(k);c[0]=I(k.c);c[1]=I(k.a);return c});})();
-

+ 4 - 1
editor/sw.js

@@ -25,6 +25,10 @@ const assets = [
 	'../examples/js/libs/draco/gltf/draco_decoder.wasm',
 	'../examples/js/libs/draco/gltf/draco_wasm_wrapper.js',
 
+	'../examples/jsm/libs/rhino3dm/rhino3dm.wasm',
+	'../examples/jsm/libs/rhino3dm/rhino3dm.js',
+
+	'../examples/jsm/loaders/3DMLoader.js',
 	'../examples/jsm/loaders/3MFLoader.js',
 	'../examples/jsm/loaders/AMFLoader.js',
 	'../examples/jsm/loaders/ColladaLoader.js',
@@ -73,7 +77,6 @@ const assets = [
 
 	'./js/libs/esprima.js',
 	'./js/libs/jsonlint.js',
-	'./js/libs/glslprep.min.js',
 
 	'./js/libs/codemirror/addon/dialog.css',
 	'./js/libs/codemirror/addon/show-hint.css',

+ 21 - 1
examples/css3d_orthographic.html

@@ -31,12 +31,13 @@
 
 			var scene2, renderer2;
 
+			var frustumSize = 500;
+
 			init();
 			animate();
 
 			function init() {
 
-				var frustumSize = 500;
 				var aspect = window.innerWidth / window.innerHeight;
 				camera = new THREE.OrthographicCamera( frustumSize * aspect / - 2, frustumSize * aspect / 2, frustumSize / 2, frustumSize / - 2, 1, 1000 );
 
@@ -116,6 +117,25 @@
 
 				}
 
+				window.addEventListener( 'resize', onWindowResize, false );
+
+			}
+
+			function onWindowResize() {
+
+				var aspect = window.innerWidth / window.innerHeight;
+
+				camera.left = - frustumSize * aspect / 2;
+				camera.right = frustumSize * aspect / 2;
+				camera.top = frustumSize / 2;
+				camera.bottom = - frustumSize / 2;
+
+				camera.updateProjectionMatrix();
+
+				renderer.setSize( window.innerWidth, window.innerHeight );
+
+				renderer2.setSize( window.innerWidth, window.innerHeight );
+
 			}
 
 			function animate() {

+ 14 - 0
examples/css3d_sandbox.html

@@ -89,6 +89,20 @@
 
 				controls = new TrackballControls( camera, renderer2.domElement );
 
+				window.addEventListener( 'resize', onWindowResize, false );
+
+			}
+
+			function onWindowResize() {
+
+				camera.aspect = window.innerWidth / window.innerHeight;
+
+				camera.updateProjectionMatrix();
+
+				renderer.setSize( window.innerWidth, window.innerHeight );
+
+				renderer2.setSize( window.innerWidth, window.innerHeight );
+
 			}
 
 			function animate() {

+ 5 - 3
examples/files.js

@@ -76,6 +76,7 @@ var files = {
 		"webgl_lines_fat",
 		"webgl_lines_fat_wireframe",
 		"webgl_lines_sphere",
+		"webgl_loader_3dm",
 		"webgl_loader_3ds",
 		"webgl_loader_3mf",
 		"webgl_loader_3mf_materials",
@@ -278,6 +279,7 @@ var files = {
 		"webgl_buffergeometry_constructed_from_geometry",
 		"webgl_buffergeometry_custom_attributes_particles",
 		"webgl_buffergeometry_drawrange",
+		"webgl_buffergeometry_glbufferattribute",
 		"webgl_buffergeometry_indexed",
 		"webgl_buffergeometry_instancing",
 		"webgl_buffergeometry_instancing_billboards",
@@ -346,10 +348,10 @@ var files = {
 	"physics": [
 		"physics_ammo_break",
 		"physics_ammo_cloth",
+		"physics_ammo_instancing",
 		"physics_ammo_rope",
 		"physics_ammo_terrain",
-		"physics_ammo_volume",
-		"physics_cannon_instancing"
+		"physics_ammo_volume"
 	],
 	"misc": [
 		"misc_animation_authoring",
@@ -437,7 +439,7 @@ var tags = {
 	"webgl_materials_envmaps_parallax": [ "onBeforeCompile" ],
 	"webgl_materials_lightmap": [ "shadows" ],
 	"webgl_materials_physical_clearcoat": [ "anisotropy" ],
-	"webgl_materials_physical_transparency": [ "alpha" ],
+	"webgl_materials_physical_transmission": [ "alpha" ],
 	"webgl_materials_shaders_fresnel": [ "refraction" ],
 	"webgl_materials_standard": [ "pbr" ],
 	"webgl_materials_texture_canvas": [ "paint" ],

+ 2 - 1
examples/index.html

@@ -231,6 +231,7 @@
 		function updateFilter() {
 
 			var v = filterInput.value.trim();
+			v = v.replace( /\s+/gi, ' ' ); // replace multiple whitespaces with a single one
 
 			if ( v !== '' ) {
 
@@ -340,7 +341,7 @@
 
 			if ( p !== - 1 ) {
 
-				return window.location.search.substr( 3 );
+				return decodeURI( window.location.search.substr( 3 ) );
 
 			}
 

+ 3 - 3
examples/js/animation/TimelinerController.js

@@ -82,7 +82,7 @@ THREE.TimelinerController.prototype = {
 
 		var track = this._tracks[ channelName ],
 			times = track.times,
-			index = Timeliner.binarySearch( times, time ),
+			index = Timeliner.binarySearch( times, time ), // eslint-disable-line no-undef
 			values = track.values,
 			stride = track.getValueSize(),
 			offset = index * stride;
@@ -120,7 +120,7 @@ THREE.TimelinerController.prototype = {
 
 		var track = this._tracks[ channelName ],
 			times = track.times,
-			index = Timeliner.binarySearch( times, time );
+			index = Timeliner.binarySearch( times, time ); // eslint-disable-line no-undef
 
 		// we disallow to remove the keyframe when it is the last one we have,
 		// since the animation system is designed to always produce a defined
@@ -159,7 +159,7 @@ THREE.TimelinerController.prototype = {
 
 		var track = this._tracks[ channelName ],
 			times = track.times,
-			index = Timeliner.binarySearch( times, time );
+			index = Timeliner.binarySearch( times, time ); // eslint-disable-line no-undef
 
 		if ( index >= 0 ) {
 

+ 2 - 2
examples/js/exporters/ColladaExporter.js

@@ -100,8 +100,8 @@ THREE.ColladaExporter.prototype = {
 			canvas = canvas || document.createElement( 'canvas' );
 			ctx = ctx || canvas.getContext( '2d' );
 
-			canvas.width = image.naturalWidth;
-			canvas.height = image.naturalHeight;
+			canvas.width = image.width;
+			canvas.height = image.height;
 
 			ctx.drawImage( image, 0, 0 );
 

+ 1 - 1
examples/js/exporters/MMDExporter.js

@@ -13,7 +13,7 @@ THREE.MMDExporter = function () {
 
 		if ( u2sTable === undefined ) {
 
-			var encoder = new MMDParser.CharsetEncoder();
+			var encoder = new MMDParser.CharsetEncoder(); // eslint-disable-line no-undef
 			var table = encoder.s2uTable;
 			u2sTable = {};
 

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 23
examples/js/libs/ammo.js


+ 822 - 0
examples/js/libs/ammo.wasm.js

@@ -0,0 +1,822 @@
+
+// This is ammo.js, a port of Bullet Physics to JavaScript. zlib licensed.
+
+var Ammo = (function() {
+  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
+  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
+  return (
+function(Ammo) {
+  Ammo = Ammo || {};
+
+
+var b;b||(b=typeof Ammo !== 'undefined' ? Ammo : {});var ba;b.ready=new Promise(function(a){ba=a});var ca={},da;for(da in b)b.hasOwnProperty(da)&&(ca[da]=b[da]);var ea=!1,fa=!1,ha=!1,ia=!1;ea="object"===typeof window;fa="function"===typeof importScripts;ha="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;ia=!ea&&!ha&&!fa;var ja="",ka,la,ma,na;
+if(ha)ja=fa?require("path").dirname(ja)+"/":__dirname+"/",ka=function(a,c){ma||(ma=require("fs"));na||(na=require("path"));a=na.normalize(a);return ma.readFileSync(a,c?null:"utf8")},la=function(a){a=ka(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",function(a){throw a;}),process.on("unhandledRejection",oa),b.inspect=function(){return"[Emscripten Module object]"};else if(ia)"undefined"!=
+typeof read&&(ka=function(a){return read(a)}),la=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");assert("object"===typeof a);return a},"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(ea||fa)fa?ja=self.location.href:document.currentScript&&(ja=document.currentScript.src),_scriptDir&&(ja=_scriptDir),ja=0!==ja.indexOf("blob:")?
+ja.substr(0,ja.lastIndexOf("/")+1):"",ka=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);return c.responseText},fa&&(la=function(a){var c=new XMLHttpRequest;c.open("GET",a,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)});var pa=b.print||console.log.bind(console),qa=b.printErr||console.warn.bind(console);for(da in ca)ca.hasOwnProperty(da)&&(b[da]=ca[da]);ca=null;var ra;b.wasmBinary&&(ra=b.wasmBinary);var noExitRuntime;
+b.noExitRuntime&&(noExitRuntime=b.noExitRuntime);"object"!==typeof WebAssembly&&qa("no native wasm support detected");var sa,ua=new WebAssembly.Table({initial:930,maximum:930,element:"anyfunc"}),va=!1;function assert(a,c){a||oa("Assertion failed: "+c)}var wa="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0,xa,ya,za,Aa,Ba,Ca,Da=b.INITIAL_MEMORY||67108864;if(sa=b.wasmMemory?b.wasmMemory:new WebAssembly.Memory({initial:Da/65536,maximum:Da/65536}))xa=sa.buffer;Da=xa.byteLength;var Ea=xa;
+xa=Ea;b.HEAP8=ya=new Int8Array(Ea);b.HEAP16=new Int16Array(Ea);b.HEAP32=Aa=new Int32Array(Ea);b.HEAPU8=za=new Uint8Array(Ea);b.HEAPU16=new Uint16Array(Ea);b.HEAPU32=new Uint32Array(Ea);b.HEAPF32=Ba=new Float32Array(Ea);b.HEAPF64=Ca=new Float64Array(Ea);Aa[7848]=5274432;function Fa(a){for(;0<a.length;){var c=a.shift();if("function"==typeof c)c(b);else{var d=c.Xy;"number"===typeof d?void 0===c.Ey?b.dynCall_v(d):b.dynCall_vi(d,c.Ey):d(void 0===c.Ey?null:c.Ey)}}}var Ga=[],Ha=[],Ia=[],Ja=[],Ka=!1;
+function La(){var a=b.preRun.shift();Ga.unshift(a)}var Ma=0,Na=null,Oa=null;b.preloadedImages={};b.preloadedAudios={};function oa(a){if(b.onAbort)b.onAbort(a);a+="";pa(a);qa(a);va=!0;throw new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");}function Pa(a){var c=Qa;return String.prototype.startsWith?c.startsWith(a):0===c.indexOf(a)}function Ra(){return Pa("data:application/octet-stream;base64,")}var Qa="ammo.wasm.wasm";
+if(!Ra()){var Sa=Qa;Qa=b.locateFile?b.locateFile(Sa,ja):ja+Sa}function Ta(){try{if(ra)return new Uint8Array(ra);if(la)return la(Qa);throw"both async and sync fetching of the wasm failed";}catch(a){oa(a)}}function Ua(){return ra||!ea&&!fa||"function"!==typeof fetch||Pa("file://")?new Promise(function(a){a(Ta())}):fetch(Qa,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+Qa+"'";return a.arrayBuffer()}).catch(function(){return Ta()})}
+var Va={1960:function(a,c,d,e,g,n,F,aa){a=b.getCache(b.ConcreteContactResultCallback)[a];if(!a.hasOwnProperty("addSingleResult"))throw"a JSImplementation must implement all functions, you forgot ConcreteContactResultCallback::addSingleResult.";return a.addSingleResult(c,d,e,g,n,F,aa)},2520:function(a,c,d,e){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty("drawLine"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::drawLine.";a.drawLine(c,d,e)},2745:function(a,c,d,
+e,g,n){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty("drawContactPoint"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::drawContactPoint.";a.drawContactPoint(c,d,e,g,n)},3002:function(a,c){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty("reportErrorWarning"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::reportErrorWarning.";a.reportErrorWarning(c)},3249:function(a,c,d){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty("draw3dText"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::draw3dText.";
+a.draw3dText(c,d)},3476:function(a,c){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty("setDebugMode"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::setDebugMode.";a.setDebugMode(c)},3705:function(a){a=b.getCache(b.DebugDrawer)[a];if(!a.hasOwnProperty("getDebugMode"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::getDebugMode.";return a.getDebugMode()}};Ha.push({Xy:function(){Wa()}});var Xa=[];
+function Ya(a,c){Xa.length=0;var d;for(c>>=2;d=za[a++];)Xa.push(105>d?Ca[++c>>1]:Aa[c]),++c;return Xa}var Za={f:function(){oa()},c:function(a,c,d){c=Ya(c,d);return Va[a].apply(null,c)},a:function(a,c,d){c=Ya(c,d);return Va[a].apply(null,c)},d:function(a,c,d){za.copyWithin(a,c,c+d)},e:function(){oa("OOM")},b:function(a){var c=Date.now();Aa[a>>2]=c/1E3|0;Aa[a+4>>2]=c%1E3*1E3|0;return 0},memory:sa,table:ua};
+(function(){function a(g){b.asm=g.exports;Ma--;b.monitorRunDependencies&&b.monitorRunDependencies(Ma);0==Ma&&(null!==Na&&(clearInterval(Na),Na=null),Oa&&(g=Oa,Oa=null,g()))}function c(g){a(g.instance)}function d(g){return Ua().then(function(n){return WebAssembly.instantiate(n,e)}).then(g,function(n){qa("failed to asynchronously prepare wasm: "+n);oa(n)})}var e={a:Za};Ma++;b.monitorRunDependencies&&b.monitorRunDependencies(Ma);if(b.instantiateWasm)try{return b.instantiateWasm(e,a)}catch(g){return qa("Module.instantiateWasm callback failed with error: "+
+g),!1}(function(){if(ra||"function"!==typeof WebAssembly.instantiateStreaming||Ra()||Pa("file://")||"function"!==typeof fetch)return d(c);fetch(Qa,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,e).then(c,function(n){qa("wasm streaming compile failed: "+n);qa("falling back to ArrayBuffer instantiation");return d(c)})})})();return{}})();var Wa=b.___wasm_call_ctors=function(){return(Wa=b.___wasm_call_ctors=b.asm.g).apply(null,arguments)};
+b.___em_js__array_bounds_check_error=function(){return(b.___em_js__array_bounds_check_error=b.asm.h).apply(null,arguments)};
+var $a=b._emscripten_bind_btCollisionWorld_getDispatcher_0=function(){return($a=b._emscripten_bind_btCollisionWorld_getDispatcher_0=b.asm.i).apply(null,arguments)},ab=b._emscripten_bind_btCollisionWorld_rayTest_3=function(){return(ab=b._emscripten_bind_btCollisionWorld_rayTest_3=b.asm.j).apply(null,arguments)},bb=b._emscripten_bind_btCollisionWorld_getPairCache_0=function(){return(bb=b._emscripten_bind_btCollisionWorld_getPairCache_0=b.asm.k).apply(null,arguments)},cb=b._emscripten_bind_btCollisionWorld_getDispatchInfo_0=
+function(){return(cb=b._emscripten_bind_btCollisionWorld_getDispatchInfo_0=b.asm.l).apply(null,arguments)},db=b._emscripten_bind_btCollisionWorld_addCollisionObject_1=function(){return(db=b._emscripten_bind_btCollisionWorld_addCollisionObject_1=b.asm.m).apply(null,arguments)},eb=b._emscripten_bind_btCollisionWorld_addCollisionObject_2=function(){return(eb=b._emscripten_bind_btCollisionWorld_addCollisionObject_2=b.asm.n).apply(null,arguments)},fb=b._emscripten_bind_btCollisionWorld_addCollisionObject_3=
+function(){return(fb=b._emscripten_bind_btCollisionWorld_addCollisionObject_3=b.asm.o).apply(null,arguments)},gb=b._emscripten_bind_btCollisionWorld_removeCollisionObject_1=function(){return(gb=b._emscripten_bind_btCollisionWorld_removeCollisionObject_1=b.asm.p).apply(null,arguments)},hb=b._emscripten_bind_btCollisionWorld_getBroadphase_0=function(){return(hb=b._emscripten_bind_btCollisionWorld_getBroadphase_0=b.asm.q).apply(null,arguments)},ib=b._emscripten_bind_btCollisionWorld_convexSweepTest_5=
+function(){return(ib=b._emscripten_bind_btCollisionWorld_convexSweepTest_5=b.asm.r).apply(null,arguments)},jb=b._emscripten_bind_btCollisionWorld_contactPairTest_3=function(){return(jb=b._emscripten_bind_btCollisionWorld_contactPairTest_3=b.asm.s).apply(null,arguments)},kb=b._emscripten_bind_btCollisionWorld_contactTest_2=function(){return(kb=b._emscripten_bind_btCollisionWorld_contactTest_2=b.asm.t).apply(null,arguments)},lb=b._emscripten_bind_btCollisionWorld_updateSingleAabb_1=function(){return(lb=
+b._emscripten_bind_btCollisionWorld_updateSingleAabb_1=b.asm.u).apply(null,arguments)},mb=b._emscripten_bind_btCollisionWorld_setDebugDrawer_1=function(){return(mb=b._emscripten_bind_btCollisionWorld_setDebugDrawer_1=b.asm.v).apply(null,arguments)},nb=b._emscripten_bind_btCollisionWorld_getDebugDrawer_0=function(){return(nb=b._emscripten_bind_btCollisionWorld_getDebugDrawer_0=b.asm.w).apply(null,arguments)},ob=b._emscripten_bind_btCollisionWorld_debugDrawWorld_0=function(){return(ob=b._emscripten_bind_btCollisionWorld_debugDrawWorld_0=
+b.asm.x).apply(null,arguments)},pb=b._emscripten_bind_btCollisionWorld_debugDrawObject_3=function(){return(pb=b._emscripten_bind_btCollisionWorld_debugDrawObject_3=b.asm.y).apply(null,arguments)},qb=b._emscripten_bind_btCollisionWorld___destroy___0=function(){return(qb=b._emscripten_bind_btCollisionWorld___destroy___0=b.asm.z).apply(null,arguments)},rb=b._emscripten_bind_btCollisionShape_setLocalScaling_1=function(){return(rb=b._emscripten_bind_btCollisionShape_setLocalScaling_1=b.asm.A).apply(null,
+arguments)},sb=b._emscripten_bind_btCollisionShape_getLocalScaling_0=function(){return(sb=b._emscripten_bind_btCollisionShape_getLocalScaling_0=b.asm.B).apply(null,arguments)},tb=b._emscripten_bind_btCollisionShape_calculateLocalInertia_2=function(){return(tb=b._emscripten_bind_btCollisionShape_calculateLocalInertia_2=b.asm.C).apply(null,arguments)},ub=b._emscripten_bind_btCollisionShape_setMargin_1=function(){return(ub=b._emscripten_bind_btCollisionShape_setMargin_1=b.asm.D).apply(null,arguments)},
+vb=b._emscripten_bind_btCollisionShape_getMargin_0=function(){return(vb=b._emscripten_bind_btCollisionShape_getMargin_0=b.asm.E).apply(null,arguments)},wb=b._emscripten_bind_btCollisionShape___destroy___0=function(){return(wb=b._emscripten_bind_btCollisionShape___destroy___0=b.asm.F).apply(null,arguments)},xb=b._emscripten_bind_btCollisionObject_setAnisotropicFriction_2=function(){return(xb=b._emscripten_bind_btCollisionObject_setAnisotropicFriction_2=b.asm.G).apply(null,arguments)},yb=b._emscripten_bind_btCollisionObject_getCollisionShape_0=
+function(){return(yb=b._emscripten_bind_btCollisionObject_getCollisionShape_0=b.asm.H).apply(null,arguments)},zb=b._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1=function(){return(zb=b._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1=b.asm.I).apply(null,arguments)},Ab=b._emscripten_bind_btCollisionObject_setActivationState_1=function(){return(Ab=b._emscripten_bind_btCollisionObject_setActivationState_1=b.asm.J).apply(null,arguments)},Bb=b._emscripten_bind_btCollisionObject_forceActivationState_1=
+function(){return(Bb=b._emscripten_bind_btCollisionObject_forceActivationState_1=b.asm.K).apply(null,arguments)},Cb=b._emscripten_bind_btCollisionObject_activate_0=function(){return(Cb=b._emscripten_bind_btCollisionObject_activate_0=b.asm.L).apply(null,arguments)},Db=b._emscripten_bind_btCollisionObject_activate_1=function(){return(Db=b._emscripten_bind_btCollisionObject_activate_1=b.asm.M).apply(null,arguments)},Eb=b._emscripten_bind_btCollisionObject_isActive_0=function(){return(Eb=b._emscripten_bind_btCollisionObject_isActive_0=
+b.asm.N).apply(null,arguments)},Fb=b._emscripten_bind_btCollisionObject_isKinematicObject_0=function(){return(Fb=b._emscripten_bind_btCollisionObject_isKinematicObject_0=b.asm.O).apply(null,arguments)},Gb=b._emscripten_bind_btCollisionObject_isStaticObject_0=function(){return(Gb=b._emscripten_bind_btCollisionObject_isStaticObject_0=b.asm.P).apply(null,arguments)},Hb=b._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0=function(){return(Hb=b._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0=
+b.asm.Q).apply(null,arguments)},Ib=b._emscripten_bind_btCollisionObject_getRestitution_0=function(){return(Ib=b._emscripten_bind_btCollisionObject_getRestitution_0=b.asm.R).apply(null,arguments)},Jb=b._emscripten_bind_btCollisionObject_getFriction_0=function(){return(Jb=b._emscripten_bind_btCollisionObject_getFriction_0=b.asm.S).apply(null,arguments)},Kb=b._emscripten_bind_btCollisionObject_getRollingFriction_0=function(){return(Kb=b._emscripten_bind_btCollisionObject_getRollingFriction_0=b.asm.T).apply(null,
+arguments)},Lb=b._emscripten_bind_btCollisionObject_setRestitution_1=function(){return(Lb=b._emscripten_bind_btCollisionObject_setRestitution_1=b.asm.U).apply(null,arguments)},Mb=b._emscripten_bind_btCollisionObject_setFriction_1=function(){return(Mb=b._emscripten_bind_btCollisionObject_setFriction_1=b.asm.V).apply(null,arguments)},Nb=b._emscripten_bind_btCollisionObject_setRollingFriction_1=function(){return(Nb=b._emscripten_bind_btCollisionObject_setRollingFriction_1=b.asm.W).apply(null,arguments)},
+Ob=b._emscripten_bind_btCollisionObject_getWorldTransform_0=function(){return(Ob=b._emscripten_bind_btCollisionObject_getWorldTransform_0=b.asm.X).apply(null,arguments)},Pb=b._emscripten_bind_btCollisionObject_getCollisionFlags_0=function(){return(Pb=b._emscripten_bind_btCollisionObject_getCollisionFlags_0=b.asm.Y).apply(null,arguments)},Qb=b._emscripten_bind_btCollisionObject_setCollisionFlags_1=function(){return(Qb=b._emscripten_bind_btCollisionObject_setCollisionFlags_1=b.asm.Z).apply(null,arguments)},
+Sb=b._emscripten_bind_btCollisionObject_setWorldTransform_1=function(){return(Sb=b._emscripten_bind_btCollisionObject_setWorldTransform_1=b.asm._).apply(null,arguments)},Tb=b._emscripten_bind_btCollisionObject_setCollisionShape_1=function(){return(Tb=b._emscripten_bind_btCollisionObject_setCollisionShape_1=b.asm.$).apply(null,arguments)},Ub=b._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1=function(){return(Ub=b._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1=b.asm.aa).apply(null,
+arguments)},Vb=b._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1=function(){return(Vb=b._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1=b.asm.ba).apply(null,arguments)},Wb=b._emscripten_bind_btCollisionObject_getUserIndex_0=function(){return(Wb=b._emscripten_bind_btCollisionObject_getUserIndex_0=b.asm.ca).apply(null,arguments)},Xb=b._emscripten_bind_btCollisionObject_setUserIndex_1=function(){return(Xb=b._emscripten_bind_btCollisionObject_setUserIndex_1=b.asm.da).apply(null,
+arguments)},Yb=b._emscripten_bind_btCollisionObject_getUserPointer_0=function(){return(Yb=b._emscripten_bind_btCollisionObject_getUserPointer_0=b.asm.ea).apply(null,arguments)},Zb=b._emscripten_bind_btCollisionObject_setUserPointer_1=function(){return(Zb=b._emscripten_bind_btCollisionObject_setUserPointer_1=b.asm.fa).apply(null,arguments)},$b=b._emscripten_bind_btCollisionObject_getBroadphaseHandle_0=function(){return($b=b._emscripten_bind_btCollisionObject_getBroadphaseHandle_0=b.asm.ga).apply(null,
+arguments)},ac=b._emscripten_bind_btCollisionObject___destroy___0=function(){return(ac=b._emscripten_bind_btCollisionObject___destroy___0=b.asm.ha).apply(null,arguments)},bc=b._emscripten_bind_btDynamicsWorld_addAction_1=function(){return(bc=b._emscripten_bind_btDynamicsWorld_addAction_1=b.asm.ia).apply(null,arguments)},cc=b._emscripten_bind_btDynamicsWorld_removeAction_1=function(){return(cc=b._emscripten_bind_btDynamicsWorld_removeAction_1=b.asm.ja).apply(null,arguments)},dc=b._emscripten_bind_btDynamicsWorld_getSolverInfo_0=
+function(){return(dc=b._emscripten_bind_btDynamicsWorld_getSolverInfo_0=b.asm.ka).apply(null,arguments)},ec=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_1=function(){return(ec=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_1=b.asm.la).apply(null,arguments)},fc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_2=function(){return(fc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_2=b.asm.ma).apply(null,arguments)},hc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_3=
+function(){return(hc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_3=b.asm.na).apply(null,arguments)},ic=b._emscripten_bind_btDynamicsWorld_getDispatcher_0=function(){return(ic=b._emscripten_bind_btDynamicsWorld_getDispatcher_0=b.asm.oa).apply(null,arguments)},jc=b._emscripten_bind_btDynamicsWorld_rayTest_3=function(){return(jc=b._emscripten_bind_btDynamicsWorld_rayTest_3=b.asm.pa).apply(null,arguments)},kc=b._emscripten_bind_btDynamicsWorld_getPairCache_0=function(){return(kc=b._emscripten_bind_btDynamicsWorld_getPairCache_0=
+b.asm.qa).apply(null,arguments)},lc=b._emscripten_bind_btDynamicsWorld_getDispatchInfo_0=function(){return(lc=b._emscripten_bind_btDynamicsWorld_getDispatchInfo_0=b.asm.ra).apply(null,arguments)},mc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_1=function(){return(mc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_1=b.asm.sa).apply(null,arguments)},nc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_2=function(){return(nc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_2=
+b.asm.ta).apply(null,arguments)},oc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_3=function(){return(oc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_3=b.asm.ua).apply(null,arguments)},pc=b._emscripten_bind_btDynamicsWorld_removeCollisionObject_1=function(){return(pc=b._emscripten_bind_btDynamicsWorld_removeCollisionObject_1=b.asm.va).apply(null,arguments)},qc=b._emscripten_bind_btDynamicsWorld_getBroadphase_0=function(){return(qc=b._emscripten_bind_btDynamicsWorld_getBroadphase_0=
+b.asm.wa).apply(null,arguments)},rc=b._emscripten_bind_btDynamicsWorld_convexSweepTest_5=function(){return(rc=b._emscripten_bind_btDynamicsWorld_convexSweepTest_5=b.asm.xa).apply(null,arguments)},sc=b._emscripten_bind_btDynamicsWorld_contactPairTest_3=function(){return(sc=b._emscripten_bind_btDynamicsWorld_contactPairTest_3=b.asm.ya).apply(null,arguments)},tc=b._emscripten_bind_btDynamicsWorld_contactTest_2=function(){return(tc=b._emscripten_bind_btDynamicsWorld_contactTest_2=b.asm.za).apply(null,
+arguments)},uc=b._emscripten_bind_btDynamicsWorld_updateSingleAabb_1=function(){return(uc=b._emscripten_bind_btDynamicsWorld_updateSingleAabb_1=b.asm.Aa).apply(null,arguments)},vc=b._emscripten_bind_btDynamicsWorld_setDebugDrawer_1=function(){return(vc=b._emscripten_bind_btDynamicsWorld_setDebugDrawer_1=b.asm.Ba).apply(null,arguments)},wc=b._emscripten_bind_btDynamicsWorld_getDebugDrawer_0=function(){return(wc=b._emscripten_bind_btDynamicsWorld_getDebugDrawer_0=b.asm.Ca).apply(null,arguments)},xc=
+b._emscripten_bind_btDynamicsWorld_debugDrawWorld_0=function(){return(xc=b._emscripten_bind_btDynamicsWorld_debugDrawWorld_0=b.asm.Da).apply(null,arguments)},yc=b._emscripten_bind_btDynamicsWorld_debugDrawObject_3=function(){return(yc=b._emscripten_bind_btDynamicsWorld_debugDrawObject_3=b.asm.Ea).apply(null,arguments)},zc=b._emscripten_bind_btDynamicsWorld___destroy___0=function(){return(zc=b._emscripten_bind_btDynamicsWorld___destroy___0=b.asm.Fa).apply(null,arguments)},Ac=b._emscripten_bind_btTypedConstraint_enableFeedback_1=
+function(){return(Ac=b._emscripten_bind_btTypedConstraint_enableFeedback_1=b.asm.Ga).apply(null,arguments)},Bc=b._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0=function(){return(Bc=b._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0=b.asm.Ha).apply(null,arguments)},Cc=b._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1=function(){return(Cc=b._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1=b.asm.Ia).apply(null,arguments)},Dc=b._emscripten_bind_btTypedConstraint_getParam_2=
+function(){return(Dc=b._emscripten_bind_btTypedConstraint_getParam_2=b.asm.Ja).apply(null,arguments)},Ec=b._emscripten_bind_btTypedConstraint_setParam_3=function(){return(Ec=b._emscripten_bind_btTypedConstraint_setParam_3=b.asm.Ka).apply(null,arguments)},Fc=b._emscripten_bind_btTypedConstraint___destroy___0=function(){return(Fc=b._emscripten_bind_btTypedConstraint___destroy___0=b.asm.La).apply(null,arguments)},Gc=b._emscripten_bind_btConcaveShape_setLocalScaling_1=function(){return(Gc=b._emscripten_bind_btConcaveShape_setLocalScaling_1=
+b.asm.Ma).apply(null,arguments)},Hc=b._emscripten_bind_btConcaveShape_getLocalScaling_0=function(){return(Hc=b._emscripten_bind_btConcaveShape_getLocalScaling_0=b.asm.Na).apply(null,arguments)},Ic=b._emscripten_bind_btConcaveShape_calculateLocalInertia_2=function(){return(Ic=b._emscripten_bind_btConcaveShape_calculateLocalInertia_2=b.asm.Oa).apply(null,arguments)},Jc=b._emscripten_bind_btConcaveShape___destroy___0=function(){return(Jc=b._emscripten_bind_btConcaveShape___destroy___0=b.asm.Pa).apply(null,
+arguments)},Kc=b._emscripten_bind_btCapsuleShape_btCapsuleShape_2=function(){return(Kc=b._emscripten_bind_btCapsuleShape_btCapsuleShape_2=b.asm.Qa).apply(null,arguments)},Lc=b._emscripten_bind_btCapsuleShape_setMargin_1=function(){return(Lc=b._emscripten_bind_btCapsuleShape_setMargin_1=b.asm.Ra).apply(null,arguments)},Mc=b._emscripten_bind_btCapsuleShape_getMargin_0=function(){return(Mc=b._emscripten_bind_btCapsuleShape_getMargin_0=b.asm.Sa).apply(null,arguments)},Nc=b._emscripten_bind_btCapsuleShape_getUpAxis_0=
+function(){return(Nc=b._emscripten_bind_btCapsuleShape_getUpAxis_0=b.asm.Ta).apply(null,arguments)},Oc=b._emscripten_bind_btCapsuleShape_getRadius_0=function(){return(Oc=b._emscripten_bind_btCapsuleShape_getRadius_0=b.asm.Ua).apply(null,arguments)},Pc=b._emscripten_bind_btCapsuleShape_getHalfHeight_0=function(){return(Pc=b._emscripten_bind_btCapsuleShape_getHalfHeight_0=b.asm.Va).apply(null,arguments)},Qc=b._emscripten_bind_btCapsuleShape_setLocalScaling_1=function(){return(Qc=b._emscripten_bind_btCapsuleShape_setLocalScaling_1=
+b.asm.Wa).apply(null,arguments)},Rc=b._emscripten_bind_btCapsuleShape_getLocalScaling_0=function(){return(Rc=b._emscripten_bind_btCapsuleShape_getLocalScaling_0=b.asm.Xa).apply(null,arguments)},Sc=b._emscripten_bind_btCapsuleShape_calculateLocalInertia_2=function(){return(Sc=b._emscripten_bind_btCapsuleShape_calculateLocalInertia_2=b.asm.Ya).apply(null,arguments)},Tc=b._emscripten_bind_btCapsuleShape___destroy___0=function(){return(Tc=b._emscripten_bind_btCapsuleShape___destroy___0=b.asm.Za).apply(null,
+arguments)},Uc=b._emscripten_bind_btIDebugDraw_drawLine_3=function(){return(Uc=b._emscripten_bind_btIDebugDraw_drawLine_3=b.asm._a).apply(null,arguments)},Vc=b._emscripten_bind_btIDebugDraw_drawContactPoint_5=function(){return(Vc=b._emscripten_bind_btIDebugDraw_drawContactPoint_5=b.asm.$a).apply(null,arguments)},Wc=b._emscripten_bind_btIDebugDraw_reportErrorWarning_1=function(){return(Wc=b._emscripten_bind_btIDebugDraw_reportErrorWarning_1=b.asm.ab).apply(null,arguments)},Xc=b._emscripten_bind_btIDebugDraw_draw3dText_2=
+function(){return(Xc=b._emscripten_bind_btIDebugDraw_draw3dText_2=b.asm.bb).apply(null,arguments)},Yc=b._emscripten_bind_btIDebugDraw_setDebugMode_1=function(){return(Yc=b._emscripten_bind_btIDebugDraw_setDebugMode_1=b.asm.cb).apply(null,arguments)},Zc=b._emscripten_bind_btIDebugDraw_getDebugMode_0=function(){return(Zc=b._emscripten_bind_btIDebugDraw_getDebugMode_0=b.asm.db).apply(null,arguments)},$c=b._emscripten_bind_btIDebugDraw___destroy___0=function(){return($c=b._emscripten_bind_btIDebugDraw___destroy___0=
+b.asm.eb).apply(null,arguments)},ad=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0=function(){return(ad=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0=b.asm.fb).apply(null,arguments)},bd=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1=function(){return(bd=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1=b.asm.gb).apply(null,arguments)},cd=b._emscripten_bind_btDefaultCollisionConfiguration___destroy___0=
+function(){return(cd=b._emscripten_bind_btDefaultCollisionConfiguration___destroy___0=b.asm.hb).apply(null,arguments)},dd=b._emscripten_bind_btTriangleMeshShape_setLocalScaling_1=function(){return(dd=b._emscripten_bind_btTriangleMeshShape_setLocalScaling_1=b.asm.ib).apply(null,arguments)},ed=b._emscripten_bind_btTriangleMeshShape_getLocalScaling_0=function(){return(ed=b._emscripten_bind_btTriangleMeshShape_getLocalScaling_0=b.asm.jb).apply(null,arguments)},fd=b._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2=
+function(){return(fd=b._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2=b.asm.kb).apply(null,arguments)},gd=b._emscripten_bind_btTriangleMeshShape___destroy___0=function(){return(gd=b._emscripten_bind_btTriangleMeshShape___destroy___0=b.asm.lb).apply(null,arguments)},hd=b._emscripten_bind_btGhostObject_btGhostObject_0=function(){return(hd=b._emscripten_bind_btGhostObject_btGhostObject_0=b.asm.mb).apply(null,arguments)},id=b._emscripten_bind_btGhostObject_getNumOverlappingObjects_0=function(){return(id=
+b._emscripten_bind_btGhostObject_getNumOverlappingObjects_0=b.asm.nb).apply(null,arguments)},jd=b._emscripten_bind_btGhostObject_getOverlappingObject_1=function(){return(jd=b._emscripten_bind_btGhostObject_getOverlappingObject_1=b.asm.ob).apply(null,arguments)},kd=b._emscripten_bind_btGhostObject_setAnisotropicFriction_2=function(){return(kd=b._emscripten_bind_btGhostObject_setAnisotropicFriction_2=b.asm.pb).apply(null,arguments)},ld=b._emscripten_bind_btGhostObject_getCollisionShape_0=function(){return(ld=
+b._emscripten_bind_btGhostObject_getCollisionShape_0=b.asm.qb).apply(null,arguments)},md=b._emscripten_bind_btGhostObject_setContactProcessingThreshold_1=function(){return(md=b._emscripten_bind_btGhostObject_setContactProcessingThreshold_1=b.asm.rb).apply(null,arguments)},nd=b._emscripten_bind_btGhostObject_setActivationState_1=function(){return(nd=b._emscripten_bind_btGhostObject_setActivationState_1=b.asm.sb).apply(null,arguments)},od=b._emscripten_bind_btGhostObject_forceActivationState_1=function(){return(od=
+b._emscripten_bind_btGhostObject_forceActivationState_1=b.asm.tb).apply(null,arguments)},pd=b._emscripten_bind_btGhostObject_activate_0=function(){return(pd=b._emscripten_bind_btGhostObject_activate_0=b.asm.ub).apply(null,arguments)},qd=b._emscripten_bind_btGhostObject_activate_1=function(){return(qd=b._emscripten_bind_btGhostObject_activate_1=b.asm.vb).apply(null,arguments)},rd=b._emscripten_bind_btGhostObject_isActive_0=function(){return(rd=b._emscripten_bind_btGhostObject_isActive_0=b.asm.wb).apply(null,
+arguments)},sd=b._emscripten_bind_btGhostObject_isKinematicObject_0=function(){return(sd=b._emscripten_bind_btGhostObject_isKinematicObject_0=b.asm.xb).apply(null,arguments)},td=b._emscripten_bind_btGhostObject_isStaticObject_0=function(){return(td=b._emscripten_bind_btGhostObject_isStaticObject_0=b.asm.yb).apply(null,arguments)},ud=b._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0=function(){return(ud=b._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0=b.asm.zb).apply(null,arguments)},
+vd=b._emscripten_bind_btGhostObject_getRestitution_0=function(){return(vd=b._emscripten_bind_btGhostObject_getRestitution_0=b.asm.Ab).apply(null,arguments)},wd=b._emscripten_bind_btGhostObject_getFriction_0=function(){return(wd=b._emscripten_bind_btGhostObject_getFriction_0=b.asm.Bb).apply(null,arguments)},xd=b._emscripten_bind_btGhostObject_getRollingFriction_0=function(){return(xd=b._emscripten_bind_btGhostObject_getRollingFriction_0=b.asm.Cb).apply(null,arguments)},yd=b._emscripten_bind_btGhostObject_setRestitution_1=
+function(){return(yd=b._emscripten_bind_btGhostObject_setRestitution_1=b.asm.Db).apply(null,arguments)},zd=b._emscripten_bind_btGhostObject_setFriction_1=function(){return(zd=b._emscripten_bind_btGhostObject_setFriction_1=b.asm.Eb).apply(null,arguments)},Ad=b._emscripten_bind_btGhostObject_setRollingFriction_1=function(){return(Ad=b._emscripten_bind_btGhostObject_setRollingFriction_1=b.asm.Fb).apply(null,arguments)},Bd=b._emscripten_bind_btGhostObject_getWorldTransform_0=function(){return(Bd=b._emscripten_bind_btGhostObject_getWorldTransform_0=
+b.asm.Gb).apply(null,arguments)},Cd=b._emscripten_bind_btGhostObject_getCollisionFlags_0=function(){return(Cd=b._emscripten_bind_btGhostObject_getCollisionFlags_0=b.asm.Hb).apply(null,arguments)},Dd=b._emscripten_bind_btGhostObject_setCollisionFlags_1=function(){return(Dd=b._emscripten_bind_btGhostObject_setCollisionFlags_1=b.asm.Ib).apply(null,arguments)},Ed=b._emscripten_bind_btGhostObject_setWorldTransform_1=function(){return(Ed=b._emscripten_bind_btGhostObject_setWorldTransform_1=b.asm.Jb).apply(null,
+arguments)},Fd=b._emscripten_bind_btGhostObject_setCollisionShape_1=function(){return(Fd=b._emscripten_bind_btGhostObject_setCollisionShape_1=b.asm.Kb).apply(null,arguments)},Gd=b._emscripten_bind_btGhostObject_setCcdMotionThreshold_1=function(){return(Gd=b._emscripten_bind_btGhostObject_setCcdMotionThreshold_1=b.asm.Lb).apply(null,arguments)},Hd=b._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1=function(){return(Hd=b._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1=b.asm.Mb).apply(null,
+arguments)},Id=b._emscripten_bind_btGhostObject_getUserIndex_0=function(){return(Id=b._emscripten_bind_btGhostObject_getUserIndex_0=b.asm.Nb).apply(null,arguments)},Jd=b._emscripten_bind_btGhostObject_setUserIndex_1=function(){return(Jd=b._emscripten_bind_btGhostObject_setUserIndex_1=b.asm.Ob).apply(null,arguments)},Kd=b._emscripten_bind_btGhostObject_getUserPointer_0=function(){return(Kd=b._emscripten_bind_btGhostObject_getUserPointer_0=b.asm.Pb).apply(null,arguments)},Ld=b._emscripten_bind_btGhostObject_setUserPointer_1=
+function(){return(Ld=b._emscripten_bind_btGhostObject_setUserPointer_1=b.asm.Qb).apply(null,arguments)},Md=b._emscripten_bind_btGhostObject_getBroadphaseHandle_0=function(){return(Md=b._emscripten_bind_btGhostObject_getBroadphaseHandle_0=b.asm.Rb).apply(null,arguments)},Nd=b._emscripten_bind_btGhostObject___destroy___0=function(){return(Nd=b._emscripten_bind_btGhostObject___destroy___0=b.asm.Sb).apply(null,arguments)},Od=b._emscripten_bind_btConeShape_btConeShape_2=function(){return(Od=b._emscripten_bind_btConeShape_btConeShape_2=
+b.asm.Tb).apply(null,arguments)},Pd=b._emscripten_bind_btConeShape_setLocalScaling_1=function(){return(Pd=b._emscripten_bind_btConeShape_setLocalScaling_1=b.asm.Ub).apply(null,arguments)},Qd=b._emscripten_bind_btConeShape_getLocalScaling_0=function(){return(Qd=b._emscripten_bind_btConeShape_getLocalScaling_0=b.asm.Vb).apply(null,arguments)},Rd=b._emscripten_bind_btConeShape_calculateLocalInertia_2=function(){return(Rd=b._emscripten_bind_btConeShape_calculateLocalInertia_2=b.asm.Wb).apply(null,arguments)},
+Sd=b._emscripten_bind_btConeShape___destroy___0=function(){return(Sd=b._emscripten_bind_btConeShape___destroy___0=b.asm.Xb).apply(null,arguments)},Td=b._emscripten_bind_btActionInterface_updateAction_2=function(){return(Td=b._emscripten_bind_btActionInterface_updateAction_2=b.asm.Yb).apply(null,arguments)},Ud=b._emscripten_bind_btActionInterface___destroy___0=function(){return(Ud=b._emscripten_bind_btActionInterface___destroy___0=b.asm.Zb).apply(null,arguments)},Vd=b._emscripten_bind_btVector3_btVector3_0=
+function(){return(Vd=b._emscripten_bind_btVector3_btVector3_0=b.asm._b).apply(null,arguments)},Wd=b._emscripten_bind_btVector3_btVector3_3=function(){return(Wd=b._emscripten_bind_btVector3_btVector3_3=b.asm.$b).apply(null,arguments)},Xd=b._emscripten_bind_btVector3_length_0=function(){return(Xd=b._emscripten_bind_btVector3_length_0=b.asm.ac).apply(null,arguments)},Yd=b._emscripten_bind_btVector3_x_0=function(){return(Yd=b._emscripten_bind_btVector3_x_0=b.asm.bc).apply(null,arguments)},Zd=b._emscripten_bind_btVector3_y_0=
+function(){return(Zd=b._emscripten_bind_btVector3_y_0=b.asm.cc).apply(null,arguments)},$d=b._emscripten_bind_btVector3_z_0=function(){return($d=b._emscripten_bind_btVector3_z_0=b.asm.dc).apply(null,arguments)},ae=b._emscripten_bind_btVector3_setX_1=function(){return(ae=b._emscripten_bind_btVector3_setX_1=b.asm.ec).apply(null,arguments)},be=b._emscripten_bind_btVector3_setY_1=function(){return(be=b._emscripten_bind_btVector3_setY_1=b.asm.fc).apply(null,arguments)},ce=b._emscripten_bind_btVector3_setZ_1=
+function(){return(ce=b._emscripten_bind_btVector3_setZ_1=b.asm.gc).apply(null,arguments)},de=b._emscripten_bind_btVector3_setValue_3=function(){return(de=b._emscripten_bind_btVector3_setValue_3=b.asm.hc).apply(null,arguments)},ee=b._emscripten_bind_btVector3_normalize_0=function(){return(ee=b._emscripten_bind_btVector3_normalize_0=b.asm.ic).apply(null,arguments)},fe=b._emscripten_bind_btVector3_rotate_2=function(){return(fe=b._emscripten_bind_btVector3_rotate_2=b.asm.jc).apply(null,arguments)},ge=
+b._emscripten_bind_btVector3_dot_1=function(){return(ge=b._emscripten_bind_btVector3_dot_1=b.asm.kc).apply(null,arguments)},he=b._emscripten_bind_btVector3_op_mul_1=function(){return(he=b._emscripten_bind_btVector3_op_mul_1=b.asm.lc).apply(null,arguments)},ie=b._emscripten_bind_btVector3_op_add_1=function(){return(ie=b._emscripten_bind_btVector3_op_add_1=b.asm.mc).apply(null,arguments)},je=b._emscripten_bind_btVector3_op_sub_1=function(){return(je=b._emscripten_bind_btVector3_op_sub_1=b.asm.nc).apply(null,
+arguments)},ke=b._emscripten_bind_btVector3___destroy___0=function(){return(ke=b._emscripten_bind_btVector3___destroy___0=b.asm.oc).apply(null,arguments)},le=b._emscripten_bind_btVehicleRaycaster_castRay_3=function(){return(le=b._emscripten_bind_btVehicleRaycaster_castRay_3=b.asm.pc).apply(null,arguments)},me=b._emscripten_bind_btVehicleRaycaster___destroy___0=function(){return(me=b._emscripten_bind_btVehicleRaycaster___destroy___0=b.asm.qc).apply(null,arguments)},ne=b._emscripten_bind_btQuadWord_x_0=
+function(){return(ne=b._emscripten_bind_btQuadWord_x_0=b.asm.rc).apply(null,arguments)},oe=b._emscripten_bind_btQuadWord_y_0=function(){return(oe=b._emscripten_bind_btQuadWord_y_0=b.asm.sc).apply(null,arguments)},pe=b._emscripten_bind_btQuadWord_z_0=function(){return(pe=b._emscripten_bind_btQuadWord_z_0=b.asm.tc).apply(null,arguments)},qe=b._emscripten_bind_btQuadWord_w_0=function(){return(qe=b._emscripten_bind_btQuadWord_w_0=b.asm.uc).apply(null,arguments)},re=b._emscripten_bind_btQuadWord_setX_1=
+function(){return(re=b._emscripten_bind_btQuadWord_setX_1=b.asm.vc).apply(null,arguments)},se=b._emscripten_bind_btQuadWord_setY_1=function(){return(se=b._emscripten_bind_btQuadWord_setY_1=b.asm.wc).apply(null,arguments)},te=b._emscripten_bind_btQuadWord_setZ_1=function(){return(te=b._emscripten_bind_btQuadWord_setZ_1=b.asm.xc).apply(null,arguments)},ue=b._emscripten_bind_btQuadWord_setW_1=function(){return(ue=b._emscripten_bind_btQuadWord_setW_1=b.asm.yc).apply(null,arguments)},ve=b._emscripten_bind_btQuadWord___destroy___0=
+function(){return(ve=b._emscripten_bind_btQuadWord___destroy___0=b.asm.zc).apply(null,arguments)},we=b._emscripten_bind_btCylinderShape_btCylinderShape_1=function(){return(we=b._emscripten_bind_btCylinderShape_btCylinderShape_1=b.asm.Ac).apply(null,arguments)},xe=b._emscripten_bind_btCylinderShape_setMargin_1=function(){return(xe=b._emscripten_bind_btCylinderShape_setMargin_1=b.asm.Bc).apply(null,arguments)},ye=b._emscripten_bind_btCylinderShape_getMargin_0=function(){return(ye=b._emscripten_bind_btCylinderShape_getMargin_0=
+b.asm.Cc).apply(null,arguments)},ze=b._emscripten_bind_btCylinderShape_setLocalScaling_1=function(){return(ze=b._emscripten_bind_btCylinderShape_setLocalScaling_1=b.asm.Dc).apply(null,arguments)},Ae=b._emscripten_bind_btCylinderShape_getLocalScaling_0=function(){return(Ae=b._emscripten_bind_btCylinderShape_getLocalScaling_0=b.asm.Ec).apply(null,arguments)},Be=b._emscripten_bind_btCylinderShape_calculateLocalInertia_2=function(){return(Be=b._emscripten_bind_btCylinderShape_calculateLocalInertia_2=
+b.asm.Fc).apply(null,arguments)},Ce=b._emscripten_bind_btCylinderShape___destroy___0=function(){return(Ce=b._emscripten_bind_btCylinderShape___destroy___0=b.asm.Gc).apply(null,arguments)},De=b._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4=function(){return(De=b._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4=b.asm.Hc).apply(null,arguments)},Ee=b._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1=function(){return(Ee=b._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1=
+b.asm.Ic).apply(null,arguments)},Fe=b._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0=function(){return(Fe=b._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0=b.asm.Jc).apply(null,arguments)},Ge=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1=function(){return(Ge=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1=b.asm.Kc).apply(null,arguments)},He=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3=function(){return(He=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3=
+b.asm.Lc).apply(null,arguments)},Ie=b._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1=function(){return(Ie=b._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1=b.asm.Mc).apply(null,arguments)},Je=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1=function(){return(Je=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1=b.asm.Nc).apply(null,arguments)},Ke=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2=function(){return(Ke=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2=
+b.asm.Oc).apply(null,arguments)},Le=b._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1=function(){return(Le=b._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1=b.asm.Pc).apply(null,arguments)},Me=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1=function(){return(Me=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1=b.asm.Qc).apply(null,arguments)},Ne=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2=function(){return(Ne=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2=
+b.asm.Rc).apply(null,arguments)},Oe=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3=function(){return(Oe=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3=b.asm.Sc).apply(null,arguments)},Pe=b._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1=function(){return(Pe=b._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1=b.asm.Tc).apply(null,arguments)},Qe=b._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1=function(){return(Qe=
+b._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1=b.asm.Uc).apply(null,arguments)},Re=b._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1=function(){return(Re=b._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1=b.asm.Vc).apply(null,arguments)},Se=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0=function(){return(Se=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0=b.asm.Wc).apply(null,arguments)},Te=b._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3=
+function(){return(Te=b._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3=b.asm.Xc).apply(null,arguments)},Ue=b._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0=function(){return(Ue=b._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0=b.asm.Yc).apply(null,arguments)},Ve=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0=function(){return(Ve=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0=b.asm.Zc).apply(null,arguments)},We=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1=
+function(){return(We=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1=b.asm._c).apply(null,arguments)},Xe=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2=function(){return(Xe=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2=b.asm.$c).apply(null,arguments)},Ye=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3=function(){return(Ye=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3=b.asm.ad).apply(null,arguments)},Ze=b._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1=
+function(){return(Ze=b._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1=b.asm.bd).apply(null,arguments)},$e=b._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0=function(){return($e=b._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0=b.asm.cd).apply(null,arguments)},af=b._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5=function(){return(af=b._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5=b.asm.dd).apply(null,arguments)},bf=b._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3=
+function(){return(bf=b._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3=b.asm.ed).apply(null,arguments)},cf=b._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2=function(){return(cf=b._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2=b.asm.fd).apply(null,arguments)},df=b._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1=function(){return(df=b._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1=b.asm.gd).apply(null,arguments)},ef=b._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1=
+function(){return(ef=b._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1=b.asm.hd).apply(null,arguments)},ff=b._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0=function(){return(ff=b._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0=b.asm.id).apply(null,arguments)},gf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0=function(){return(gf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0=b.asm.jd).apply(null,arguments)},hf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3=
+function(){return(hf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3=b.asm.kd).apply(null,arguments)},jf=b._emscripten_bind_btDiscreteDynamicsWorld_addAction_1=function(){return(jf=b._emscripten_bind_btDiscreteDynamicsWorld_addAction_1=b.asm.ld).apply(null,arguments)},kf=b._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1=function(){return(kf=b._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1=b.asm.md).apply(null,arguments)},lf=b._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0=
+function(){return(lf=b._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0=b.asm.nd).apply(null,arguments)},mf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_1=function(){return(mf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_1=b.asm.od).apply(null,arguments)},nf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_2=function(){return(nf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_2=b.asm.pd).apply(null,arguments)},
+of=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_3=function(){return(of=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_3=b.asm.qd).apply(null,arguments)},pf=b._emscripten_bind_btDiscreteDynamicsWorld___destroy___0=function(){return(pf=b._emscripten_bind_btDiscreteDynamicsWorld___destroy___0=b.asm.rd).apply(null,arguments)},qf=b._emscripten_bind_btConvexShape_setLocalScaling_1=function(){return(qf=b._emscripten_bind_btConvexShape_setLocalScaling_1=b.asm.sd).apply(null,
+arguments)},rf=b._emscripten_bind_btConvexShape_getLocalScaling_0=function(){return(rf=b._emscripten_bind_btConvexShape_getLocalScaling_0=b.asm.td).apply(null,arguments)},sf=b._emscripten_bind_btConvexShape_calculateLocalInertia_2=function(){return(sf=b._emscripten_bind_btConvexShape_calculateLocalInertia_2=b.asm.ud).apply(null,arguments)},tf=b._emscripten_bind_btConvexShape_setMargin_1=function(){return(tf=b._emscripten_bind_btConvexShape_setMargin_1=b.asm.vd).apply(null,arguments)},uf=b._emscripten_bind_btConvexShape_getMargin_0=
+function(){return(uf=b._emscripten_bind_btConvexShape_getMargin_0=b.asm.wd).apply(null,arguments)},vf=b._emscripten_bind_btConvexShape___destroy___0=function(){return(vf=b._emscripten_bind_btConvexShape___destroy___0=b.asm.xd).apply(null,arguments)},wf=b._emscripten_bind_btDispatcher_getNumManifolds_0=function(){return(wf=b._emscripten_bind_btDispatcher_getNumManifolds_0=b.asm.yd).apply(null,arguments)},xf=b._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1=function(){return(xf=b._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1=
+b.asm.zd).apply(null,arguments)},yf=b._emscripten_bind_btDispatcher___destroy___0=function(){return(yf=b._emscripten_bind_btDispatcher___destroy___0=b.asm.Ad).apply(null,arguments)},zf=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3=function(){return(zf=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3=b.asm.Bd).apply(null,arguments)},Af=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5=function(){return(Af=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5=
+b.asm.Cd).apply(null,arguments)},Bf=b._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1=function(){return(Bf=b._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1=b.asm.Dd).apply(null,arguments)},Cf=b._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1=function(){return(Cf=b._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1=b.asm.Ed).apply(null,arguments)},Df=b._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1=function(){return(Df=b._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1=
+b.asm.Fd).apply(null,arguments)},Ef=b._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1=function(){return(Ef=b._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1=b.asm.Gd).apply(null,arguments)},Ff=b._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0=function(){return(Ff=b._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0=b.asm.Hd).apply(null,arguments)},Gf=b._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1=function(){return(Gf=b._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1=
+b.asm.Id).apply(null,arguments)},Hf=b._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0=function(){return(Hf=b._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0=b.asm.Jd).apply(null,arguments)},If=b._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1=function(){return(If=b._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1=b.asm.Kd).apply(null,arguments)},Jf=b._emscripten_bind_btGeneric6DofConstraint_getParam_2=function(){return(Jf=
+b._emscripten_bind_btGeneric6DofConstraint_getParam_2=b.asm.Ld).apply(null,arguments)},Kf=b._emscripten_bind_btGeneric6DofConstraint_setParam_3=function(){return(Kf=b._emscripten_bind_btGeneric6DofConstraint_setParam_3=b.asm.Md).apply(null,arguments)},Lf=b._emscripten_bind_btGeneric6DofConstraint___destroy___0=function(){return(Lf=b._emscripten_bind_btGeneric6DofConstraint___destroy___0=b.asm.Nd).apply(null,arguments)},Mf=b._emscripten_bind_btStridingMeshInterface_setScaling_1=function(){return(Mf=
+b._emscripten_bind_btStridingMeshInterface_setScaling_1=b.asm.Od).apply(null,arguments)},Nf=b._emscripten_bind_btStridingMeshInterface___destroy___0=function(){return(Nf=b._emscripten_bind_btStridingMeshInterface___destroy___0=b.asm.Pd).apply(null,arguments)},Of=b._emscripten_bind_btMotionState_getWorldTransform_1=function(){return(Of=b._emscripten_bind_btMotionState_getWorldTransform_1=b.asm.Qd).apply(null,arguments)},Pf=b._emscripten_bind_btMotionState_setWorldTransform_1=function(){return(Pf=b._emscripten_bind_btMotionState_setWorldTransform_1=
+b.asm.Rd).apply(null,arguments)},Qf=b._emscripten_bind_btMotionState___destroy___0=function(){return(Qf=b._emscripten_bind_btMotionState___destroy___0=b.asm.Sd).apply(null,arguments)},Rf=b._emscripten_bind_ConvexResultCallback_hasHit_0=function(){return(Rf=b._emscripten_bind_ConvexResultCallback_hasHit_0=b.asm.Td).apply(null,arguments)},Sf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0=function(){return(Sf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0=
+b.asm.Ud).apply(null,arguments)},Tf=b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1=function(){return(Tf=b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1=b.asm.Vd).apply(null,arguments)},Uf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0=function(){return(Uf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0=b.asm.Wd).apply(null,arguments)},Vf=b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1=function(){return(Vf=
+b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1=b.asm.Xd).apply(null,arguments)},Wf=b._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0=function(){return(Wf=b._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0=b.asm.Yd).apply(null,arguments)},Xf=b._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1=function(){return(Xf=b._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1=b.asm.Zd).apply(null,arguments)},Yf=b._emscripten_bind_ConvexResultCallback___destroy___0=
+function(){return(Yf=b._emscripten_bind_ConvexResultCallback___destroy___0=b.asm._d).apply(null,arguments)},Zf=b._emscripten_bind_ContactResultCallback_addSingleResult_7=function(){return(Zf=b._emscripten_bind_ContactResultCallback_addSingleResult_7=b.asm.$d).apply(null,arguments)},$f=b._emscripten_bind_ContactResultCallback___destroy___0=function(){return($f=b._emscripten_bind_ContactResultCallback___destroy___0=b.asm.ae).apply(null,arguments)},ag=b._emscripten_bind_btSoftBodySolver___destroy___0=
+function(){return(ag=b._emscripten_bind_btSoftBodySolver___destroy___0=b.asm.be).apply(null,arguments)},bg=b._emscripten_bind_RayResultCallback_hasHit_0=function(){return(bg=b._emscripten_bind_RayResultCallback_hasHit_0=b.asm.ce).apply(null,arguments)},cg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0=function(){return(cg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0=b.asm.de).apply(null,arguments)},dg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1=
+function(){return(dg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1=b.asm.ee).apply(null,arguments)},eg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0=function(){return(eg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0=b.asm.fe).apply(null,arguments)},fg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1=function(){return(fg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1=b.asm.ge).apply(null,arguments)},gg=b._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0=
+function(){return(gg=b._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0=b.asm.he).apply(null,arguments)},hg=b._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1=function(){return(hg=b._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1=b.asm.ie).apply(null,arguments)},ig=b._emscripten_bind_RayResultCallback_get_m_collisionObject_0=function(){return(ig=b._emscripten_bind_RayResultCallback_get_m_collisionObject_0=b.asm.je).apply(null,arguments)},jg=b._emscripten_bind_RayResultCallback_set_m_collisionObject_1=
+function(){return(jg=b._emscripten_bind_RayResultCallback_set_m_collisionObject_1=b.asm.ke).apply(null,arguments)},kg=b._emscripten_bind_RayResultCallback___destroy___0=function(){return(kg=b._emscripten_bind_RayResultCallback___destroy___0=b.asm.le).apply(null,arguments)},lg=b._emscripten_bind_btMatrix3x3_setEulerZYX_3=function(){return(lg=b._emscripten_bind_btMatrix3x3_setEulerZYX_3=b.asm.me).apply(null,arguments)},mg=b._emscripten_bind_btMatrix3x3_getRotation_1=function(){return(mg=b._emscripten_bind_btMatrix3x3_getRotation_1=
+b.asm.ne).apply(null,arguments)},ng=b._emscripten_bind_btMatrix3x3_getRow_1=function(){return(ng=b._emscripten_bind_btMatrix3x3_getRow_1=b.asm.oe).apply(null,arguments)},og=b._emscripten_bind_btMatrix3x3___destroy___0=function(){return(og=b._emscripten_bind_btMatrix3x3___destroy___0=b.asm.pe).apply(null,arguments)},pg=b._emscripten_bind_btScalarArray_size_0=function(){return(pg=b._emscripten_bind_btScalarArray_size_0=b.asm.qe).apply(null,arguments)},qg=b._emscripten_bind_btScalarArray_at_1=function(){return(qg=
+b._emscripten_bind_btScalarArray_at_1=b.asm.re).apply(null,arguments)},rg=b._emscripten_bind_btScalarArray___destroy___0=function(){return(rg=b._emscripten_bind_btScalarArray___destroy___0=b.asm.se).apply(null,arguments)},sg=b._emscripten_bind_Material_get_m_kLST_0=function(){return(sg=b._emscripten_bind_Material_get_m_kLST_0=b.asm.te).apply(null,arguments)},tg=b._emscripten_bind_Material_set_m_kLST_1=function(){return(tg=b._emscripten_bind_Material_set_m_kLST_1=b.asm.ue).apply(null,arguments)},ug=
+b._emscripten_bind_Material_get_m_kAST_0=function(){return(ug=b._emscripten_bind_Material_get_m_kAST_0=b.asm.ve).apply(null,arguments)},vg=b._emscripten_bind_Material_set_m_kAST_1=function(){return(vg=b._emscripten_bind_Material_set_m_kAST_1=b.asm.we).apply(null,arguments)},wg=b._emscripten_bind_Material_get_m_kVST_0=function(){return(wg=b._emscripten_bind_Material_get_m_kVST_0=b.asm.xe).apply(null,arguments)},xg=b._emscripten_bind_Material_set_m_kVST_1=function(){return(xg=b._emscripten_bind_Material_set_m_kVST_1=
+b.asm.ye).apply(null,arguments)},yg=b._emscripten_bind_Material_get_m_flags_0=function(){return(yg=b._emscripten_bind_Material_get_m_flags_0=b.asm.ze).apply(null,arguments)},zg=b._emscripten_bind_Material_set_m_flags_1=function(){return(zg=b._emscripten_bind_Material_set_m_flags_1=b.asm.Ae).apply(null,arguments)},Ag=b._emscripten_bind_Material___destroy___0=function(){return(Ag=b._emscripten_bind_Material___destroy___0=b.asm.Be).apply(null,arguments)},Bg=b._emscripten_bind_btDispatcherInfo_get_m_timeStep_0=
+function(){return(Bg=b._emscripten_bind_btDispatcherInfo_get_m_timeStep_0=b.asm.Ce).apply(null,arguments)},Cg=b._emscripten_bind_btDispatcherInfo_set_m_timeStep_1=function(){return(Cg=b._emscripten_bind_btDispatcherInfo_set_m_timeStep_1=b.asm.De).apply(null,arguments)},Dg=b._emscripten_bind_btDispatcherInfo_get_m_stepCount_0=function(){return(Dg=b._emscripten_bind_btDispatcherInfo_get_m_stepCount_0=b.asm.Ee).apply(null,arguments)},Eg=b._emscripten_bind_btDispatcherInfo_set_m_stepCount_1=function(){return(Eg=
+b._emscripten_bind_btDispatcherInfo_set_m_stepCount_1=b.asm.Fe).apply(null,arguments)},Fg=b._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0=function(){return(Fg=b._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0=b.asm.Ge).apply(null,arguments)},Gg=b._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1=function(){return(Gg=b._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1=b.asm.He).apply(null,arguments)},Hg=b._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0=function(){return(Hg=
+b._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0=b.asm.Ie).apply(null,arguments)},Ig=b._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1=function(){return(Ig=b._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1=b.asm.Je).apply(null,arguments)},Jg=b._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0=function(){return(Jg=b._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0=b.asm.Ke).apply(null,arguments)},Kg=b._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1=function(){return(Kg=
+b._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1=b.asm.Le).apply(null,arguments)},Lg=b._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0=function(){return(Lg=b._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0=b.asm.Me).apply(null,arguments)},Mg=b._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1=function(){return(Mg=b._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1=b.asm.Ne).apply(null,arguments)},Ng=b._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0=
+function(){return(Ng=b._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0=b.asm.Oe).apply(null,arguments)},Og=b._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1=function(){return(Og=b._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1=b.asm.Pe).apply(null,arguments)},Pg=b._emscripten_bind_btDispatcherInfo_get_m_useEpa_0=function(){return(Pg=b._emscripten_bind_btDispatcherInfo_get_m_useEpa_0=b.asm.Qe).apply(null,arguments)},Qg=b._emscripten_bind_btDispatcherInfo_set_m_useEpa_1=function(){return(Qg=
+b._emscripten_bind_btDispatcherInfo_set_m_useEpa_1=b.asm.Re).apply(null,arguments)},Rg=b._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0=function(){return(Rg=b._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0=b.asm.Se).apply(null,arguments)},Sg=b._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1=function(){return(Sg=b._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1=b.asm.Te).apply(null,arguments)},Tg=b._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0=
+function(){return(Tg=b._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0=b.asm.Ue).apply(null,arguments)},Ug=b._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1=function(){return(Ug=b._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1=b.asm.Ve).apply(null,arguments)},Vg=b._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0=function(){return(Vg=b._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0=
+b.asm.We).apply(null,arguments)},Wg=b._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1=function(){return(Wg=b._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1=b.asm.Xe).apply(null,arguments)},Xg=b._emscripten_bind_btDispatcherInfo___destroy___0=function(){return(Xg=b._emscripten_bind_btDispatcherInfo___destroy___0=b.asm.Ye).apply(null,arguments)},Yg=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0=function(){return(Yg=
+b._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0=b.asm.Ze).apply(null,arguments)},Zg=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1=function(){return(Zg=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1=b.asm._e).apply(null,arguments)},$g=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0=function(){return($g=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0=b.asm.$e).apply(null,
+arguments)},ah=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1=function(){return(ah=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1=b.asm.af).apply(null,arguments)},bh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0=function(){return(bh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0=b.asm.bf).apply(null,arguments)},ch=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1=function(){return(ch=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1=
+b.asm.cf).apply(null,arguments)},dh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0=function(){return(dh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0=b.asm.df).apply(null,arguments)},eh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1=function(){return(eh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1=b.asm.ef).apply(null,arguments)},fh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0=
+function(){return(fh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0=b.asm.ff).apply(null,arguments)},gh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1=function(){return(gh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1=b.asm.gf).apply(null,arguments)},hh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0=function(){return(hh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0=b.asm.hf).apply(null,
+arguments)},ih=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1=function(){return(ih=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1=b.asm.jf).apply(null,arguments)},jh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0=function(){return(jh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0=b.asm.kf).apply(null,arguments)},kh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1=function(){return(kh=
+b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1=b.asm.lf).apply(null,arguments)},lh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0=function(){return(lh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0=b.asm.mf).apply(null,arguments)},mh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1=function(){return(mh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1=
+b.asm.nf).apply(null,arguments)},nh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0=function(){return(nh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0=b.asm.of).apply(null,arguments)},oh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1=function(){return(oh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1=b.asm.pf).apply(null,arguments)},ph=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0=
+function(){return(ph=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0=b.asm.qf).apply(null,arguments)},qh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1=function(){return(qh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1=b.asm.rf).apply(null,arguments)},rh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0=function(){return(rh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0=b.asm.sf).apply(null,
+arguments)},sh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1=function(){return(sh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1=b.asm.tf).apply(null,arguments)},th=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0=function(){return(th=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0=b.asm.uf).apply(null,arguments)},uh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1=function(){return(uh=
+b._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1=b.asm.vf).apply(null,arguments)},vh=b._emscripten_bind_btWheelInfoConstructionInfo___destroy___0=function(){return(vh=b._emscripten_bind_btWheelInfoConstructionInfo___destroy___0=b.asm.wf).apply(null,arguments)},wh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1=function(){return(wh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1=b.asm.xf).apply(null,arguments)},xh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2=
+function(){return(xh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2=b.asm.yf).apply(null,arguments)},yh=b._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1=function(){return(yh=b._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1=b.asm.zf).apply(null,arguments)},zh=b._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0=function(){return(zh=b._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0=b.asm.Af).apply(null,arguments)},Ah=b._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2=
+function(){return(Ah=b._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2=b.asm.Bf).apply(null,arguments)},Bh=b._emscripten_bind_btConvexTriangleMeshShape_setMargin_1=function(){return(Bh=b._emscripten_bind_btConvexTriangleMeshShape_setMargin_1=b.asm.Cf).apply(null,arguments)},Ch=b._emscripten_bind_btConvexTriangleMeshShape_getMargin_0=function(){return(Ch=b._emscripten_bind_btConvexTriangleMeshShape_getMargin_0=b.asm.Df).apply(null,arguments)},Dh=b._emscripten_bind_btConvexTriangleMeshShape___destroy___0=
+function(){return(Dh=b._emscripten_bind_btConvexTriangleMeshShape___destroy___0=b.asm.Ef).apply(null,arguments)},Eh=b._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0=function(){return(Eh=b._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0=b.asm.Ff).apply(null,arguments)},Fh=b._emscripten_bind_btBroadphaseInterface___destroy___0=function(){return(Fh=b._emscripten_bind_btBroadphaseInterface___destroy___0=b.asm.Gf).apply(null,arguments)},Gh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3=
+function(){return(Gh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3=b.asm.Hf).apply(null,arguments)},Hh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4=function(){return(Hh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4=b.asm.If).apply(null,arguments)},Ih=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0=function(){return(Ih=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0=
+b.asm.Jf).apply(null,arguments)},Jh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1=function(){return(Jh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1=b.asm.Kf).apply(null,arguments)},Kh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0=function(){return(Kh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0=b.asm.Lf).apply(null,arguments)},Lh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1=function(){return(Lh=
+b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1=b.asm.Mf).apply(null,arguments)},Mh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0=function(){return(Mh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0=b.asm.Nf).apply(null,arguments)},Nh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1=function(){return(Nh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1=b.asm.Of).apply(null,arguments)},Oh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0=
+function(){return(Oh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0=b.asm.Pf).apply(null,arguments)},Ph=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1=function(){return(Ph=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1=b.asm.Qf).apply(null,arguments)},Qh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0=function(){return(Qh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0=b.asm.Rf).apply(null,
+arguments)},Rh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1=function(){return(Rh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1=b.asm.Sf).apply(null,arguments)},Sh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0=function(){return(Sh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0=b.asm.Tf).apply(null,arguments)},Th=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1=function(){return(Th=
+b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1=b.asm.Uf).apply(null,arguments)},Uh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0=function(){return(Uh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0=b.asm.Vf).apply(null,arguments)},Vh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1=function(){return(Vh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1=
+b.asm.Wf).apply(null,arguments)},Wh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0=function(){return(Wh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0=b.asm.Xf).apply(null,arguments)},Xh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1=function(){return(Xh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1=b.asm.Yf).apply(null,arguments)},Yh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0=
+function(){return(Yh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0=b.asm.Zf).apply(null,arguments)},Zh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1=function(){return(Zh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1=b.asm._f).apply(null,arguments)},$h=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0=function(){return($h=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0=
+b.asm.$f).apply(null,arguments)},ai=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1=function(){return(ai=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1=b.asm.ag).apply(null,arguments)},bi=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0=function(){return(bi=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0=b.asm.bg).apply(null,
+arguments)},ci=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1=function(){return(ci=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1=b.asm.cg).apply(null,arguments)},di=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0=function(){return(di=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0=b.asm.dg).apply(null,arguments)},ei=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1=
+function(){return(ei=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1=b.asm.eg).apply(null,arguments)},fi=b._emscripten_bind_btRigidBodyConstructionInfo___destroy___0=function(){return(fi=b._emscripten_bind_btRigidBodyConstructionInfo___destroy___0=b.asm.fg).apply(null,arguments)},gi=b._emscripten_bind_btCollisionConfiguration___destroy___0=function(){return(gi=b._emscripten_bind_btCollisionConfiguration___destroy___0=b.asm.gg).apply(null,arguments)},hi=b._emscripten_bind_btPersistentManifold_btPersistentManifold_0=
+function(){return(hi=b._emscripten_bind_btPersistentManifold_btPersistentManifold_0=b.asm.hg).apply(null,arguments)},ii=b._emscripten_bind_btPersistentManifold_getBody0_0=function(){return(ii=b._emscripten_bind_btPersistentManifold_getBody0_0=b.asm.ig).apply(null,arguments)},ji=b._emscripten_bind_btPersistentManifold_getBody1_0=function(){return(ji=b._emscripten_bind_btPersistentManifold_getBody1_0=b.asm.jg).apply(null,arguments)},ki=b._emscripten_bind_btPersistentManifold_getNumContacts_0=function(){return(ki=
+b._emscripten_bind_btPersistentManifold_getNumContacts_0=b.asm.kg).apply(null,arguments)},li=b._emscripten_bind_btPersistentManifold_getContactPoint_1=function(){return(li=b._emscripten_bind_btPersistentManifold_getContactPoint_1=b.asm.lg).apply(null,arguments)},mi=b._emscripten_bind_btPersistentManifold___destroy___0=function(){return(mi=b._emscripten_bind_btPersistentManifold___destroy___0=b.asm.mg).apply(null,arguments)},ni=b._emscripten_bind_btCompoundShape_btCompoundShape_0=function(){return(ni=
+b._emscripten_bind_btCompoundShape_btCompoundShape_0=b.asm.ng).apply(null,arguments)},oi=b._emscripten_bind_btCompoundShape_btCompoundShape_1=function(){return(oi=b._emscripten_bind_btCompoundShape_btCompoundShape_1=b.asm.og).apply(null,arguments)},pi=b._emscripten_bind_btCompoundShape_addChildShape_2=function(){return(pi=b._emscripten_bind_btCompoundShape_addChildShape_2=b.asm.pg).apply(null,arguments)},qi=b._emscripten_bind_btCompoundShape_removeChildShape_1=function(){return(qi=b._emscripten_bind_btCompoundShape_removeChildShape_1=
+b.asm.qg).apply(null,arguments)},ri=b._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1=function(){return(ri=b._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1=b.asm.rg).apply(null,arguments)},si=b._emscripten_bind_btCompoundShape_getNumChildShapes_0=function(){return(si=b._emscripten_bind_btCompoundShape_getNumChildShapes_0=b.asm.sg).apply(null,arguments)},ti=b._emscripten_bind_btCompoundShape_getChildShape_1=function(){return(ti=b._emscripten_bind_btCompoundShape_getChildShape_1=
+b.asm.tg).apply(null,arguments)},ui=b._emscripten_bind_btCompoundShape_updateChildTransform_2=function(){return(ui=b._emscripten_bind_btCompoundShape_updateChildTransform_2=b.asm.ug).apply(null,arguments)},vi=b._emscripten_bind_btCompoundShape_updateChildTransform_3=function(){return(vi=b._emscripten_bind_btCompoundShape_updateChildTransform_3=b.asm.vg).apply(null,arguments)},wi=b._emscripten_bind_btCompoundShape_setMargin_1=function(){return(wi=b._emscripten_bind_btCompoundShape_setMargin_1=b.asm.wg).apply(null,
+arguments)},xi=b._emscripten_bind_btCompoundShape_getMargin_0=function(){return(xi=b._emscripten_bind_btCompoundShape_getMargin_0=b.asm.xg).apply(null,arguments)},yi=b._emscripten_bind_btCompoundShape_setLocalScaling_1=function(){return(yi=b._emscripten_bind_btCompoundShape_setLocalScaling_1=b.asm.yg).apply(null,arguments)},zi=b._emscripten_bind_btCompoundShape_getLocalScaling_0=function(){return(zi=b._emscripten_bind_btCompoundShape_getLocalScaling_0=b.asm.zg).apply(null,arguments)},Ai=b._emscripten_bind_btCompoundShape_calculateLocalInertia_2=
+function(){return(Ai=b._emscripten_bind_btCompoundShape_calculateLocalInertia_2=b.asm.Ag).apply(null,arguments)},Bi=b._emscripten_bind_btCompoundShape___destroy___0=function(){return(Bi=b._emscripten_bind_btCompoundShape___destroy___0=b.asm.Bg).apply(null,arguments)},Ci=b._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2=function(){return(Ci=b._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2=b.asm.Cg).apply(null,arguments)},Di=b._emscripten_bind_ClosestConvexResultCallback_hasHit_0=
+function(){return(Di=b._emscripten_bind_ClosestConvexResultCallback_hasHit_0=b.asm.Dg).apply(null,arguments)},Ei=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0=function(){return(Ei=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0=b.asm.Eg).apply(null,arguments)},Fi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1=function(){return(Fi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1=b.asm.Fg).apply(null,arguments)},
+Gi=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0=function(){return(Gi=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0=b.asm.Gg).apply(null,arguments)},Hi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1=function(){return(Hi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1=b.asm.Hg).apply(null,arguments)},Ii=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0=function(){return(Ii=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0=
+b.asm.Ig).apply(null,arguments)},Ji=b._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1=function(){return(Ji=b._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1=b.asm.Jg).apply(null,arguments)},Ki=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0=function(){return(Ki=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0=b.asm.Kg).apply(null,arguments)},Li=b._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1=function(){return(Li=
+b._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1=b.asm.Lg).apply(null,arguments)},Mi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0=function(){return(Mi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0=b.asm.Mg).apply(null,arguments)},Ni=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1=function(){return(Ni=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1=b.asm.Ng).apply(null,
+arguments)},Oi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0=function(){return(Oi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0=b.asm.Og).apply(null,arguments)},Pi=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1=function(){return(Pi=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1=b.asm.Pg).apply(null,arguments)},Qi=b._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0=
+function(){return(Qi=b._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0=b.asm.Qg).apply(null,arguments)},Ri=b._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1=function(){return(Ri=b._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1=b.asm.Rg).apply(null,arguments)},Si=b._emscripten_bind_ClosestConvexResultCallback___destroy___0=function(){return(Si=b._emscripten_bind_ClosestConvexResultCallback___destroy___0=b.asm.Sg).apply(null,arguments)},
+Ti=b._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2=function(){return(Ti=b._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2=b.asm.Tg).apply(null,arguments)},Ui=b._emscripten_bind_AllHitsRayResultCallback_hasHit_0=function(){return(Ui=b._emscripten_bind_AllHitsRayResultCallback_hasHit_0=b.asm.Ug).apply(null,arguments)},Vi=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0=function(){return(Vi=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0=
+b.asm.Vg).apply(null,arguments)},Wi=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1=function(){return(Wi=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1=b.asm.Wg).apply(null,arguments)},Xi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0=function(){return(Xi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0=b.asm.Xg).apply(null,arguments)},Yi=b._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1=function(){return(Yi=
+b._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1=b.asm.Yg).apply(null,arguments)},Zi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0=function(){return(Zi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0=b.asm.Zg).apply(null,arguments)},$i=b._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1=function(){return($i=b._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1=b.asm._g).apply(null,arguments)},aj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0=
+function(){return(aj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0=b.asm.$g).apply(null,arguments)},bj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1=function(){return(bj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1=b.asm.ah).apply(null,arguments)},cj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0=function(){return(cj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0=b.asm.bh).apply(null,arguments)},
+dj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1=function(){return(dj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1=b.asm.ch).apply(null,arguments)},ej=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0=function(){return(ej=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0=b.asm.dh).apply(null,arguments)},fj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1=function(){return(fj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1=
+b.asm.eh).apply(null,arguments)},gj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0=function(){return(gj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0=b.asm.fh).apply(null,arguments)},hj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1=function(){return(hj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1=b.asm.gh).apply(null,arguments)},ij=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0=
+function(){return(ij=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0=b.asm.hh).apply(null,arguments)},jj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1=function(){return(jj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1=b.asm.ih).apply(null,arguments)},kj=b._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0=function(){return(kj=b._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0=b.asm.jh).apply(null,
+arguments)},lj=b._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1=function(){return(lj=b._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1=b.asm.kh).apply(null,arguments)},mj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0=function(){return(mj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0=b.asm.lh).apply(null,arguments)},nj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1=function(){return(nj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1=
+b.asm.mh).apply(null,arguments)},oj=b._emscripten_bind_AllHitsRayResultCallback___destroy___0=function(){return(oj=b._emscripten_bind_AllHitsRayResultCallback___destroy___0=b.asm.nh).apply(null,arguments)},pj=b._emscripten_bind_tMaterialArray_size_0=function(){return(pj=b._emscripten_bind_tMaterialArray_size_0=b.asm.oh).apply(null,arguments)},qj=b._emscripten_bind_tMaterialArray_at_1=function(){return(qj=b._emscripten_bind_tMaterialArray_at_1=b.asm.ph).apply(null,arguments)},rj=b._emscripten_bind_tMaterialArray___destroy___0=
+function(){return(rj=b._emscripten_bind_tMaterialArray___destroy___0=b.asm.qh).apply(null,arguments)},sj=b._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1=function(){return(sj=b._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1=b.asm.rh).apply(null,arguments)},tj=b._emscripten_bind_btDefaultVehicleRaycaster_castRay_3=function(){return(tj=b._emscripten_bind_btDefaultVehicleRaycaster_castRay_3=b.asm.sh).apply(null,arguments)},uj=b._emscripten_bind_btDefaultVehicleRaycaster___destroy___0=
+function(){return(uj=b._emscripten_bind_btDefaultVehicleRaycaster___destroy___0=b.asm.th).apply(null,arguments)},vj=b._emscripten_bind_btEmptyShape_btEmptyShape_0=function(){return(vj=b._emscripten_bind_btEmptyShape_btEmptyShape_0=b.asm.uh).apply(null,arguments)},wj=b._emscripten_bind_btEmptyShape_setLocalScaling_1=function(){return(wj=b._emscripten_bind_btEmptyShape_setLocalScaling_1=b.asm.vh).apply(null,arguments)},xj=b._emscripten_bind_btEmptyShape_getLocalScaling_0=function(){return(xj=b._emscripten_bind_btEmptyShape_getLocalScaling_0=
+b.asm.wh).apply(null,arguments)},yj=b._emscripten_bind_btEmptyShape_calculateLocalInertia_2=function(){return(yj=b._emscripten_bind_btEmptyShape_calculateLocalInertia_2=b.asm.xh).apply(null,arguments)},zj=b._emscripten_bind_btEmptyShape___destroy___0=function(){return(zj=b._emscripten_bind_btEmptyShape___destroy___0=b.asm.yh).apply(null,arguments)},Aj=b._emscripten_bind_btConstraintSetting_btConstraintSetting_0=function(){return(Aj=b._emscripten_bind_btConstraintSetting_btConstraintSetting_0=b.asm.zh).apply(null,
+arguments)},Bj=b._emscripten_bind_btConstraintSetting_get_m_tau_0=function(){return(Bj=b._emscripten_bind_btConstraintSetting_get_m_tau_0=b.asm.Ah).apply(null,arguments)},Cj=b._emscripten_bind_btConstraintSetting_set_m_tau_1=function(){return(Cj=b._emscripten_bind_btConstraintSetting_set_m_tau_1=b.asm.Bh).apply(null,arguments)},Dj=b._emscripten_bind_btConstraintSetting_get_m_damping_0=function(){return(Dj=b._emscripten_bind_btConstraintSetting_get_m_damping_0=b.asm.Ch).apply(null,arguments)},Ej=b._emscripten_bind_btConstraintSetting_set_m_damping_1=
+function(){return(Ej=b._emscripten_bind_btConstraintSetting_set_m_damping_1=b.asm.Dh).apply(null,arguments)},Fj=b._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0=function(){return(Fj=b._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0=b.asm.Eh).apply(null,arguments)},Gj=b._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1=function(){return(Gj=b._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1=b.asm.Fh).apply(null,arguments)},Hj=b._emscripten_bind_btConstraintSetting___destroy___0=
+function(){return(Hj=b._emscripten_bind_btConstraintSetting___destroy___0=b.asm.Gh).apply(null,arguments)},Ij=b._emscripten_bind_LocalShapeInfo_get_m_shapePart_0=function(){return(Ij=b._emscripten_bind_LocalShapeInfo_get_m_shapePart_0=b.asm.Hh).apply(null,arguments)},Jj=b._emscripten_bind_LocalShapeInfo_set_m_shapePart_1=function(){return(Jj=b._emscripten_bind_LocalShapeInfo_set_m_shapePart_1=b.asm.Ih).apply(null,arguments)},Kj=b._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0=function(){return(Kj=
+b._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0=b.asm.Jh).apply(null,arguments)},Lj=b._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1=function(){return(Lj=b._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1=b.asm.Kh).apply(null,arguments)},Mj=b._emscripten_bind_LocalShapeInfo___destroy___0=function(){return(Mj=b._emscripten_bind_LocalShapeInfo___destroy___0=b.asm.Lh).apply(null,arguments)},Nj=b._emscripten_bind_btRigidBody_btRigidBody_1=function(){return(Nj=b._emscripten_bind_btRigidBody_btRigidBody_1=
+b.asm.Mh).apply(null,arguments)},Oj=b._emscripten_bind_btRigidBody_getCenterOfMassTransform_0=function(){return(Oj=b._emscripten_bind_btRigidBody_getCenterOfMassTransform_0=b.asm.Nh).apply(null,arguments)},Pj=b._emscripten_bind_btRigidBody_setCenterOfMassTransform_1=function(){return(Pj=b._emscripten_bind_btRigidBody_setCenterOfMassTransform_1=b.asm.Oh).apply(null,arguments)},Qj=b._emscripten_bind_btRigidBody_setSleepingThresholds_2=function(){return(Qj=b._emscripten_bind_btRigidBody_setSleepingThresholds_2=
+b.asm.Ph).apply(null,arguments)},Rj=b._emscripten_bind_btRigidBody_getLinearDamping_0=function(){return(Rj=b._emscripten_bind_btRigidBody_getLinearDamping_0=b.asm.Qh).apply(null,arguments)},Sj=b._emscripten_bind_btRigidBody_getAngularDamping_0=function(){return(Sj=b._emscripten_bind_btRigidBody_getAngularDamping_0=b.asm.Rh).apply(null,arguments)},Tj=b._emscripten_bind_btRigidBody_setDamping_2=function(){return(Tj=b._emscripten_bind_btRigidBody_setDamping_2=b.asm.Sh).apply(null,arguments)},Uj=b._emscripten_bind_btRigidBody_setMassProps_2=
+function(){return(Uj=b._emscripten_bind_btRigidBody_setMassProps_2=b.asm.Th).apply(null,arguments)},Vj=b._emscripten_bind_btRigidBody_getLinearFactor_0=function(){return(Vj=b._emscripten_bind_btRigidBody_getLinearFactor_0=b.asm.Uh).apply(null,arguments)},Wj=b._emscripten_bind_btRigidBody_setLinearFactor_1=function(){return(Wj=b._emscripten_bind_btRigidBody_setLinearFactor_1=b.asm.Vh).apply(null,arguments)},Xj=b._emscripten_bind_btRigidBody_applyTorque_1=function(){return(Xj=b._emscripten_bind_btRigidBody_applyTorque_1=
+b.asm.Wh).apply(null,arguments)},Yj=b._emscripten_bind_btRigidBody_applyLocalTorque_1=function(){return(Yj=b._emscripten_bind_btRigidBody_applyLocalTorque_1=b.asm.Xh).apply(null,arguments)},Zj=b._emscripten_bind_btRigidBody_applyForce_2=function(){return(Zj=b._emscripten_bind_btRigidBody_applyForce_2=b.asm.Yh).apply(null,arguments)},ak=b._emscripten_bind_btRigidBody_applyCentralForce_1=function(){return(ak=b._emscripten_bind_btRigidBody_applyCentralForce_1=b.asm.Zh).apply(null,arguments)},bk=b._emscripten_bind_btRigidBody_applyCentralLocalForce_1=
+function(){return(bk=b._emscripten_bind_btRigidBody_applyCentralLocalForce_1=b.asm._h).apply(null,arguments)},ck=b._emscripten_bind_btRigidBody_applyTorqueImpulse_1=function(){return(ck=b._emscripten_bind_btRigidBody_applyTorqueImpulse_1=b.asm.$h).apply(null,arguments)},dk=b._emscripten_bind_btRigidBody_applyImpulse_2=function(){return(dk=b._emscripten_bind_btRigidBody_applyImpulse_2=b.asm.ai).apply(null,arguments)},ek=b._emscripten_bind_btRigidBody_applyCentralImpulse_1=function(){return(ek=b._emscripten_bind_btRigidBody_applyCentralImpulse_1=
+b.asm.bi).apply(null,arguments)},fk=b._emscripten_bind_btRigidBody_updateInertiaTensor_0=function(){return(fk=b._emscripten_bind_btRigidBody_updateInertiaTensor_0=b.asm.ci).apply(null,arguments)},gk=b._emscripten_bind_btRigidBody_getLinearVelocity_0=function(){return(gk=b._emscripten_bind_btRigidBody_getLinearVelocity_0=b.asm.di).apply(null,arguments)},hk=b._emscripten_bind_btRigidBody_getAngularVelocity_0=function(){return(hk=b._emscripten_bind_btRigidBody_getAngularVelocity_0=b.asm.ei).apply(null,
+arguments)},ik=b._emscripten_bind_btRigidBody_setLinearVelocity_1=function(){return(ik=b._emscripten_bind_btRigidBody_setLinearVelocity_1=b.asm.fi).apply(null,arguments)},jk=b._emscripten_bind_btRigidBody_setAngularVelocity_1=function(){return(jk=b._emscripten_bind_btRigidBody_setAngularVelocity_1=b.asm.gi).apply(null,arguments)},kk=b._emscripten_bind_btRigidBody_getMotionState_0=function(){return(kk=b._emscripten_bind_btRigidBody_getMotionState_0=b.asm.hi).apply(null,arguments)},lk=b._emscripten_bind_btRigidBody_setMotionState_1=
+function(){return(lk=b._emscripten_bind_btRigidBody_setMotionState_1=b.asm.ii).apply(null,arguments)},mk=b._emscripten_bind_btRigidBody_getAngularFactor_0=function(){return(mk=b._emscripten_bind_btRigidBody_getAngularFactor_0=b.asm.ji).apply(null,arguments)},nk=b._emscripten_bind_btRigidBody_setAngularFactor_1=function(){return(nk=b._emscripten_bind_btRigidBody_setAngularFactor_1=b.asm.ki).apply(null,arguments)},ok=b._emscripten_bind_btRigidBody_upcast_1=function(){return(ok=b._emscripten_bind_btRigidBody_upcast_1=
+b.asm.li).apply(null,arguments)},pk=b._emscripten_bind_btRigidBody_getAabb_2=function(){return(pk=b._emscripten_bind_btRigidBody_getAabb_2=b.asm.mi).apply(null,arguments)},qk=b._emscripten_bind_btRigidBody_applyGravity_0=function(){return(qk=b._emscripten_bind_btRigidBody_applyGravity_0=b.asm.ni).apply(null,arguments)},rk=b._emscripten_bind_btRigidBody_getGravity_0=function(){return(rk=b._emscripten_bind_btRigidBody_getGravity_0=b.asm.oi).apply(null,arguments)},sk=b._emscripten_bind_btRigidBody_setGravity_1=
+function(){return(sk=b._emscripten_bind_btRigidBody_setGravity_1=b.asm.pi).apply(null,arguments)},tk=b._emscripten_bind_btRigidBody_getBroadphaseProxy_0=function(){return(tk=b._emscripten_bind_btRigidBody_getBroadphaseProxy_0=b.asm.qi).apply(null,arguments)},uk=b._emscripten_bind_btRigidBody_clearForces_0=function(){return(uk=b._emscripten_bind_btRigidBody_clearForces_0=b.asm.ri).apply(null,arguments)},vk=b._emscripten_bind_btRigidBody_setAnisotropicFriction_2=function(){return(vk=b._emscripten_bind_btRigidBody_setAnisotropicFriction_2=
+b.asm.si).apply(null,arguments)},wk=b._emscripten_bind_btRigidBody_getCollisionShape_0=function(){return(wk=b._emscripten_bind_btRigidBody_getCollisionShape_0=b.asm.ti).apply(null,arguments)},xk=b._emscripten_bind_btRigidBody_setContactProcessingThreshold_1=function(){return(xk=b._emscripten_bind_btRigidBody_setContactProcessingThreshold_1=b.asm.ui).apply(null,arguments)},yk=b._emscripten_bind_btRigidBody_setActivationState_1=function(){return(yk=b._emscripten_bind_btRigidBody_setActivationState_1=
+b.asm.vi).apply(null,arguments)},zk=b._emscripten_bind_btRigidBody_forceActivationState_1=function(){return(zk=b._emscripten_bind_btRigidBody_forceActivationState_1=b.asm.wi).apply(null,arguments)},Ak=b._emscripten_bind_btRigidBody_activate_0=function(){return(Ak=b._emscripten_bind_btRigidBody_activate_0=b.asm.xi).apply(null,arguments)},Bk=b._emscripten_bind_btRigidBody_activate_1=function(){return(Bk=b._emscripten_bind_btRigidBody_activate_1=b.asm.yi).apply(null,arguments)},Ck=b._emscripten_bind_btRigidBody_isActive_0=
+function(){return(Ck=b._emscripten_bind_btRigidBody_isActive_0=b.asm.zi).apply(null,arguments)},Dk=b._emscripten_bind_btRigidBody_isKinematicObject_0=function(){return(Dk=b._emscripten_bind_btRigidBody_isKinematicObject_0=b.asm.Ai).apply(null,arguments)},Ek=b._emscripten_bind_btRigidBody_isStaticObject_0=function(){return(Ek=b._emscripten_bind_btRigidBody_isStaticObject_0=b.asm.Bi).apply(null,arguments)},Fk=b._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0=function(){return(Fk=b._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0=
+b.asm.Ci).apply(null,arguments)},Gk=b._emscripten_bind_btRigidBody_getRestitution_0=function(){return(Gk=b._emscripten_bind_btRigidBody_getRestitution_0=b.asm.Di).apply(null,arguments)},Hk=b._emscripten_bind_btRigidBody_getFriction_0=function(){return(Hk=b._emscripten_bind_btRigidBody_getFriction_0=b.asm.Ei).apply(null,arguments)},Ik=b._emscripten_bind_btRigidBody_getRollingFriction_0=function(){return(Ik=b._emscripten_bind_btRigidBody_getRollingFriction_0=b.asm.Fi).apply(null,arguments)},Jk=b._emscripten_bind_btRigidBody_setRestitution_1=
+function(){return(Jk=b._emscripten_bind_btRigidBody_setRestitution_1=b.asm.Gi).apply(null,arguments)},Kk=b._emscripten_bind_btRigidBody_setFriction_1=function(){return(Kk=b._emscripten_bind_btRigidBody_setFriction_1=b.asm.Hi).apply(null,arguments)},Lk=b._emscripten_bind_btRigidBody_setRollingFriction_1=function(){return(Lk=b._emscripten_bind_btRigidBody_setRollingFriction_1=b.asm.Ii).apply(null,arguments)},Mk=b._emscripten_bind_btRigidBody_getWorldTransform_0=function(){return(Mk=b._emscripten_bind_btRigidBody_getWorldTransform_0=
+b.asm.Ji).apply(null,arguments)},Nk=b._emscripten_bind_btRigidBody_getCollisionFlags_0=function(){return(Nk=b._emscripten_bind_btRigidBody_getCollisionFlags_0=b.asm.Ki).apply(null,arguments)},Ok=b._emscripten_bind_btRigidBody_setCollisionFlags_1=function(){return(Ok=b._emscripten_bind_btRigidBody_setCollisionFlags_1=b.asm.Li).apply(null,arguments)},Pk=b._emscripten_bind_btRigidBody_setWorldTransform_1=function(){return(Pk=b._emscripten_bind_btRigidBody_setWorldTransform_1=b.asm.Mi).apply(null,arguments)},
+Qk=b._emscripten_bind_btRigidBody_setCollisionShape_1=function(){return(Qk=b._emscripten_bind_btRigidBody_setCollisionShape_1=b.asm.Ni).apply(null,arguments)},Rk=b._emscripten_bind_btRigidBody_setCcdMotionThreshold_1=function(){return(Rk=b._emscripten_bind_btRigidBody_setCcdMotionThreshold_1=b.asm.Oi).apply(null,arguments)},Sk=b._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1=function(){return(Sk=b._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1=b.asm.Pi).apply(null,arguments)},Tk=b._emscripten_bind_btRigidBody_getUserIndex_0=
+function(){return(Tk=b._emscripten_bind_btRigidBody_getUserIndex_0=b.asm.Qi).apply(null,arguments)},Uk=b._emscripten_bind_btRigidBody_setUserIndex_1=function(){return(Uk=b._emscripten_bind_btRigidBody_setUserIndex_1=b.asm.Ri).apply(null,arguments)},Vk=b._emscripten_bind_btRigidBody_getUserPointer_0=function(){return(Vk=b._emscripten_bind_btRigidBody_getUserPointer_0=b.asm.Si).apply(null,arguments)},Wk=b._emscripten_bind_btRigidBody_setUserPointer_1=function(){return(Wk=b._emscripten_bind_btRigidBody_setUserPointer_1=
+b.asm.Ti).apply(null,arguments)},Xk=b._emscripten_bind_btRigidBody_getBroadphaseHandle_0=function(){return(Xk=b._emscripten_bind_btRigidBody_getBroadphaseHandle_0=b.asm.Ui).apply(null,arguments)},Yk=b._emscripten_bind_btRigidBody___destroy___0=function(){return(Yk=b._emscripten_bind_btRigidBody___destroy___0=b.asm.Vi).apply(null,arguments)},Zk=b._emscripten_bind_btIndexedMeshArray_size_0=function(){return(Zk=b._emscripten_bind_btIndexedMeshArray_size_0=b.asm.Wi).apply(null,arguments)},$k=b._emscripten_bind_btIndexedMeshArray_at_1=
+function(){return($k=b._emscripten_bind_btIndexedMeshArray_at_1=b.asm.Xi).apply(null,arguments)},al=b._emscripten_bind_btIndexedMeshArray___destroy___0=function(){return(al=b._emscripten_bind_btIndexedMeshArray___destroy___0=b.asm.Yi).apply(null,arguments)},bl=b._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0=function(){return(bl=b._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0=b.asm.Zi).apply(null,arguments)},cl=b._emscripten_bind_btDbvtBroadphase___destroy___0=function(){return(cl=b._emscripten_bind_btDbvtBroadphase___destroy___0=
+b.asm._i).apply(null,arguments)},dl=b._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9=function(){return(dl=b._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9=b.asm.$i).apply(null,arguments)},el=b._emscripten_bind_btHeightfieldTerrainShape_setMargin_1=function(){return(el=b._emscripten_bind_btHeightfieldTerrainShape_setMargin_1=b.asm.aj).apply(null,arguments)},fl=b._emscripten_bind_btHeightfieldTerrainShape_getMargin_0=function(){return(fl=b._emscripten_bind_btHeightfieldTerrainShape_getMargin_0=
+b.asm.bj).apply(null,arguments)},gl=b._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1=function(){return(gl=b._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1=b.asm.cj).apply(null,arguments)},hl=b._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0=function(){return(hl=b._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0=b.asm.dj).apply(null,arguments)},il=b._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2=function(){return(il=b._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2=
+b.asm.ej).apply(null,arguments)},jl=b._emscripten_bind_btHeightfieldTerrainShape___destroy___0=function(){return(jl=b._emscripten_bind_btHeightfieldTerrainShape___destroy___0=b.asm.fj).apply(null,arguments)},kl=b._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0=function(){return(kl=b._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0=b.asm.gj).apply(null,arguments)},ll=b._emscripten_bind_btDefaultSoftBodySolver___destroy___0=function(){return(ll=b._emscripten_bind_btDefaultSoftBodySolver___destroy___0=
+b.asm.hj).apply(null,arguments)},ml=b._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1=function(){return(ml=b._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1=b.asm.ij).apply(null,arguments)},nl=b._emscripten_bind_btCollisionDispatcher_getNumManifolds_0=function(){return(nl=b._emscripten_bind_btCollisionDispatcher_getNumManifolds_0=b.asm.jj).apply(null,arguments)},ol=b._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1=function(){return(ol=b._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1=
+b.asm.kj).apply(null,arguments)},pl=b._emscripten_bind_btCollisionDispatcher___destroy___0=function(){return(pl=b._emscripten_bind_btCollisionDispatcher___destroy___0=b.asm.lj).apply(null,arguments)},ql=b._emscripten_bind_btAxisSweep3_btAxisSweep3_2=function(){return(ql=b._emscripten_bind_btAxisSweep3_btAxisSweep3_2=b.asm.mj).apply(null,arguments)},rl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_3=function(){return(rl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_3=b.asm.nj).apply(null,arguments)},
+sl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_4=function(){return(sl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_4=b.asm.oj).apply(null,arguments)},tl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_5=function(){return(tl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_5=b.asm.pj).apply(null,arguments)},ul=b._emscripten_bind_btAxisSweep3___destroy___0=function(){return(ul=b._emscripten_bind_btAxisSweep3___destroy___0=b.asm.qj).apply(null,arguments)},vl=b._emscripten_bind_VoidPtr___destroy___0=function(){return(vl=
+b._emscripten_bind_VoidPtr___destroy___0=b.asm.rj).apply(null,arguments)},wl=b._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0=function(){return(wl=b._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0=b.asm.sj).apply(null,arguments)},xl=b._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0=function(){return(xl=b._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0=b.asm.tj).apply(null,arguments)},yl=b._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1=function(){return(yl=
+b._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1=b.asm.uj).apply(null,arguments)},zl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0=function(){return(zl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0=b.asm.vj).apply(null,arguments)},Al=b._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1=function(){return(Al=b._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1=b.asm.wj).apply(null,arguments)},Bl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0=
+function(){return(Bl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0=b.asm.xj).apply(null,arguments)},Cl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1=function(){return(Cl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1=b.asm.yj).apply(null,arguments)},Dl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0=function(){return(Dl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0=b.asm.zj).apply(null,arguments)},El=b._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1=
+function(){return(El=b._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1=b.asm.Aj).apply(null,arguments)},Fl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0=function(){return(Fl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0=b.asm.Bj).apply(null,arguments)},Gl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1=function(){return(Gl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1=b.asm.Cj).apply(null,arguments)},Hl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0=
+function(){return(Hl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0=b.asm.Dj).apply(null,arguments)},Il=b._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1=function(){return(Il=b._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1=b.asm.Ej).apply(null,arguments)},Jl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0=function(){return(Jl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0=b.asm.Fj).apply(null,arguments)},Kl=b._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1=
+function(){return(Kl=b._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1=b.asm.Gj).apply(null,arguments)},Ll=b._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0=function(){return(Ll=b._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0=b.asm.Hj).apply(null,arguments)},Ml=b._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1=function(){return(Ml=b._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1=b.asm.Ij).apply(null,arguments)},Nl=b._emscripten_bind_btSoftBodyWorldInfo___destroy___0=
+function(){return(Nl=b._emscripten_bind_btSoftBodyWorldInfo___destroy___0=b.asm.Jj).apply(null,arguments)},Ol=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2=function(){return(Ol=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2=b.asm.Kj).apply(null,arguments)},Pl=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4=function(){return(Pl=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4=b.asm.Lj).apply(null,arguments)},Ql=b._emscripten_bind_btConeTwistConstraint_setLimit_2=
+function(){return(Ql=b._emscripten_bind_btConeTwistConstraint_setLimit_2=b.asm.Mj).apply(null,arguments)},Rl=b._emscripten_bind_btConeTwistConstraint_setAngularOnly_1=function(){return(Rl=b._emscripten_bind_btConeTwistConstraint_setAngularOnly_1=b.asm.Nj).apply(null,arguments)},Sl=b._emscripten_bind_btConeTwistConstraint_setDamping_1=function(){return(Sl=b._emscripten_bind_btConeTwistConstraint_setDamping_1=b.asm.Oj).apply(null,arguments)},Tl=b._emscripten_bind_btConeTwistConstraint_enableMotor_1=
+function(){return(Tl=b._emscripten_bind_btConeTwistConstraint_enableMotor_1=b.asm.Pj).apply(null,arguments)},Ul=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1=function(){return(Ul=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1=b.asm.Qj).apply(null,arguments)},Vl=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1=function(){return(Vl=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1=b.asm.Rj).apply(null,arguments)},Wl=b._emscripten_bind_btConeTwistConstraint_setMotorTarget_1=
+function(){return(Wl=b._emscripten_bind_btConeTwistConstraint_setMotorTarget_1=b.asm.Sj).apply(null,arguments)},Xl=b._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1=function(){return(Xl=b._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1=b.asm.Tj).apply(null,arguments)},Yl=b._emscripten_bind_btConeTwistConstraint_enableFeedback_1=function(){return(Yl=b._emscripten_bind_btConeTwistConstraint_enableFeedback_1=b.asm.Uj).apply(null,arguments)},Zl=b._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0=
+function(){return(Zl=b._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0=b.asm.Vj).apply(null,arguments)},$l=b._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1=function(){return($l=b._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1=b.asm.Wj).apply(null,arguments)},am=b._emscripten_bind_btConeTwistConstraint_getParam_2=function(){return(am=b._emscripten_bind_btConeTwistConstraint_getParam_2=b.asm.Xj).apply(null,arguments)},bm=b._emscripten_bind_btConeTwistConstraint_setParam_3=
+function(){return(bm=b._emscripten_bind_btConeTwistConstraint_setParam_3=b.asm.Yj).apply(null,arguments)},cm=b._emscripten_bind_btConeTwistConstraint___destroy___0=function(){return(cm=b._emscripten_bind_btConeTwistConstraint___destroy___0=b.asm.Zj).apply(null,arguments)},dm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_2=function(){return(dm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_2=b.asm._j).apply(null,arguments)},em=b._emscripten_bind_btHingeConstraint_btHingeConstraint_3=
+function(){return(em=b._emscripten_bind_btHingeConstraint_btHingeConstraint_3=b.asm.$j).apply(null,arguments)},fm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_4=function(){return(fm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_4=b.asm.ak).apply(null,arguments)},gm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_5=function(){return(gm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_5=b.asm.bk).apply(null,arguments)},hm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_6=
+function(){return(hm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_6=b.asm.ck).apply(null,arguments)},im=b._emscripten_bind_btHingeConstraint_btHingeConstraint_7=function(){return(im=b._emscripten_bind_btHingeConstraint_btHingeConstraint_7=b.asm.dk).apply(null,arguments)},jm=b._emscripten_bind_btHingeConstraint_setLimit_4=function(){return(jm=b._emscripten_bind_btHingeConstraint_setLimit_4=b.asm.ek).apply(null,arguments)},km=b._emscripten_bind_btHingeConstraint_setLimit_5=function(){return(km=
+b._emscripten_bind_btHingeConstraint_setLimit_5=b.asm.fk).apply(null,arguments)},lm=b._emscripten_bind_btHingeConstraint_enableAngularMotor_3=function(){return(lm=b._emscripten_bind_btHingeConstraint_enableAngularMotor_3=b.asm.gk).apply(null,arguments)},mm=b._emscripten_bind_btHingeConstraint_setAngularOnly_1=function(){return(mm=b._emscripten_bind_btHingeConstraint_setAngularOnly_1=b.asm.hk).apply(null,arguments)},nm=b._emscripten_bind_btHingeConstraint_enableMotor_1=function(){return(nm=b._emscripten_bind_btHingeConstraint_enableMotor_1=
+b.asm.ik).apply(null,arguments)},om=b._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1=function(){return(om=b._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1=b.asm.jk).apply(null,arguments)},pm=b._emscripten_bind_btHingeConstraint_setMotorTarget_2=function(){return(pm=b._emscripten_bind_btHingeConstraint_setMotorTarget_2=b.asm.kk).apply(null,arguments)},qm=b._emscripten_bind_btHingeConstraint_enableFeedback_1=function(){return(qm=b._emscripten_bind_btHingeConstraint_enableFeedback_1=
+b.asm.lk).apply(null,arguments)},rm=b._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0=function(){return(rm=b._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0=b.asm.mk).apply(null,arguments)},sm=b._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1=function(){return(sm=b._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1=b.asm.nk).apply(null,arguments)},tm=b._emscripten_bind_btHingeConstraint_getParam_2=function(){return(tm=b._emscripten_bind_btHingeConstraint_getParam_2=
+b.asm.ok).apply(null,arguments)},um=b._emscripten_bind_btHingeConstraint_setParam_3=function(){return(um=b._emscripten_bind_btHingeConstraint_setParam_3=b.asm.pk).apply(null,arguments)},wm=b._emscripten_bind_btHingeConstraint___destroy___0=function(){return(wm=b._emscripten_bind_btHingeConstraint___destroy___0=b.asm.qk).apply(null,arguments)},xm=b._emscripten_bind_btConeShapeZ_btConeShapeZ_2=function(){return(xm=b._emscripten_bind_btConeShapeZ_btConeShapeZ_2=b.asm.rk).apply(null,arguments)},ym=b._emscripten_bind_btConeShapeZ_setLocalScaling_1=
+function(){return(ym=b._emscripten_bind_btConeShapeZ_setLocalScaling_1=b.asm.sk).apply(null,arguments)},zm=b._emscripten_bind_btConeShapeZ_getLocalScaling_0=function(){return(zm=b._emscripten_bind_btConeShapeZ_getLocalScaling_0=b.asm.tk).apply(null,arguments)},Am=b._emscripten_bind_btConeShapeZ_calculateLocalInertia_2=function(){return(Am=b._emscripten_bind_btConeShapeZ_calculateLocalInertia_2=b.asm.uk).apply(null,arguments)},Bm=b._emscripten_bind_btConeShapeZ___destroy___0=function(){return(Bm=b._emscripten_bind_btConeShapeZ___destroy___0=
+b.asm.vk).apply(null,arguments)},Cm=b._emscripten_bind_btConeShapeX_btConeShapeX_2=function(){return(Cm=b._emscripten_bind_btConeShapeX_btConeShapeX_2=b.asm.wk).apply(null,arguments)},Dm=b._emscripten_bind_btConeShapeX_setLocalScaling_1=function(){return(Dm=b._emscripten_bind_btConeShapeX_setLocalScaling_1=b.asm.xk).apply(null,arguments)},Em=b._emscripten_bind_btConeShapeX_getLocalScaling_0=function(){return(Em=b._emscripten_bind_btConeShapeX_getLocalScaling_0=b.asm.yk).apply(null,arguments)},Fm=
+b._emscripten_bind_btConeShapeX_calculateLocalInertia_2=function(){return(Fm=b._emscripten_bind_btConeShapeX_calculateLocalInertia_2=b.asm.zk).apply(null,arguments)},Gm=b._emscripten_bind_btConeShapeX___destroy___0=function(){return(Gm=b._emscripten_bind_btConeShapeX___destroy___0=b.asm.Ak).apply(null,arguments)},Hm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_0=function(){return(Hm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_0=b.asm.Bk).apply(null,arguments)},Im=b._emscripten_bind_btTriangleMesh_btTriangleMesh_1=
+function(){return(Im=b._emscripten_bind_btTriangleMesh_btTriangleMesh_1=b.asm.Ck).apply(null,arguments)},Jm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_2=function(){return(Jm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_2=b.asm.Dk).apply(null,arguments)},Km=b._emscripten_bind_btTriangleMesh_addTriangle_3=function(){return(Km=b._emscripten_bind_btTriangleMesh_addTriangle_3=b.asm.Ek).apply(null,arguments)},Lm=b._emscripten_bind_btTriangleMesh_addTriangle_4=function(){return(Lm=b._emscripten_bind_btTriangleMesh_addTriangle_4=
+b.asm.Fk).apply(null,arguments)},Mm=b._emscripten_bind_btTriangleMesh_findOrAddVertex_2=function(){return(Mm=b._emscripten_bind_btTriangleMesh_findOrAddVertex_2=b.asm.Gk).apply(null,arguments)},Nm=b._emscripten_bind_btTriangleMesh_addIndex_1=function(){return(Nm=b._emscripten_bind_btTriangleMesh_addIndex_1=b.asm.Hk).apply(null,arguments)},Om=b._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0=function(){return(Om=b._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0=b.asm.Ik).apply(null,arguments)},
+Pm=b._emscripten_bind_btTriangleMesh_setScaling_1=function(){return(Pm=b._emscripten_bind_btTriangleMesh_setScaling_1=b.asm.Jk).apply(null,arguments)},Qm=b._emscripten_bind_btTriangleMesh___destroy___0=function(){return(Qm=b._emscripten_bind_btTriangleMesh___destroy___0=b.asm.Kk).apply(null,arguments)},Rm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_0=function(){return(Rm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_0=b.asm.Lk).apply(null,arguments)},Sm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_1=
+function(){return(Sm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_1=b.asm.Mk).apply(null,arguments)},Tm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_2=function(){return(Tm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_2=b.asm.Nk).apply(null,arguments)},Um=b._emscripten_bind_btConvexHullShape_addPoint_1=function(){return(Um=b._emscripten_bind_btConvexHullShape_addPoint_1=b.asm.Ok).apply(null,arguments)},Vm=b._emscripten_bind_btConvexHullShape_addPoint_2=function(){return(Vm=
+b._emscripten_bind_btConvexHullShape_addPoint_2=b.asm.Pk).apply(null,arguments)},Wm=b._emscripten_bind_btConvexHullShape_setMargin_1=function(){return(Wm=b._emscripten_bind_btConvexHullShape_setMargin_1=b.asm.Qk).apply(null,arguments)},Xm=b._emscripten_bind_btConvexHullShape_getMargin_0=function(){return(Xm=b._emscripten_bind_btConvexHullShape_getMargin_0=b.asm.Rk).apply(null,arguments)},Ym=b._emscripten_bind_btConvexHullShape_getNumVertices_0=function(){return(Ym=b._emscripten_bind_btConvexHullShape_getNumVertices_0=
+b.asm.Sk).apply(null,arguments)},Zm=b._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1=function(){return(Zm=b._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1=b.asm.Tk).apply(null,arguments)},$m=b._emscripten_bind_btConvexHullShape_recalcLocalAabb_0=function(){return($m=b._emscripten_bind_btConvexHullShape_recalcLocalAabb_0=b.asm.Uk).apply(null,arguments)},an=b._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0=function(){return(an=b._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0=
+b.asm.Vk).apply(null,arguments)},bn=b._emscripten_bind_btConvexHullShape_setLocalScaling_1=function(){return(bn=b._emscripten_bind_btConvexHullShape_setLocalScaling_1=b.asm.Wk).apply(null,arguments)},cn=b._emscripten_bind_btConvexHullShape_getLocalScaling_0=function(){return(cn=b._emscripten_bind_btConvexHullShape_getLocalScaling_0=b.asm.Xk).apply(null,arguments)},dn=b._emscripten_bind_btConvexHullShape_calculateLocalInertia_2=function(){return(dn=b._emscripten_bind_btConvexHullShape_calculateLocalInertia_2=
+b.asm.Yk).apply(null,arguments)},en=b._emscripten_bind_btConvexHullShape___destroy___0=function(){return(en=b._emscripten_bind_btConvexHullShape___destroy___0=b.asm.Zk).apply(null,arguments)},fn=b._emscripten_bind_btVehicleTuning_btVehicleTuning_0=function(){return(fn=b._emscripten_bind_btVehicleTuning_btVehicleTuning_0=b.asm._k).apply(null,arguments)},gn=b._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0=function(){return(gn=b._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0=
+b.asm.$k).apply(null,arguments)},hn=b._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1=function(){return(hn=b._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1=b.asm.al).apply(null,arguments)},jn=b._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0=function(){return(jn=b._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0=b.asm.bl).apply(null,arguments)},kn=b._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1=function(){return(kn=b._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1=
+b.asm.cl).apply(null,arguments)},ln=b._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0=function(){return(ln=b._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0=b.asm.dl).apply(null,arguments)},mn=b._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1=function(){return(mn=b._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1=b.asm.el).apply(null,arguments)},nn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0=function(){return(nn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0=
+b.asm.fl).apply(null,arguments)},on=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1=function(){return(on=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1=b.asm.gl).apply(null,arguments)},pn=b._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0=function(){return(pn=b._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0=b.asm.hl).apply(null,arguments)},qn=b._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1=function(){return(qn=b._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1=
+b.asm.il).apply(null,arguments)},rn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0=function(){return(rn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0=b.asm.jl).apply(null,arguments)},sn=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1=function(){return(sn=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1=b.asm.kl).apply(null,arguments)},tn=b._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0=function(){return(tn=b._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0=
+b.asm.ll).apply(null,arguments)},un=b._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0=function(){return(un=b._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0=b.asm.ml).apply(null,arguments)},vn=b._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0=function(){return(vn=b._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0=b.asm.nl).apply(null,arguments)},wn=b._emscripten_bind_btShapeHull_btShapeHull_1=function(){return(wn=b._emscripten_bind_btShapeHull_btShapeHull_1=
+b.asm.ol).apply(null,arguments)},xn=b._emscripten_bind_btShapeHull_buildHull_1=function(){return(xn=b._emscripten_bind_btShapeHull_buildHull_1=b.asm.pl).apply(null,arguments)},yn=b._emscripten_bind_btShapeHull_numVertices_0=function(){return(yn=b._emscripten_bind_btShapeHull_numVertices_0=b.asm.ql).apply(null,arguments)},zn=b._emscripten_bind_btShapeHull_getVertexPointer_0=function(){return(zn=b._emscripten_bind_btShapeHull_getVertexPointer_0=b.asm.rl).apply(null,arguments)},An=b._emscripten_bind_btShapeHull___destroy___0=
+function(){return(An=b._emscripten_bind_btShapeHull___destroy___0=b.asm.sl).apply(null,arguments)},Bn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0=function(){return(Bn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0=b.asm.tl).apply(null,arguments)},Cn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1=function(){return(Cn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1=b.asm.ul).apply(null,arguments)},Dn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2=
+function(){return(Dn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2=b.asm.vl).apply(null,arguments)},En=b._emscripten_bind_btDefaultMotionState_getWorldTransform_1=function(){return(En=b._emscripten_bind_btDefaultMotionState_getWorldTransform_1=b.asm.wl).apply(null,arguments)},Fn=b._emscripten_bind_btDefaultMotionState_setWorldTransform_1=function(){return(Fn=b._emscripten_bind_btDefaultMotionState_setWorldTransform_1=b.asm.xl).apply(null,arguments)},Gn=b._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0=
+function(){return(Gn=b._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0=b.asm.yl).apply(null,arguments)},Hn=b._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1=function(){return(Hn=b._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1=b.asm.zl).apply(null,arguments)},In=b._emscripten_bind_btDefaultMotionState___destroy___0=function(){return(In=b._emscripten_bind_btDefaultMotionState___destroy___0=b.asm.Al).apply(null,arguments)},Jn=b._emscripten_bind_btWheelInfo_btWheelInfo_1=
+function(){return(Jn=b._emscripten_bind_btWheelInfo_btWheelInfo_1=b.asm.Bl).apply(null,arguments)},Kn=b._emscripten_bind_btWheelInfo_getSuspensionRestLength_0=function(){return(Kn=b._emscripten_bind_btWheelInfo_getSuspensionRestLength_0=b.asm.Cl).apply(null,arguments)},Ln=b._emscripten_bind_btWheelInfo_updateWheel_2=function(){return(Ln=b._emscripten_bind_btWheelInfo_updateWheel_2=b.asm.Dl).apply(null,arguments)},Mn=b._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0=function(){return(Mn=b._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0=
+b.asm.El).apply(null,arguments)},Nn=b._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1=function(){return(Nn=b._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1=b.asm.Fl).apply(null,arguments)},On=b._emscripten_bind_btWheelInfo_get_m_frictionSlip_0=function(){return(On=b._emscripten_bind_btWheelInfo_get_m_frictionSlip_0=b.asm.Gl).apply(null,arguments)},Pn=b._emscripten_bind_btWheelInfo_set_m_frictionSlip_1=function(){return(Pn=b._emscripten_bind_btWheelInfo_set_m_frictionSlip_1=b.asm.Hl).apply(null,
+arguments)},Qn=b._emscripten_bind_btWheelInfo_get_m_engineForce_0=function(){return(Qn=b._emscripten_bind_btWheelInfo_get_m_engineForce_0=b.asm.Il).apply(null,arguments)},Rn=b._emscripten_bind_btWheelInfo_set_m_engineForce_1=function(){return(Rn=b._emscripten_bind_btWheelInfo_set_m_engineForce_1=b.asm.Jl).apply(null,arguments)},Sn=b._emscripten_bind_btWheelInfo_get_m_rollInfluence_0=function(){return(Sn=b._emscripten_bind_btWheelInfo_get_m_rollInfluence_0=b.asm.Kl).apply(null,arguments)},Tn=b._emscripten_bind_btWheelInfo_set_m_rollInfluence_1=
+function(){return(Tn=b._emscripten_bind_btWheelInfo_set_m_rollInfluence_1=b.asm.Ll).apply(null,arguments)},Un=b._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0=function(){return(Un=b._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0=b.asm.Ml).apply(null,arguments)},Vn=b._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1=function(){return(Vn=b._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1=b.asm.Nl).apply(null,arguments)},Wn=b._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0=
+function(){return(Wn=b._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0=b.asm.Ol).apply(null,arguments)},Xn=b._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1=function(){return(Xn=b._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1=b.asm.Pl).apply(null,arguments)},Yn=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0=function(){return(Yn=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0=b.asm.Ql).apply(null,arguments)},Zn=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1=
+function(){return(Zn=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1=b.asm.Rl).apply(null,arguments)},$n=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0=function(){return($n=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0=b.asm.Sl).apply(null,arguments)},ao=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1=function(){return(ao=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1=b.asm.Tl).apply(null,arguments)},bo=b._emscripten_bind_btWheelInfo_get_m_steering_0=
+function(){return(bo=b._emscripten_bind_btWheelInfo_get_m_steering_0=b.asm.Ul).apply(null,arguments)},co=b._emscripten_bind_btWheelInfo_set_m_steering_1=function(){return(co=b._emscripten_bind_btWheelInfo_set_m_steering_1=b.asm.Vl).apply(null,arguments)},eo=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0=function(){return(eo=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0=b.asm.Wl).apply(null,arguments)},fo=b._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1=function(){return(fo=
+b._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1=b.asm.Xl).apply(null,arguments)},go=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0=function(){return(go=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0=b.asm.Yl).apply(null,arguments)},ho=b._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1=function(){return(ho=b._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1=b.asm.Zl).apply(null,arguments)},io=b._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0=
+function(){return(io=b._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0=b.asm._l).apply(null,arguments)},jo=b._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1=function(){return(jo=b._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1=b.asm.$l).apply(null,arguments)},ko=b._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0=function(){return(ko=b._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0=b.asm.am).apply(null,arguments)},lo=b._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1=
+function(){return(lo=b._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1=b.asm.bm).apply(null,arguments)},mo=b._emscripten_bind_btWheelInfo_get_m_raycastInfo_0=function(){return(mo=b._emscripten_bind_btWheelInfo_get_m_raycastInfo_0=b.asm.cm).apply(null,arguments)},no=b._emscripten_bind_btWheelInfo_set_m_raycastInfo_1=function(){return(no=b._emscripten_bind_btWheelInfo_set_m_raycastInfo_1=b.asm.dm).apply(null,arguments)},oo=b._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0=function(){return(oo=
+b._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0=b.asm.em).apply(null,arguments)},po=b._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1=function(){return(po=b._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1=b.asm.fm).apply(null,arguments)},qo=b._emscripten_bind_btWheelInfo_get_m_worldTransform_0=function(){return(qo=b._emscripten_bind_btWheelInfo_get_m_worldTransform_0=b.asm.gm).apply(null,arguments)},ro=b._emscripten_bind_btWheelInfo_set_m_worldTransform_1=
+function(){return(ro=b._emscripten_bind_btWheelInfo_set_m_worldTransform_1=b.asm.hm).apply(null,arguments)},so=b._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0=function(){return(so=b._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0=b.asm.im).apply(null,arguments)},to=b._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1=function(){return(to=b._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1=b.asm.jm).apply(null,arguments)},uo=b._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0=function(){return(uo=
+b._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0=b.asm.km).apply(null,arguments)},vo=b._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1=function(){return(vo=b._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1=b.asm.lm).apply(null,arguments)},wo=b._emscripten_bind_btWheelInfo_get_m_rotation_0=function(){return(wo=b._emscripten_bind_btWheelInfo_get_m_rotation_0=b.asm.mm).apply(null,arguments)},xo=b._emscripten_bind_btWheelInfo_set_m_rotation_1=function(){return(xo=b._emscripten_bind_btWheelInfo_set_m_rotation_1=
+b.asm.nm).apply(null,arguments)},yo=b._emscripten_bind_btWheelInfo_get_m_deltaRotation_0=function(){return(yo=b._emscripten_bind_btWheelInfo_get_m_deltaRotation_0=b.asm.om).apply(null,arguments)},zo=b._emscripten_bind_btWheelInfo_set_m_deltaRotation_1=function(){return(zo=b._emscripten_bind_btWheelInfo_set_m_deltaRotation_1=b.asm.pm).apply(null,arguments)},Ao=b._emscripten_bind_btWheelInfo_get_m_brake_0=function(){return(Ao=b._emscripten_bind_btWheelInfo_get_m_brake_0=b.asm.qm).apply(null,arguments)},
+Bo=b._emscripten_bind_btWheelInfo_set_m_brake_1=function(){return(Bo=b._emscripten_bind_btWheelInfo_set_m_brake_1=b.asm.rm).apply(null,arguments)},Co=b._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0=function(){return(Co=b._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0=b.asm.sm).apply(null,arguments)},Do=b._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1=function(){return(Do=b._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1=
+b.asm.tm).apply(null,arguments)},Eo=b._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0=function(){return(Eo=b._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0=b.asm.um).apply(null,arguments)},Fo=b._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1=function(){return(Fo=b._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1=b.asm.vm).apply(null,arguments)},Go=b._emscripten_bind_btWheelInfo_get_m_skidInfo_0=function(){return(Go=b._emscripten_bind_btWheelInfo_get_m_skidInfo_0=
+b.asm.wm).apply(null,arguments)},Ho=b._emscripten_bind_btWheelInfo_set_m_skidInfo_1=function(){return(Ho=b._emscripten_bind_btWheelInfo_set_m_skidInfo_1=b.asm.xm).apply(null,arguments)},Io=b._emscripten_bind_btWheelInfo___destroy___0=function(){return(Io=b._emscripten_bind_btWheelInfo___destroy___0=b.asm.ym).apply(null,arguments)},Jo=b._emscripten_bind_btVector4_btVector4_0=function(){return(Jo=b._emscripten_bind_btVector4_btVector4_0=b.asm.zm).apply(null,arguments)},Ko=b._emscripten_bind_btVector4_btVector4_4=
+function(){return(Ko=b._emscripten_bind_btVector4_btVector4_4=b.asm.Am).apply(null,arguments)},Lo=b._emscripten_bind_btVector4_w_0=function(){return(Lo=b._emscripten_bind_btVector4_w_0=b.asm.Bm).apply(null,arguments)},Mo=b._emscripten_bind_btVector4_setValue_4=function(){return(Mo=b._emscripten_bind_btVector4_setValue_4=b.asm.Cm).apply(null,arguments)},No=b._emscripten_bind_btVector4_length_0=function(){return(No=b._emscripten_bind_btVector4_length_0=b.asm.Dm).apply(null,arguments)},Oo=b._emscripten_bind_btVector4_x_0=
+function(){return(Oo=b._emscripten_bind_btVector4_x_0=b.asm.Em).apply(null,arguments)},Po=b._emscripten_bind_btVector4_y_0=function(){return(Po=b._emscripten_bind_btVector4_y_0=b.asm.Fm).apply(null,arguments)},Qo=b._emscripten_bind_btVector4_z_0=function(){return(Qo=b._emscripten_bind_btVector4_z_0=b.asm.Gm).apply(null,arguments)},Ro=b._emscripten_bind_btVector4_setX_1=function(){return(Ro=b._emscripten_bind_btVector4_setX_1=b.asm.Hm).apply(null,arguments)},So=b._emscripten_bind_btVector4_setY_1=
+function(){return(So=b._emscripten_bind_btVector4_setY_1=b.asm.Im).apply(null,arguments)},To=b._emscripten_bind_btVector4_setZ_1=function(){return(To=b._emscripten_bind_btVector4_setZ_1=b.asm.Jm).apply(null,arguments)},Uo=b._emscripten_bind_btVector4_normalize_0=function(){return(Uo=b._emscripten_bind_btVector4_normalize_0=b.asm.Km).apply(null,arguments)},Vo=b._emscripten_bind_btVector4_rotate_2=function(){return(Vo=b._emscripten_bind_btVector4_rotate_2=b.asm.Lm).apply(null,arguments)},Wo=b._emscripten_bind_btVector4_dot_1=
+function(){return(Wo=b._emscripten_bind_btVector4_dot_1=b.asm.Mm).apply(null,arguments)},Xo=b._emscripten_bind_btVector4_op_mul_1=function(){return(Xo=b._emscripten_bind_btVector4_op_mul_1=b.asm.Nm).apply(null,arguments)},Yo=b._emscripten_bind_btVector4_op_add_1=function(){return(Yo=b._emscripten_bind_btVector4_op_add_1=b.asm.Om).apply(null,arguments)},Zo=b._emscripten_bind_btVector4_op_sub_1=function(){return(Zo=b._emscripten_bind_btVector4_op_sub_1=b.asm.Pm).apply(null,arguments)},$o=b._emscripten_bind_btVector4___destroy___0=
+function(){return($o=b._emscripten_bind_btVector4___destroy___0=b.asm.Qm).apply(null,arguments)},ap=b._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0=function(){return(ap=b._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0=b.asm.Rm).apply(null,arguments)},bp=b._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0=function(){return(bp=b._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0=b.asm.Sm).apply(null,
+arguments)},cp=b._emscripten_bind_Anchor_get_m_node_0=function(){return(cp=b._emscripten_bind_Anchor_get_m_node_0=b.asm.Tm).apply(null,arguments)},dp=b._emscripten_bind_Anchor_set_m_node_1=function(){return(dp=b._emscripten_bind_Anchor_set_m_node_1=b.asm.Um).apply(null,arguments)},ep=b._emscripten_bind_Anchor_get_m_local_0=function(){return(ep=b._emscripten_bind_Anchor_get_m_local_0=b.asm.Vm).apply(null,arguments)},fp=b._emscripten_bind_Anchor_set_m_local_1=function(){return(fp=b._emscripten_bind_Anchor_set_m_local_1=
+b.asm.Wm).apply(null,arguments)},gp=b._emscripten_bind_Anchor_get_m_body_0=function(){return(gp=b._emscripten_bind_Anchor_get_m_body_0=b.asm.Xm).apply(null,arguments)},hp=b._emscripten_bind_Anchor_set_m_body_1=function(){return(hp=b._emscripten_bind_Anchor_set_m_body_1=b.asm.Ym).apply(null,arguments)},ip=b._emscripten_bind_Anchor_get_m_influence_0=function(){return(ip=b._emscripten_bind_Anchor_get_m_influence_0=b.asm.Zm).apply(null,arguments)},jp=b._emscripten_bind_Anchor_set_m_influence_1=function(){return(jp=
+b._emscripten_bind_Anchor_set_m_influence_1=b.asm._m).apply(null,arguments)},kp=b._emscripten_bind_Anchor_get_m_c0_0=function(){return(kp=b._emscripten_bind_Anchor_get_m_c0_0=b.asm.$m).apply(null,arguments)},lp=b._emscripten_bind_Anchor_set_m_c0_1=function(){return(lp=b._emscripten_bind_Anchor_set_m_c0_1=b.asm.an).apply(null,arguments)},mp=b._emscripten_bind_Anchor_get_m_c1_0=function(){return(mp=b._emscripten_bind_Anchor_get_m_c1_0=b.asm.bn).apply(null,arguments)},np=b._emscripten_bind_Anchor_set_m_c1_1=
+function(){return(np=b._emscripten_bind_Anchor_set_m_c1_1=b.asm.cn).apply(null,arguments)},op=b._emscripten_bind_Anchor_get_m_c2_0=function(){return(op=b._emscripten_bind_Anchor_get_m_c2_0=b.asm.dn).apply(null,arguments)},pp=b._emscripten_bind_Anchor_set_m_c2_1=function(){return(pp=b._emscripten_bind_Anchor_set_m_c2_1=b.asm.en).apply(null,arguments)},qp=b._emscripten_bind_Anchor___destroy___0=function(){return(qp=b._emscripten_bind_Anchor___destroy___0=b.asm.fn).apply(null,arguments)},rp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0=
+function(){return(rp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0=b.asm.gn).apply(null,arguments)},sp=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1=function(){return(sp=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1=b.asm.hn).apply(null,arguments)},tp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0=function(){return(tp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0=b.asm.jn).apply(null,arguments)},
+up=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1=function(){return(up=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1=b.asm.kn).apply(null,arguments)},vp=b._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0=function(){return(vp=b._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0=b.asm.ln).apply(null,arguments)},wp=b._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1=function(){return(wp=b._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1=
+b.asm.mn).apply(null,arguments)},xp=b._emscripten_bind_btVehicleRaycasterResult___destroy___0=function(){return(xp=b._emscripten_bind_btVehicleRaycasterResult___destroy___0=b.asm.nn).apply(null,arguments)},yp=b._emscripten_bind_btVector3Array_size_0=function(){return(yp=b._emscripten_bind_btVector3Array_size_0=b.asm.on).apply(null,arguments)},zp=b._emscripten_bind_btVector3Array_at_1=function(){return(zp=b._emscripten_bind_btVector3Array_at_1=b.asm.pn).apply(null,arguments)},Ap=b._emscripten_bind_btVector3Array___destroy___0=
+function(){return(Ap=b._emscripten_bind_btVector3Array___destroy___0=b.asm.qn).apply(null,arguments)},Bp=b._emscripten_bind_btConstraintSolver___destroy___0=function(){return(Bp=b._emscripten_bind_btConstraintSolver___destroy___0=b.asm.rn).apply(null,arguments)},Cp=b._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3=function(){return(Cp=b._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3=b.asm.sn).apply(null,arguments)},Dp=b._emscripten_bind_btRaycastVehicle_applyEngineForce_2=function(){return(Dp=
+b._emscripten_bind_btRaycastVehicle_applyEngineForce_2=b.asm.tn).apply(null,arguments)},Ep=b._emscripten_bind_btRaycastVehicle_setSteeringValue_2=function(){return(Ep=b._emscripten_bind_btRaycastVehicle_setSteeringValue_2=b.asm.un).apply(null,arguments)},Fp=b._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1=function(){return(Fp=b._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1=b.asm.vn).apply(null,arguments)},Gp=b._emscripten_bind_btRaycastVehicle_updateWheelTransform_2=function(){return(Gp=
+b._emscripten_bind_btRaycastVehicle_updateWheelTransform_2=b.asm.wn).apply(null,arguments)},Hp=b._emscripten_bind_btRaycastVehicle_addWheel_7=function(){return(Hp=b._emscripten_bind_btRaycastVehicle_addWheel_7=b.asm.xn).apply(null,arguments)},Ip=b._emscripten_bind_btRaycastVehicle_getNumWheels_0=function(){return(Ip=b._emscripten_bind_btRaycastVehicle_getNumWheels_0=b.asm.yn).apply(null,arguments)},Jp=b._emscripten_bind_btRaycastVehicle_getRigidBody_0=function(){return(Jp=b._emscripten_bind_btRaycastVehicle_getRigidBody_0=
+b.asm.zn).apply(null,arguments)},Kp=b._emscripten_bind_btRaycastVehicle_getWheelInfo_1=function(){return(Kp=b._emscripten_bind_btRaycastVehicle_getWheelInfo_1=b.asm.An).apply(null,arguments)},Lp=b._emscripten_bind_btRaycastVehicle_setBrake_2=function(){return(Lp=b._emscripten_bind_btRaycastVehicle_setBrake_2=b.asm.Bn).apply(null,arguments)},Mp=b._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3=function(){return(Mp=b._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3=b.asm.Cn).apply(null,
+arguments)},Np=b._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0=function(){return(Np=b._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0=b.asm.Dn).apply(null,arguments)},Op=b._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0=function(){return(Op=b._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0=b.asm.En).apply(null,arguments)},Pp=b._emscripten_bind_btRaycastVehicle_rayCast_1=function(){return(Pp=b._emscripten_bind_btRaycastVehicle_rayCast_1=b.asm.Fn).apply(null,
+arguments)},Qp=b._emscripten_bind_btRaycastVehicle_updateVehicle_1=function(){return(Qp=b._emscripten_bind_btRaycastVehicle_updateVehicle_1=b.asm.Gn).apply(null,arguments)},Rp=b._emscripten_bind_btRaycastVehicle_resetSuspension_0=function(){return(Rp=b._emscripten_bind_btRaycastVehicle_resetSuspension_0=b.asm.Hn).apply(null,arguments)},Sp=b._emscripten_bind_btRaycastVehicle_getSteeringValue_1=function(){return(Sp=b._emscripten_bind_btRaycastVehicle_getSteeringValue_1=b.asm.In).apply(null,arguments)},
+Tp=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1=function(){return(Tp=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1=b.asm.Jn).apply(null,arguments)},Up=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2=function(){return(Up=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2=b.asm.Kn).apply(null,arguments)},Vp=b._emscripten_bind_btRaycastVehicle_setPitchControl_1=function(){return(Vp=b._emscripten_bind_btRaycastVehicle_setPitchControl_1=b.asm.Ln).apply(null,
+arguments)},Wp=b._emscripten_bind_btRaycastVehicle_updateSuspension_1=function(){return(Wp=b._emscripten_bind_btRaycastVehicle_updateSuspension_1=b.asm.Mn).apply(null,arguments)},Xp=b._emscripten_bind_btRaycastVehicle_updateFriction_1=function(){return(Xp=b._emscripten_bind_btRaycastVehicle_updateFriction_1=b.asm.Nn).apply(null,arguments)},Yp=b._emscripten_bind_btRaycastVehicle_getRightAxis_0=function(){return(Yp=b._emscripten_bind_btRaycastVehicle_getRightAxis_0=b.asm.On).apply(null,arguments)},
+Zp=b._emscripten_bind_btRaycastVehicle_getUpAxis_0=function(){return(Zp=b._emscripten_bind_btRaycastVehicle_getUpAxis_0=b.asm.Pn).apply(null,arguments)},$p=b._emscripten_bind_btRaycastVehicle_getForwardAxis_0=function(){return($p=b._emscripten_bind_btRaycastVehicle_getForwardAxis_0=b.asm.Qn).apply(null,arguments)},aq=b._emscripten_bind_btRaycastVehicle_getForwardVector_0=function(){return(aq=b._emscripten_bind_btRaycastVehicle_getForwardVector_0=b.asm.Rn).apply(null,arguments)},bq=b._emscripten_bind_btRaycastVehicle_getUserConstraintType_0=
+function(){return(bq=b._emscripten_bind_btRaycastVehicle_getUserConstraintType_0=b.asm.Sn).apply(null,arguments)},cq=b._emscripten_bind_btRaycastVehicle_setUserConstraintType_1=function(){return(cq=b._emscripten_bind_btRaycastVehicle_setUserConstraintType_1=b.asm.Tn).apply(null,arguments)},dq=b._emscripten_bind_btRaycastVehicle_setUserConstraintId_1=function(){return(dq=b._emscripten_bind_btRaycastVehicle_setUserConstraintId_1=b.asm.Un).apply(null,arguments)},eq=b._emscripten_bind_btRaycastVehicle_getUserConstraintId_0=
+function(){return(eq=b._emscripten_bind_btRaycastVehicle_getUserConstraintId_0=b.asm.Vn).apply(null,arguments)},fq=b._emscripten_bind_btRaycastVehicle_updateAction_2=function(){return(fq=b._emscripten_bind_btRaycastVehicle_updateAction_2=b.asm.Wn).apply(null,arguments)},gq=b._emscripten_bind_btRaycastVehicle___destroy___0=function(){return(gq=b._emscripten_bind_btRaycastVehicle___destroy___0=b.asm.Xn).apply(null,arguments)},hq=b._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1=function(){return(hq=
+b._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1=b.asm.Yn).apply(null,arguments)},iq=b._emscripten_bind_btCylinderShapeX_setMargin_1=function(){return(iq=b._emscripten_bind_btCylinderShapeX_setMargin_1=b.asm.Zn).apply(null,arguments)},jq=b._emscripten_bind_btCylinderShapeX_getMargin_0=function(){return(jq=b._emscripten_bind_btCylinderShapeX_getMargin_0=b.asm._n).apply(null,arguments)},kq=b._emscripten_bind_btCylinderShapeX_setLocalScaling_1=function(){return(kq=b._emscripten_bind_btCylinderShapeX_setLocalScaling_1=
+b.asm.$n).apply(null,arguments)},lq=b._emscripten_bind_btCylinderShapeX_getLocalScaling_0=function(){return(lq=b._emscripten_bind_btCylinderShapeX_getLocalScaling_0=b.asm.ao).apply(null,arguments)},mq=b._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2=function(){return(mq=b._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2=b.asm.bo).apply(null,arguments)},nq=b._emscripten_bind_btCylinderShapeX___destroy___0=function(){return(nq=b._emscripten_bind_btCylinderShapeX___destroy___0=b.asm.co).apply(null,
+arguments)},oq=b._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1=function(){return(oq=b._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1=b.asm.eo).apply(null,arguments)},pq=b._emscripten_bind_btCylinderShapeZ_setMargin_1=function(){return(pq=b._emscripten_bind_btCylinderShapeZ_setMargin_1=b.asm.fo).apply(null,arguments)},qq=b._emscripten_bind_btCylinderShapeZ_getMargin_0=function(){return(qq=b._emscripten_bind_btCylinderShapeZ_getMargin_0=b.asm.go).apply(null,arguments)},rq=b._emscripten_bind_btCylinderShapeZ_setLocalScaling_1=
+function(){return(rq=b._emscripten_bind_btCylinderShapeZ_setLocalScaling_1=b.asm.ho).apply(null,arguments)},sq=b._emscripten_bind_btCylinderShapeZ_getLocalScaling_0=function(){return(sq=b._emscripten_bind_btCylinderShapeZ_getLocalScaling_0=b.asm.io).apply(null,arguments)},tq=b._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2=function(){return(tq=b._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2=b.asm.jo).apply(null,arguments)},uq=b._emscripten_bind_btCylinderShapeZ___destroy___0=
+function(){return(uq=b._emscripten_bind_btCylinderShapeZ___destroy___0=b.asm.ko).apply(null,arguments)},vq=b._emscripten_bind_btConvexPolyhedron_get_m_vertices_0=function(){return(vq=b._emscripten_bind_btConvexPolyhedron_get_m_vertices_0=b.asm.lo).apply(null,arguments)},wq=b._emscripten_bind_btConvexPolyhedron_set_m_vertices_1=function(){return(wq=b._emscripten_bind_btConvexPolyhedron_set_m_vertices_1=b.asm.mo).apply(null,arguments)},xq=b._emscripten_bind_btConvexPolyhedron_get_m_faces_0=function(){return(xq=
+b._emscripten_bind_btConvexPolyhedron_get_m_faces_0=b.asm.no).apply(null,arguments)},yq=b._emscripten_bind_btConvexPolyhedron_set_m_faces_1=function(){return(yq=b._emscripten_bind_btConvexPolyhedron_set_m_faces_1=b.asm.oo).apply(null,arguments)},zq=b._emscripten_bind_btConvexPolyhedron___destroy___0=function(){return(zq=b._emscripten_bind_btConvexPolyhedron___destroy___0=b.asm.po).apply(null,arguments)},Aq=b._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0=
+function(){return(Aq=b._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0=b.asm.qo).apply(null,arguments)},Bq=b._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0=function(){return(Bq=b._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0=b.asm.ro).apply(null,arguments)},Cq=b._emscripten_bind_tAnchorArray_size_0=function(){return(Cq=b._emscripten_bind_tAnchorArray_size_0=b.asm.so).apply(null,arguments)},Dq=b._emscripten_bind_tAnchorArray_at_1=
+function(){return(Dq=b._emscripten_bind_tAnchorArray_at_1=b.asm.to).apply(null,arguments)},Eq=b._emscripten_bind_tAnchorArray_clear_0=function(){return(Eq=b._emscripten_bind_tAnchorArray_clear_0=b.asm.uo).apply(null,arguments)},Fq=b._emscripten_bind_tAnchorArray_push_back_1=function(){return(Fq=b._emscripten_bind_tAnchorArray_push_back_1=b.asm.vo).apply(null,arguments)},Gq=b._emscripten_bind_tAnchorArray_pop_back_0=function(){return(Gq=b._emscripten_bind_tAnchorArray_pop_back_0=b.asm.wo).apply(null,
+arguments)},Hq=b._emscripten_bind_tAnchorArray___destroy___0=function(){return(Hq=b._emscripten_bind_tAnchorArray___destroy___0=b.asm.xo).apply(null,arguments)},Iq=b._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0=function(){return(Iq=b._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0=b.asm.yo).apply(null,arguments)},Jq=b._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1=function(){return(Jq=b._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1=b.asm.zo).apply(null,arguments)},Kq=b._emscripten_bind_RaycastInfo_get_m_contactPointWS_0=
+function(){return(Kq=b._emscripten_bind_RaycastInfo_get_m_contactPointWS_0=b.asm.Ao).apply(null,arguments)},Lq=b._emscripten_bind_RaycastInfo_set_m_contactPointWS_1=function(){return(Lq=b._emscripten_bind_RaycastInfo_set_m_contactPointWS_1=b.asm.Bo).apply(null,arguments)},Mq=b._emscripten_bind_RaycastInfo_get_m_suspensionLength_0=function(){return(Mq=b._emscripten_bind_RaycastInfo_get_m_suspensionLength_0=b.asm.Co).apply(null,arguments)},Nq=b._emscripten_bind_RaycastInfo_set_m_suspensionLength_1=
+function(){return(Nq=b._emscripten_bind_RaycastInfo_set_m_suspensionLength_1=b.asm.Do).apply(null,arguments)},Oq=b._emscripten_bind_RaycastInfo_get_m_hardPointWS_0=function(){return(Oq=b._emscripten_bind_RaycastInfo_get_m_hardPointWS_0=b.asm.Eo).apply(null,arguments)},Pq=b._emscripten_bind_RaycastInfo_set_m_hardPointWS_1=function(){return(Pq=b._emscripten_bind_RaycastInfo_set_m_hardPointWS_1=b.asm.Fo).apply(null,arguments)},Qq=b._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0=function(){return(Qq=
+b._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0=b.asm.Go).apply(null,arguments)},Rq=b._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1=function(){return(Rq=b._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1=b.asm.Ho).apply(null,arguments)},Sq=b._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0=function(){return(Sq=b._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0=b.asm.Io).apply(null,arguments)},Tq=b._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1=function(){return(Tq=b._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1=
+b.asm.Jo).apply(null,arguments)},Uq=b._emscripten_bind_RaycastInfo_get_m_isInContact_0=function(){return(Uq=b._emscripten_bind_RaycastInfo_get_m_isInContact_0=b.asm.Ko).apply(null,arguments)},Vq=b._emscripten_bind_RaycastInfo_set_m_isInContact_1=function(){return(Vq=b._emscripten_bind_RaycastInfo_set_m_isInContact_1=b.asm.Lo).apply(null,arguments)},Wq=b._emscripten_bind_RaycastInfo_get_m_groundObject_0=function(){return(Wq=b._emscripten_bind_RaycastInfo_get_m_groundObject_0=b.asm.Mo).apply(null,arguments)},
+Xq=b._emscripten_bind_RaycastInfo_set_m_groundObject_1=function(){return(Xq=b._emscripten_bind_RaycastInfo_set_m_groundObject_1=b.asm.No).apply(null,arguments)},Yq=b._emscripten_bind_RaycastInfo___destroy___0=function(){return(Yq=b._emscripten_bind_RaycastInfo___destroy___0=b.asm.Oo).apply(null,arguments)},Zq=b._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3=function(){return(Zq=b._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3=b.asm.Po).apply(null,arguments)},$q=b._emscripten_bind_btMultiSphereShape_setLocalScaling_1=
+function(){return($q=b._emscripten_bind_btMultiSphereShape_setLocalScaling_1=b.asm.Qo).apply(null,arguments)},ar=b._emscripten_bind_btMultiSphereShape_getLocalScaling_0=function(){return(ar=b._emscripten_bind_btMultiSphereShape_getLocalScaling_0=b.asm.Ro).apply(null,arguments)},br=b._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2=function(){return(br=b._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2=b.asm.So).apply(null,arguments)},cr=b._emscripten_bind_btMultiSphereShape___destroy___0=
+function(){return(cr=b._emscripten_bind_btMultiSphereShape___destroy___0=b.asm.To).apply(null,arguments)},dr=b._emscripten_bind_btSoftBody_btSoftBody_4=function(){return(dr=b._emscripten_bind_btSoftBody_btSoftBody_4=b.asm.Uo).apply(null,arguments)},er=b._emscripten_bind_btSoftBody_checkLink_2=function(){return(er=b._emscripten_bind_btSoftBody_checkLink_2=b.asm.Vo).apply(null,arguments)},fr=b._emscripten_bind_btSoftBody_checkFace_3=function(){return(fr=b._emscripten_bind_btSoftBody_checkFace_3=b.asm.Wo).apply(null,
+arguments)},gr=b._emscripten_bind_btSoftBody_appendMaterial_0=function(){return(gr=b._emscripten_bind_btSoftBody_appendMaterial_0=b.asm.Xo).apply(null,arguments)},hr=b._emscripten_bind_btSoftBody_appendNode_2=function(){return(hr=b._emscripten_bind_btSoftBody_appendNode_2=b.asm.Yo).apply(null,arguments)},ir=b._emscripten_bind_btSoftBody_appendLink_4=function(){return(ir=b._emscripten_bind_btSoftBody_appendLink_4=b.asm.Zo).apply(null,arguments)},jr=b._emscripten_bind_btSoftBody_appendFace_4=function(){return(jr=
+b._emscripten_bind_btSoftBody_appendFace_4=b.asm._o).apply(null,arguments)},kr=b._emscripten_bind_btSoftBody_appendTetra_5=function(){return(kr=b._emscripten_bind_btSoftBody_appendTetra_5=b.asm.$o).apply(null,arguments)},lr=b._emscripten_bind_btSoftBody_appendAnchor_4=function(){return(lr=b._emscripten_bind_btSoftBody_appendAnchor_4=b.asm.ap).apply(null,arguments)},mr=b._emscripten_bind_btSoftBody_addForce_1=function(){return(mr=b._emscripten_bind_btSoftBody_addForce_1=b.asm.bp).apply(null,arguments)},
+nr=b._emscripten_bind_btSoftBody_addForce_2=function(){return(nr=b._emscripten_bind_btSoftBody_addForce_2=b.asm.cp).apply(null,arguments)},or=b._emscripten_bind_btSoftBody_addAeroForceToNode_2=function(){return(or=b._emscripten_bind_btSoftBody_addAeroForceToNode_2=b.asm.dp).apply(null,arguments)},pr=b._emscripten_bind_btSoftBody_getTotalMass_0=function(){return(pr=b._emscripten_bind_btSoftBody_getTotalMass_0=b.asm.ep).apply(null,arguments)},qr=b._emscripten_bind_btSoftBody_setTotalMass_2=function(){return(qr=
+b._emscripten_bind_btSoftBody_setTotalMass_2=b.asm.fp).apply(null,arguments)},rr=b._emscripten_bind_btSoftBody_setMass_2=function(){return(rr=b._emscripten_bind_btSoftBody_setMass_2=b.asm.gp).apply(null,arguments)},sr=b._emscripten_bind_btSoftBody_transform_1=function(){return(sr=b._emscripten_bind_btSoftBody_transform_1=b.asm.hp).apply(null,arguments)},tr=b._emscripten_bind_btSoftBody_translate_1=function(){return(tr=b._emscripten_bind_btSoftBody_translate_1=b.asm.ip).apply(null,arguments)},ur=b._emscripten_bind_btSoftBody_rotate_1=
+function(){return(ur=b._emscripten_bind_btSoftBody_rotate_1=b.asm.jp).apply(null,arguments)},vr=b._emscripten_bind_btSoftBody_scale_1=function(){return(vr=b._emscripten_bind_btSoftBody_scale_1=b.asm.kp).apply(null,arguments)},wr=b._emscripten_bind_btSoftBody_generateClusters_1=function(){return(wr=b._emscripten_bind_btSoftBody_generateClusters_1=b.asm.lp).apply(null,arguments)},xr=b._emscripten_bind_btSoftBody_generateClusters_2=function(){return(xr=b._emscripten_bind_btSoftBody_generateClusters_2=
+b.asm.mp).apply(null,arguments)},yr=b._emscripten_bind_btSoftBody_generateBendingConstraints_2=function(){return(yr=b._emscripten_bind_btSoftBody_generateBendingConstraints_2=b.asm.np).apply(null,arguments)},zr=b._emscripten_bind_btSoftBody_upcast_1=function(){return(zr=b._emscripten_bind_btSoftBody_upcast_1=b.asm.op).apply(null,arguments)},Ar=b._emscripten_bind_btSoftBody_setAnisotropicFriction_2=function(){return(Ar=b._emscripten_bind_btSoftBody_setAnisotropicFriction_2=b.asm.pp).apply(null,arguments)},
+Br=b._emscripten_bind_btSoftBody_getCollisionShape_0=function(){return(Br=b._emscripten_bind_btSoftBody_getCollisionShape_0=b.asm.qp).apply(null,arguments)},Cr=b._emscripten_bind_btSoftBody_setContactProcessingThreshold_1=function(){return(Cr=b._emscripten_bind_btSoftBody_setContactProcessingThreshold_1=b.asm.rp).apply(null,arguments)},Dr=b._emscripten_bind_btSoftBody_setActivationState_1=function(){return(Dr=b._emscripten_bind_btSoftBody_setActivationState_1=b.asm.sp).apply(null,arguments)},Er=b._emscripten_bind_btSoftBody_forceActivationState_1=
+function(){return(Er=b._emscripten_bind_btSoftBody_forceActivationState_1=b.asm.tp).apply(null,arguments)},Fr=b._emscripten_bind_btSoftBody_activate_0=function(){return(Fr=b._emscripten_bind_btSoftBody_activate_0=b.asm.up).apply(null,arguments)},Gr=b._emscripten_bind_btSoftBody_activate_1=function(){return(Gr=b._emscripten_bind_btSoftBody_activate_1=b.asm.vp).apply(null,arguments)},Hr=b._emscripten_bind_btSoftBody_isActive_0=function(){return(Hr=b._emscripten_bind_btSoftBody_isActive_0=b.asm.wp).apply(null,
+arguments)},Ir=b._emscripten_bind_btSoftBody_isKinematicObject_0=function(){return(Ir=b._emscripten_bind_btSoftBody_isKinematicObject_0=b.asm.xp).apply(null,arguments)},Jr=b._emscripten_bind_btSoftBody_isStaticObject_0=function(){return(Jr=b._emscripten_bind_btSoftBody_isStaticObject_0=b.asm.yp).apply(null,arguments)},Kr=b._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0=function(){return(Kr=b._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0=b.asm.zp).apply(null,arguments)},Lr=b._emscripten_bind_btSoftBody_getRestitution_0=
+function(){return(Lr=b._emscripten_bind_btSoftBody_getRestitution_0=b.asm.Ap).apply(null,arguments)},Mr=b._emscripten_bind_btSoftBody_getFriction_0=function(){return(Mr=b._emscripten_bind_btSoftBody_getFriction_0=b.asm.Bp).apply(null,arguments)},Nr=b._emscripten_bind_btSoftBody_getRollingFriction_0=function(){return(Nr=b._emscripten_bind_btSoftBody_getRollingFriction_0=b.asm.Cp).apply(null,arguments)},Or=b._emscripten_bind_btSoftBody_setRestitution_1=function(){return(Or=b._emscripten_bind_btSoftBody_setRestitution_1=
+b.asm.Dp).apply(null,arguments)},Pr=b._emscripten_bind_btSoftBody_setFriction_1=function(){return(Pr=b._emscripten_bind_btSoftBody_setFriction_1=b.asm.Ep).apply(null,arguments)},Qr=b._emscripten_bind_btSoftBody_setRollingFriction_1=function(){return(Qr=b._emscripten_bind_btSoftBody_setRollingFriction_1=b.asm.Fp).apply(null,arguments)},Rr=b._emscripten_bind_btSoftBody_getWorldTransform_0=function(){return(Rr=b._emscripten_bind_btSoftBody_getWorldTransform_0=b.asm.Gp).apply(null,arguments)},Sr=b._emscripten_bind_btSoftBody_getCollisionFlags_0=
+function(){return(Sr=b._emscripten_bind_btSoftBody_getCollisionFlags_0=b.asm.Hp).apply(null,arguments)},Tr=b._emscripten_bind_btSoftBody_setCollisionFlags_1=function(){return(Tr=b._emscripten_bind_btSoftBody_setCollisionFlags_1=b.asm.Ip).apply(null,arguments)},Ur=b._emscripten_bind_btSoftBody_setWorldTransform_1=function(){return(Ur=b._emscripten_bind_btSoftBody_setWorldTransform_1=b.asm.Jp).apply(null,arguments)},Vr=b._emscripten_bind_btSoftBody_setCollisionShape_1=function(){return(Vr=b._emscripten_bind_btSoftBody_setCollisionShape_1=
+b.asm.Kp).apply(null,arguments)},Wr=b._emscripten_bind_btSoftBody_setCcdMotionThreshold_1=function(){return(Wr=b._emscripten_bind_btSoftBody_setCcdMotionThreshold_1=b.asm.Lp).apply(null,arguments)},Xr=b._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1=function(){return(Xr=b._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1=b.asm.Mp).apply(null,arguments)},Yr=b._emscripten_bind_btSoftBody_getUserIndex_0=function(){return(Yr=b._emscripten_bind_btSoftBody_getUserIndex_0=b.asm.Np).apply(null,
+arguments)},Zr=b._emscripten_bind_btSoftBody_setUserIndex_1=function(){return(Zr=b._emscripten_bind_btSoftBody_setUserIndex_1=b.asm.Op).apply(null,arguments)},$r=b._emscripten_bind_btSoftBody_getUserPointer_0=function(){return($r=b._emscripten_bind_btSoftBody_getUserPointer_0=b.asm.Pp).apply(null,arguments)},as=b._emscripten_bind_btSoftBody_setUserPointer_1=function(){return(as=b._emscripten_bind_btSoftBody_setUserPointer_1=b.asm.Qp).apply(null,arguments)},bs=b._emscripten_bind_btSoftBody_getBroadphaseHandle_0=
+function(){return(bs=b._emscripten_bind_btSoftBody_getBroadphaseHandle_0=b.asm.Rp).apply(null,arguments)},cs=b._emscripten_bind_btSoftBody_get_m_cfg_0=function(){return(cs=b._emscripten_bind_btSoftBody_get_m_cfg_0=b.asm.Sp).apply(null,arguments)},ds=b._emscripten_bind_btSoftBody_set_m_cfg_1=function(){return(ds=b._emscripten_bind_btSoftBody_set_m_cfg_1=b.asm.Tp).apply(null,arguments)},es=b._emscripten_bind_btSoftBody_get_m_nodes_0=function(){return(es=b._emscripten_bind_btSoftBody_get_m_nodes_0=b.asm.Up).apply(null,
+arguments)},gs=b._emscripten_bind_btSoftBody_set_m_nodes_1=function(){return(gs=b._emscripten_bind_btSoftBody_set_m_nodes_1=b.asm.Vp).apply(null,arguments)},hs=b._emscripten_bind_btSoftBody_get_m_faces_0=function(){return(hs=b._emscripten_bind_btSoftBody_get_m_faces_0=b.asm.Wp).apply(null,arguments)},is=b._emscripten_bind_btSoftBody_set_m_faces_1=function(){return(is=b._emscripten_bind_btSoftBody_set_m_faces_1=b.asm.Xp).apply(null,arguments)},js=b._emscripten_bind_btSoftBody_get_m_materials_0=function(){return(js=
+b._emscripten_bind_btSoftBody_get_m_materials_0=b.asm.Yp).apply(null,arguments)},ks=b._emscripten_bind_btSoftBody_set_m_materials_1=function(){return(ks=b._emscripten_bind_btSoftBody_set_m_materials_1=b.asm.Zp).apply(null,arguments)},ls=b._emscripten_bind_btSoftBody_get_m_anchors_0=function(){return(ls=b._emscripten_bind_btSoftBody_get_m_anchors_0=b.asm._p).apply(null,arguments)},ms=b._emscripten_bind_btSoftBody_set_m_anchors_1=function(){return(ms=b._emscripten_bind_btSoftBody_set_m_anchors_1=b.asm.$p).apply(null,
+arguments)},ns=b._emscripten_bind_btSoftBody___destroy___0=function(){return(ns=b._emscripten_bind_btSoftBody___destroy___0=b.asm.aq).apply(null,arguments)},ps=b._emscripten_bind_btIntArray_size_0=function(){return(ps=b._emscripten_bind_btIntArray_size_0=b.asm.bq).apply(null,arguments)},qs=b._emscripten_bind_btIntArray_at_1=function(){return(qs=b._emscripten_bind_btIntArray_at_1=b.asm.cq).apply(null,arguments)},rs=b._emscripten_bind_btIntArray___destroy___0=function(){return(rs=b._emscripten_bind_btIntArray___destroy___0=
+b.asm.dq).apply(null,arguments)},ss=b._emscripten_bind_Config_get_kVCF_0=function(){return(ss=b._emscripten_bind_Config_get_kVCF_0=b.asm.eq).apply(null,arguments)},ts=b._emscripten_bind_Config_set_kVCF_1=function(){return(ts=b._emscripten_bind_Config_set_kVCF_1=b.asm.fq).apply(null,arguments)},us=b._emscripten_bind_Config_get_kDP_0=function(){return(us=b._emscripten_bind_Config_get_kDP_0=b.asm.gq).apply(null,arguments)},vs=b._emscripten_bind_Config_set_kDP_1=function(){return(vs=b._emscripten_bind_Config_set_kDP_1=
+b.asm.hq).apply(null,arguments)},xs=b._emscripten_bind_Config_get_kDG_0=function(){return(xs=b._emscripten_bind_Config_get_kDG_0=b.asm.iq).apply(null,arguments)},ys=b._emscripten_bind_Config_set_kDG_1=function(){return(ys=b._emscripten_bind_Config_set_kDG_1=b.asm.jq).apply(null,arguments)},zs=b._emscripten_bind_Config_get_kLF_0=function(){return(zs=b._emscripten_bind_Config_get_kLF_0=b.asm.kq).apply(null,arguments)},As=b._emscripten_bind_Config_set_kLF_1=function(){return(As=b._emscripten_bind_Config_set_kLF_1=
+b.asm.lq).apply(null,arguments)},Bs=b._emscripten_bind_Config_get_kPR_0=function(){return(Bs=b._emscripten_bind_Config_get_kPR_0=b.asm.mq).apply(null,arguments)},Cs=b._emscripten_bind_Config_set_kPR_1=function(){return(Cs=b._emscripten_bind_Config_set_kPR_1=b.asm.nq).apply(null,arguments)},Ds=b._emscripten_bind_Config_get_kVC_0=function(){return(Ds=b._emscripten_bind_Config_get_kVC_0=b.asm.oq).apply(null,arguments)},Es=b._emscripten_bind_Config_set_kVC_1=function(){return(Es=b._emscripten_bind_Config_set_kVC_1=
+b.asm.pq).apply(null,arguments)},Fs=b._emscripten_bind_Config_get_kDF_0=function(){return(Fs=b._emscripten_bind_Config_get_kDF_0=b.asm.qq).apply(null,arguments)},Gs=b._emscripten_bind_Config_set_kDF_1=function(){return(Gs=b._emscripten_bind_Config_set_kDF_1=b.asm.rq).apply(null,arguments)},Hs=b._emscripten_bind_Config_get_kMT_0=function(){return(Hs=b._emscripten_bind_Config_get_kMT_0=b.asm.sq).apply(null,arguments)},Is=b._emscripten_bind_Config_set_kMT_1=function(){return(Is=b._emscripten_bind_Config_set_kMT_1=
+b.asm.tq).apply(null,arguments)},Js=b._emscripten_bind_Config_get_kCHR_0=function(){return(Js=b._emscripten_bind_Config_get_kCHR_0=b.asm.uq).apply(null,arguments)},Ks=b._emscripten_bind_Config_set_kCHR_1=function(){return(Ks=b._emscripten_bind_Config_set_kCHR_1=b.asm.vq).apply(null,arguments)},Ls=b._emscripten_bind_Config_get_kKHR_0=function(){return(Ls=b._emscripten_bind_Config_get_kKHR_0=b.asm.wq).apply(null,arguments)},Ms=b._emscripten_bind_Config_set_kKHR_1=function(){return(Ms=b._emscripten_bind_Config_set_kKHR_1=
+b.asm.xq).apply(null,arguments)},Ns=b._emscripten_bind_Config_get_kSHR_0=function(){return(Ns=b._emscripten_bind_Config_get_kSHR_0=b.asm.yq).apply(null,arguments)},Os=b._emscripten_bind_Config_set_kSHR_1=function(){return(Os=b._emscripten_bind_Config_set_kSHR_1=b.asm.zq).apply(null,arguments)},Ps=b._emscripten_bind_Config_get_kAHR_0=function(){return(Ps=b._emscripten_bind_Config_get_kAHR_0=b.asm.Aq).apply(null,arguments)},Qs=b._emscripten_bind_Config_set_kAHR_1=function(){return(Qs=b._emscripten_bind_Config_set_kAHR_1=
+b.asm.Bq).apply(null,arguments)},Rs=b._emscripten_bind_Config_get_kSRHR_CL_0=function(){return(Rs=b._emscripten_bind_Config_get_kSRHR_CL_0=b.asm.Cq).apply(null,arguments)},Ss=b._emscripten_bind_Config_set_kSRHR_CL_1=function(){return(Ss=b._emscripten_bind_Config_set_kSRHR_CL_1=b.asm.Dq).apply(null,arguments)},Ts=b._emscripten_bind_Config_get_kSKHR_CL_0=function(){return(Ts=b._emscripten_bind_Config_get_kSKHR_CL_0=b.asm.Eq).apply(null,arguments)},Us=b._emscripten_bind_Config_set_kSKHR_CL_1=function(){return(Us=
+b._emscripten_bind_Config_set_kSKHR_CL_1=b.asm.Fq).apply(null,arguments)},Vs=b._emscripten_bind_Config_get_kSSHR_CL_0=function(){return(Vs=b._emscripten_bind_Config_get_kSSHR_CL_0=b.asm.Gq).apply(null,arguments)},Ws=b._emscripten_bind_Config_set_kSSHR_CL_1=function(){return(Ws=b._emscripten_bind_Config_set_kSSHR_CL_1=b.asm.Hq).apply(null,arguments)},Xs=b._emscripten_bind_Config_get_kSR_SPLT_CL_0=function(){return(Xs=b._emscripten_bind_Config_get_kSR_SPLT_CL_0=b.asm.Iq).apply(null,arguments)},Ys=b._emscripten_bind_Config_set_kSR_SPLT_CL_1=
+function(){return(Ys=b._emscripten_bind_Config_set_kSR_SPLT_CL_1=b.asm.Jq).apply(null,arguments)},Zs=b._emscripten_bind_Config_get_kSK_SPLT_CL_0=function(){return(Zs=b._emscripten_bind_Config_get_kSK_SPLT_CL_0=b.asm.Kq).apply(null,arguments)},$s=b._emscripten_bind_Config_set_kSK_SPLT_CL_1=function(){return($s=b._emscripten_bind_Config_set_kSK_SPLT_CL_1=b.asm.Lq).apply(null,arguments)},at=b._emscripten_bind_Config_get_kSS_SPLT_CL_0=function(){return(at=b._emscripten_bind_Config_get_kSS_SPLT_CL_0=b.asm.Mq).apply(null,
+arguments)},bt=b._emscripten_bind_Config_set_kSS_SPLT_CL_1=function(){return(bt=b._emscripten_bind_Config_set_kSS_SPLT_CL_1=b.asm.Nq).apply(null,arguments)},ct=b._emscripten_bind_Config_get_maxvolume_0=function(){return(ct=b._emscripten_bind_Config_get_maxvolume_0=b.asm.Oq).apply(null,arguments)},dt=b._emscripten_bind_Config_set_maxvolume_1=function(){return(dt=b._emscripten_bind_Config_set_maxvolume_1=b.asm.Pq).apply(null,arguments)},et=b._emscripten_bind_Config_get_timescale_0=function(){return(et=
+b._emscripten_bind_Config_get_timescale_0=b.asm.Qq).apply(null,arguments)},ft=b._emscripten_bind_Config_set_timescale_1=function(){return(ft=b._emscripten_bind_Config_set_timescale_1=b.asm.Rq).apply(null,arguments)},gt=b._emscripten_bind_Config_get_viterations_0=function(){return(gt=b._emscripten_bind_Config_get_viterations_0=b.asm.Sq).apply(null,arguments)},ht=b._emscripten_bind_Config_set_viterations_1=function(){return(ht=b._emscripten_bind_Config_set_viterations_1=b.asm.Tq).apply(null,arguments)},
+it=b._emscripten_bind_Config_get_piterations_0=function(){return(it=b._emscripten_bind_Config_get_piterations_0=b.asm.Uq).apply(null,arguments)},jt=b._emscripten_bind_Config_set_piterations_1=function(){return(jt=b._emscripten_bind_Config_set_piterations_1=b.asm.Vq).apply(null,arguments)},kt=b._emscripten_bind_Config_get_diterations_0=function(){return(kt=b._emscripten_bind_Config_get_diterations_0=b.asm.Wq).apply(null,arguments)},lt=b._emscripten_bind_Config_set_diterations_1=function(){return(lt=
+b._emscripten_bind_Config_set_diterations_1=b.asm.Xq).apply(null,arguments)},mt=b._emscripten_bind_Config_get_citerations_0=function(){return(mt=b._emscripten_bind_Config_get_citerations_0=b.asm.Yq).apply(null,arguments)},nt=b._emscripten_bind_Config_set_citerations_1=function(){return(nt=b._emscripten_bind_Config_set_citerations_1=b.asm.Zq).apply(null,arguments)},ot=b._emscripten_bind_Config_get_collisions_0=function(){return(ot=b._emscripten_bind_Config_get_collisions_0=b.asm._q).apply(null,arguments)},
+pt=b._emscripten_bind_Config_set_collisions_1=function(){return(pt=b._emscripten_bind_Config_set_collisions_1=b.asm.$q).apply(null,arguments)},qt=b._emscripten_bind_Config___destroy___0=function(){return(qt=b._emscripten_bind_Config___destroy___0=b.asm.ar).apply(null,arguments)},rt=b._emscripten_bind_Node_get_m_x_0=function(){return(rt=b._emscripten_bind_Node_get_m_x_0=b.asm.br).apply(null,arguments)},st=b._emscripten_bind_Node_set_m_x_1=function(){return(st=b._emscripten_bind_Node_set_m_x_1=b.asm.cr).apply(null,
+arguments)},tt=b._emscripten_bind_Node_get_m_q_0=function(){return(tt=b._emscripten_bind_Node_get_m_q_0=b.asm.dr).apply(null,arguments)},ut=b._emscripten_bind_Node_set_m_q_1=function(){return(ut=b._emscripten_bind_Node_set_m_q_1=b.asm.er).apply(null,arguments)},vt=b._emscripten_bind_Node_get_m_v_0=function(){return(vt=b._emscripten_bind_Node_get_m_v_0=b.asm.fr).apply(null,arguments)},wt=b._emscripten_bind_Node_set_m_v_1=function(){return(wt=b._emscripten_bind_Node_set_m_v_1=b.asm.gr).apply(null,arguments)},
+xt=b._emscripten_bind_Node_get_m_f_0=function(){return(xt=b._emscripten_bind_Node_get_m_f_0=b.asm.hr).apply(null,arguments)},yt=b._emscripten_bind_Node_set_m_f_1=function(){return(yt=b._emscripten_bind_Node_set_m_f_1=b.asm.ir).apply(null,arguments)},zt=b._emscripten_bind_Node_get_m_n_0=function(){return(zt=b._emscripten_bind_Node_get_m_n_0=b.asm.jr).apply(null,arguments)},At=b._emscripten_bind_Node_set_m_n_1=function(){return(At=b._emscripten_bind_Node_set_m_n_1=b.asm.kr).apply(null,arguments)},Bt=
+b._emscripten_bind_Node_get_m_im_0=function(){return(Bt=b._emscripten_bind_Node_get_m_im_0=b.asm.lr).apply(null,arguments)},Ct=b._emscripten_bind_Node_set_m_im_1=function(){return(Ct=b._emscripten_bind_Node_set_m_im_1=b.asm.mr).apply(null,arguments)},Dt=b._emscripten_bind_Node_get_m_area_0=function(){return(Dt=b._emscripten_bind_Node_get_m_area_0=b.asm.nr).apply(null,arguments)},Et=b._emscripten_bind_Node_set_m_area_1=function(){return(Et=b._emscripten_bind_Node_set_m_area_1=b.asm.or).apply(null,
+arguments)},Ft=b._emscripten_bind_Node___destroy___0=function(){return(Ft=b._emscripten_bind_Node___destroy___0=b.asm.pr).apply(null,arguments)},Gt=b._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0=function(){return(Gt=b._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0=b.asm.qr).apply(null,arguments)},Ht=b._emscripten_bind_btGhostPairCallback___destroy___0=function(){return(Ht=b._emscripten_bind_btGhostPairCallback___destroy___0=b.asm.rr).apply(null,arguments)},It=b._emscripten_bind_btOverlappingPairCallback___destroy___0=
+function(){return(It=b._emscripten_bind_btOverlappingPairCallback___destroy___0=b.asm.sr).apply(null,arguments)},Jt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3=function(){return(Jt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3=b.asm.tr).apply(null,arguments)},Kt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4=function(){return(Kt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4=
+b.asm.ur).apply(null,arguments)},Lt=b._emscripten_bind_btKinematicCharacterController_setUpAxis_1=function(){return(Lt=b._emscripten_bind_btKinematicCharacterController_setUpAxis_1=b.asm.vr).apply(null,arguments)},Mt=b._emscripten_bind_btKinematicCharacterController_setWalkDirection_1=function(){return(Mt=b._emscripten_bind_btKinematicCharacterController_setWalkDirection_1=b.asm.wr).apply(null,arguments)},Nt=b._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2=function(){return(Nt=
+b._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2=b.asm.xr).apply(null,arguments)},Ot=b._emscripten_bind_btKinematicCharacterController_warp_1=function(){return(Ot=b._emscripten_bind_btKinematicCharacterController_warp_1=b.asm.yr).apply(null,arguments)},Pt=b._emscripten_bind_btKinematicCharacterController_preStep_1=function(){return(Pt=b._emscripten_bind_btKinematicCharacterController_preStep_1=b.asm.zr).apply(null,arguments)},Qt=b._emscripten_bind_btKinematicCharacterController_playerStep_2=
+function(){return(Qt=b._emscripten_bind_btKinematicCharacterController_playerStep_2=b.asm.Ar).apply(null,arguments)},Rt=b._emscripten_bind_btKinematicCharacterController_setFallSpeed_1=function(){return(Rt=b._emscripten_bind_btKinematicCharacterController_setFallSpeed_1=b.asm.Br).apply(null,arguments)},St=b._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1=function(){return(St=b._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1=b.asm.Cr).apply(null,arguments)},Tt=b._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1=
+function(){return(Tt=b._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1=b.asm.Dr).apply(null,arguments)},Ut=b._emscripten_bind_btKinematicCharacterController_canJump_0=function(){return(Ut=b._emscripten_bind_btKinematicCharacterController_canJump_0=b.asm.Er).apply(null,arguments)},Vt=b._emscripten_bind_btKinematicCharacterController_jump_0=function(){return(Vt=b._emscripten_bind_btKinematicCharacterController_jump_0=b.asm.Fr).apply(null,arguments)},Wt=b._emscripten_bind_btKinematicCharacterController_setGravity_1=
+function(){return(Wt=b._emscripten_bind_btKinematicCharacterController_setGravity_1=b.asm.Gr).apply(null,arguments)},Xt=b._emscripten_bind_btKinematicCharacterController_getGravity_0=function(){return(Xt=b._emscripten_bind_btKinematicCharacterController_getGravity_0=b.asm.Hr).apply(null,arguments)},Yt=b._emscripten_bind_btKinematicCharacterController_setMaxSlope_1=function(){return(Yt=b._emscripten_bind_btKinematicCharacterController_setMaxSlope_1=b.asm.Ir).apply(null,arguments)},Zt=b._emscripten_bind_btKinematicCharacterController_getMaxSlope_0=
+function(){return(Zt=b._emscripten_bind_btKinematicCharacterController_getMaxSlope_0=b.asm.Jr).apply(null,arguments)},$t=b._emscripten_bind_btKinematicCharacterController_getGhostObject_0=function(){return($t=b._emscripten_bind_btKinematicCharacterController_getGhostObject_0=b.asm.Kr).apply(null,arguments)},au=b._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1=function(){return(au=b._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1=b.asm.Lr).apply(null,arguments)},
+bu=b._emscripten_bind_btKinematicCharacterController_onGround_0=function(){return(bu=b._emscripten_bind_btKinematicCharacterController_onGround_0=b.asm.Mr).apply(null,arguments)},cu=b._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1=function(){return(cu=b._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1=b.asm.Nr).apply(null,arguments)},du=b._emscripten_bind_btKinematicCharacterController_updateAction_2=function(){return(du=b._emscripten_bind_btKinematicCharacterController_updateAction_2=
+b.asm.Or).apply(null,arguments)},eu=b._emscripten_bind_btKinematicCharacterController___destroy___0=function(){return(eu=b._emscripten_bind_btKinematicCharacterController___destroy___0=b.asm.Pr).apply(null,arguments)},fu=b._emscripten_bind_btSoftBodyArray_size_0=function(){return(fu=b._emscripten_bind_btSoftBodyArray_size_0=b.asm.Qr).apply(null,arguments)},gu=b._emscripten_bind_btSoftBodyArray_at_1=function(){return(gu=b._emscripten_bind_btSoftBodyArray_at_1=b.asm.Rr).apply(null,arguments)},hu=b._emscripten_bind_btSoftBodyArray___destroy___0=
+function(){return(hu=b._emscripten_bind_btSoftBodyArray___destroy___0=b.asm.Sr).apply(null,arguments)},iu=b._emscripten_bind_btFaceArray_size_0=function(){return(iu=b._emscripten_bind_btFaceArray_size_0=b.asm.Tr).apply(null,arguments)},ju=b._emscripten_bind_btFaceArray_at_1=function(){return(ju=b._emscripten_bind_btFaceArray_at_1=b.asm.Ur).apply(null,arguments)},ku=b._emscripten_bind_btFaceArray___destroy___0=function(){return(ku=b._emscripten_bind_btFaceArray___destroy___0=b.asm.Vr).apply(null,arguments)},
+lu=b._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2=function(){return(lu=b._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2=b.asm.Wr).apply(null,arguments)},mu=b._emscripten_bind_btStaticPlaneShape_setLocalScaling_1=function(){return(mu=b._emscripten_bind_btStaticPlaneShape_setLocalScaling_1=b.asm.Xr).apply(null,arguments)},nu=b._emscripten_bind_btStaticPlaneShape_getLocalScaling_0=function(){return(nu=b._emscripten_bind_btStaticPlaneShape_getLocalScaling_0=b.asm.Yr).apply(null,
+arguments)},ou=b._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2=function(){return(ou=b._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2=b.asm.Zr).apply(null,arguments)},pu=b._emscripten_bind_btStaticPlaneShape___destroy___0=function(){return(pu=b._emscripten_bind_btStaticPlaneShape___destroy___0=b.asm._r).apply(null,arguments)},qu=b._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1=function(){return(qu=b._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1=
+b.asm.$r).apply(null,arguments)},ru=b._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0=function(){return(ru=b._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0=b.asm.as).apply(null,arguments)},su=b._emscripten_bind_btOverlappingPairCache___destroy___0=function(){return(su=b._emscripten_bind_btOverlappingPairCache___destroy___0=b.asm.bs).apply(null,arguments)},tu=b._emscripten_bind_btIndexedMesh_get_m_numTriangles_0=function(){return(tu=b._emscripten_bind_btIndexedMesh_get_m_numTriangles_0=
+b.asm.cs).apply(null,arguments)},uu=b._emscripten_bind_btIndexedMesh_set_m_numTriangles_1=function(){return(uu=b._emscripten_bind_btIndexedMesh_set_m_numTriangles_1=b.asm.ds).apply(null,arguments)},vu=b._emscripten_bind_btIndexedMesh___destroy___0=function(){return(vu=b._emscripten_bind_btIndexedMesh___destroy___0=b.asm.es).apply(null,arguments)},wu=b._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5=function(){return(wu=b._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5=
+b.asm.fs).apply(null,arguments)},xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3=function(){return(xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3=b.asm.gs).apply(null,arguments)},yu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1=function(){return(yu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1=b.asm.hs).apply(null,arguments)},zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1=function(){return(zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1=
+b.asm.is).apply(null,arguments)},Au=b._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0=function(){return(Au=b._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0=b.asm.js).apply(null,arguments)},Bu=b._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0=function(){return(Bu=b._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0=b.asm.ks).apply(null,arguments)},Cu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0=function(){return(Cu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0=
+b.asm.ls).apply(null,arguments)},Du=b._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3=function(){return(Du=b._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3=b.asm.ms).apply(null,arguments)},Eu=b._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0=function(){return(Eu=b._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0=b.asm.ns).apply(null,arguments)},Fu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0=function(){return(Fu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0=
+b.asm.os).apply(null,arguments)},Gu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1=function(){return(Gu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1=b.asm.ps).apply(null,arguments)},Hu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2=function(){return(Hu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2=b.asm.qs).apply(null,arguments)},Iu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3=function(){return(Iu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3=
+b.asm.rs).apply(null,arguments)},Ju=b._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0=function(){return(Ju=b._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0=b.asm.ss).apply(null,arguments)},Ku=b._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5=function(){return(Ku=b._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5=b.asm.ts).apply(null,arguments)},Lu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3=function(){return(Lu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3=
+b.asm.us).apply(null,arguments)},Mu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2=function(){return(Mu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2=b.asm.vs).apply(null,arguments)},Nu=b._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1=function(){return(Nu=b._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1=b.asm.ws).apply(null,arguments)},Ou=b._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1=function(){return(Ou=b._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1=
+b.asm.xs).apply(null,arguments)},Pu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0=function(){return(Pu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0=b.asm.ys).apply(null,arguments)},Qu=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0=function(){return(Qu=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0=b.asm.zs).apply(null,arguments)},Ru=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3=function(){return(Ru=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3=
+b.asm.As).apply(null,arguments)},Su=b._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1=function(){return(Su=b._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1=b.asm.Bs).apply(null,arguments)},Tu=b._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0=function(){return(Tu=b._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0=b.asm.Cs).apply(null,arguments)},Uu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1=function(){return(Uu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1=
+b.asm.Ds).apply(null,arguments)},Vu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3=function(){return(Vu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3=b.asm.Es).apply(null,arguments)},Wu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1=function(){return(Wu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1=b.asm.Fs).apply(null,arguments)},Xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1=function(){return(Xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1=
+b.asm.Gs).apply(null,arguments)},Yu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2=function(){return(Yu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2=b.asm.Hs).apply(null,arguments)},Zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1=function(){return(Zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1=b.asm.Is).apply(null,arguments)},$u=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1=function(){return($u=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1=
+b.asm.Js).apply(null,arguments)},av=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2=function(){return(av=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2=b.asm.Ks).apply(null,arguments)},bv=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3=function(){return(bv=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3=b.asm.Ls).apply(null,arguments)},cv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1=function(){return(cv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1=
+b.asm.Ms).apply(null,arguments)},dv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1=function(){return(dv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1=b.asm.Ns).apply(null,arguments)},ev=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1=function(){return(ev=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1=b.asm.Os).apply(null,arguments)},fv=b._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1=
+function(){return(fv=b._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1=b.asm.Ps).apply(null,arguments)},gv=b._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1=function(){return(gv=b._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1=b.asm.Qs).apply(null,arguments)},hv=b._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0=function(){return(hv=b._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0=b.asm.Rs).apply(null,arguments)},iv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_1=
+function(){return(iv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_1=b.asm.Ss).apply(null,arguments)},jv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_2=function(){return(jv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_2=b.asm.Ts).apply(null,arguments)},kv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_3=function(){return(kv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_3=b.asm.Us).apply(null,
+arguments)},lv=b._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0=function(){return(lv=b._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0=b.asm.Vs).apply(null,arguments)},mv=b._emscripten_bind_btFixedConstraint_btFixedConstraint_4=function(){return(mv=b._emscripten_bind_btFixedConstraint_btFixedConstraint_4=b.asm.Ws).apply(null,arguments)},nv=b._emscripten_bind_btFixedConstraint_enableFeedback_1=function(){return(nv=b._emscripten_bind_btFixedConstraint_enableFeedback_1=b.asm.Xs).apply(null,
+arguments)},ov=b._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0=function(){return(ov=b._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0=b.asm.Ys).apply(null,arguments)},pv=b._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1=function(){return(pv=b._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1=b.asm.Zs).apply(null,arguments)},qv=b._emscripten_bind_btFixedConstraint_getParam_2=function(){return(qv=b._emscripten_bind_btFixedConstraint_getParam_2=
+b.asm._s).apply(null,arguments)},rv=b._emscripten_bind_btFixedConstraint_setParam_3=function(){return(rv=b._emscripten_bind_btFixedConstraint_setParam_3=b.asm.$s).apply(null,arguments)},sv=b._emscripten_bind_btFixedConstraint___destroy___0=function(){return(sv=b._emscripten_bind_btFixedConstraint___destroy___0=b.asm.at).apply(null,arguments)},tv=b._emscripten_bind_btTransform_btTransform_0=function(){return(tv=b._emscripten_bind_btTransform_btTransform_0=b.asm.bt).apply(null,arguments)},uv=b._emscripten_bind_btTransform_btTransform_2=
+function(){return(uv=b._emscripten_bind_btTransform_btTransform_2=b.asm.ct).apply(null,arguments)},vv=b._emscripten_bind_btTransform_setIdentity_0=function(){return(vv=b._emscripten_bind_btTransform_setIdentity_0=b.asm.dt).apply(null,arguments)},wv=b._emscripten_bind_btTransform_setOrigin_1=function(){return(wv=b._emscripten_bind_btTransform_setOrigin_1=b.asm.et).apply(null,arguments)},xv=b._emscripten_bind_btTransform_setRotation_1=function(){return(xv=b._emscripten_bind_btTransform_setRotation_1=
+b.asm.ft).apply(null,arguments)},yv=b._emscripten_bind_btTransform_getOrigin_0=function(){return(yv=b._emscripten_bind_btTransform_getOrigin_0=b.asm.gt).apply(null,arguments)},zv=b._emscripten_bind_btTransform_getRotation_0=function(){return(zv=b._emscripten_bind_btTransform_getRotation_0=b.asm.ht).apply(null,arguments)},Av=b._emscripten_bind_btTransform_getBasis_0=function(){return(Av=b._emscripten_bind_btTransform_getBasis_0=b.asm.it).apply(null,arguments)},Bv=b._emscripten_bind_btTransform_setFromOpenGLMatrix_1=
+function(){return(Bv=b._emscripten_bind_btTransform_setFromOpenGLMatrix_1=b.asm.jt).apply(null,arguments)},Cv=b._emscripten_bind_btTransform_inverse_0=function(){return(Cv=b._emscripten_bind_btTransform_inverse_0=b.asm.kt).apply(null,arguments)},Dv=b._emscripten_bind_btTransform_op_mul_1=function(){return(Dv=b._emscripten_bind_btTransform_op_mul_1=b.asm.lt).apply(null,arguments)},Ev=b._emscripten_bind_btTransform___destroy___0=function(){return(Ev=b._emscripten_bind_btTransform___destroy___0=b.asm.mt).apply(null,
+arguments)},Fv=b._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2=function(){return(Fv=b._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2=b.asm.nt).apply(null,arguments)},Gv=b._emscripten_bind_ClosestRayResultCallback_hasHit_0=function(){return(Gv=b._emscripten_bind_ClosestRayResultCallback_hasHit_0=b.asm.ot).apply(null,arguments)},Hv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0=function(){return(Hv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0=
+b.asm.pt).apply(null,arguments)},Iv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1=function(){return(Iv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1=b.asm.qt).apply(null,arguments)},Jv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0=function(){return(Jv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0=b.asm.rt).apply(null,arguments)},Kv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1=function(){return(Kv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1=
+b.asm.st).apply(null,arguments)},Lv=b._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0=function(){return(Lv=b._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0=b.asm.tt).apply(null,arguments)},Mv=b._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1=function(){return(Mv=b._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1=b.asm.ut).apply(null,arguments)},Nv=b._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0=function(){return(Nv=
+b._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0=b.asm.vt).apply(null,arguments)},Ov=b._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1=function(){return(Ov=b._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1=b.asm.wt).apply(null,arguments)},Pv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0=function(){return(Pv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0=b.asm.xt).apply(null,arguments)},Qv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1=
+function(){return(Qv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1=b.asm.yt).apply(null,arguments)},Rv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0=function(){return(Rv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0=b.asm.zt).apply(null,arguments)},Sv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1=function(){return(Sv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1=b.asm.At).apply(null,
+arguments)},Tv=b._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0=function(){return(Tv=b._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0=b.asm.Bt).apply(null,arguments)},Uv=b._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1=function(){return(Uv=b._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1=b.asm.Ct).apply(null,arguments)},Vv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0=function(){return(Vv=
+b._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0=b.asm.Dt).apply(null,arguments)},Wv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1=function(){return(Wv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1=b.asm.Et).apply(null,arguments)},Xv=b._emscripten_bind_ClosestRayResultCallback___destroy___0=function(){return(Xv=b._emscripten_bind_ClosestRayResultCallback___destroy___0=b.asm.Ft).apply(null,arguments)},Yv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0=
+function(){return(Yv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0=b.asm.Gt).apply(null,arguments)},Zv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1=function(){return(Zv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1=b.asm.Ht).apply(null,arguments)},$v=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0=
+function(){return($v=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0=b.asm.It).apply(null,arguments)},aw=b._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0=function(){return(aw=b._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0=b.asm.Jt).apply(null,arguments)},bw=b._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7=function(){return(bw=b._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7=
+b.asm.Kt).apply(null,arguments)},cw=b._emscripten_bind_ConcreteContactResultCallback___destroy___0=function(){return(cw=b._emscripten_bind_ConcreteContactResultCallback___destroy___0=b.asm.Lt).apply(null,arguments)},dw=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2=function(){return(dw=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2=b.asm.Mt).apply(null,arguments)},ew=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3=function(){return(ew=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3=
+b.asm.Nt).apply(null,arguments)},fw=b._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1=function(){return(fw=b._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1=b.asm.Ot).apply(null,arguments)},gw=b._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0=function(){return(gw=b._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0=b.asm.Pt).apply(null,arguments)},hw=b._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2=function(){return(hw=b._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2=
+b.asm.Qt).apply(null,arguments)},iw=b._emscripten_bind_btBvhTriangleMeshShape___destroy___0=function(){return(iw=b._emscripten_bind_btBvhTriangleMeshShape___destroy___0=b.asm.Rt).apply(null,arguments)},jw=b._emscripten_bind_btConstCollisionObjectArray_size_0=function(){return(jw=b._emscripten_bind_btConstCollisionObjectArray_size_0=b.asm.St).apply(null,arguments)},kw=b._emscripten_bind_btConstCollisionObjectArray_at_1=function(){return(kw=b._emscripten_bind_btConstCollisionObjectArray_at_1=b.asm.Tt).apply(null,
+arguments)},lw=b._emscripten_bind_btConstCollisionObjectArray___destroy___0=function(){return(lw=b._emscripten_bind_btConstCollisionObjectArray___destroy___0=b.asm.Ut).apply(null,arguments)},mw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_3=function(){return(mw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_3=b.asm.Vt).apply(null,arguments)},nw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_5=function(){return(nw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_5=
+b.asm.Wt).apply(null,arguments)},ow=b._emscripten_bind_btSliderConstraint_setLowerLinLimit_1=function(){return(ow=b._emscripten_bind_btSliderConstraint_setLowerLinLimit_1=b.asm.Xt).apply(null,arguments)},pw=b._emscripten_bind_btSliderConstraint_setUpperLinLimit_1=function(){return(pw=b._emscripten_bind_btSliderConstraint_setUpperLinLimit_1=b.asm.Yt).apply(null,arguments)},qw=b._emscripten_bind_btSliderConstraint_setLowerAngLimit_1=function(){return(qw=b._emscripten_bind_btSliderConstraint_setLowerAngLimit_1=
+b.asm.Zt).apply(null,arguments)},rw=b._emscripten_bind_btSliderConstraint_setUpperAngLimit_1=function(){return(rw=b._emscripten_bind_btSliderConstraint_setUpperAngLimit_1=b.asm._t).apply(null,arguments)},sw=b._emscripten_bind_btSliderConstraint_enableFeedback_1=function(){return(sw=b._emscripten_bind_btSliderConstraint_enableFeedback_1=b.asm.$t).apply(null,arguments)},tw=b._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0=function(){return(tw=b._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0=
+b.asm.au).apply(null,arguments)},uw=b._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1=function(){return(uw=b._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1=b.asm.bu).apply(null,arguments)},vw=b._emscripten_bind_btSliderConstraint_getParam_2=function(){return(vw=b._emscripten_bind_btSliderConstraint_getParam_2=b.asm.cu).apply(null,arguments)},ww=b._emscripten_bind_btSliderConstraint_setParam_3=function(){return(ww=b._emscripten_bind_btSliderConstraint_setParam_3=
+b.asm.du).apply(null,arguments)},xw=b._emscripten_bind_btSliderConstraint___destroy___0=function(){return(xw=b._emscripten_bind_btSliderConstraint___destroy___0=b.asm.eu).apply(null,arguments)},yw=b._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0=function(){return(yw=b._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0=b.asm.fu).apply(null,arguments)},zw=b._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2=function(){return(zw=b._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2=
+b.asm.gu).apply(null,arguments)},Aw=b._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0=function(){return(Aw=b._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0=b.asm.hu).apply(null,arguments)},Bw=b._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1=function(){return(Bw=b._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1=b.asm.iu).apply(null,arguments)},Cw=b._emscripten_bind_btPairCachingGhostObject_setActivationState_1=function(){return(Cw=
+b._emscripten_bind_btPairCachingGhostObject_setActivationState_1=b.asm.ju).apply(null,arguments)},Dw=b._emscripten_bind_btPairCachingGhostObject_forceActivationState_1=function(){return(Dw=b._emscripten_bind_btPairCachingGhostObject_forceActivationState_1=b.asm.ku).apply(null,arguments)},Ew=b._emscripten_bind_btPairCachingGhostObject_activate_0=function(){return(Ew=b._emscripten_bind_btPairCachingGhostObject_activate_0=b.asm.lu).apply(null,arguments)},Fw=b._emscripten_bind_btPairCachingGhostObject_activate_1=
+function(){return(Fw=b._emscripten_bind_btPairCachingGhostObject_activate_1=b.asm.mu).apply(null,arguments)},Gw=b._emscripten_bind_btPairCachingGhostObject_isActive_0=function(){return(Gw=b._emscripten_bind_btPairCachingGhostObject_isActive_0=b.asm.nu).apply(null,arguments)},Hw=b._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0=function(){return(Hw=b._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0=b.asm.ou).apply(null,arguments)},Iw=b._emscripten_bind_btPairCachingGhostObject_isStaticObject_0=
+function(){return(Iw=b._emscripten_bind_btPairCachingGhostObject_isStaticObject_0=b.asm.pu).apply(null,arguments)},Jw=b._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0=function(){return(Jw=b._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0=b.asm.qu).apply(null,arguments)},Kw=b._emscripten_bind_btPairCachingGhostObject_getRestitution_0=function(){return(Kw=b._emscripten_bind_btPairCachingGhostObject_getRestitution_0=b.asm.ru).apply(null,arguments)},Lw=b._emscripten_bind_btPairCachingGhostObject_getFriction_0=
+function(){return(Lw=b._emscripten_bind_btPairCachingGhostObject_getFriction_0=b.asm.su).apply(null,arguments)},Mw=b._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0=function(){return(Mw=b._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0=b.asm.tu).apply(null,arguments)},Nw=b._emscripten_bind_btPairCachingGhostObject_setRestitution_1=function(){return(Nw=b._emscripten_bind_btPairCachingGhostObject_setRestitution_1=b.asm.uu).apply(null,arguments)},Ow=b._emscripten_bind_btPairCachingGhostObject_setFriction_1=
+function(){return(Ow=b._emscripten_bind_btPairCachingGhostObject_setFriction_1=b.asm.vu).apply(null,arguments)},Pw=b._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1=function(){return(Pw=b._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1=b.asm.wu).apply(null,arguments)},Qw=b._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0=function(){return(Qw=b._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0=b.asm.xu).apply(null,arguments)},Rw=b._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0=
+function(){return(Rw=b._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0=b.asm.yu).apply(null,arguments)},Sw=b._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1=function(){return(Sw=b._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1=b.asm.zu).apply(null,arguments)},Tw=b._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1=function(){return(Tw=b._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1=b.asm.Au).apply(null,arguments)},Uw=b._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1=
+function(){return(Uw=b._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1=b.asm.Bu).apply(null,arguments)},Vw=b._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1=function(){return(Vw=b._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1=b.asm.Cu).apply(null,arguments)},Ww=b._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1=function(){return(Ww=b._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1=b.asm.Du).apply(null,arguments)},
+Xw=b._emscripten_bind_btPairCachingGhostObject_getUserIndex_0=function(){return(Xw=b._emscripten_bind_btPairCachingGhostObject_getUserIndex_0=b.asm.Eu).apply(null,arguments)},Yw=b._emscripten_bind_btPairCachingGhostObject_setUserIndex_1=function(){return(Yw=b._emscripten_bind_btPairCachingGhostObject_setUserIndex_1=b.asm.Fu).apply(null,arguments)},Zw=b._emscripten_bind_btPairCachingGhostObject_getUserPointer_0=function(){return(Zw=b._emscripten_bind_btPairCachingGhostObject_getUserPointer_0=b.asm.Gu).apply(null,
+arguments)},$w=b._emscripten_bind_btPairCachingGhostObject_setUserPointer_1=function(){return($w=b._emscripten_bind_btPairCachingGhostObject_setUserPointer_1=b.asm.Hu).apply(null,arguments)},ax=b._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0=function(){return(ax=b._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0=b.asm.Iu).apply(null,arguments)},bx=b._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0=function(){return(bx=b._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0=
+b.asm.Ju).apply(null,arguments)},cx=b._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1=function(){return(cx=b._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1=b.asm.Ku).apply(null,arguments)},dx=b._emscripten_bind_btPairCachingGhostObject___destroy___0=function(){return(dx=b._emscripten_bind_btPairCachingGhostObject___destroy___0=b.asm.Lu).apply(null,arguments)},ex=b._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0=function(){return(ex=b._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0=
+b.asm.Mu).apply(null,arguments)},fx=b._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0=function(){return(fx=b._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0=b.asm.Nu).apply(null,arguments)},gx=b._emscripten_bind_btManifoldPoint_getAppliedImpulse_0=function(){return(gx=b._emscripten_bind_btManifoldPoint_getAppliedImpulse_0=b.asm.Ou).apply(null,arguments)},hx=b._emscripten_bind_btManifoldPoint_getDistance_0=function(){return(hx=b._emscripten_bind_btManifoldPoint_getDistance_0=b.asm.Pu).apply(null,
+arguments)},ix=b._emscripten_bind_btManifoldPoint_get_m_localPointA_0=function(){return(ix=b._emscripten_bind_btManifoldPoint_get_m_localPointA_0=b.asm.Qu).apply(null,arguments)},jx=b._emscripten_bind_btManifoldPoint_set_m_localPointA_1=function(){return(jx=b._emscripten_bind_btManifoldPoint_set_m_localPointA_1=b.asm.Ru).apply(null,arguments)},kx=b._emscripten_bind_btManifoldPoint_get_m_localPointB_0=function(){return(kx=b._emscripten_bind_btManifoldPoint_get_m_localPointB_0=b.asm.Su).apply(null,
+arguments)},lx=b._emscripten_bind_btManifoldPoint_set_m_localPointB_1=function(){return(lx=b._emscripten_bind_btManifoldPoint_set_m_localPointB_1=b.asm.Tu).apply(null,arguments)},mx=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0=function(){return(mx=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0=b.asm.Uu).apply(null,arguments)},nx=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1=function(){return(nx=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1=b.asm.Vu).apply(null,
+arguments)},ox=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0=function(){return(ox=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0=b.asm.Wu).apply(null,arguments)},px=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1=function(){return(px=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1=b.asm.Xu).apply(null,arguments)},qx=b._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0=function(){return(qx=b._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0=
+b.asm.Yu).apply(null,arguments)},rx=b._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1=function(){return(rx=b._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1=b.asm.Zu).apply(null,arguments)},sx=b._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0=function(){return(sx=b._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0=b.asm._u).apply(null,arguments)},tx=b._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1=function(){return(tx=b._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1=
+b.asm.$u).apply(null,arguments)},ux=b._emscripten_bind_btManifoldPoint___destroy___0=function(){return(ux=b._emscripten_bind_btManifoldPoint___destroy___0=b.asm.av).apply(null,arguments)},vx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2=function(){return(vx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2=b.asm.bv).apply(null,arguments)},wx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4=function(){return(wx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4=
+b.asm.cv).apply(null,arguments)},xx=b._emscripten_bind_btPoint2PointConstraint_setPivotA_1=function(){return(xx=b._emscripten_bind_btPoint2PointConstraint_setPivotA_1=b.asm.dv).apply(null,arguments)},yx=b._emscripten_bind_btPoint2PointConstraint_setPivotB_1=function(){return(yx=b._emscripten_bind_btPoint2PointConstraint_setPivotB_1=b.asm.ev).apply(null,arguments)},zx=b._emscripten_bind_btPoint2PointConstraint_getPivotInA_0=function(){return(zx=b._emscripten_bind_btPoint2PointConstraint_getPivotInA_0=
+b.asm.fv).apply(null,arguments)},Ax=b._emscripten_bind_btPoint2PointConstraint_getPivotInB_0=function(){return(Ax=b._emscripten_bind_btPoint2PointConstraint_getPivotInB_0=b.asm.gv).apply(null,arguments)},Bx=b._emscripten_bind_btPoint2PointConstraint_enableFeedback_1=function(){return(Bx=b._emscripten_bind_btPoint2PointConstraint_enableFeedback_1=b.asm.hv).apply(null,arguments)},Cx=b._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0=function(){return(Cx=b._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0=
+b.asm.iv).apply(null,arguments)},Dx=b._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1=function(){return(Dx=b._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1=b.asm.jv).apply(null,arguments)},Ex=b._emscripten_bind_btPoint2PointConstraint_getParam_2=function(){return(Ex=b._emscripten_bind_btPoint2PointConstraint_getParam_2=b.asm.kv).apply(null,arguments)},Fx=b._emscripten_bind_btPoint2PointConstraint_setParam_3=function(){return(Fx=b._emscripten_bind_btPoint2PointConstraint_setParam_3=
+b.asm.lv).apply(null,arguments)},Gx=b._emscripten_bind_btPoint2PointConstraint_get_m_setting_0=function(){return(Gx=b._emscripten_bind_btPoint2PointConstraint_get_m_setting_0=b.asm.mv).apply(null,arguments)},Hx=b._emscripten_bind_btPoint2PointConstraint_set_m_setting_1=function(){return(Hx=b._emscripten_bind_btPoint2PointConstraint_set_m_setting_1=b.asm.nv).apply(null,arguments)},Ix=b._emscripten_bind_btPoint2PointConstraint___destroy___0=function(){return(Ix=b._emscripten_bind_btPoint2PointConstraint___destroy___0=
+b.asm.ov).apply(null,arguments)},Jx=b._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0=function(){return(Jx=b._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0=b.asm.pv).apply(null,arguments)},Kx=b._emscripten_bind_btSoftBodyHelpers_CreateRope_5=function(){return(Kx=b._emscripten_bind_btSoftBodyHelpers_CreateRope_5=b.asm.qv).apply(null,arguments)},Lx=b._emscripten_bind_btSoftBodyHelpers_CreatePatch_9=function(){return(Lx=b._emscripten_bind_btSoftBodyHelpers_CreatePatch_9=b.asm.rv).apply(null,
+arguments)},Mx=b._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10=function(){return(Mx=b._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10=b.asm.sv).apply(null,arguments)},Nx=b._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4=function(){return(Nx=b._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4=b.asm.tv).apply(null,arguments)},Ox=b._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5=function(){return(Ox=b._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5=b.asm.uv).apply(null,
+arguments)},Px=b._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4=function(){return(Px=b._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4=b.asm.vv).apply(null,arguments)},Qx=b._emscripten_bind_btSoftBodyHelpers___destroy___0=function(){return(Qx=b._emscripten_bind_btSoftBodyHelpers___destroy___0=b.asm.wv).apply(null,arguments)},Rx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0=function(){return(Rx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0=
+b.asm.xv).apply(null,arguments)},Sx=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1=function(){return(Sx=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1=b.asm.yv).apply(null,arguments)},Tx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0=function(){return(Tx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0=b.asm.zv).apply(null,arguments)},Ux=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1=function(){return(Ux=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1=
+b.asm.Av).apply(null,arguments)},Vx=b._emscripten_bind_btBroadphaseProxy___destroy___0=function(){return(Vx=b._emscripten_bind_btBroadphaseProxy___destroy___0=b.asm.Bv).apply(null,arguments)},Wx=b._emscripten_bind_tNodeArray_size_0=function(){return(Wx=b._emscripten_bind_tNodeArray_size_0=b.asm.Cv).apply(null,arguments)},Xx=b._emscripten_bind_tNodeArray_at_1=function(){return(Xx=b._emscripten_bind_tNodeArray_at_1=b.asm.Dv).apply(null,arguments)},Yx=b._emscripten_bind_tNodeArray___destroy___0=function(){return(Yx=
+b._emscripten_bind_tNodeArray___destroy___0=b.asm.Ev).apply(null,arguments)},Zx=b._emscripten_bind_btBoxShape_btBoxShape_1=function(){return(Zx=b._emscripten_bind_btBoxShape_btBoxShape_1=b.asm.Fv).apply(null,arguments)},$x=b._emscripten_bind_btBoxShape_setMargin_1=function(){return($x=b._emscripten_bind_btBoxShape_setMargin_1=b.asm.Gv).apply(null,arguments)},ay=b._emscripten_bind_btBoxShape_getMargin_0=function(){return(ay=b._emscripten_bind_btBoxShape_getMargin_0=b.asm.Hv).apply(null,arguments)},
+by=b._emscripten_bind_btBoxShape_setLocalScaling_1=function(){return(by=b._emscripten_bind_btBoxShape_setLocalScaling_1=b.asm.Iv).apply(null,arguments)},cy=b._emscripten_bind_btBoxShape_getLocalScaling_0=function(){return(cy=b._emscripten_bind_btBoxShape_getLocalScaling_0=b.asm.Jv).apply(null,arguments)},dy=b._emscripten_bind_btBoxShape_calculateLocalInertia_2=function(){return(dy=b._emscripten_bind_btBoxShape_calculateLocalInertia_2=b.asm.Kv).apply(null,arguments)},ey=b._emscripten_bind_btBoxShape___destroy___0=
+function(){return(ey=b._emscripten_bind_btBoxShape___destroy___0=b.asm.Lv).apply(null,arguments)},fy=b._emscripten_bind_btFace_get_m_indices_0=function(){return(fy=b._emscripten_bind_btFace_get_m_indices_0=b.asm.Mv).apply(null,arguments)},gy=b._emscripten_bind_btFace_set_m_indices_1=function(){return(gy=b._emscripten_bind_btFace_set_m_indices_1=b.asm.Nv).apply(null,arguments)},hy=b._emscripten_bind_btFace_get_m_plane_1=function(){return(hy=b._emscripten_bind_btFace_get_m_plane_1=b.asm.Ov).apply(null,
+arguments)},iy=b._emscripten_bind_btFace_set_m_plane_2=function(){return(iy=b._emscripten_bind_btFace_set_m_plane_2=b.asm.Pv).apply(null,arguments)},jy=b._emscripten_bind_btFace___destroy___0=function(){return(jy=b._emscripten_bind_btFace___destroy___0=b.asm.Qv).apply(null,arguments)},ky=b._emscripten_bind_DebugDrawer_DebugDrawer_0=function(){return(ky=b._emscripten_bind_DebugDrawer_DebugDrawer_0=b.asm.Rv).apply(null,arguments)},ly=b._emscripten_bind_DebugDrawer_drawLine_3=function(){return(ly=b._emscripten_bind_DebugDrawer_drawLine_3=
+b.asm.Sv).apply(null,arguments)},my=b._emscripten_bind_DebugDrawer_drawContactPoint_5=function(){return(my=b._emscripten_bind_DebugDrawer_drawContactPoint_5=b.asm.Tv).apply(null,arguments)},ny=b._emscripten_bind_DebugDrawer_reportErrorWarning_1=function(){return(ny=b._emscripten_bind_DebugDrawer_reportErrorWarning_1=b.asm.Uv).apply(null,arguments)},oy=b._emscripten_bind_DebugDrawer_draw3dText_2=function(){return(oy=b._emscripten_bind_DebugDrawer_draw3dText_2=b.asm.Vv).apply(null,arguments)},py=b._emscripten_bind_DebugDrawer_setDebugMode_1=
+function(){return(py=b._emscripten_bind_DebugDrawer_setDebugMode_1=b.asm.Wv).apply(null,arguments)},qy=b._emscripten_bind_DebugDrawer_getDebugMode_0=function(){return(qy=b._emscripten_bind_DebugDrawer_getDebugMode_0=b.asm.Xv).apply(null,arguments)},ry=b._emscripten_bind_DebugDrawer___destroy___0=function(){return(ry=b._emscripten_bind_DebugDrawer___destroy___0=b.asm.Yv).apply(null,arguments)},sy=b._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2=function(){return(sy=b._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2=
+b.asm.Zv).apply(null,arguments)},ty=b._emscripten_bind_btCapsuleShapeX_setMargin_1=function(){return(ty=b._emscripten_bind_btCapsuleShapeX_setMargin_1=b.asm._v).apply(null,arguments)},uy=b._emscripten_bind_btCapsuleShapeX_getMargin_0=function(){return(uy=b._emscripten_bind_btCapsuleShapeX_getMargin_0=b.asm.$v).apply(null,arguments)},vy=b._emscripten_bind_btCapsuleShapeX_getUpAxis_0=function(){return(vy=b._emscripten_bind_btCapsuleShapeX_getUpAxis_0=b.asm.aw).apply(null,arguments)},wy=b._emscripten_bind_btCapsuleShapeX_getRadius_0=
+function(){return(wy=b._emscripten_bind_btCapsuleShapeX_getRadius_0=b.asm.bw).apply(null,arguments)},xy=b._emscripten_bind_btCapsuleShapeX_getHalfHeight_0=function(){return(xy=b._emscripten_bind_btCapsuleShapeX_getHalfHeight_0=b.asm.cw).apply(null,arguments)},yy=b._emscripten_bind_btCapsuleShapeX_setLocalScaling_1=function(){return(yy=b._emscripten_bind_btCapsuleShapeX_setLocalScaling_1=b.asm.dw).apply(null,arguments)},zy=b._emscripten_bind_btCapsuleShapeX_getLocalScaling_0=function(){return(zy=b._emscripten_bind_btCapsuleShapeX_getLocalScaling_0=
+b.asm.ew).apply(null,arguments)},Ay=b._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2=function(){return(Ay=b._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2=b.asm.fw).apply(null,arguments)},By=b._emscripten_bind_btCapsuleShapeX___destroy___0=function(){return(By=b._emscripten_bind_btCapsuleShapeX___destroy___0=b.asm.gw).apply(null,arguments)},Cy=b._emscripten_bind_btQuaternion_btQuaternion_4=function(){return(Cy=b._emscripten_bind_btQuaternion_btQuaternion_4=b.asm.hw).apply(null,
+arguments)},Dy=b._emscripten_bind_btQuaternion_setValue_4=function(){return(Dy=b._emscripten_bind_btQuaternion_setValue_4=b.asm.iw).apply(null,arguments)},Ey=b._emscripten_bind_btQuaternion_setEulerZYX_3=function(){return(Ey=b._emscripten_bind_btQuaternion_setEulerZYX_3=b.asm.jw).apply(null,arguments)},Fy=b._emscripten_bind_btQuaternion_setRotation_2=function(){return(Fy=b._emscripten_bind_btQuaternion_setRotation_2=b.asm.kw).apply(null,arguments)},Gy=b._emscripten_bind_btQuaternion_normalize_0=function(){return(Gy=
+b._emscripten_bind_btQuaternion_normalize_0=b.asm.lw).apply(null,arguments)},Hy=b._emscripten_bind_btQuaternion_length2_0=function(){return(Hy=b._emscripten_bind_btQuaternion_length2_0=b.asm.mw).apply(null,arguments)},Iy=b._emscripten_bind_btQuaternion_length_0=function(){return(Iy=b._emscripten_bind_btQuaternion_length_0=b.asm.nw).apply(null,arguments)},Jy=b._emscripten_bind_btQuaternion_dot_1=function(){return(Jy=b._emscripten_bind_btQuaternion_dot_1=b.asm.ow).apply(null,arguments)},Ky=b._emscripten_bind_btQuaternion_normalized_0=
+function(){return(Ky=b._emscripten_bind_btQuaternion_normalized_0=b.asm.pw).apply(null,arguments)},Ly=b._emscripten_bind_btQuaternion_getAxis_0=function(){return(Ly=b._emscripten_bind_btQuaternion_getAxis_0=b.asm.qw).apply(null,arguments)},My=b._emscripten_bind_btQuaternion_inverse_0=function(){return(My=b._emscripten_bind_btQuaternion_inverse_0=b.asm.rw).apply(null,arguments)},Ny=b._emscripten_bind_btQuaternion_getAngle_0=function(){return(Ny=b._emscripten_bind_btQuaternion_getAngle_0=b.asm.sw).apply(null,
+arguments)},Oy=b._emscripten_bind_btQuaternion_getAngleShortestPath_0=function(){return(Oy=b._emscripten_bind_btQuaternion_getAngleShortestPath_0=b.asm.tw).apply(null,arguments)},Py=b._emscripten_bind_btQuaternion_angle_1=function(){return(Py=b._emscripten_bind_btQuaternion_angle_1=b.asm.uw).apply(null,arguments)},Qy=b._emscripten_bind_btQuaternion_angleShortestPath_1=function(){return(Qy=b._emscripten_bind_btQuaternion_angleShortestPath_1=b.asm.vw).apply(null,arguments)},Ry=b._emscripten_bind_btQuaternion_op_add_1=
+function(){return(Ry=b._emscripten_bind_btQuaternion_op_add_1=b.asm.ww).apply(null,arguments)},Sy=b._emscripten_bind_btQuaternion_op_sub_1=function(){return(Sy=b._emscripten_bind_btQuaternion_op_sub_1=b.asm.xw).apply(null,arguments)},Ty=b._emscripten_bind_btQuaternion_op_mul_1=function(){return(Ty=b._emscripten_bind_btQuaternion_op_mul_1=b.asm.yw).apply(null,arguments)},Uy=b._emscripten_bind_btQuaternion_op_mulq_1=function(){return(Uy=b._emscripten_bind_btQuaternion_op_mulq_1=b.asm.zw).apply(null,
+arguments)},Vy=b._emscripten_bind_btQuaternion_op_div_1=function(){return(Vy=b._emscripten_bind_btQuaternion_op_div_1=b.asm.Aw).apply(null,arguments)},Wy=b._emscripten_bind_btQuaternion_x_0=function(){return(Wy=b._emscripten_bind_btQuaternion_x_0=b.asm.Bw).apply(null,arguments)},Xy=b._emscripten_bind_btQuaternion_y_0=function(){return(Xy=b._emscripten_bind_btQuaternion_y_0=b.asm.Cw).apply(null,arguments)},Yy=b._emscripten_bind_btQuaternion_z_0=function(){return(Yy=b._emscripten_bind_btQuaternion_z_0=
+b.asm.Dw).apply(null,arguments)},Zy=b._emscripten_bind_btQuaternion_w_0=function(){return(Zy=b._emscripten_bind_btQuaternion_w_0=b.asm.Ew).apply(null,arguments)},$y=b._emscripten_bind_btQuaternion_setX_1=function(){return($y=b._emscripten_bind_btQuaternion_setX_1=b.asm.Fw).apply(null,arguments)},az=b._emscripten_bind_btQuaternion_setY_1=function(){return(az=b._emscripten_bind_btQuaternion_setY_1=b.asm.Gw).apply(null,arguments)},bz=b._emscripten_bind_btQuaternion_setZ_1=function(){return(bz=b._emscripten_bind_btQuaternion_setZ_1=
+b.asm.Hw).apply(null,arguments)},cz=b._emscripten_bind_btQuaternion_setW_1=function(){return(cz=b._emscripten_bind_btQuaternion_setW_1=b.asm.Iw).apply(null,arguments)},dz=b._emscripten_bind_btQuaternion___destroy___0=function(){return(dz=b._emscripten_bind_btQuaternion___destroy___0=b.asm.Jw).apply(null,arguments)},ez=b._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2=function(){return(ez=b._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2=b.asm.Kw).apply(null,arguments)},fz=b._emscripten_bind_btCapsuleShapeZ_setMargin_1=
+function(){return(fz=b._emscripten_bind_btCapsuleShapeZ_setMargin_1=b.asm.Lw).apply(null,arguments)},gz=b._emscripten_bind_btCapsuleShapeZ_getMargin_0=function(){return(gz=b._emscripten_bind_btCapsuleShapeZ_getMargin_0=b.asm.Mw).apply(null,arguments)},hz=b._emscripten_bind_btCapsuleShapeZ_getUpAxis_0=function(){return(hz=b._emscripten_bind_btCapsuleShapeZ_getUpAxis_0=b.asm.Nw).apply(null,arguments)},iz=b._emscripten_bind_btCapsuleShapeZ_getRadius_0=function(){return(iz=b._emscripten_bind_btCapsuleShapeZ_getRadius_0=
+b.asm.Ow).apply(null,arguments)},jz=b._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0=function(){return(jz=b._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0=b.asm.Pw).apply(null,arguments)},kz=b._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1=function(){return(kz=b._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1=b.asm.Qw).apply(null,arguments)},lz=b._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0=function(){return(lz=b._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0=b.asm.Rw).apply(null,
+arguments)},mz=b._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2=function(){return(mz=b._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2=b.asm.Sw).apply(null,arguments)},nz=b._emscripten_bind_btCapsuleShapeZ___destroy___0=function(){return(nz=b._emscripten_bind_btCapsuleShapeZ___destroy___0=b.asm.Tw).apply(null,arguments)},oz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0=function(){return(oz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0=b.asm.Uw).apply(null,
+arguments)},pz=b._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1=function(){return(pz=b._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1=b.asm.Vw).apply(null,arguments)},qz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0=function(){return(qz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0=b.asm.Ww).apply(null,arguments)},rz=b._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1=function(){return(rz=
+b._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1=b.asm.Xw).apply(null,arguments)},sz=b._emscripten_bind_btContactSolverInfo_get_m_numIterations_0=function(){return(sz=b._emscripten_bind_btContactSolverInfo_get_m_numIterations_0=b.asm.Yw).apply(null,arguments)},tz=b._emscripten_bind_btContactSolverInfo_set_m_numIterations_1=function(){return(tz=b._emscripten_bind_btContactSolverInfo_set_m_numIterations_1=b.asm.Zw).apply(null,arguments)},uz=b._emscripten_bind_btContactSolverInfo___destroy___0=
+function(){return(uz=b._emscripten_bind_btContactSolverInfo___destroy___0=b.asm._w).apply(null,arguments)},vz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3=function(){return(vz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3=b.asm.$w).apply(null,arguments)},wz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5=function(){return(wz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5=
+b.asm.ax).apply(null,arguments)},xz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2=function(){return(xz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2=b.asm.bx).apply(null,arguments)},yz=b._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2=function(){return(yz=b._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2=b.asm.cx).apply(null,arguments)},zz=b._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2=function(){return(zz=b._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2=
+b.asm.dx).apply(null,arguments)},Az=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0=function(){return(Az=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0=b.asm.ex).apply(null,arguments)},Bz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1=function(){return(Bz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1=b.asm.fx).apply(null,arguments)},Cz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2=
+function(){return(Cz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2=b.asm.gx).apply(null,arguments)},Dz=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1=function(){return(Dz=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1=b.asm.hx).apply(null,arguments)},Ez=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1=function(){return(Ez=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1=b.asm.ix).apply(null,
+arguments)},Fz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1=function(){return(Fz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1=b.asm.jx).apply(null,arguments)},Gz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1=function(){return(Gz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1=b.asm.kx).apply(null,arguments)},Hz=b._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0=function(){return(Hz=
+b._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0=b.asm.lx).apply(null,arguments)},Iz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1=function(){return(Iz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1=b.asm.mx).apply(null,arguments)},Jz=b._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0=function(){return(Jz=b._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0=b.asm.nx).apply(null,arguments)},
+Kz=b._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1=function(){return(Kz=b._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1=b.asm.ox).apply(null,arguments)},Lz=b._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2=function(){return(Lz=b._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2=b.asm.px).apply(null,arguments)},Mz=b._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3=function(){return(Mz=b._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3=
+b.asm.qx).apply(null,arguments)},Nz=b._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0=function(){return(Nz=b._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0=b.asm.rx).apply(null,arguments)},Oz=b._emscripten_bind_btSphereShape_btSphereShape_1=function(){return(Oz=b._emscripten_bind_btSphereShape_btSphereShape_1=b.asm.sx).apply(null,arguments)},Pz=b._emscripten_bind_btSphereShape_setMargin_1=function(){return(Pz=b._emscripten_bind_btSphereShape_setMargin_1=b.asm.tx).apply(null,
+arguments)},Qz=b._emscripten_bind_btSphereShape_getMargin_0=function(){return(Qz=b._emscripten_bind_btSphereShape_getMargin_0=b.asm.ux).apply(null,arguments)},Rz=b._emscripten_bind_btSphereShape_setLocalScaling_1=function(){return(Rz=b._emscripten_bind_btSphereShape_setLocalScaling_1=b.asm.vx).apply(null,arguments)},Sz=b._emscripten_bind_btSphereShape_getLocalScaling_0=function(){return(Sz=b._emscripten_bind_btSphereShape_getLocalScaling_0=b.asm.wx).apply(null,arguments)},Tz=b._emscripten_bind_btSphereShape_calculateLocalInertia_2=
+function(){return(Tz=b._emscripten_bind_btSphereShape_calculateLocalInertia_2=b.asm.xx).apply(null,arguments)},Uz=b._emscripten_bind_btSphereShape___destroy___0=function(){return(Uz=b._emscripten_bind_btSphereShape___destroy___0=b.asm.yx).apply(null,arguments)},Vz=b._emscripten_bind_Face_get_m_n_1=function(){return(Vz=b._emscripten_bind_Face_get_m_n_1=b.asm.zx).apply(null,arguments)},Wz=b._emscripten_bind_Face_set_m_n_2=function(){return(Wz=b._emscripten_bind_Face_set_m_n_2=b.asm.Ax).apply(null,arguments)},
+Xz=b._emscripten_bind_Face_get_m_normal_0=function(){return(Xz=b._emscripten_bind_Face_get_m_normal_0=b.asm.Bx).apply(null,arguments)},Yz=b._emscripten_bind_Face_set_m_normal_1=function(){return(Yz=b._emscripten_bind_Face_set_m_normal_1=b.asm.Cx).apply(null,arguments)},Zz=b._emscripten_bind_Face_get_m_ra_0=function(){return(Zz=b._emscripten_bind_Face_get_m_ra_0=b.asm.Dx).apply(null,arguments)},$z=b._emscripten_bind_Face_set_m_ra_1=function(){return($z=b._emscripten_bind_Face_set_m_ra_1=b.asm.Ex).apply(null,
+arguments)},aA=b._emscripten_bind_Face___destroy___0=function(){return(aA=b._emscripten_bind_Face___destroy___0=b.asm.Fx).apply(null,arguments)},bA=b._emscripten_bind_tFaceArray_size_0=function(){return(bA=b._emscripten_bind_tFaceArray_size_0=b.asm.Gx).apply(null,arguments)},cA=b._emscripten_bind_tFaceArray_at_1=function(){return(cA=b._emscripten_bind_tFaceArray_at_1=b.asm.Hx).apply(null,arguments)},dA=b._emscripten_bind_tFaceArray___destroy___0=function(){return(dA=b._emscripten_bind_tFaceArray___destroy___0=
+b.asm.Ix).apply(null,arguments)},eA=b._emscripten_bind_LocalConvexResult_LocalConvexResult_5=function(){return(eA=b._emscripten_bind_LocalConvexResult_LocalConvexResult_5=b.asm.Jx).apply(null,arguments)},fA=b._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0=function(){return(fA=b._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0=b.asm.Kx).apply(null,arguments)},gA=b._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1=function(){return(gA=b._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1=
+b.asm.Lx).apply(null,arguments)},hA=b._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0=function(){return(hA=b._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0=b.asm.Mx).apply(null,arguments)},iA=b._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1=function(){return(iA=b._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1=b.asm.Nx).apply(null,arguments)},jA=b._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0=function(){return(jA=b._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0=
+b.asm.Ox).apply(null,arguments)},kA=b._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1=function(){return(kA=b._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1=b.asm.Px).apply(null,arguments)},lA=b._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0=function(){return(lA=b._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0=b.asm.Qx).apply(null,arguments)},mA=b._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1=function(){return(mA=b._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1=
+b.asm.Rx).apply(null,arguments)},nA=b._emscripten_bind_LocalConvexResult_get_m_hitFraction_0=function(){return(nA=b._emscripten_bind_LocalConvexResult_get_m_hitFraction_0=b.asm.Sx).apply(null,arguments)},oA=b._emscripten_bind_LocalConvexResult_set_m_hitFraction_1=function(){return(oA=b._emscripten_bind_LocalConvexResult_set_m_hitFraction_1=b.asm.Tx).apply(null,arguments)},pA=b._emscripten_bind_LocalConvexResult___destroy___0=function(){return(pA=b._emscripten_bind_LocalConvexResult___destroy___0=
+b.asm.Ux).apply(null,arguments)},qA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP=function(){return(qA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP=b.asm.Vx).apply(null,arguments)},rA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP=function(){return(rA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP=b.asm.Wx).apply(null,arguments)},sA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM=function(){return(sA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM=
+b.asm.Xx).apply(null,arguments)},tA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM=function(){return(tA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM=b.asm.Yx).apply(null,arguments)},uA=b._emscripten_enum_PHY_ScalarType_PHY_FLOAT=function(){return(uA=b._emscripten_enum_PHY_ScalarType_PHY_FLOAT=b.asm.Zx).apply(null,arguments)},vA=b._emscripten_enum_PHY_ScalarType_PHY_DOUBLE=function(){return(vA=b._emscripten_enum_PHY_ScalarType_PHY_DOUBLE=b.asm._x).apply(null,arguments)},
+wA=b._emscripten_enum_PHY_ScalarType_PHY_INTEGER=function(){return(wA=b._emscripten_enum_PHY_ScalarType_PHY_INTEGER=b.asm.$x).apply(null,arguments)},xA=b._emscripten_enum_PHY_ScalarType_PHY_SHORT=function(){return(xA=b._emscripten_enum_PHY_ScalarType_PHY_SHORT=b.asm.ay).apply(null,arguments)},yA=b._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88=function(){return(yA=b._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88=b.asm.by).apply(null,arguments)},zA=b._emscripten_enum_PHY_ScalarType_PHY_UCHAR=function(){return(zA=
+b._emscripten_enum_PHY_ScalarType_PHY_UCHAR=b.asm.cy).apply(null,arguments)};b._malloc=function(){return(b._malloc=b.asm.dy).apply(null,arguments)};b._free=function(){return(b._free=b.asm.ey).apply(null,arguments)};b.dynCall_vi=function(){return(b.dynCall_vi=b.asm.fy).apply(null,arguments)};b.dynCall_v=function(){return(b.dynCall_v=b.asm.gy).apply(null,arguments)};
+b.UTF8ToString=function(a,c){if(a){var d=a+c;for(c=a;za[c]&&!(c>=d);)++c;if(16<c-a&&za.subarray&&wa)a=wa.decode(za.subarray(a,c));else{for(d="";a<c;){var e=za[a++];if(e&128){var g=za[a++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|g);else{var n=za[a++]&63;e=224==(e&240)?(e&15)<<12|g<<6|n:(e&7)<<18|g<<12|n<<6|za[a++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}a=d}}else a="";return a};var AA;
+Oa=function BA(){AA||CA();AA||(Oa=BA)};
+function CA(){function a(){if(!AA&&(AA=!0,b.calledRun=!0,!va)){Ka=!0;Fa(Ha);Fa(Ia);ba(b);if(b.onRuntimeInitialized)b.onRuntimeInitialized();if(b.postRun)for("function"==typeof b.postRun&&(b.postRun=[b.postRun]);b.postRun.length;){var c=b.postRun.shift();Ja.unshift(c)}Fa(Ja)}}if(!(0<Ma)){if(b.preRun)for("function"==typeof b.preRun&&(b.preRun=[b.preRun]);b.preRun.length;)La();Fa(Ga);0<Ma||(b.setStatus?(b.setStatus("Running..."),setTimeout(function(){setTimeout(function(){b.setStatus("")},1);a()},1)):
+a())}}b.run=CA;if(b.preInit)for("function"==typeof b.preInit&&(b.preInit=[b.preInit]);0<b.preInit.length;)b.preInit.pop()();noExitRuntime=!0;CA();function f(){}f.prototype=Object.create(f.prototype);f.prototype.constructor=f;f.prototype.iy=f;f.jy={};b.WrapperObject=f;function h(a){return(a||f).jy}b.getCache=h;function k(a,c){var d=h(c),e=d[a];if(e)return e;e=Object.create((c||f).prototype);e.hy=a;return d[a]=e}b.wrapPointer=k;b.castObject=function(a,c){return k(a.hy,c)};b.NULL=k(0);
+b.destroy=function(a){if(!a.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";a.__destroy__();delete h(a.iy)[a.hy]};b.compare=function(a,c){return a.hy===c.hy};b.getPointer=function(a){return a.hy};b.getClass=function(a){return a.iy};var DA=0,EA=0,FA=0,GA=[],HA=0;function IA(){if(HA){for(var a=0;a<GA.length;a++)b._free(GA[a]);GA.length=0;b._free(DA);DA=0;EA+=HA;HA=0}DA||(EA+=128,DA=b._malloc(EA),assert(DA));FA=0}
+function JA(a,c){assert(DA);a=a.length*c.BYTES_PER_ELEMENT;a=a+7&-8;FA+a>=EA?(assert(0<a),HA+=a,c=b._malloc(a),GA.push(c)):(c=DA+FA,FA+=a);return c}function KA(a,c,d){d>>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var e=0;e<a.length;e++)c[d+e]=a[e]}
+function LA(a){if("string"===typeof a){for(var c=0,d=0;d<a.length;++d){var e=a.charCodeAt(d);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++d)&1023);127>=e?++c:c=2047>=e?c+2:65535>=e?c+3:c+4}c=Array(c+1);e=c.length;d=0;if(0<e){e=d+e-1;for(var g=0;g<a.length;++g){var n=a.charCodeAt(g);if(55296<=n&&57343>=n){var F=a.charCodeAt(++g);n=65536+((n&1023)<<10)|F&1023}if(127>=n){if(d>=e)break;c[d++]=n}else{if(2047>=n){if(d+1>=e)break;c[d++]=192|n>>6}else{if(65535>=n){if(d+2>=e)break;c[d++]=224|
+n>>12}else{if(d+3>=e)break;c[d++]=240|n>>18;c[d++]=128|n>>12&63}c[d++]=128|n>>6&63}c[d++]=128|n&63}}c[d]=0}a=JA(c,ya);KA(c,ya,a)}return a}function MA(a){if("object"===typeof a){var c=JA(a,Ba);KA(a,Ba,c);return c}return a}function NA(){throw"cannot construct a btCollisionWorld, no constructor in IDL";}NA.prototype=Object.create(f.prototype);NA.prototype.constructor=NA;NA.prototype.iy=NA;NA.jy={};b.btCollisionWorld=NA;NA.prototype.getDispatcher=function(){return k($a(this.hy),OA)};
+NA.prototype.rayTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);ab(e,a,c,d)};NA.prototype.getPairCache=function(){return k(bb(this.hy),PA)};NA.prototype.getDispatchInfo=function(){return k(cb(this.hy),l)};
+NA.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?db(e,a):void 0===d?eb(e,a,c):fb(e,a,c,d)};NA.prototype.removeCollisionObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gb(c,a)};NA.prototype.getBroadphase=function(){return k(hb(this.hy),QA)};
+NA.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);ib(n,a,c,d,e,g)};NA.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);jb(e,a,c,d)};
+NA.prototype.contactTest=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);kb(d,a,c)};NA.prototype.updateSingleAabb=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lb(c,a)};NA.prototype.setDebugDrawer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mb(c,a)};NA.prototype.getDebugDrawer=function(){return k(nb(this.hy),RA)};NA.prototype.debugDrawWorld=function(){ob(this.hy)};
+NA.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);pb(e,a,c,d)};NA.prototype.__destroy__=function(){qb(this.hy)};function m(){throw"cannot construct a btCollisionShape, no constructor in IDL";}m.prototype=Object.create(f.prototype);m.prototype.constructor=m;m.prototype.iy=m;m.jy={};b.btCollisionShape=m;
+m.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);rb(c,a)};m.prototype.getLocalScaling=function(){return k(sb(this.hy),p)};m.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);tb(d,a,c)};m.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ub(c,a)};m.prototype.getMargin=function(){return vb(this.hy)};m.prototype.__destroy__=function(){wb(this.hy)};
+function q(){throw"cannot construct a btCollisionObject, no constructor in IDL";}q.prototype=Object.create(f.prototype);q.prototype.constructor=q;q.prototype.iy=q;q.jy={};b.btCollisionObject=q;q.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);xb(d,a,c)};q.prototype.getCollisionShape=function(){return k(yb(this.hy),m)};
+q.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zb(c,a)};q.prototype.setActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ab(c,a)};q.prototype.forceActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bb(c,a)};q.prototype.activate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);void 0===a?Cb(c):Db(c,a)};q.prototype.isActive=function(){return!!Eb(this.hy)};q.prototype.isKinematicObject=function(){return!!Fb(this.hy)};
+q.prototype.isStaticObject=function(){return!!Gb(this.hy)};q.prototype.isStaticOrKinematicObject=function(){return!!Hb(this.hy)};q.prototype.getRestitution=function(){return Ib(this.hy)};q.prototype.getFriction=function(){return Jb(this.hy)};q.prototype.getRollingFriction=function(){return Kb(this.hy)};q.prototype.setRestitution=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lb(c,a)};q.prototype.setFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Mb(c,a)};
+q.prototype.setRollingFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nb(c,a)};q.prototype.getWorldTransform=function(){return k(Ob(this.hy),r)};q.prototype.getCollisionFlags=function(){return Pb(this.hy)};q.prototype.setCollisionFlags=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qb(c,a)};q.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sb(c,a)};
+q.prototype.setCollisionShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tb(c,a)};q.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ub(c,a)};q.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vb(c,a)};q.prototype.getUserIndex=function(){return Wb(this.hy)};q.prototype.setUserIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xb(c,a)};
+q.prototype.getUserPointer=function(){return k(Yb(this.hy),SA)};q.prototype.setUserPointer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zb(c,a)};q.prototype.getBroadphaseHandle=function(){return k($b(this.hy),t)};q.prototype.__destroy__=function(){ac(this.hy)};function u(){throw"cannot construct a btDynamicsWorld, no constructor in IDL";}u.prototype=Object.create(NA.prototype);u.prototype.constructor=u;u.prototype.iy=u;u.jy={};b.btDynamicsWorld=u;
+u.prototype.addAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bc(c,a)};u.prototype.removeAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);cc(c,a)};u.prototype.getSolverInfo=function(){return k(dc(this.hy),v)};u.prototype.setInternalTickCallback=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?ec(e,a):void 0===d?fc(e,a,c):hc(e,a,c,d)};
+u.prototype.getDispatcher=function(){return k(ic(this.hy),OA)};u.prototype.rayTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);jc(e,a,c,d)};u.prototype.getPairCache=function(){return k(kc(this.hy),PA)};u.prototype.getDispatchInfo=function(){return k(lc(this.hy),l)};
+u.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?mc(e,a):void 0===d?nc(e,a,c):oc(e,a,c,d)};u.prototype.removeCollisionObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pc(c,a)};u.prototype.getBroadphase=function(){return k(qc(this.hy),QA)};
+u.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);rc(n,a,c,d,e,g)};u.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);sc(e,a,c,d)};
+u.prototype.contactTest=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);tc(d,a,c)};u.prototype.updateSingleAabb=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);uc(c,a)};u.prototype.setDebugDrawer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);vc(c,a)};u.prototype.getDebugDrawer=function(){return k(wc(this.hy),RA)};u.prototype.debugDrawWorld=function(){xc(this.hy)};
+u.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);yc(e,a,c,d)};u.prototype.__destroy__=function(){zc(this.hy)};function TA(){throw"cannot construct a btTypedConstraint, no constructor in IDL";}TA.prototype=Object.create(f.prototype);TA.prototype.constructor=TA;TA.prototype.iy=TA;TA.jy={};b.btTypedConstraint=TA;
+TA.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ac(c,a)};TA.prototype.getBreakingImpulseThreshold=function(){return Bc(this.hy)};TA.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cc(c,a)};TA.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return Dc(d,a,c)};
+TA.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Ec(e,a,c,d)};TA.prototype.__destroy__=function(){Fc(this.hy)};function UA(){throw"cannot construct a btConcaveShape, no constructor in IDL";}UA.prototype=Object.create(m.prototype);UA.prototype.constructor=UA;UA.prototype.iy=UA;UA.jy={};b.btConcaveShape=UA;
+UA.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gc(c,a)};UA.prototype.getLocalScaling=function(){return k(Hc(this.hy),p)};UA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ic(d,a,c)};UA.prototype.__destroy__=function(){Jc(this.hy)};function VA(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Kc(a,c);h(VA)[this.hy]=this}VA.prototype=Object.create(m.prototype);
+VA.prototype.constructor=VA;VA.prototype.iy=VA;VA.jy={};b.btCapsuleShape=VA;VA.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lc(c,a)};VA.prototype.getMargin=function(){return Mc(this.hy)};VA.prototype.getUpAxis=function(){return Nc(this.hy)};VA.prototype.getRadius=function(){return Oc(this.hy)};VA.prototype.getHalfHeight=function(){return Pc(this.hy)};VA.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qc(c,a)};
+VA.prototype.getLocalScaling=function(){return k(Rc(this.hy),p)};VA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Sc(d,a,c)};VA.prototype.__destroy__=function(){Tc(this.hy)};function RA(){throw"cannot construct a btIDebugDraw, no constructor in IDL";}RA.prototype=Object.create(f.prototype);RA.prototype.constructor=RA;RA.prototype.iy=RA;RA.jy={};b.btIDebugDraw=RA;
+RA.prototype.drawLine=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Uc(e,a,c,d)};RA.prototype.drawContactPoint=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);Vc(n,a,c,d,e,g)};
+RA.prototype.reportErrorWarning=function(a){var c=this.hy;IA();a=a&&"object"===typeof a?a.hy:LA(a);Wc(c,a)};RA.prototype.draw3dText=function(a,c){var d=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);c=c&&"object"===typeof c?c.hy:LA(c);Xc(d,a,c)};RA.prototype.setDebugMode=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yc(c,a)};RA.prototype.getDebugMode=function(){return Zc(this.hy)};RA.prototype.__destroy__=function(){$c(this.hy)};
+function WA(a){a&&"object"===typeof a&&(a=a.hy);this.hy=void 0===a?ad():bd(a);h(WA)[this.hy]=this}WA.prototype=Object.create(f.prototype);WA.prototype.constructor=WA;WA.prototype.iy=WA;WA.jy={};b.btDefaultCollisionConfiguration=WA;WA.prototype.__destroy__=function(){cd(this.hy)};function XA(){throw"cannot construct a btTriangleMeshShape, no constructor in IDL";}XA.prototype=Object.create(UA.prototype);XA.prototype.constructor=XA;XA.prototype.iy=XA;XA.jy={};b.btTriangleMeshShape=XA;
+XA.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dd(c,a)};XA.prototype.getLocalScaling=function(){return k(ed(this.hy),p)};XA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);fd(d,a,c)};XA.prototype.__destroy__=function(){gd(this.hy)};function w(){this.hy=hd();h(w)[this.hy]=this}w.prototype=Object.create(q.prototype);w.prototype.constructor=w;w.prototype.iy=w;w.jy={};
+b.btGhostObject=w;w.prototype.getNumOverlappingObjects=function(){return id(this.hy)};w.prototype.getOverlappingObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(jd(c,a),q)};w.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);kd(d,a,c)};w.prototype.getCollisionShape=function(){return k(ld(this.hy),m)};
+w.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);md(c,a)};w.prototype.setActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nd(c,a)};w.prototype.forceActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);od(c,a)};w.prototype.activate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);void 0===a?pd(c):qd(c,a)};w.prototype.isActive=function(){return!!rd(this.hy)};w.prototype.isKinematicObject=function(){return!!sd(this.hy)};
+w.prototype.isStaticObject=function(){return!!td(this.hy)};w.prototype.isStaticOrKinematicObject=function(){return!!ud(this.hy)};w.prototype.getRestitution=function(){return vd(this.hy)};w.prototype.getFriction=function(){return wd(this.hy)};w.prototype.getRollingFriction=function(){return xd(this.hy)};w.prototype.setRestitution=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yd(c,a)};w.prototype.setFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zd(c,a)};
+w.prototype.setRollingFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ad(c,a)};w.prototype.getWorldTransform=function(){return k(Bd(this.hy),r)};w.prototype.getCollisionFlags=function(){return Cd(this.hy)};w.prototype.setCollisionFlags=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dd(c,a)};w.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ed(c,a)};
+w.prototype.setCollisionShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fd(c,a)};w.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gd(c,a)};w.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Hd(c,a)};w.prototype.getUserIndex=function(){return Id(this.hy)};w.prototype.setUserIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Jd(c,a)};
+w.prototype.getUserPointer=function(){return k(Kd(this.hy),SA)};w.prototype.setUserPointer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ld(c,a)};w.prototype.getBroadphaseHandle=function(){return k(Md(this.hy),t)};w.prototype.__destroy__=function(){Nd(this.hy)};function YA(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Od(a,c);h(YA)[this.hy]=this}YA.prototype=Object.create(m.prototype);YA.prototype.constructor=YA;YA.prototype.iy=YA;YA.jy={};
+b.btConeShape=YA;YA.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pd(c,a)};YA.prototype.getLocalScaling=function(){return k(Qd(this.hy),p)};YA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Rd(d,a,c)};YA.prototype.__destroy__=function(){Sd(this.hy)};function ZA(){throw"cannot construct a btActionInterface, no constructor in IDL";}ZA.prototype=Object.create(f.prototype);
+ZA.prototype.constructor=ZA;ZA.prototype.iy=ZA;ZA.jy={};b.btActionInterface=ZA;ZA.prototype.updateAction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Td(d,a,c)};ZA.prototype.__destroy__=function(){Ud(this.hy)};
+function p(a,c,d){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);this.hy=void 0===a?Vd():void 0===c?_emscripten_bind_btVector3_btVector3_1(a):void 0===d?_emscripten_bind_btVector3_btVector3_2(a,c):Wd(a,c,d);h(p)[this.hy]=this}p.prototype=Object.create(f.prototype);p.prototype.constructor=p;p.prototype.iy=p;p.jy={};b.btVector3=p;p.prototype.length=p.prototype.length=function(){return Xd(this.hy)};p.prototype.x=p.prototype.x=function(){return Yd(this.hy)};
+p.prototype.y=p.prototype.y=function(){return Zd(this.hy)};p.prototype.z=p.prototype.z=function(){return $d(this.hy)};p.prototype.setX=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ae(c,a)};p.prototype.setY=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);be(c,a)};p.prototype.setZ=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ce(c,a)};
+p.prototype.setValue=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);de(e,a,c,d)};p.prototype.normalize=p.prototype.normalize=function(){ee(this.hy)};p.prototype.rotate=p.prototype.rotate=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return k(fe(d,a,c),p)};p.prototype.dot=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return ge(c,a)};
+p.prototype.op_mul=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(he(c,a),p)};p.prototype.op_add=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ie(c,a),p)};p.prototype.op_sub=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(je(c,a),p)};p.prototype.__destroy__=function(){ke(this.hy)};function $A(){throw"cannot construct a btVehicleRaycaster, no constructor in IDL";}$A.prototype=Object.create(f.prototype);$A.prototype.constructor=$A;
+$A.prototype.iy=$A;$A.jy={};b.btVehicleRaycaster=$A;$A.prototype.castRay=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);le(e,a,c,d)};$A.prototype.__destroy__=function(){me(this.hy)};function aB(){throw"cannot construct a btQuadWord, no constructor in IDL";}aB.prototype=Object.create(f.prototype);aB.prototype.constructor=aB;aB.prototype.iy=aB;aB.jy={};b.btQuadWord=aB;aB.prototype.x=aB.prototype.x=function(){return ne(this.hy)};
+aB.prototype.y=aB.prototype.y=function(){return oe(this.hy)};aB.prototype.z=aB.prototype.z=function(){return pe(this.hy)};aB.prototype.w=function(){return qe(this.hy)};aB.prototype.setX=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);re(c,a)};aB.prototype.setY=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);se(c,a)};aB.prototype.setZ=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);te(c,a)};
+aB.prototype.setW=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ue(c,a)};aB.prototype.__destroy__=function(){ve(this.hy)};function bB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=we(a);h(bB)[this.hy]=this}bB.prototype=Object.create(m.prototype);bB.prototype.constructor=bB;bB.prototype.iy=bB;bB.jy={};b.btCylinderShape=bB;bB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xe(c,a)};bB.prototype.getMargin=function(){return ye(this.hy)};
+bB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ze(c,a)};bB.prototype.getLocalScaling=function(){return k(Ae(this.hy),p)};bB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Be(d,a,c)};bB.prototype.__destroy__=function(){Ce(this.hy)};
+function x(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=De(a,c,d,e);h(x)[this.hy]=this}x.prototype=Object.create(u.prototype);x.prototype.constructor=x;x.prototype.iy=x;x.jy={};b.btDiscreteDynamicsWorld=x;x.prototype.setGravity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ee(c,a)};x.prototype.getGravity=function(){return k(Fe(this.hy),p)};
+x.prototype.addRigidBody=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?Ge(e,a):void 0===d?_emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_2(e,a,c):He(e,a,c,d)};x.prototype.removeRigidBody=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ie(c,a)};
+x.prototype.addConstraint=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===c?Je(d,a):Ke(d,a,c)};x.prototype.removeConstraint=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Le(c,a)};x.prototype.stepSimulation=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);return void 0===c?Me(e,a):void 0===d?Ne(e,a,c):Oe(e,a,c,d)};
+x.prototype.setContactAddedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pe(c,a)};x.prototype.setContactProcessedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qe(c,a)};x.prototype.setContactDestroyedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Re(c,a)};x.prototype.getDispatcher=function(){return k(Se(this.hy),OA)};
+x.prototype.rayTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Te(e,a,c,d)};x.prototype.getPairCache=function(){return k(Ue(this.hy),PA)};x.prototype.getDispatchInfo=function(){return k(Ve(this.hy),l)};x.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?We(e,a):void 0===d?Xe(e,a,c):Ye(e,a,c,d)};
+x.prototype.removeCollisionObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ze(c,a)};x.prototype.getBroadphase=function(){return k($e(this.hy),QA)};x.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);af(n,a,c,d,e,g)};
+x.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);bf(e,a,c,d)};x.prototype.contactTest=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);cf(d,a,c)};x.prototype.updateSingleAabb=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);df(c,a)};x.prototype.setDebugDrawer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ef(c,a)};
+x.prototype.getDebugDrawer=function(){return k(ff(this.hy),RA)};x.prototype.debugDrawWorld=function(){gf(this.hy)};x.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);hf(e,a,c,d)};x.prototype.addAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jf(c,a)};x.prototype.removeAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kf(c,a)};
+x.prototype.getSolverInfo=function(){return k(lf(this.hy),v)};x.prototype.setInternalTickCallback=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?mf(e,a):void 0===d?nf(e,a,c):of(e,a,c,d)};x.prototype.__destroy__=function(){pf(this.hy)};function cB(){throw"cannot construct a btConvexShape, no constructor in IDL";}cB.prototype=Object.create(m.prototype);cB.prototype.constructor=cB;cB.prototype.iy=cB;cB.jy={};
+b.btConvexShape=cB;cB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qf(c,a)};cB.prototype.getLocalScaling=function(){return k(rf(this.hy),p)};cB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);sf(d,a,c)};cB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);tf(c,a)};cB.prototype.getMargin=function(){return uf(this.hy)};cB.prototype.__destroy__=function(){vf(this.hy)};
+function OA(){throw"cannot construct a btDispatcher, no constructor in IDL";}OA.prototype=Object.create(f.prototype);OA.prototype.constructor=OA;OA.prototype.iy=OA;OA.jy={};b.btDispatcher=OA;OA.prototype.getNumManifolds=function(){return wf(this.hy)};OA.prototype.getManifoldByIndexInternal=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(xf(c,a),dB)};OA.prototype.__destroy__=function(){yf(this.hy)};
+function eB(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=void 0===e?zf(a,c,d):void 0===g?_emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_4(a,c,d,e):Af(a,c,d,e,g);h(eB)[this.hy]=this}eB.prototype=Object.create(TA.prototype);eB.prototype.constructor=eB;eB.prototype.iy=eB;eB.jy={};b.btGeneric6DofConstraint=eB;
+eB.prototype.setLinearLowerLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bf(c,a)};eB.prototype.setLinearUpperLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cf(c,a)};eB.prototype.setAngularLowerLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Df(c,a)};eB.prototype.setAngularUpperLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ef(c,a)};eB.prototype.getFrameOffsetA=function(){return k(Ff(this.hy),r)};
+eB.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gf(c,a)};eB.prototype.getBreakingImpulseThreshold=function(){return Hf(this.hy)};eB.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);If(c,a)};eB.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return Jf(d,a,c)};
+eB.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Kf(e,a,c,d)};eB.prototype.__destroy__=function(){Lf(this.hy)};function fB(){throw"cannot construct a btStridingMeshInterface, no constructor in IDL";}fB.prototype=Object.create(f.prototype);fB.prototype.constructor=fB;fB.prototype.iy=fB;fB.jy={};b.btStridingMeshInterface=fB;
+fB.prototype.setScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Mf(c,a)};fB.prototype.__destroy__=function(){Nf(this.hy)};function gB(){throw"cannot construct a btMotionState, no constructor in IDL";}gB.prototype=Object.create(f.prototype);gB.prototype.constructor=gB;gB.prototype.iy=gB;gB.jy={};b.btMotionState=gB;gB.prototype.getWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Of(c,a)};
+gB.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pf(c,a)};gB.prototype.__destroy__=function(){Qf(this.hy)};function y(){throw"cannot construct a ConvexResultCallback, no constructor in IDL";}y.prototype=Object.create(f.prototype);y.prototype.constructor=y;y.prototype.iy=y;y.jy={};b.ConvexResultCallback=y;y.prototype.hasHit=function(){return!!Rf(this.hy)};y.prototype.get_m_collisionFilterGroup=y.prototype.ky=function(){return Sf(this.hy)};
+y.prototype.set_m_collisionFilterGroup=y.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tf(c,a)};Object.defineProperty(y.prototype,"m_collisionFilterGroup",{get:y.prototype.ky,set:y.prototype.my});y.prototype.get_m_collisionFilterMask=y.prototype.ly=function(){return Uf(this.hy)};y.prototype.set_m_collisionFilterMask=y.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vf(c,a)};
+Object.defineProperty(y.prototype,"m_collisionFilterMask",{get:y.prototype.ly,set:y.prototype.ny});y.prototype.get_m_closestHitFraction=y.prototype.oy=function(){return Wf(this.hy)};y.prototype.set_m_closestHitFraction=y.prototype.py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xf(c,a)};Object.defineProperty(y.prototype,"m_closestHitFraction",{get:y.prototype.oy,set:y.prototype.py});y.prototype.__destroy__=function(){Yf(this.hy)};
+function hB(){throw"cannot construct a ContactResultCallback, no constructor in IDL";}hB.prototype=Object.create(f.prototype);hB.prototype.constructor=hB;hB.prototype.iy=hB;hB.jy={};b.ContactResultCallback=hB;
+hB.prototype.addSingleResult=function(a,c,d,e,g,n,F){var aa=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);return Zf(aa,a,c,d,e,g,n,F)};hB.prototype.__destroy__=function(){$f(this.hy)};function iB(){throw"cannot construct a btSoftBodySolver, no constructor in IDL";}iB.prototype=Object.create(f.prototype);
+iB.prototype.constructor=iB;iB.prototype.iy=iB;iB.jy={};b.btSoftBodySolver=iB;iB.prototype.__destroy__=function(){ag(this.hy)};function z(){throw"cannot construct a RayResultCallback, no constructor in IDL";}z.prototype=Object.create(f.prototype);z.prototype.constructor=z;z.prototype.iy=z;z.jy={};b.RayResultCallback=z;z.prototype.hasHit=function(){return!!bg(this.hy)};z.prototype.get_m_collisionFilterGroup=z.prototype.ky=function(){return cg(this.hy)};
+z.prototype.set_m_collisionFilterGroup=z.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dg(c,a)};Object.defineProperty(z.prototype,"m_collisionFilterGroup",{get:z.prototype.ky,set:z.prototype.my});z.prototype.get_m_collisionFilterMask=z.prototype.ly=function(){return eg(this.hy)};z.prototype.set_m_collisionFilterMask=z.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fg(c,a)};
+Object.defineProperty(z.prototype,"m_collisionFilterMask",{get:z.prototype.ly,set:z.prototype.ny});z.prototype.get_m_closestHitFraction=z.prototype.oy=function(){return gg(this.hy)};z.prototype.set_m_closestHitFraction=z.prototype.py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);hg(c,a)};Object.defineProperty(z.prototype,"m_closestHitFraction",{get:z.prototype.oy,set:z.prototype.py});z.prototype.get_m_collisionObject=z.prototype.qy=function(){return k(ig(this.hy),q)};
+z.prototype.set_m_collisionObject=z.prototype.xy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jg(c,a)};Object.defineProperty(z.prototype,"m_collisionObject",{get:z.prototype.qy,set:z.prototype.xy});z.prototype.__destroy__=function(){kg(this.hy)};function jB(){throw"cannot construct a btMatrix3x3, no constructor in IDL";}jB.prototype=Object.create(f.prototype);jB.prototype.constructor=jB;jB.prototype.iy=jB;jB.jy={};b.btMatrix3x3=jB;
+jB.prototype.setEulerZYX=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);lg(e,a,c,d)};jB.prototype.getRotation=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mg(c,a)};jB.prototype.getRow=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ng(c,a),p)};jB.prototype.__destroy__=function(){og(this.hy)};function kB(){throw"cannot construct a btScalarArray, no constructor in IDL";}kB.prototype=Object.create(f.prototype);
+kB.prototype.constructor=kB;kB.prototype.iy=kB;kB.jy={};b.btScalarArray=kB;kB.prototype.size=kB.prototype.size=function(){return pg(this.hy)};kB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return qg(c,a)};kB.prototype.__destroy__=function(){rg(this.hy)};function A(){throw"cannot construct a Material, no constructor in IDL";}A.prototype=Object.create(f.prototype);A.prototype.constructor=A;A.prototype.iy=A;A.jy={};b.Material=A;A.prototype.get_m_kLST=A.prototype.vA=function(){return sg(this.hy)};
+A.prototype.set_m_kLST=A.prototype.bD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);tg(c,a)};Object.defineProperty(A.prototype,"m_kLST",{get:A.prototype.vA,set:A.prototype.bD});A.prototype.get_m_kAST=A.prototype.uA=function(){return ug(this.hy)};A.prototype.set_m_kAST=A.prototype.aD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);vg(c,a)};Object.defineProperty(A.prototype,"m_kAST",{get:A.prototype.uA,set:A.prototype.aD});A.prototype.get_m_kVST=A.prototype.wA=function(){return wg(this.hy)};
+A.prototype.set_m_kVST=A.prototype.cD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xg(c,a)};Object.defineProperty(A.prototype,"m_kVST",{get:A.prototype.wA,set:A.prototype.cD});A.prototype.get_m_flags=A.prototype.cA=function(){return yg(this.hy)};A.prototype.set_m_flags=A.prototype.JC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zg(c,a)};Object.defineProperty(A.prototype,"m_flags",{get:A.prototype.cA,set:A.prototype.JC});A.prototype.__destroy__=function(){Ag(this.hy)};
+function l(){throw"cannot construct a btDispatcherInfo, no constructor in IDL";}l.prototype=Object.create(f.prototype);l.prototype.constructor=l;l.prototype.iy=l;l.jy={};b.btDispatcherInfo=l;l.prototype.get_m_timeStep=l.prototype.jB=function(){return Bg(this.hy)};l.prototype.set_m_timeStep=l.prototype.QD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cg(c,a)};Object.defineProperty(l.prototype,"m_timeStep",{get:l.prototype.jB,set:l.prototype.QD});
+l.prototype.get_m_stepCount=l.prototype.aB=function(){return Dg(this.hy)};l.prototype.set_m_stepCount=l.prototype.HD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Eg(c,a)};Object.defineProperty(l.prototype,"m_stepCount",{get:l.prototype.aB,set:l.prototype.HD});l.prototype.get_m_dispatchFunc=l.prototype.Wz=function(){return Fg(this.hy)};l.prototype.set_m_dispatchFunc=l.prototype.CC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gg(c,a)};
+Object.defineProperty(l.prototype,"m_dispatchFunc",{get:l.prototype.Wz,set:l.prototype.CC});l.prototype.get_m_timeOfImpact=l.prototype.iB=function(){return Hg(this.hy)};l.prototype.set_m_timeOfImpact=l.prototype.PD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ig(c,a)};Object.defineProperty(l.prototype,"m_timeOfImpact",{get:l.prototype.iB,set:l.prototype.PD});l.prototype.get_m_useContinuous=l.prototype.lB=function(){return!!Jg(this.hy)};
+l.prototype.set_m_useContinuous=l.prototype.SD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Kg(c,a)};Object.defineProperty(l.prototype,"m_useContinuous",{get:l.prototype.lB,set:l.prototype.SD});l.prototype.get_m_enableSatConvex=l.prototype.$z=function(){return!!Lg(this.hy)};l.prototype.set_m_enableSatConvex=l.prototype.GC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Mg(c,a)};Object.defineProperty(l.prototype,"m_enableSatConvex",{get:l.prototype.$z,set:l.prototype.GC});
+l.prototype.get_m_enableSPU=l.prototype.Zz=function(){return!!Ng(this.hy)};l.prototype.set_m_enableSPU=l.prototype.FC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Og(c,a)};Object.defineProperty(l.prototype,"m_enableSPU",{get:l.prototype.Zz,set:l.prototype.FC});l.prototype.get_m_useEpa=l.prototype.nB=function(){return!!Pg(this.hy)};l.prototype.set_m_useEpa=l.prototype.UD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qg(c,a)};
+Object.defineProperty(l.prototype,"m_useEpa",{get:l.prototype.nB,set:l.prototype.UD});l.prototype.get_m_allowedCcdPenetration=l.prototype.zz=function(){return Rg(this.hy)};l.prototype.set_m_allowedCcdPenetration=l.prototype.fC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sg(c,a)};Object.defineProperty(l.prototype,"m_allowedCcdPenetration",{get:l.prototype.zz,set:l.prototype.fC});l.prototype.get_m_useConvexConservativeDistanceUtil=l.prototype.mB=function(){return!!Tg(this.hy)};
+l.prototype.set_m_useConvexConservativeDistanceUtil=l.prototype.TD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ug(c,a)};Object.defineProperty(l.prototype,"m_useConvexConservativeDistanceUtil",{get:l.prototype.mB,set:l.prototype.TD});l.prototype.get_m_convexConservativeDistanceThreshold=l.prototype.Rz=function(){return Vg(this.hy)};l.prototype.set_m_convexConservativeDistanceThreshold=l.prototype.xC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wg(c,a)};
+Object.defineProperty(l.prototype,"m_convexConservativeDistanceThreshold",{get:l.prototype.Rz,set:l.prototype.xC});l.prototype.__destroy__=function(){Xg(this.hy)};function B(){throw"cannot construct a btWheelInfoConstructionInfo, no constructor in IDL";}B.prototype=Object.create(f.prototype);B.prototype.constructor=B;B.prototype.iy=B;B.jy={};b.btWheelInfoConstructionInfo=B;B.prototype.get_m_chassisConnectionCS=B.prototype.Lz=function(){return k(Yg(this.hy),p)};
+B.prototype.set_m_chassisConnectionCS=B.prototype.rC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zg(c,a)};Object.defineProperty(B.prototype,"m_chassisConnectionCS",{get:B.prototype.Lz,set:B.prototype.rC});B.prototype.get_m_wheelDirectionCS=B.prototype.Ly=function(){return k($g(this.hy),p)};B.prototype.set_m_wheelDirectionCS=B.prototype.Uy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ah(c,a)};Object.defineProperty(B.prototype,"m_wheelDirectionCS",{get:B.prototype.Ly,set:B.prototype.Uy});
+B.prototype.get_m_wheelAxleCS=B.prototype.Ky=function(){return k(bh(this.hy),p)};B.prototype.set_m_wheelAxleCS=B.prototype.Ty=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ch(c,a)};Object.defineProperty(B.prototype,"m_wheelAxleCS",{get:B.prototype.Ky,set:B.prototype.Ty});B.prototype.get_m_suspensionRestLength=B.prototype.fB=function(){return dh(this.hy)};B.prototype.set_m_suspensionRestLength=B.prototype.MD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);eh(c,a)};
+Object.defineProperty(B.prototype,"m_suspensionRestLength",{get:B.prototype.fB,set:B.prototype.MD});B.prototype.get_m_maxSuspensionTravelCm=B.prototype.vy=function(){return fh(this.hy)};B.prototype.set_m_maxSuspensionTravelCm=B.prototype.Cy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gh(c,a)};Object.defineProperty(B.prototype,"m_maxSuspensionTravelCm",{get:B.prototype.vy,set:B.prototype.Cy});B.prototype.get_m_wheelRadius=B.prototype.tB=function(){return hh(this.hy)};
+B.prototype.set_m_wheelRadius=B.prototype.$D=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ih(c,a)};Object.defineProperty(B.prototype,"m_wheelRadius",{get:B.prototype.tB,set:B.prototype.$D});B.prototype.get_m_suspensionStiffness=B.prototype.wy=function(){return jh(this.hy)};B.prototype.set_m_suspensionStiffness=B.prototype.Dy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kh(c,a)};Object.defineProperty(B.prototype,"m_suspensionStiffness",{get:B.prototype.wy,set:B.prototype.Dy});
+B.prototype.get_m_wheelsDampingCompression=B.prototype.My=function(){return lh(this.hy)};B.prototype.set_m_wheelsDampingCompression=B.prototype.Vy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mh(c,a)};Object.defineProperty(B.prototype,"m_wheelsDampingCompression",{get:B.prototype.My,set:B.prototype.Vy});B.prototype.get_m_wheelsDampingRelaxation=B.prototype.Ny=function(){return nh(this.hy)};
+B.prototype.set_m_wheelsDampingRelaxation=B.prototype.Wy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);oh(c,a)};Object.defineProperty(B.prototype,"m_wheelsDampingRelaxation",{get:B.prototype.Ny,set:B.prototype.Wy});B.prototype.get_m_frictionSlip=B.prototype.ry=function(){return ph(this.hy)};B.prototype.set_m_frictionSlip=B.prototype.yy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qh(c,a)};Object.defineProperty(B.prototype,"m_frictionSlip",{get:B.prototype.ry,set:B.prototype.yy});
+B.prototype.get_m_maxSuspensionForce=B.prototype.uy=function(){return rh(this.hy)};B.prototype.set_m_maxSuspensionForce=B.prototype.By=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sh(c,a)};Object.defineProperty(B.prototype,"m_maxSuspensionForce",{get:B.prototype.uy,set:B.prototype.By});B.prototype.get_m_bIsFrontWheel=B.prototype.Fy=function(){return!!th(this.hy)};B.prototype.set_m_bIsFrontWheel=B.prototype.Oy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);uh(c,a)};
+Object.defineProperty(B.prototype,"m_bIsFrontWheel",{get:B.prototype.Fy,set:B.prototype.Oy});B.prototype.__destroy__=function(){vh(this.hy)};function lB(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=void 0===c?wh(a):xh(a,c);h(lB)[this.hy]=this}lB.prototype=Object.create(cB.prototype);lB.prototype.constructor=lB;lB.prototype.iy=lB;lB.jy={};b.btConvexTriangleMeshShape=lB;lB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yh(c,a)};
+lB.prototype.getLocalScaling=function(){return k(zh(this.hy),p)};lB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ah(d,a,c)};lB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bh(c,a)};lB.prototype.getMargin=function(){return Ch(this.hy)};lB.prototype.__destroy__=function(){Dh(this.hy)};function QA(){throw"cannot construct a btBroadphaseInterface, no constructor in IDL";}QA.prototype=Object.create(f.prototype);
+QA.prototype.constructor=QA;QA.prototype.iy=QA;QA.jy={};b.btBroadphaseInterface=QA;QA.prototype.getOverlappingPairCache=function(){return k(Eh(this.hy),PA)};QA.prototype.__destroy__=function(){Fh(this.hy)};function C(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=void 0===e?Gh(a,c,d):Hh(a,c,d,e);h(C)[this.hy]=this}C.prototype=Object.create(f.prototype);C.prototype.constructor=C;C.prototype.iy=C;
+C.jy={};b.btRigidBodyConstructionInfo=C;C.prototype.get_m_linearDamping=C.prototype.xA=function(){return Ih(this.hy)};C.prototype.set_m_linearDamping=C.prototype.dD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Jh(c,a)};Object.defineProperty(C.prototype,"m_linearDamping",{get:C.prototype.xA,set:C.prototype.dD});C.prototype.get_m_angularDamping=C.prototype.Bz=function(){return Kh(this.hy)};
+C.prototype.set_m_angularDamping=C.prototype.hC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lh(c,a)};Object.defineProperty(C.prototype,"m_angularDamping",{get:C.prototype.Bz,set:C.prototype.hC});C.prototype.get_m_friction=C.prototype.dA=function(){return Mh(this.hy)};C.prototype.set_m_friction=C.prototype.KC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nh(c,a)};Object.defineProperty(C.prototype,"m_friction",{get:C.prototype.dA,set:C.prototype.KC});
+C.prototype.get_m_rollingFriction=C.prototype.TA=function(){return Oh(this.hy)};C.prototype.set_m_rollingFriction=C.prototype.zD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ph(c,a)};Object.defineProperty(C.prototype,"m_rollingFriction",{get:C.prototype.TA,set:C.prototype.zD});C.prototype.get_m_restitution=C.prototype.RA=function(){return Qh(this.hy)};C.prototype.set_m_restitution=C.prototype.xD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rh(c,a)};
+Object.defineProperty(C.prototype,"m_restitution",{get:C.prototype.RA,set:C.prototype.xD});C.prototype.get_m_linearSleepingThreshold=C.prototype.yA=function(){return Sh(this.hy)};C.prototype.set_m_linearSleepingThreshold=C.prototype.eD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Th(c,a)};Object.defineProperty(C.prototype,"m_linearSleepingThreshold",{get:C.prototype.yA,set:C.prototype.eD});C.prototype.get_m_angularSleepingThreshold=C.prototype.Cz=function(){return Uh(this.hy)};
+C.prototype.set_m_angularSleepingThreshold=C.prototype.iC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vh(c,a)};Object.defineProperty(C.prototype,"m_angularSleepingThreshold",{get:C.prototype.Cz,set:C.prototype.iC});C.prototype.get_m_additionalDamping=C.prototype.wz=function(){return!!Wh(this.hy)};C.prototype.set_m_additionalDamping=C.prototype.cC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xh(c,a)};
+Object.defineProperty(C.prototype,"m_additionalDamping",{get:C.prototype.wz,set:C.prototype.cC});C.prototype.get_m_additionalDampingFactor=C.prototype.xz=function(){return Yh(this.hy)};C.prototype.set_m_additionalDampingFactor=C.prototype.dC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zh(c,a)};Object.defineProperty(C.prototype,"m_additionalDampingFactor",{get:C.prototype.xz,set:C.prototype.dC});C.prototype.get_m_additionalLinearDampingThresholdSqr=C.prototype.yz=function(){return $h(this.hy)};
+C.prototype.set_m_additionalLinearDampingThresholdSqr=C.prototype.eC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ai(c,a)};Object.defineProperty(C.prototype,"m_additionalLinearDampingThresholdSqr",{get:C.prototype.yz,set:C.prototype.eC});C.prototype.get_m_additionalAngularDampingThresholdSqr=C.prototype.vz=function(){return bi(this.hy)};C.prototype.set_m_additionalAngularDampingThresholdSqr=C.prototype.bC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ci(c,a)};
+Object.defineProperty(C.prototype,"m_additionalAngularDampingThresholdSqr",{get:C.prototype.vz,set:C.prototype.bC});C.prototype.get_m_additionalAngularDampingFactor=C.prototype.uz=function(){return di(this.hy)};C.prototype.set_m_additionalAngularDampingFactor=C.prototype.aC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ei(c,a)};Object.defineProperty(C.prototype,"m_additionalAngularDampingFactor",{get:C.prototype.uz,set:C.prototype.aC});C.prototype.__destroy__=function(){fi(this.hy)};
+function mB(){throw"cannot construct a btCollisionConfiguration, no constructor in IDL";}mB.prototype=Object.create(f.prototype);mB.prototype.constructor=mB;mB.prototype.iy=mB;mB.jy={};b.btCollisionConfiguration=mB;mB.prototype.__destroy__=function(){gi(this.hy)};function dB(){this.hy=hi();h(dB)[this.hy]=this}dB.prototype=Object.create(f.prototype);dB.prototype.constructor=dB;dB.prototype.iy=dB;dB.jy={};b.btPersistentManifold=dB;dB.prototype.getBody0=function(){return k(ii(this.hy),q)};
+dB.prototype.getBody1=function(){return k(ji(this.hy),q)};dB.prototype.getNumContacts=function(){return ki(this.hy)};dB.prototype.getContactPoint=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(li(c,a),D)};dB.prototype.__destroy__=function(){mi(this.hy)};function nB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=void 0===a?ni():oi(a);h(nB)[this.hy]=this}nB.prototype=Object.create(m.prototype);nB.prototype.constructor=nB;nB.prototype.iy=nB;nB.jy={};b.btCompoundShape=nB;
+nB.prototype.addChildShape=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);pi(d,a,c)};nB.prototype.removeChildShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qi(c,a)};nB.prototype.removeChildShapeByIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ri(c,a)};nB.prototype.getNumChildShapes=function(){return si(this.hy)};nB.prototype.getChildShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ti(c,a),m)};
+nB.prototype.updateChildTransform=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===d?ui(e,a,c):vi(e,a,c,d)};nB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wi(c,a)};nB.prototype.getMargin=function(){return xi(this.hy)};nB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yi(c,a)};nB.prototype.getLocalScaling=function(){return k(zi(this.hy),p)};
+nB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ai(d,a,c)};nB.prototype.__destroy__=function(){Bi(this.hy)};function E(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Ci(a,c);h(E)[this.hy]=this}E.prototype=Object.create(y.prototype);E.prototype.constructor=E;E.prototype.iy=E;E.jy={};b.ClosestConvexResultCallback=E;E.prototype.hasHit=function(){return!!Di(this.hy)};
+E.prototype.get_m_convexFromWorld=E.prototype.Sz=function(){return k(Ei(this.hy),p)};E.prototype.set_m_convexFromWorld=E.prototype.yC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fi(c,a)};Object.defineProperty(E.prototype,"m_convexFromWorld",{get:E.prototype.Sz,set:E.prototype.yC});E.prototype.get_m_convexToWorld=E.prototype.Tz=function(){return k(Gi(this.hy),p)};E.prototype.set_m_convexToWorld=E.prototype.zC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Hi(c,a)};
+Object.defineProperty(E.prototype,"m_convexToWorld",{get:E.prototype.Tz,set:E.prototype.zC});E.prototype.get_m_hitNormalWorld=E.prototype.sy=function(){return k(Ii(this.hy),p)};E.prototype.set_m_hitNormalWorld=E.prototype.zy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ji(c,a)};Object.defineProperty(E.prototype,"m_hitNormalWorld",{get:E.prototype.sy,set:E.prototype.zy});E.prototype.get_m_hitPointWorld=E.prototype.ty=function(){return k(Ki(this.hy),p)};
+E.prototype.set_m_hitPointWorld=E.prototype.Ay=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Li(c,a)};Object.defineProperty(E.prototype,"m_hitPointWorld",{get:E.prototype.ty,set:E.prototype.Ay});E.prototype.get_m_collisionFilterGroup=E.prototype.ky=function(){return Mi(this.hy)};E.prototype.set_m_collisionFilterGroup=E.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ni(c,a)};Object.defineProperty(E.prototype,"m_collisionFilterGroup",{get:E.prototype.ky,set:E.prototype.my});
+E.prototype.get_m_collisionFilterMask=E.prototype.ly=function(){return Oi(this.hy)};E.prototype.set_m_collisionFilterMask=E.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pi(c,a)};Object.defineProperty(E.prototype,"m_collisionFilterMask",{get:E.prototype.ly,set:E.prototype.ny});E.prototype.get_m_closestHitFraction=E.prototype.oy=function(){return Qi(this.hy)};
+E.prototype.set_m_closestHitFraction=E.prototype.py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ri(c,a)};Object.defineProperty(E.prototype,"m_closestHitFraction",{get:E.prototype.oy,set:E.prototype.py});E.prototype.__destroy__=function(){Si(this.hy)};function G(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Ti(a,c);h(G)[this.hy]=this}G.prototype=Object.create(z.prototype);G.prototype.constructor=G;G.prototype.iy=G;G.jy={};b.AllHitsRayResultCallback=G;
+G.prototype.hasHit=function(){return!!Ui(this.hy)};G.prototype.get_m_collisionObjects=G.prototype.Oz=function(){return k(Vi(this.hy),oB)};G.prototype.set_m_collisionObjects=G.prototype.uC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wi(c,a)};Object.defineProperty(G.prototype,"m_collisionObjects",{get:G.prototype.Oz,set:G.prototype.uC});G.prototype.get_m_rayFromWorld=G.prototype.Iy=function(){return k(Xi(this.hy),p)};
+G.prototype.set_m_rayFromWorld=G.prototype.Ry=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yi(c,a)};Object.defineProperty(G.prototype,"m_rayFromWorld",{get:G.prototype.Iy,set:G.prototype.Ry});G.prototype.get_m_rayToWorld=G.prototype.Jy=function(){return k(Zi(this.hy),p)};G.prototype.set_m_rayToWorld=G.prototype.Sy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$i(c,a)};Object.defineProperty(G.prototype,"m_rayToWorld",{get:G.prototype.Jy,set:G.prototype.Sy});
+G.prototype.get_m_hitNormalWorld=G.prototype.sy=function(){return k(aj(this.hy),pB)};G.prototype.set_m_hitNormalWorld=G.prototype.zy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bj(c,a)};Object.defineProperty(G.prototype,"m_hitNormalWorld",{get:G.prototype.sy,set:G.prototype.zy});G.prototype.get_m_hitPointWorld=G.prototype.ty=function(){return k(cj(this.hy),pB)};G.prototype.set_m_hitPointWorld=G.prototype.Ay=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dj(c,a)};
+Object.defineProperty(G.prototype,"m_hitPointWorld",{get:G.prototype.ty,set:G.prototype.Ay});G.prototype.get_m_hitFractions=G.prototype.kA=function(){return k(ej(this.hy),kB)};G.prototype.set_m_hitFractions=G.prototype.RC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fj(c,a)};Object.defineProperty(G.prototype,"m_hitFractions",{get:G.prototype.kA,set:G.prototype.RC});G.prototype.get_m_collisionFilterGroup=G.prototype.ky=function(){return gj(this.hy)};
+G.prototype.set_m_collisionFilterGroup=G.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);hj(c,a)};Object.defineProperty(G.prototype,"m_collisionFilterGroup",{get:G.prototype.ky,set:G.prototype.my});G.prototype.get_m_collisionFilterMask=G.prototype.ly=function(){return ij(this.hy)};G.prototype.set_m_collisionFilterMask=G.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jj(c,a)};
+Object.defineProperty(G.prototype,"m_collisionFilterMask",{get:G.prototype.ly,set:G.prototype.ny});G.prototype.get_m_closestHitFraction=G.prototype.oy=function(){return kj(this.hy)};G.prototype.set_m_closestHitFraction=G.prototype.py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lj(c,a)};Object.defineProperty(G.prototype,"m_closestHitFraction",{get:G.prototype.oy,set:G.prototype.py});G.prototype.get_m_collisionObject=G.prototype.qy=function(){return k(mj(this.hy),q)};
+G.prototype.set_m_collisionObject=G.prototype.xy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nj(c,a)};Object.defineProperty(G.prototype,"m_collisionObject",{get:G.prototype.qy,set:G.prototype.xy});G.prototype.__destroy__=function(){oj(this.hy)};function qB(){throw"cannot construct a tMaterialArray, no constructor in IDL";}qB.prototype=Object.create(f.prototype);qB.prototype.constructor=qB;qB.prototype.iy=qB;qB.jy={};b.tMaterialArray=qB;qB.prototype.size=qB.prototype.size=function(){return pj(this.hy)};
+qB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(qj(c,a),A)};qB.prototype.__destroy__=function(){rj(this.hy)};function rB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=sj(a);h(rB)[this.hy]=this}rB.prototype=Object.create($A.prototype);rB.prototype.constructor=rB;rB.prototype.iy=rB;rB.jy={};b.btDefaultVehicleRaycaster=rB;
+rB.prototype.castRay=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);tj(e,a,c,d)};rB.prototype.__destroy__=function(){uj(this.hy)};function sB(){this.hy=vj();h(sB)[this.hy]=this}sB.prototype=Object.create(UA.prototype);sB.prototype.constructor=sB;sB.prototype.iy=sB;sB.jy={};b.btEmptyShape=sB;sB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wj(c,a)};
+sB.prototype.getLocalScaling=function(){return k(xj(this.hy),p)};sB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);yj(d,a,c)};sB.prototype.__destroy__=function(){zj(this.hy)};function H(){this.hy=Aj();h(H)[this.hy]=this}H.prototype=Object.create(f.prototype);H.prototype.constructor=H;H.prototype.iy=H;H.jy={};b.btConstraintSetting=H;H.prototype.get_m_tau=H.prototype.hB=function(){return Bj(this.hy)};
+H.prototype.set_m_tau=H.prototype.OD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cj(c,a)};Object.defineProperty(H.prototype,"m_tau",{get:H.prototype.hB,set:H.prototype.OD});H.prototype.get_m_damping=H.prototype.Uz=function(){return Dj(this.hy)};H.prototype.set_m_damping=H.prototype.AC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ej(c,a)};Object.defineProperty(H.prototype,"m_damping",{get:H.prototype.Uz,set:H.prototype.AC});
+H.prototype.get_m_impulseClamp=H.prototype.qA=function(){return Fj(this.hy)};H.prototype.set_m_impulseClamp=H.prototype.XC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gj(c,a)};Object.defineProperty(H.prototype,"m_impulseClamp",{get:H.prototype.qA,set:H.prototype.XC});H.prototype.__destroy__=function(){Hj(this.hy)};function tB(){throw"cannot construct a LocalShapeInfo, no constructor in IDL";}tB.prototype=Object.create(f.prototype);tB.prototype.constructor=tB;tB.prototype.iy=tB;
+tB.jy={};b.LocalShapeInfo=tB;tB.prototype.get_m_shapePart=tB.prototype.WA=function(){return Ij(this.hy)};tB.prototype.set_m_shapePart=tB.prototype.CD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Jj(c,a)};Object.defineProperty(tB.prototype,"m_shapePart",{get:tB.prototype.WA,set:tB.prototype.CD});tB.prototype.get_m_triangleIndex=tB.prototype.kB=function(){return Kj(this.hy)};
+tB.prototype.set_m_triangleIndex=tB.prototype.RD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lj(c,a)};Object.defineProperty(tB.prototype,"m_triangleIndex",{get:tB.prototype.kB,set:tB.prototype.RD});tB.prototype.__destroy__=function(){Mj(this.hy)};function I(a){a&&"object"===typeof a&&(a=a.hy);this.hy=Nj(a);h(I)[this.hy]=this}I.prototype=Object.create(q.prototype);I.prototype.constructor=I;I.prototype.iy=I;I.jy={};b.btRigidBody=I;
+I.prototype.getCenterOfMassTransform=function(){return k(Oj(this.hy),r)};I.prototype.setCenterOfMassTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pj(c,a)};I.prototype.setSleepingThresholds=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Qj(d,a,c)};I.prototype.getLinearDamping=function(){return Rj(this.hy)};I.prototype.getAngularDamping=function(){return Sj(this.hy)};
+I.prototype.setDamping=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Tj(d,a,c)};I.prototype.setMassProps=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Uj(d,a,c)};I.prototype.getLinearFactor=function(){return k(Vj(this.hy),p)};I.prototype.setLinearFactor=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wj(c,a)};
+I.prototype.applyTorque=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xj(c,a)};I.prototype.applyLocalTorque=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yj(c,a)};I.prototype.applyForce=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Zj(d,a,c)};I.prototype.applyCentralForce=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ak(c,a)};
+I.prototype.applyCentralLocalForce=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bk(c,a)};I.prototype.applyTorqueImpulse=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ck(c,a)};I.prototype.applyImpulse=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);dk(d,a,c)};I.prototype.applyCentralImpulse=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ek(c,a)};I.prototype.updateInertiaTensor=function(){fk(this.hy)};
+I.prototype.getLinearVelocity=function(){return k(gk(this.hy),p)};I.prototype.getAngularVelocity=function(){return k(hk(this.hy),p)};I.prototype.setLinearVelocity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ik(c,a)};I.prototype.setAngularVelocity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jk(c,a)};I.prototype.getMotionState=function(){return k(kk(this.hy),gB)};I.prototype.setMotionState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lk(c,a)};
+I.prototype.getAngularFactor=function(){return k(mk(this.hy),p)};I.prototype.setAngularFactor=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nk(c,a)};I.prototype.upcast=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ok(c,a),I)};I.prototype.getAabb=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);pk(d,a,c)};I.prototype.applyGravity=function(){qk(this.hy)};I.prototype.getGravity=function(){return k(rk(this.hy),p)};
+I.prototype.setGravity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sk(c,a)};I.prototype.getBroadphaseProxy=function(){return k(tk(this.hy),t)};I.prototype.clearForces=function(){uk(this.hy)};I.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);vk(d,a,c)};I.prototype.getCollisionShape=function(){return k(wk(this.hy),m)};
+I.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xk(c,a)};I.prototype.setActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yk(c,a)};I.prototype.forceActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zk(c,a)};I.prototype.activate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);void 0===a?Ak(c):Bk(c,a)};I.prototype.isActive=function(){return!!Ck(this.hy)};I.prototype.isKinematicObject=function(){return!!Dk(this.hy)};
+I.prototype.isStaticObject=function(){return!!Ek(this.hy)};I.prototype.isStaticOrKinematicObject=function(){return!!Fk(this.hy)};I.prototype.getRestitution=function(){return Gk(this.hy)};I.prototype.getFriction=function(){return Hk(this.hy)};I.prototype.getRollingFriction=function(){return Ik(this.hy)};I.prototype.setRestitution=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Jk(c,a)};I.prototype.setFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Kk(c,a)};
+I.prototype.setRollingFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lk(c,a)};I.prototype.getWorldTransform=function(){return k(Mk(this.hy),r)};I.prototype.getCollisionFlags=function(){return Nk(this.hy)};I.prototype.setCollisionFlags=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ok(c,a)};I.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pk(c,a)};
+I.prototype.setCollisionShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qk(c,a)};I.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rk(c,a)};I.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sk(c,a)};I.prototype.getUserIndex=function(){return Tk(this.hy)};I.prototype.setUserIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Uk(c,a)};
+I.prototype.getUserPointer=function(){return k(Vk(this.hy),SA)};I.prototype.setUserPointer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wk(c,a)};I.prototype.getBroadphaseHandle=function(){return k(Xk(this.hy),t)};I.prototype.__destroy__=function(){Yk(this.hy)};function uB(){throw"cannot construct a btIndexedMeshArray, no constructor in IDL";}uB.prototype=Object.create(f.prototype);uB.prototype.constructor=uB;uB.prototype.iy=uB;uB.jy={};b.btIndexedMeshArray=uB;
+uB.prototype.size=uB.prototype.size=function(){return Zk(this.hy)};uB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k($k(c,a),vB)};uB.prototype.__destroy__=function(){al(this.hy)};function wB(){this.hy=bl();h(wB)[this.hy]=this}wB.prototype=Object.create(f.prototype);wB.prototype.constructor=wB;wB.prototype.iy=wB;wB.jy={};b.btDbvtBroadphase=wB;wB.prototype.__destroy__=function(){cl(this.hy)};
+function xB(a,c,d,e,g,n,F,aa,ta){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);aa&&"object"===typeof aa&&(aa=aa.hy);ta&&"object"===typeof ta&&(ta=ta.hy);this.hy=dl(a,c,d,e,g,n,F,aa,ta);h(xB)[this.hy]=this}xB.prototype=Object.create(UA.prototype);xB.prototype.constructor=xB;xB.prototype.iy=xB;xB.jy={};
+b.btHeightfieldTerrainShape=xB;xB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);el(c,a)};xB.prototype.getMargin=function(){return fl(this.hy)};xB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gl(c,a)};xB.prototype.getLocalScaling=function(){return k(hl(this.hy),p)};xB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);il(d,a,c)};
+xB.prototype.__destroy__=function(){jl(this.hy)};function yB(){this.hy=kl();h(yB)[this.hy]=this}yB.prototype=Object.create(iB.prototype);yB.prototype.constructor=yB;yB.prototype.iy=yB;yB.jy={};b.btDefaultSoftBodySolver=yB;yB.prototype.__destroy__=function(){ll(this.hy)};function zB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=ml(a);h(zB)[this.hy]=this}zB.prototype=Object.create(OA.prototype);zB.prototype.constructor=zB;zB.prototype.iy=zB;zB.jy={};b.btCollisionDispatcher=zB;
+zB.prototype.getNumManifolds=function(){return nl(this.hy)};zB.prototype.getManifoldByIndexInternal=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ol(c,a),dB)};zB.prototype.__destroy__=function(){pl(this.hy)};
+function AB(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=void 0===d?ql(a,c):void 0===e?rl(a,c,d):void 0===g?sl(a,c,d,e):tl(a,c,d,e,g);h(AB)[this.hy]=this}AB.prototype=Object.create(f.prototype);AB.prototype.constructor=AB;AB.prototype.iy=AB;AB.jy={};b.btAxisSweep3=AB;AB.prototype.__destroy__=function(){ul(this.hy)};
+function SA(){throw"cannot construct a VoidPtr, no constructor in IDL";}SA.prototype=Object.create(f.prototype);SA.prototype.constructor=SA;SA.prototype.iy=SA;SA.jy={};b.VoidPtr=SA;SA.prototype.__destroy__=function(){vl(this.hy)};function J(){this.hy=wl();h(J)[this.hy]=this}J.prototype=Object.create(f.prototype);J.prototype.constructor=J;J.prototype.iy=J;J.jy={};b.btSoftBodyWorldInfo=J;J.prototype.get_air_density=J.prototype.Yy=function(){return xl(this.hy)};
+J.prototype.set_air_density=J.prototype.FB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yl(c,a)};Object.defineProperty(J.prototype,"air_density",{get:J.prototype.Yy,set:J.prototype.FB});J.prototype.get_water_density=J.prototype.CB=function(){return zl(this.hy)};J.prototype.set_water_density=J.prototype.iE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Al(c,a)};Object.defineProperty(J.prototype,"water_density",{get:J.prototype.CB,set:J.prototype.iE});
+J.prototype.get_water_offset=J.prototype.EB=function(){return Bl(this.hy)};J.prototype.set_water_offset=J.prototype.kE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cl(c,a)};Object.defineProperty(J.prototype,"water_offset",{get:J.prototype.EB,set:J.prototype.kE});J.prototype.get_m_maxDisplacement=J.prototype.EA=function(){return Dl(this.hy)};J.prototype.set_m_maxDisplacement=J.prototype.kD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);El(c,a)};
+Object.defineProperty(J.prototype,"m_maxDisplacement",{get:J.prototype.EA,set:J.prototype.kD});J.prototype.get_water_normal=J.prototype.DB=function(){return k(Fl(this.hy),p)};J.prototype.set_water_normal=J.prototype.jE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gl(c,a)};Object.defineProperty(J.prototype,"water_normal",{get:J.prototype.DB,set:J.prototype.jE});J.prototype.get_m_broadphase=J.prototype.Gz=function(){return k(Hl(this.hy),QA)};
+J.prototype.set_m_broadphase=J.prototype.mC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Il(c,a)};Object.defineProperty(J.prototype,"m_broadphase",{get:J.prototype.Gz,set:J.prototype.mC});J.prototype.get_m_dispatcher=J.prototype.Xz=function(){return k(Jl(this.hy),OA)};J.prototype.set_m_dispatcher=J.prototype.DC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Kl(c,a)};Object.defineProperty(J.prototype,"m_dispatcher",{get:J.prototype.Xz,set:J.prototype.DC});
+J.prototype.get_m_gravity=J.prototype.fA=function(){return k(Ll(this.hy),p)};J.prototype.set_m_gravity=J.prototype.MC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ml(c,a)};Object.defineProperty(J.prototype,"m_gravity",{get:J.prototype.fA,set:J.prototype.MC});J.prototype.__destroy__=function(){Nl(this.hy)};
+function BB(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=void 0===d?Ol(a,c):void 0===e?_emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_3(a,c,d):Pl(a,c,d,e);h(BB)[this.hy]=this}BB.prototype=Object.create(TA.prototype);BB.prototype.constructor=BB;BB.prototype.iy=BB;BB.jy={};b.btConeTwistConstraint=BB;
+BB.prototype.setLimit=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ql(d,a,c)};BB.prototype.setAngularOnly=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rl(c,a)};BB.prototype.setDamping=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sl(c,a)};BB.prototype.enableMotor=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tl(c,a)};
+BB.prototype.setMaxMotorImpulse=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ul(c,a)};BB.prototype.setMaxMotorImpulseNormalized=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vl(c,a)};BB.prototype.setMotorTarget=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wl(c,a)};BB.prototype.setMotorTargetInConstraintSpace=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xl(c,a)};
+BB.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yl(c,a)};BB.prototype.getBreakingImpulseThreshold=function(){return Zl(this.hy)};BB.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$l(c,a)};BB.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return am(d,a,c)};
+BB.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);bm(e,a,c,d)};BB.prototype.__destroy__=function(){cm(this.hy)};
+function CB(a,c,d,e,g,n,F){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);this.hy=void 0===d?dm(a,c):void 0===e?em(a,c,d):void 0===g?fm(a,c,d,e):void 0===n?gm(a,c,d,e,g):void 0===F?hm(a,c,d,e,g,n):im(a,c,d,e,g,n,F);h(CB)[this.hy]=this}CB.prototype=Object.create(TA.prototype);CB.prototype.constructor=CB;
+CB.prototype.iy=CB;CB.jy={};b.btHingeConstraint=CB;CB.prototype.setLimit=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);void 0===g?jm(n,a,c,d,e):km(n,a,c,d,e,g)};CB.prototype.enableAngularMotor=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);lm(e,a,c,d)};
+CB.prototype.setAngularOnly=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mm(c,a)};CB.prototype.enableMotor=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nm(c,a)};CB.prototype.setMaxMotorImpulse=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);om(c,a)};CB.prototype.setMotorTarget=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);pm(d,a,c)};
+CB.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qm(c,a)};CB.prototype.getBreakingImpulseThreshold=function(){return rm(this.hy)};CB.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sm(c,a)};CB.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return tm(d,a,c)};
+CB.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);um(e,a,c,d)};CB.prototype.__destroy__=function(){wm(this.hy)};function DB(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=xm(a,c);h(DB)[this.hy]=this}DB.prototype=Object.create(YA.prototype);DB.prototype.constructor=DB;DB.prototype.iy=DB;DB.jy={};b.btConeShapeZ=DB;
+DB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ym(c,a)};DB.prototype.getLocalScaling=function(){return k(zm(this.hy),p)};DB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Am(d,a,c)};DB.prototype.__destroy__=function(){Bm(this.hy)};function EB(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Cm(a,c);h(EB)[this.hy]=this}EB.prototype=Object.create(YA.prototype);
+EB.prototype.constructor=EB;EB.prototype.iy=EB;EB.jy={};b.btConeShapeX=EB;EB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dm(c,a)};EB.prototype.getLocalScaling=function(){return k(Em(this.hy),p)};EB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Fm(d,a,c)};EB.prototype.__destroy__=function(){Gm(this.hy)};
+function FB(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=void 0===a?Hm():void 0===c?Im(a):Jm(a,c);h(FB)[this.hy]=this}FB.prototype=Object.create(fB.prototype);FB.prototype.constructor=FB;FB.prototype.iy=FB;FB.jy={};b.btTriangleMesh=FB;FB.prototype.addTriangle=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);void 0===e?Km(g,a,c,d):Lm(g,a,c,d,e)};
+FB.prototype.findOrAddVertex=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return Mm(d,a,c)};FB.prototype.addIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nm(c,a)};FB.prototype.getIndexedMeshArray=function(){return k(Om(this.hy),uB)};FB.prototype.setScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pm(c,a)};FB.prototype.__destroy__=function(){Qm(this.hy)};
+function GB(a,c){IA();"object"==typeof a&&(a=MA(a));c&&"object"===typeof c&&(c=c.hy);this.hy=void 0===a?Rm():void 0===c?Sm(a):Tm(a,c);h(GB)[this.hy]=this}GB.prototype=Object.create(m.prototype);GB.prototype.constructor=GB;GB.prototype.iy=GB;GB.jy={};b.btConvexHullShape=GB;GB.prototype.addPoint=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===c?Um(d,a):Vm(d,a,c)};
+GB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wm(c,a)};GB.prototype.getMargin=function(){return Xm(this.hy)};GB.prototype.getNumVertices=function(){return Ym(this.hy)};GB.prototype.initializePolyhedralFeatures=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return!!Zm(c,a)};GB.prototype.recalcLocalAabb=function(){$m(this.hy)};GB.prototype.getConvexPolyhedron=function(){return k(an(this.hy),HB)};
+GB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bn(c,a)};GB.prototype.getLocalScaling=function(){return k(cn(this.hy),p)};GB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);dn(d,a,c)};GB.prototype.__destroy__=function(){en(this.hy)};function K(){this.hy=fn();h(K)[this.hy]=this}K.prototype=Object.create(f.prototype);K.prototype.constructor=K;K.prototype.iy=K;K.jy={};
+b.btVehicleTuning=K;K.prototype.get_m_suspensionStiffness=K.prototype.wy=function(){return gn(this.hy)};K.prototype.set_m_suspensionStiffness=K.prototype.Dy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);hn(c,a)};Object.defineProperty(K.prototype,"m_suspensionStiffness",{get:K.prototype.wy,set:K.prototype.Dy});K.prototype.get_m_suspensionCompression=K.prototype.bB=function(){return jn(this.hy)};
+K.prototype.set_m_suspensionCompression=K.prototype.ID=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kn(c,a)};Object.defineProperty(K.prototype,"m_suspensionCompression",{get:K.prototype.bB,set:K.prototype.ID});K.prototype.get_m_suspensionDamping=K.prototype.cB=function(){return ln(this.hy)};K.prototype.set_m_suspensionDamping=K.prototype.JD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mn(c,a)};
+Object.defineProperty(K.prototype,"m_suspensionDamping",{get:K.prototype.cB,set:K.prototype.JD});K.prototype.get_m_maxSuspensionTravelCm=K.prototype.vy=function(){return nn(this.hy)};K.prototype.set_m_maxSuspensionTravelCm=K.prototype.Cy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);on(c,a)};Object.defineProperty(K.prototype,"m_maxSuspensionTravelCm",{get:K.prototype.vy,set:K.prototype.Cy});K.prototype.get_m_frictionSlip=K.prototype.ry=function(){return pn(this.hy)};
+K.prototype.set_m_frictionSlip=K.prototype.yy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qn(c,a)};Object.defineProperty(K.prototype,"m_frictionSlip",{get:K.prototype.ry,set:K.prototype.yy});K.prototype.get_m_maxSuspensionForce=K.prototype.uy=function(){return rn(this.hy)};K.prototype.set_m_maxSuspensionForce=K.prototype.By=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sn(c,a)};Object.defineProperty(K.prototype,"m_maxSuspensionForce",{get:K.prototype.uy,set:K.prototype.By});
+function IB(){throw"cannot construct a btCollisionObjectWrapper, no constructor in IDL";}IB.prototype=Object.create(f.prototype);IB.prototype.constructor=IB;IB.prototype.iy=IB;IB.jy={};b.btCollisionObjectWrapper=IB;IB.prototype.getWorldTransform=function(){return k(tn(this.hy),r)};IB.prototype.getCollisionObject=function(){return k(un(this.hy),q)};IB.prototype.getCollisionShape=function(){return k(vn(this.hy),m)};function JB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=wn(a);h(JB)[this.hy]=this}
+JB.prototype=Object.create(f.prototype);JB.prototype.constructor=JB;JB.prototype.iy=JB;JB.jy={};b.btShapeHull=JB;JB.prototype.buildHull=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return!!xn(c,a)};JB.prototype.numVertices=function(){return yn(this.hy)};JB.prototype.getVertexPointer=function(){return k(zn(this.hy),p)};JB.prototype.__destroy__=function(){An(this.hy)};
+function KB(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=void 0===a?Bn():void 0===c?Cn(a):Dn(a,c);h(KB)[this.hy]=this}KB.prototype=Object.create(gB.prototype);KB.prototype.constructor=KB;KB.prototype.iy=KB;KB.jy={};b.btDefaultMotionState=KB;KB.prototype.getWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);En(c,a)};KB.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fn(c,a)};
+KB.prototype.get_m_graphicsWorldTrans=KB.prototype.eA=function(){return k(Gn(this.hy),r)};KB.prototype.set_m_graphicsWorldTrans=KB.prototype.LC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Hn(c,a)};Object.defineProperty(KB.prototype,"m_graphicsWorldTrans",{get:KB.prototype.eA,set:KB.prototype.LC});KB.prototype.__destroy__=function(){In(this.hy)};function L(a){a&&"object"===typeof a&&(a=a.hy);this.hy=Jn(a);h(L)[this.hy]=this}L.prototype=Object.create(f.prototype);
+L.prototype.constructor=L;L.prototype.iy=L;L.jy={};b.btWheelInfo=L;L.prototype.getSuspensionRestLength=function(){return Kn(this.hy)};L.prototype.updateWheel=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ln(d,a,c)};L.prototype.get_m_suspensionStiffness=L.prototype.wy=function(){return Mn(this.hy)};L.prototype.set_m_suspensionStiffness=L.prototype.Dy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nn(c,a)};
+Object.defineProperty(L.prototype,"m_suspensionStiffness",{get:L.prototype.wy,set:L.prototype.Dy});L.prototype.get_m_frictionSlip=L.prototype.ry=function(){return On(this.hy)};L.prototype.set_m_frictionSlip=L.prototype.yy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pn(c,a)};Object.defineProperty(L.prototype,"m_frictionSlip",{get:L.prototype.ry,set:L.prototype.yy});L.prototype.get_m_engineForce=L.prototype.aA=function(){return Qn(this.hy)};
+L.prototype.set_m_engineForce=L.prototype.HC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rn(c,a)};Object.defineProperty(L.prototype,"m_engineForce",{get:L.prototype.aA,set:L.prototype.HC});L.prototype.get_m_rollInfluence=L.prototype.SA=function(){return Sn(this.hy)};L.prototype.set_m_rollInfluence=L.prototype.yD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tn(c,a)};Object.defineProperty(L.prototype,"m_rollInfluence",{get:L.prototype.SA,set:L.prototype.yD});
+L.prototype.get_m_suspensionRestLength1=L.prototype.gB=function(){return Un(this.hy)};L.prototype.set_m_suspensionRestLength1=L.prototype.ND=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vn(c,a)};Object.defineProperty(L.prototype,"m_suspensionRestLength1",{get:L.prototype.gB,set:L.prototype.ND});L.prototype.get_m_wheelsRadius=L.prototype.uB=function(){return Wn(this.hy)};L.prototype.set_m_wheelsRadius=L.prototype.aE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xn(c,a)};
+Object.defineProperty(L.prototype,"m_wheelsRadius",{get:L.prototype.uB,set:L.prototype.aE});L.prototype.get_m_wheelsDampingCompression=L.prototype.My=function(){return Yn(this.hy)};L.prototype.set_m_wheelsDampingCompression=L.prototype.Vy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zn(c,a)};Object.defineProperty(L.prototype,"m_wheelsDampingCompression",{get:L.prototype.My,set:L.prototype.Vy});L.prototype.get_m_wheelsDampingRelaxation=L.prototype.Ny=function(){return $n(this.hy)};
+L.prototype.set_m_wheelsDampingRelaxation=L.prototype.Wy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ao(c,a)};Object.defineProperty(L.prototype,"m_wheelsDampingRelaxation",{get:L.prototype.Ny,set:L.prototype.Wy});L.prototype.get_m_steering=L.prototype.$A=function(){return bo(this.hy)};L.prototype.set_m_steering=L.prototype.GD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);co(c,a)};Object.defineProperty(L.prototype,"m_steering",{get:L.prototype.$A,set:L.prototype.GD});
+L.prototype.get_m_maxSuspensionForce=L.prototype.uy=function(){return eo(this.hy)};L.prototype.set_m_maxSuspensionForce=L.prototype.By=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fo(c,a)};Object.defineProperty(L.prototype,"m_maxSuspensionForce",{get:L.prototype.uy,set:L.prototype.By});L.prototype.get_m_maxSuspensionTravelCm=L.prototype.vy=function(){return go(this.hy)};
+L.prototype.set_m_maxSuspensionTravelCm=L.prototype.Cy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ho(c,a)};Object.defineProperty(L.prototype,"m_maxSuspensionTravelCm",{get:L.prototype.vy,set:L.prototype.Cy});L.prototype.get_m_wheelsSuspensionForce=L.prototype.vB=function(){return io(this.hy)};L.prototype.set_m_wheelsSuspensionForce=L.prototype.bE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jo(c,a)};
+Object.defineProperty(L.prototype,"m_wheelsSuspensionForce",{get:L.prototype.vB,set:L.prototype.bE});L.prototype.get_m_bIsFrontWheel=L.prototype.Fy=function(){return!!ko(this.hy)};L.prototype.set_m_bIsFrontWheel=L.prototype.Oy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lo(c,a)};Object.defineProperty(L.prototype,"m_bIsFrontWheel",{get:L.prototype.Fy,set:L.prototype.Oy});L.prototype.get_m_raycastInfo=L.prototype.QA=function(){return k(mo(this.hy),M)};
+L.prototype.set_m_raycastInfo=L.prototype.wD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);no(c,a)};Object.defineProperty(L.prototype,"m_raycastInfo",{get:L.prototype.QA,set:L.prototype.wD});L.prototype.get_m_chassisConnectionPointCS=L.prototype.Mz=function(){return k(oo(this.hy),p)};L.prototype.set_m_chassisConnectionPointCS=L.prototype.sC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);po(c,a)};
+Object.defineProperty(L.prototype,"m_chassisConnectionPointCS",{get:L.prototype.Mz,set:L.prototype.sC});L.prototype.get_m_worldTransform=L.prototype.wB=function(){return k(qo(this.hy),r)};L.prototype.set_m_worldTransform=L.prototype.cE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ro(c,a)};Object.defineProperty(L.prototype,"m_worldTransform",{get:L.prototype.wB,set:L.prototype.cE});L.prototype.get_m_wheelDirectionCS=L.prototype.Ly=function(){return k(so(this.hy),p)};
+L.prototype.set_m_wheelDirectionCS=L.prototype.Uy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);to(c,a)};Object.defineProperty(L.prototype,"m_wheelDirectionCS",{get:L.prototype.Ly,set:L.prototype.Uy});L.prototype.get_m_wheelAxleCS=L.prototype.Ky=function(){return k(uo(this.hy),p)};L.prototype.set_m_wheelAxleCS=L.prototype.Ty=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);vo(c,a)};Object.defineProperty(L.prototype,"m_wheelAxleCS",{get:L.prototype.Ky,set:L.prototype.Ty});
+L.prototype.get_m_rotation=L.prototype.UA=function(){return wo(this.hy)};L.prototype.set_m_rotation=L.prototype.AD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xo(c,a)};Object.defineProperty(L.prototype,"m_rotation",{get:L.prototype.UA,set:L.prototype.AD});L.prototype.get_m_deltaRotation=L.prototype.Vz=function(){return yo(this.hy)};L.prototype.set_m_deltaRotation=L.prototype.BC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zo(c,a)};
+Object.defineProperty(L.prototype,"m_deltaRotation",{get:L.prototype.Vz,set:L.prototype.BC});L.prototype.get_m_brake=L.prototype.Fz=function(){return Ao(this.hy)};L.prototype.set_m_brake=L.prototype.lC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bo(c,a)};Object.defineProperty(L.prototype,"m_brake",{get:L.prototype.Fz,set:L.prototype.lC});L.prototype.get_m_clippedInvContactDotSuspension=L.prototype.Nz=function(){return Co(this.hy)};
+L.prototype.set_m_clippedInvContactDotSuspension=L.prototype.tC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Do(c,a)};Object.defineProperty(L.prototype,"m_clippedInvContactDotSuspension",{get:L.prototype.Nz,set:L.prototype.tC});L.prototype.get_m_suspensionRelativeVelocity=L.prototype.eB=function(){return Eo(this.hy)};L.prototype.set_m_suspensionRelativeVelocity=L.prototype.LD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fo(c,a)};
+Object.defineProperty(L.prototype,"m_suspensionRelativeVelocity",{get:L.prototype.eB,set:L.prototype.LD});L.prototype.get_m_skidInfo=L.prototype.XA=function(){return Go(this.hy)};L.prototype.set_m_skidInfo=L.prototype.DD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ho(c,a)};Object.defineProperty(L.prototype,"m_skidInfo",{get:L.prototype.XA,set:L.prototype.DD});L.prototype.__destroy__=function(){Io(this.hy)};
+function N(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=void 0===a?Jo():void 0===c?_emscripten_bind_btVector4_btVector4_1(a):void 0===d?_emscripten_bind_btVector4_btVector4_2(a,c):void 0===e?_emscripten_bind_btVector4_btVector4_3(a,c,d):Ko(a,c,d,e);h(N)[this.hy]=this}N.prototype=Object.create(p.prototype);N.prototype.constructor=N;N.prototype.iy=N;N.jy={};b.btVector4=N;N.prototype.w=function(){return Lo(this.hy)};
+N.prototype.setValue=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);Mo(g,a,c,d,e)};N.prototype.length=N.prototype.length=function(){return No(this.hy)};N.prototype.x=N.prototype.x=function(){return Oo(this.hy)};N.prototype.y=N.prototype.y=function(){return Po(this.hy)};N.prototype.z=N.prototype.z=function(){return Qo(this.hy)};
+N.prototype.setX=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ro(c,a)};N.prototype.setY=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);So(c,a)};N.prototype.setZ=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);To(c,a)};N.prototype.normalize=N.prototype.normalize=function(){Uo(this.hy)};N.prototype.rotate=N.prototype.rotate=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return k(Vo(d,a,c),p)};
+N.prototype.dot=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Wo(c,a)};N.prototype.op_mul=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Xo(c,a),p)};N.prototype.op_add=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Yo(c,a),p)};N.prototype.op_sub=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Zo(c,a),p)};N.prototype.__destroy__=function(){$o(this.hy)};function LB(){this.hy=ap();h(LB)[this.hy]=this}LB.prototype=Object.create(f.prototype);
+LB.prototype.constructor=LB;LB.prototype.iy=LB;LB.jy={};b.btDefaultCollisionConstructionInfo=LB;LB.prototype.__destroy__=function(){bp(this.hy)};function O(){throw"cannot construct a Anchor, no constructor in IDL";}O.prototype=Object.create(f.prototype);O.prototype.constructor=O;O.prototype.iy=O;O.jy={};b.Anchor=O;O.prototype.get_m_node=O.prototype.FA=function(){return k(cp(this.hy),Node)};O.prototype.set_m_node=O.prototype.lD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dp(c,a)};
+Object.defineProperty(O.prototype,"m_node",{get:O.prototype.FA,set:O.prototype.lD});O.prototype.get_m_local=O.prototype.zA=function(){return k(ep(this.hy),p)};O.prototype.set_m_local=O.prototype.fD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fp(c,a)};Object.defineProperty(O.prototype,"m_local",{get:O.prototype.zA,set:O.prototype.fD});O.prototype.get_m_body=O.prototype.Ez=function(){return k(gp(this.hy),I)};
+O.prototype.set_m_body=O.prototype.kC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);hp(c,a)};Object.defineProperty(O.prototype,"m_body",{get:O.prototype.Ez,set:O.prototype.kC});O.prototype.get_m_influence=O.prototype.sA=function(){return ip(this.hy)};O.prototype.set_m_influence=O.prototype.ZC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jp(c,a)};Object.defineProperty(O.prototype,"m_influence",{get:O.prototype.sA,set:O.prototype.ZC});
+O.prototype.get_m_c0=O.prototype.Hz=function(){return k(kp(this.hy),jB)};O.prototype.set_m_c0=O.prototype.nC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lp(c,a)};Object.defineProperty(O.prototype,"m_c0",{get:O.prototype.Hz,set:O.prototype.nC});O.prototype.get_m_c1=O.prototype.Iz=function(){return k(mp(this.hy),p)};O.prototype.set_m_c1=O.prototype.oC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);np(c,a)};Object.defineProperty(O.prototype,"m_c1",{get:O.prototype.Iz,set:O.prototype.oC});
+O.prototype.get_m_c2=O.prototype.Jz=function(){return op(this.hy)};O.prototype.set_m_c2=O.prototype.pC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pp(c,a)};Object.defineProperty(O.prototype,"m_c2",{get:O.prototype.Jz,set:O.prototype.pC});O.prototype.__destroy__=function(){qp(this.hy)};function P(){throw"cannot construct a btVehicleRaycasterResult, no constructor in IDL";}P.prototype=Object.create(f.prototype);P.prototype.constructor=P;P.prototype.iy=P;P.jy={};
+b.btVehicleRaycasterResult=P;P.prototype.get_m_hitPointInWorld=P.prototype.nA=function(){return k(rp(this.hy),p)};P.prototype.set_m_hitPointInWorld=P.prototype.UC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sp(c,a)};Object.defineProperty(P.prototype,"m_hitPointInWorld",{get:P.prototype.nA,set:P.prototype.UC});P.prototype.get_m_hitNormalInWorld=P.prototype.lA=function(){return k(tp(this.hy),p)};
+P.prototype.set_m_hitNormalInWorld=P.prototype.SC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);up(c,a)};Object.defineProperty(P.prototype,"m_hitNormalInWorld",{get:P.prototype.lA,set:P.prototype.SC});P.prototype.get_m_distFraction=P.prototype.Yz=function(){return vp(this.hy)};P.prototype.set_m_distFraction=P.prototype.EC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wp(c,a)};Object.defineProperty(P.prototype,"m_distFraction",{get:P.prototype.Yz,set:P.prototype.EC});
+P.prototype.__destroy__=function(){xp(this.hy)};function pB(){throw"cannot construct a btVector3Array, no constructor in IDL";}pB.prototype=Object.create(f.prototype);pB.prototype.constructor=pB;pB.prototype.iy=pB;pB.jy={};b.btVector3Array=pB;pB.prototype.size=pB.prototype.size=function(){return yp(this.hy)};pB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(zp(c,a),p)};pB.prototype.__destroy__=function(){Ap(this.hy)};
+function MB(){throw"cannot construct a btConstraintSolver, no constructor in IDL";}MB.prototype=Object.create(f.prototype);MB.prototype.constructor=MB;MB.prototype.iy=MB;MB.jy={};b.btConstraintSolver=MB;MB.prototype.__destroy__=function(){Bp(this.hy)};function Q(a,c,d){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);this.hy=Cp(a,c,d);h(Q)[this.hy]=this}Q.prototype=Object.create(ZA.prototype);Q.prototype.constructor=Q;Q.prototype.iy=Q;Q.jy={};
+b.btRaycastVehicle=Q;Q.prototype.applyEngineForce=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Dp(d,a,c)};Q.prototype.setSteeringValue=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ep(d,a,c)};Q.prototype.getWheelTransformWS=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Fp(c,a),r)};
+Q.prototype.updateWheelTransform=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Gp(d,a,c)};Q.prototype.addWheel=function(a,c,d,e,g,n,F){var aa=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);return k(Hp(aa,a,c,d,e,g,n,F),L)};Q.prototype.getNumWheels=function(){return Ip(this.hy)};
+Q.prototype.getRigidBody=function(){return k(Jp(this.hy),I)};Q.prototype.getWheelInfo=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Kp(c,a),L)};Q.prototype.setBrake=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Lp(d,a,c)};Q.prototype.setCoordinateSystem=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Mp(e,a,c,d)};Q.prototype.getCurrentSpeedKmHour=function(){return Np(this.hy)};
+Q.prototype.getChassisWorldTransform=function(){return k(Op(this.hy),r)};Q.prototype.rayCast=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Pp(c,a)};Q.prototype.updateVehicle=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qp(c,a)};Q.prototype.resetSuspension=function(){Rp(this.hy)};Q.prototype.getSteeringValue=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Sp(c,a)};
+Q.prototype.updateWheelTransformsWS=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===c?Tp(d,a):Up(d,a,c)};Q.prototype.setPitchControl=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vp(c,a)};Q.prototype.updateSuspension=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wp(c,a)};Q.prototype.updateFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xp(c,a)};Q.prototype.getRightAxis=function(){return Yp(this.hy)};
+Q.prototype.getUpAxis=function(){return Zp(this.hy)};Q.prototype.getForwardAxis=function(){return $p(this.hy)};Q.prototype.getForwardVector=function(){return k(aq(this.hy),p)};Q.prototype.getUserConstraintType=function(){return bq(this.hy)};Q.prototype.setUserConstraintType=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);cq(c,a)};Q.prototype.setUserConstraintId=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dq(c,a)};Q.prototype.getUserConstraintId=function(){return eq(this.hy)};
+Q.prototype.updateAction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);fq(d,a,c)};Q.prototype.__destroy__=function(){gq(this.hy)};function NB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=hq(a);h(NB)[this.hy]=this}NB.prototype=Object.create(bB.prototype);NB.prototype.constructor=NB;NB.prototype.iy=NB;NB.jy={};b.btCylinderShapeX=NB;NB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);iq(c,a)};NB.prototype.getMargin=function(){return jq(this.hy)};
+NB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kq(c,a)};NB.prototype.getLocalScaling=function(){return k(lq(this.hy),p)};NB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);mq(d,a,c)};NB.prototype.__destroy__=function(){nq(this.hy)};function OB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=oq(a);h(OB)[this.hy]=this}OB.prototype=Object.create(bB.prototype);OB.prototype.constructor=OB;
+OB.prototype.iy=OB;OB.jy={};b.btCylinderShapeZ=OB;OB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pq(c,a)};OB.prototype.getMargin=function(){return qq(this.hy)};OB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);rq(c,a)};OB.prototype.getLocalScaling=function(){return k(sq(this.hy),p)};OB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);tq(d,a,c)};
+OB.prototype.__destroy__=function(){uq(this.hy)};function HB(){throw"cannot construct a btConvexPolyhedron, no constructor in IDL";}HB.prototype=Object.create(f.prototype);HB.prototype.constructor=HB;HB.prototype.iy=HB;HB.jy={};b.btConvexPolyhedron=HB;HB.prototype.get_m_vertices=HB.prototype.qB=function(){return k(vq(this.hy),pB)};HB.prototype.set_m_vertices=HB.prototype.XD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wq(c,a)};
+Object.defineProperty(HB.prototype,"m_vertices",{get:HB.prototype.qB,set:HB.prototype.XD});HB.prototype.get_m_faces=HB.prototype.Gy=function(){return k(xq(this.hy),PB)};HB.prototype.set_m_faces=HB.prototype.Py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yq(c,a)};Object.defineProperty(HB.prototype,"m_faces",{get:HB.prototype.Gy,set:HB.prototype.Py});HB.prototype.__destroy__=function(){zq(this.hy)};function QB(){this.hy=Aq();h(QB)[this.hy]=this}QB.prototype=Object.create(f.prototype);
+QB.prototype.constructor=QB;QB.prototype.iy=QB;QB.jy={};b.btSequentialImpulseConstraintSolver=QB;QB.prototype.__destroy__=function(){Bq(this.hy)};function RB(){throw"cannot construct a tAnchorArray, no constructor in IDL";}RB.prototype=Object.create(f.prototype);RB.prototype.constructor=RB;RB.prototype.iy=RB;RB.jy={};b.tAnchorArray=RB;RB.prototype.size=RB.prototype.size=function(){return Cq(this.hy)};RB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Dq(c,a),O)};
+RB.prototype.clear=RB.prototype.clear=function(){Eq(this.hy)};RB.prototype.push_back=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fq(c,a)};RB.prototype.pop_back=function(){Gq(this.hy)};RB.prototype.__destroy__=function(){Hq(this.hy)};function M(){throw"cannot construct a RaycastInfo, no constructor in IDL";}M.prototype=Object.create(f.prototype);M.prototype.constructor=M;M.prototype.iy=M;M.jy={};b.RaycastInfo=M;
+M.prototype.get_m_contactNormalWS=M.prototype.Pz=function(){return k(Iq(this.hy),p)};M.prototype.set_m_contactNormalWS=M.prototype.vC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Jq(c,a)};Object.defineProperty(M.prototype,"m_contactNormalWS",{get:M.prototype.Pz,set:M.prototype.vC});M.prototype.get_m_contactPointWS=M.prototype.Qz=function(){return k(Kq(this.hy),p)};M.prototype.set_m_contactPointWS=M.prototype.wC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lq(c,a)};
+Object.defineProperty(M.prototype,"m_contactPointWS",{get:M.prototype.Qz,set:M.prototype.wC});M.prototype.get_m_suspensionLength=M.prototype.dB=function(){return Mq(this.hy)};M.prototype.set_m_suspensionLength=M.prototype.KD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nq(c,a)};Object.defineProperty(M.prototype,"m_suspensionLength",{get:M.prototype.dB,set:M.prototype.KD});M.prototype.get_m_hardPointWS=M.prototype.hA=function(){return k(Oq(this.hy),p)};
+M.prototype.set_m_hardPointWS=M.prototype.OC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pq(c,a)};Object.defineProperty(M.prototype,"m_hardPointWS",{get:M.prototype.hA,set:M.prototype.OC});M.prototype.get_m_wheelDirectionWS=M.prototype.sB=function(){return k(Qq(this.hy),p)};M.prototype.set_m_wheelDirectionWS=M.prototype.ZD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rq(c,a)};Object.defineProperty(M.prototype,"m_wheelDirectionWS",{get:M.prototype.sB,set:M.prototype.ZD});
+M.prototype.get_m_wheelAxleWS=M.prototype.rB=function(){return k(Sq(this.hy),p)};M.prototype.set_m_wheelAxleWS=M.prototype.YD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tq(c,a)};Object.defineProperty(M.prototype,"m_wheelAxleWS",{get:M.prototype.rB,set:M.prototype.YD});M.prototype.get_m_isInContact=M.prototype.tA=function(){return!!Uq(this.hy)};M.prototype.set_m_isInContact=M.prototype.$C=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vq(c,a)};
+Object.defineProperty(M.prototype,"m_isInContact",{get:M.prototype.tA,set:M.prototype.$C});M.prototype.get_m_groundObject=M.prototype.gA=function(){return Wq(this.hy)};M.prototype.set_m_groundObject=M.prototype.NC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xq(c,a)};Object.defineProperty(M.prototype,"m_groundObject",{get:M.prototype.gA,set:M.prototype.NC});M.prototype.__destroy__=function(){Yq(this.hy)};
+function SB(a,c,d){IA();a&&"object"===typeof a&&(a=a.hy);"object"==typeof c&&(c=MA(c));d&&"object"===typeof d&&(d=d.hy);this.hy=Zq(a,c,d);h(SB)[this.hy]=this}SB.prototype=Object.create(m.prototype);SB.prototype.constructor=SB;SB.prototype.iy=SB;SB.jy={};b.btMultiSphereShape=SB;SB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$q(c,a)};SB.prototype.getLocalScaling=function(){return k(ar(this.hy),p)};
+SB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);br(d,a,c)};SB.prototype.__destroy__=function(){cr(this.hy)};function R(a,c,d,e){IA();a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);"object"==typeof e&&(e=MA(e));this.hy=dr(a,c,d,e);h(R)[this.hy]=this}R.prototype=Object.create(q.prototype);R.prototype.constructor=R;R.prototype.iy=R;R.jy={};b.btSoftBody=R;
+R.prototype.checkLink=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return!!er(d,a,c)};R.prototype.checkFace=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);return!!fr(e,a,c,d)};R.prototype.appendMaterial=function(){return k(gr(this.hy),A)};R.prototype.appendNode=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);hr(d,a,c)};
+R.prototype.appendLink=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);ir(g,a,c,d,e)};R.prototype.appendFace=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);jr(g,a,c,d,e)};
+R.prototype.appendTetra=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);kr(n,a,c,d,e,g)};R.prototype.appendAnchor=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);lr(g,a,c,d,e)};
+R.prototype.addForce=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===c?mr(d,a):nr(d,a,c)};R.prototype.addAeroForceToNode=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);or(d,a,c)};R.prototype.getTotalMass=function(){return pr(this.hy)};R.prototype.setTotalMass=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);qr(d,a,c)};
+R.prototype.setMass=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);rr(d,a,c)};R.prototype.transform=R.prototype.transform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sr(c,a)};R.prototype.translate=R.prototype.translate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);tr(c,a)};R.prototype.rotate=R.prototype.rotate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ur(c,a)};
+R.prototype.scale=R.prototype.scale=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);vr(c,a)};R.prototype.generateClusters=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return void 0===c?wr(d,a):xr(d,a,c)};R.prototype.generateBendingConstraints=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return yr(d,a,c)};
+R.prototype.upcast=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(zr(c,a),R)};R.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ar(d,a,c)};R.prototype.getCollisionShape=function(){return k(Br(this.hy),m)};R.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cr(c,a)};
+R.prototype.setActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dr(c,a)};R.prototype.forceActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Er(c,a)};R.prototype.activate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);void 0===a?Fr(c):Gr(c,a)};R.prototype.isActive=function(){return!!Hr(this.hy)};R.prototype.isKinematicObject=function(){return!!Ir(this.hy)};R.prototype.isStaticObject=function(){return!!Jr(this.hy)};
+R.prototype.isStaticOrKinematicObject=function(){return!!Kr(this.hy)};R.prototype.getRestitution=function(){return Lr(this.hy)};R.prototype.getFriction=function(){return Mr(this.hy)};R.prototype.getRollingFriction=function(){return Nr(this.hy)};R.prototype.setRestitution=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Or(c,a)};R.prototype.setFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pr(c,a)};
+R.prototype.setRollingFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qr(c,a)};R.prototype.getWorldTransform=function(){return k(Rr(this.hy),r)};R.prototype.getCollisionFlags=function(){return Sr(this.hy)};R.prototype.setCollisionFlags=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tr(c,a)};R.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ur(c,a)};
+R.prototype.setCollisionShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vr(c,a)};R.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wr(c,a)};R.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xr(c,a)};R.prototype.getUserIndex=function(){return Yr(this.hy)};R.prototype.setUserIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zr(c,a)};
+R.prototype.getUserPointer=function(){return k($r(this.hy),SA)};R.prototype.setUserPointer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);as(c,a)};R.prototype.getBroadphaseHandle=function(){return k(bs(this.hy),t)};R.prototype.get_m_cfg=R.prototype.Kz=function(){return k(cs(this.hy),S)};R.prototype.set_m_cfg=R.prototype.qC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ds(c,a)};Object.defineProperty(R.prototype,"m_cfg",{get:R.prototype.Kz,set:R.prototype.qC});
+R.prototype.get_m_nodes=R.prototype.GA=function(){return k(es(this.hy),TB)};R.prototype.set_m_nodes=R.prototype.mD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gs(c,a)};Object.defineProperty(R.prototype,"m_nodes",{get:R.prototype.GA,set:R.prototype.mD});R.prototype.get_m_faces=R.prototype.Gy=function(){return k(hs(this.hy),UB)};R.prototype.set_m_faces=R.prototype.Py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);is(c,a)};
+Object.defineProperty(R.prototype,"m_faces",{get:R.prototype.Gy,set:R.prototype.Py});R.prototype.get_m_materials=R.prototype.DA=function(){return k(js(this.hy),qB)};R.prototype.set_m_materials=R.prototype.jD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ks(c,a)};Object.defineProperty(R.prototype,"m_materials",{get:R.prototype.DA,set:R.prototype.jD});R.prototype.get_m_anchors=R.prototype.Az=function(){return k(ls(this.hy),RB)};
+R.prototype.set_m_anchors=R.prototype.gC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ms(c,a)};Object.defineProperty(R.prototype,"m_anchors",{get:R.prototype.Az,set:R.prototype.gC});R.prototype.__destroy__=function(){ns(this.hy)};function VB(){throw"cannot construct a btIntArray, no constructor in IDL";}VB.prototype=Object.create(f.prototype);VB.prototype.constructor=VB;VB.prototype.iy=VB;VB.jy={};b.btIntArray=VB;VB.prototype.size=VB.prototype.size=function(){return ps(this.hy)};
+VB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return qs(c,a)};VB.prototype.__destroy__=function(){rs(this.hy)};function S(){throw"cannot construct a Config, no constructor in IDL";}S.prototype=Object.create(f.prototype);S.prototype.constructor=S;S.prototype.iy=S;S.jy={};b.Config=S;S.prototype.get_kVCF=S.prototype.sz=function(){return ss(this.hy)};S.prototype.set_kVCF=S.prototype.$B=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ts(c,a)};
+Object.defineProperty(S.prototype,"kVCF",{get:S.prototype.sz,set:S.prototype.$B});S.prototype.get_kDP=S.prototype.fz=function(){return us(this.hy)};S.prototype.set_kDP=S.prototype.NB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);vs(c,a)};Object.defineProperty(S.prototype,"kDP",{get:S.prototype.fz,set:S.prototype.NB});S.prototype.get_kDG=S.prototype.ez=function(){return xs(this.hy)};S.prototype.set_kDG=S.prototype.MB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ys(c,a)};
+Object.defineProperty(S.prototype,"kDG",{get:S.prototype.ez,set:S.prototype.MB});S.prototype.get_kLF=S.prototype.hz=function(){return zs(this.hy)};S.prototype.set_kLF=S.prototype.PB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);As(c,a)};Object.defineProperty(S.prototype,"kLF",{get:S.prototype.hz,set:S.prototype.PB});S.prototype.get_kPR=S.prototype.jz=function(){return Bs(this.hy)};S.prototype.set_kPR=S.prototype.RB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cs(c,a)};
+Object.defineProperty(S.prototype,"kPR",{get:S.prototype.jz,set:S.prototype.RB});S.prototype.get_kVC=S.prototype.rz=function(){return Ds(this.hy)};S.prototype.set_kVC=S.prototype.ZB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Es(c,a)};Object.defineProperty(S.prototype,"kVC",{get:S.prototype.rz,set:S.prototype.ZB});S.prototype.get_kDF=S.prototype.dz=function(){return Fs(this.hy)};S.prototype.set_kDF=S.prototype.LB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gs(c,a)};
+Object.defineProperty(S.prototype,"kDF",{get:S.prototype.dz,set:S.prototype.LB});S.prototype.get_kMT=S.prototype.iz=function(){return Hs(this.hy)};S.prototype.set_kMT=S.prototype.QB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Is(c,a)};Object.defineProperty(S.prototype,"kMT",{get:S.prototype.iz,set:S.prototype.QB});S.prototype.get_kCHR=S.prototype.cz=function(){return Js(this.hy)};S.prototype.set_kCHR=S.prototype.KB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ks(c,a)};
+Object.defineProperty(S.prototype,"kCHR",{get:S.prototype.cz,set:S.prototype.KB});S.prototype.get_kKHR=S.prototype.gz=function(){return Ls(this.hy)};S.prototype.set_kKHR=S.prototype.OB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ms(c,a)};Object.defineProperty(S.prototype,"kKHR",{get:S.prototype.gz,set:S.prototype.OB});S.prototype.get_kSHR=S.prototype.kz=function(){return Ns(this.hy)};
+S.prototype.set_kSHR=S.prototype.SB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Os(c,a)};Object.defineProperty(S.prototype,"kSHR",{get:S.prototype.kz,set:S.prototype.SB});S.prototype.get_kAHR=S.prototype.bz=function(){return Ps(this.hy)};S.prototype.set_kAHR=S.prototype.JB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qs(c,a)};Object.defineProperty(S.prototype,"kAHR",{get:S.prototype.bz,set:S.prototype.JB});S.prototype.get_kSRHR_CL=S.prototype.nz=function(){return Rs(this.hy)};
+S.prototype.set_kSRHR_CL=S.prototype.VB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ss(c,a)};Object.defineProperty(S.prototype,"kSRHR_CL",{get:S.prototype.nz,set:S.prototype.VB});S.prototype.get_kSKHR_CL=S.prototype.lz=function(){return Ts(this.hy)};S.prototype.set_kSKHR_CL=S.prototype.TB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Us(c,a)};Object.defineProperty(S.prototype,"kSKHR_CL",{get:S.prototype.lz,set:S.prototype.TB});S.prototype.get_kSSHR_CL=S.prototype.pz=function(){return Vs(this.hy)};
+S.prototype.set_kSSHR_CL=S.prototype.XB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ws(c,a)};Object.defineProperty(S.prototype,"kSSHR_CL",{get:S.prototype.pz,set:S.prototype.XB});S.prototype.get_kSR_SPLT_CL=S.prototype.oz=function(){return Xs(this.hy)};S.prototype.set_kSR_SPLT_CL=S.prototype.WB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ys(c,a)};Object.defineProperty(S.prototype,"kSR_SPLT_CL",{get:S.prototype.oz,set:S.prototype.WB});
+S.prototype.get_kSK_SPLT_CL=S.prototype.mz=function(){return Zs(this.hy)};S.prototype.set_kSK_SPLT_CL=S.prototype.UB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$s(c,a)};Object.defineProperty(S.prototype,"kSK_SPLT_CL",{get:S.prototype.mz,set:S.prototype.UB});S.prototype.get_kSS_SPLT_CL=S.prototype.qz=function(){return at(this.hy)};S.prototype.set_kSS_SPLT_CL=S.prototype.YB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bt(c,a)};
+Object.defineProperty(S.prototype,"kSS_SPLT_CL",{get:S.prototype.qz,set:S.prototype.YB});S.prototype.get_maxvolume=S.prototype.yB=function(){return ct(this.hy)};S.prototype.set_maxvolume=S.prototype.eE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dt(c,a)};Object.defineProperty(S.prototype,"maxvolume",{get:S.prototype.yB,set:S.prototype.eE});S.prototype.get_timescale=S.prototype.AB=function(){return et(this.hy)};
+S.prototype.set_timescale=S.prototype.gE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ft(c,a)};Object.defineProperty(S.prototype,"timescale",{get:S.prototype.AB,set:S.prototype.gE});S.prototype.get_viterations=S.prototype.BB=function(){return gt(this.hy)};S.prototype.set_viterations=S.prototype.hE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ht(c,a)};Object.defineProperty(S.prototype,"viterations",{get:S.prototype.BB,set:S.prototype.hE});
+S.prototype.get_piterations=S.prototype.zB=function(){return it(this.hy)};S.prototype.set_piterations=S.prototype.fE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jt(c,a)};Object.defineProperty(S.prototype,"piterations",{get:S.prototype.zB,set:S.prototype.fE});S.prototype.get_diterations=S.prototype.az=function(){return kt(this.hy)};S.prototype.set_diterations=S.prototype.IB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lt(c,a)};
+Object.defineProperty(S.prototype,"diterations",{get:S.prototype.az,set:S.prototype.IB});S.prototype.get_citerations=S.prototype.Zy=function(){return mt(this.hy)};S.prototype.set_citerations=S.prototype.GB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nt(c,a)};Object.defineProperty(S.prototype,"citerations",{get:S.prototype.Zy,set:S.prototype.GB});S.prototype.get_collisions=S.prototype.$y=function(){return ot(this.hy)};
+S.prototype.set_collisions=S.prototype.HB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pt(c,a)};Object.defineProperty(S.prototype,"collisions",{get:S.prototype.$y,set:S.prototype.HB});S.prototype.__destroy__=function(){qt(this.hy)};function Node(){throw"cannot construct a Node, no constructor in IDL";}Node.prototype=Object.create(f.prototype);Node.prototype.constructor=Node;Node.prototype.iy=Node;Node.jy={};b.Node=Node;
+Node.prototype.get_m_x=Node.prototype.xB=function(){return k(rt(this.hy),p)};Node.prototype.set_m_x=Node.prototype.dE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);st(c,a)};Object.defineProperty(Node.prototype,"m_x",{get:Node.prototype.xB,set:Node.prototype.dE});Node.prototype.get_m_q=Node.prototype.OA=function(){return k(tt(this.hy),p)};Node.prototype.set_m_q=Node.prototype.uD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ut(c,a)};
+Object.defineProperty(Node.prototype,"m_q",{get:Node.prototype.OA,set:Node.prototype.uD});Node.prototype.get_m_v=Node.prototype.pB=function(){return k(vt(this.hy),p)};Node.prototype.set_m_v=Node.prototype.WD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wt(c,a)};Object.defineProperty(Node.prototype,"m_v",{get:Node.prototype.pB,set:Node.prototype.WD});Node.prototype.get_m_f=Node.prototype.bA=function(){return k(xt(this.hy),p)};
+Node.prototype.set_m_f=Node.prototype.IC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yt(c,a)};Object.defineProperty(Node.prototype,"m_f",{get:Node.prototype.bA,set:Node.prototype.IC});Node.prototype.get_m_n=Node.prototype.Hy=function(){return k(zt(this.hy),p)};Node.prototype.set_m_n=Node.prototype.Qy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);At(c,a)};Object.defineProperty(Node.prototype,"m_n",{get:Node.prototype.Hy,set:Node.prototype.Qy});
+Node.prototype.get_m_im=Node.prototype.pA=function(){return Bt(this.hy)};Node.prototype.set_m_im=Node.prototype.WC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ct(c,a)};Object.defineProperty(Node.prototype,"m_im",{get:Node.prototype.pA,set:Node.prototype.WC});Node.prototype.get_m_area=Node.prototype.Dz=function(){return Dt(this.hy)};Node.prototype.set_m_area=Node.prototype.jC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Et(c,a)};
+Object.defineProperty(Node.prototype,"m_area",{get:Node.prototype.Dz,set:Node.prototype.jC});Node.prototype.__destroy__=function(){Ft(this.hy)};function WB(){this.hy=Gt();h(WB)[this.hy]=this}WB.prototype=Object.create(f.prototype);WB.prototype.constructor=WB;WB.prototype.iy=WB;WB.jy={};b.btGhostPairCallback=WB;WB.prototype.__destroy__=function(){Ht(this.hy)};function XB(){throw"cannot construct a btOverlappingPairCallback, no constructor in IDL";}XB.prototype=Object.create(f.prototype);
+XB.prototype.constructor=XB;XB.prototype.iy=XB;XB.jy={};b.btOverlappingPairCallback=XB;XB.prototype.__destroy__=function(){It(this.hy)};function T(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=void 0===e?Jt(a,c,d):Kt(a,c,d,e);h(T)[this.hy]=this}T.prototype=Object.create(ZA.prototype);T.prototype.constructor=T;T.prototype.iy=T;T.jy={};b.btKinematicCharacterController=T;
+T.prototype.setUpAxis=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lt(c,a)};T.prototype.setWalkDirection=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Mt(c,a)};T.prototype.setVelocityForTimeInterval=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Nt(d,a,c)};T.prototype.warp=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ot(c,a)};T.prototype.preStep=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pt(c,a)};
+T.prototype.playerStep=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Qt(d,a,c)};T.prototype.setFallSpeed=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rt(c,a)};T.prototype.setJumpSpeed=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);St(c,a)};T.prototype.setMaxJumpHeight=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tt(c,a)};T.prototype.canJump=function(){return!!Ut(this.hy)};T.prototype.jump=function(){Vt(this.hy)};
+T.prototype.setGravity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wt(c,a)};T.prototype.getGravity=function(){return Xt(this.hy)};T.prototype.setMaxSlope=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yt(c,a)};T.prototype.getMaxSlope=function(){return Zt(this.hy)};T.prototype.getGhostObject=function(){return k($t(this.hy),U)};T.prototype.setUseGhostSweepTest=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);au(c,a)};T.prototype.onGround=function(){return!!bu(this.hy)};
+T.prototype.setUpInterpolate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);cu(c,a)};T.prototype.updateAction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);du(d,a,c)};T.prototype.__destroy__=function(){eu(this.hy)};function YB(){throw"cannot construct a btSoftBodyArray, no constructor in IDL";}YB.prototype=Object.create(f.prototype);YB.prototype.constructor=YB;YB.prototype.iy=YB;YB.jy={};b.btSoftBodyArray=YB;
+YB.prototype.size=YB.prototype.size=function(){return fu(this.hy)};YB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(gu(c,a),R)};YB.prototype.__destroy__=function(){hu(this.hy)};function PB(){throw"cannot construct a btFaceArray, no constructor in IDL";}PB.prototype=Object.create(f.prototype);PB.prototype.constructor=PB;PB.prototype.iy=PB;PB.jy={};b.btFaceArray=PB;PB.prototype.size=PB.prototype.size=function(){return iu(this.hy)};
+PB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ju(c,a),ZB)};PB.prototype.__destroy__=function(){ku(this.hy)};function $B(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=lu(a,c);h($B)[this.hy]=this}$B.prototype=Object.create(UA.prototype);$B.prototype.constructor=$B;$B.prototype.iy=$B;$B.jy={};b.btStaticPlaneShape=$B;$B.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mu(c,a)};
+$B.prototype.getLocalScaling=function(){return k(nu(this.hy),p)};$B.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);ou(d,a,c)};$B.prototype.__destroy__=function(){pu(this.hy)};function PA(){throw"cannot construct a btOverlappingPairCache, no constructor in IDL";}PA.prototype=Object.create(f.prototype);PA.prototype.constructor=PA;PA.prototype.iy=PA;PA.jy={};b.btOverlappingPairCache=PA;
+PA.prototype.setInternalGhostPairCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qu(c,a)};PA.prototype.getNumOverlappingPairs=function(){return ru(this.hy)};PA.prototype.__destroy__=function(){su(this.hy)};function vB(){throw"cannot construct a btIndexedMesh, no constructor in IDL";}vB.prototype=Object.create(f.prototype);vB.prototype.constructor=vB;vB.prototype.iy=vB;vB.jy={};b.btIndexedMesh=vB;vB.prototype.get_m_numTriangles=vB.prototype.KA=function(){return tu(this.hy)};
+vB.prototype.set_m_numTriangles=vB.prototype.qD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);uu(c,a)};Object.defineProperty(vB.prototype,"m_numTriangles",{get:vB.prototype.KA,set:vB.prototype.qD});vB.prototype.__destroy__=function(){vu(this.hy)};function V(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=wu(a,c,d,e,g);h(V)[this.hy]=this}V.prototype=Object.create(x.prototype);
+V.prototype.constructor=V;V.prototype.iy=V;V.jy={};b.btSoftRigidDynamicsWorld=V;V.prototype.addSoftBody=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);xu(e,a,c,d)};V.prototype.removeSoftBody=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yu(c,a)};V.prototype.removeCollisionObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zu(c,a)};V.prototype.getWorldInfo=function(){return k(Au(this.hy),J)};
+V.prototype.getSoftBodyArray=function(){return k(Bu(this.hy),YB)};V.prototype.getDispatcher=function(){return k(Cu(this.hy),OA)};V.prototype.rayTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Du(e,a,c,d)};V.prototype.getPairCache=function(){return k(Eu(this.hy),PA)};V.prototype.getDispatchInfo=function(){return k(Fu(this.hy),l)};
+V.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?Gu(e,a):void 0===d?Hu(e,a,c):Iu(e,a,c,d)};V.prototype.getBroadphase=function(){return k(Ju(this.hy),QA)};
+V.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);Ku(n,a,c,d,e,g)};V.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Lu(e,a,c,d)};
+V.prototype.contactTest=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Mu(d,a,c)};V.prototype.updateSingleAabb=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nu(c,a)};V.prototype.setDebugDrawer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ou(c,a)};V.prototype.getDebugDrawer=function(){return k(Pu(this.hy),RA)};V.prototype.debugDrawWorld=function(){Qu(this.hy)};
+V.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Ru(e,a,c,d)};V.prototype.setGravity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Su(c,a)};V.prototype.getGravity=function(){return k(Tu(this.hy),p)};
+V.prototype.addRigidBody=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?Uu(e,a):void 0===d?_emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_2(e,a,c):Vu(e,a,c,d)};V.prototype.removeRigidBody=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wu(c,a)};
+V.prototype.addConstraint=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===c?Xu(d,a):Yu(d,a,c)};V.prototype.removeConstraint=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zu(c,a)};V.prototype.stepSimulation=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);return void 0===c?$u(e,a):void 0===d?av(e,a,c):bv(e,a,c,d)};
+V.prototype.setContactAddedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);cv(c,a)};V.prototype.setContactProcessedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dv(c,a)};V.prototype.setContactDestroyedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ev(c,a)};V.prototype.addAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fv(c,a)};V.prototype.removeAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gv(c,a)};
+V.prototype.getSolverInfo=function(){return k(hv(this.hy),v)};V.prototype.setInternalTickCallback=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?iv(e,a):void 0===d?jv(e,a,c):kv(e,a,c,d)};V.prototype.__destroy__=function(){lv(this.hy)};
+function aC(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=mv(a,c,d,e);h(aC)[this.hy]=this}aC.prototype=Object.create(TA.prototype);aC.prototype.constructor=aC;aC.prototype.iy=aC;aC.jy={};b.btFixedConstraint=aC;aC.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nv(c,a)};aC.prototype.getBreakingImpulseThreshold=function(){return ov(this.hy)};
+aC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pv(c,a)};aC.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return qv(d,a,c)};aC.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);rv(e,a,c,d)};aC.prototype.__destroy__=function(){sv(this.hy)};
+function r(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=void 0===a?tv():void 0===c?_emscripten_bind_btTransform_btTransform_1(a):uv(a,c);h(r)[this.hy]=this}r.prototype=Object.create(f.prototype);r.prototype.constructor=r;r.prototype.iy=r;r.jy={};b.btTransform=r;r.prototype.setIdentity=function(){vv(this.hy)};r.prototype.setOrigin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wv(c,a)};
+r.prototype.setRotation=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xv(c,a)};r.prototype.getOrigin=function(){return k(yv(this.hy),p)};r.prototype.getRotation=function(){return k(zv(this.hy),W)};r.prototype.getBasis=function(){return k(Av(this.hy),jB)};r.prototype.setFromOpenGLMatrix=function(a){var c=this.hy;IA();"object"==typeof a&&(a=MA(a));Bv(c,a)};r.prototype.inverse=r.prototype.inverse=function(){return k(Cv(this.hy),r)};
+r.prototype.op_mul=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Dv(c,a),r)};r.prototype.__destroy__=function(){Ev(this.hy)};function X(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Fv(a,c);h(X)[this.hy]=this}X.prototype=Object.create(z.prototype);X.prototype.constructor=X;X.prototype.iy=X;X.jy={};b.ClosestRayResultCallback=X;X.prototype.hasHit=function(){return!!Gv(this.hy)};
+X.prototype.get_m_rayFromWorld=X.prototype.Iy=function(){return k(Hv(this.hy),p)};X.prototype.set_m_rayFromWorld=X.prototype.Ry=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Iv(c,a)};Object.defineProperty(X.prototype,"m_rayFromWorld",{get:X.prototype.Iy,set:X.prototype.Ry});X.prototype.get_m_rayToWorld=X.prototype.Jy=function(){return k(Jv(this.hy),p)};X.prototype.set_m_rayToWorld=X.prototype.Sy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Kv(c,a)};
+Object.defineProperty(X.prototype,"m_rayToWorld",{get:X.prototype.Jy,set:X.prototype.Sy});X.prototype.get_m_hitNormalWorld=X.prototype.sy=function(){return k(Lv(this.hy),p)};X.prototype.set_m_hitNormalWorld=X.prototype.zy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Mv(c,a)};Object.defineProperty(X.prototype,"m_hitNormalWorld",{get:X.prototype.sy,set:X.prototype.zy});X.prototype.get_m_hitPointWorld=X.prototype.ty=function(){return k(Nv(this.hy),p)};
+X.prototype.set_m_hitPointWorld=X.prototype.Ay=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ov(c,a)};Object.defineProperty(X.prototype,"m_hitPointWorld",{get:X.prototype.ty,set:X.prototype.Ay});X.prototype.get_m_collisionFilterGroup=X.prototype.ky=function(){return Pv(this.hy)};X.prototype.set_m_collisionFilterGroup=X.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qv(c,a)};Object.defineProperty(X.prototype,"m_collisionFilterGroup",{get:X.prototype.ky,set:X.prototype.my});
+X.prototype.get_m_collisionFilterMask=X.prototype.ly=function(){return Rv(this.hy)};X.prototype.set_m_collisionFilterMask=X.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sv(c,a)};Object.defineProperty(X.prototype,"m_collisionFilterMask",{get:X.prototype.ly,set:X.prototype.ny});X.prototype.get_m_closestHitFraction=X.prototype.oy=function(){return Tv(this.hy)};
+X.prototype.set_m_closestHitFraction=X.prototype.py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Uv(c,a)};Object.defineProperty(X.prototype,"m_closestHitFraction",{get:X.prototype.oy,set:X.prototype.py});X.prototype.get_m_collisionObject=X.prototype.qy=function(){return k(Vv(this.hy),q)};X.prototype.set_m_collisionObject=X.prototype.xy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wv(c,a)};Object.defineProperty(X.prototype,"m_collisionObject",{get:X.prototype.qy,set:X.prototype.xy});
+X.prototype.__destroy__=function(){Xv(this.hy)};function bC(a){a&&"object"===typeof a&&(a=a.hy);this.hy=void 0===a?Yv():Zv(a);h(bC)[this.hy]=this}bC.prototype=Object.create(WA.prototype);bC.prototype.constructor=bC;bC.prototype.iy=bC;bC.jy={};b.btSoftBodyRigidBodyCollisionConfiguration=bC;bC.prototype.__destroy__=function(){$v(this.hy)};function cC(){this.hy=aw();h(cC)[this.hy]=this}cC.prototype=Object.create(hB.prototype);cC.prototype.constructor=cC;cC.prototype.iy=cC;cC.jy={};
+b.ConcreteContactResultCallback=cC;cC.prototype.addSingleResult=function(a,c,d,e,g,n,F){var aa=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);return bw(aa,a,c,d,e,g,n,F)};cC.prototype.__destroy__=function(){cw(this.hy)};
+function dC(a,c,d){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);this.hy=void 0===d?dw(a,c):ew(a,c,d);h(dC)[this.hy]=this}dC.prototype=Object.create(XA.prototype);dC.prototype.constructor=dC;dC.prototype.iy=dC;dC.jy={};b.btBvhTriangleMeshShape=dC;dC.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fw(c,a)};dC.prototype.getLocalScaling=function(){return k(gw(this.hy),p)};
+dC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);hw(d,a,c)};dC.prototype.__destroy__=function(){iw(this.hy)};function oB(){throw"cannot construct a btConstCollisionObjectArray, no constructor in IDL";}oB.prototype=Object.create(f.prototype);oB.prototype.constructor=oB;oB.prototype.iy=oB;oB.jy={};b.btConstCollisionObjectArray=oB;oB.prototype.size=oB.prototype.size=function(){return jw(this.hy)};
+oB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(kw(c,a),q)};oB.prototype.__destroy__=function(){lw(this.hy)};function eC(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=void 0===e?mw(a,c,d):void 0===g?_emscripten_bind_btSliderConstraint_btSliderConstraint_4(a,c,d,e):nw(a,c,d,e,g);h(eC)[this.hy]=this}eC.prototype=Object.create(TA.prototype);
+eC.prototype.constructor=eC;eC.prototype.iy=eC;eC.jy={};b.btSliderConstraint=eC;eC.prototype.setLowerLinLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ow(c,a)};eC.prototype.setUpperLinLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pw(c,a)};eC.prototype.setLowerAngLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qw(c,a)};eC.prototype.setUpperAngLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);rw(c,a)};
+eC.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sw(c,a)};eC.prototype.getBreakingImpulseThreshold=function(){return tw(this.hy)};eC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);uw(c,a)};eC.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return vw(d,a,c)};
+eC.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);ww(e,a,c,d)};eC.prototype.__destroy__=function(){xw(this.hy)};function U(){this.hy=yw();h(U)[this.hy]=this}U.prototype=Object.create(w.prototype);U.prototype.constructor=U;U.prototype.iy=U;U.jy={};b.btPairCachingGhostObject=U;
+U.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);zw(d,a,c)};U.prototype.getCollisionShape=function(){return k(Aw(this.hy),m)};U.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bw(c,a)};U.prototype.setActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cw(c,a)};
+U.prototype.forceActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dw(c,a)};U.prototype.activate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);void 0===a?Ew(c):Fw(c,a)};U.prototype.isActive=function(){return!!Gw(this.hy)};U.prototype.isKinematicObject=function(){return!!Hw(this.hy)};U.prototype.isStaticObject=function(){return!!Iw(this.hy)};U.prototype.isStaticOrKinematicObject=function(){return!!Jw(this.hy)};U.prototype.getRestitution=function(){return Kw(this.hy)};
+U.prototype.getFriction=function(){return Lw(this.hy)};U.prototype.getRollingFriction=function(){return Mw(this.hy)};U.prototype.setRestitution=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nw(c,a)};U.prototype.setFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ow(c,a)};U.prototype.setRollingFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pw(c,a)};U.prototype.getWorldTransform=function(){return k(Qw(this.hy),r)};U.prototype.getCollisionFlags=function(){return Rw(this.hy)};
+U.prototype.setCollisionFlags=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sw(c,a)};U.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tw(c,a)};U.prototype.setCollisionShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Uw(c,a)};U.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vw(c,a)};U.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ww(c,a)};
+U.prototype.getUserIndex=function(){return Xw(this.hy)};U.prototype.setUserIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yw(c,a)};U.prototype.getUserPointer=function(){return k(Zw(this.hy),SA)};U.prototype.setUserPointer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$w(c,a)};U.prototype.getBroadphaseHandle=function(){return k(ax(this.hy),t)};U.prototype.getNumOverlappingObjects=function(){return bx(this.hy)};
+U.prototype.getOverlappingObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(cx(c,a),q)};U.prototype.__destroy__=function(){dx(this.hy)};function D(){throw"cannot construct a btManifoldPoint, no constructor in IDL";}D.prototype=Object.create(f.prototype);D.prototype.constructor=D;D.prototype.iy=D;D.jy={};b.btManifoldPoint=D;D.prototype.getPositionWorldOnA=function(){return k(ex(this.hy),p)};D.prototype.getPositionWorldOnB=function(){return k(fx(this.hy),p)};
+D.prototype.getAppliedImpulse=function(){return gx(this.hy)};D.prototype.getDistance=function(){return hx(this.hy)};D.prototype.get_m_localPointA=D.prototype.AA=function(){return k(ix(this.hy),p)};D.prototype.set_m_localPointA=D.prototype.gD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jx(c,a)};Object.defineProperty(D.prototype,"m_localPointA",{get:D.prototype.AA,set:D.prototype.gD});D.prototype.get_m_localPointB=D.prototype.BA=function(){return k(kx(this.hy),p)};
+D.prototype.set_m_localPointB=D.prototype.hD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lx(c,a)};Object.defineProperty(D.prototype,"m_localPointB",{get:D.prototype.BA,set:D.prototype.hD});D.prototype.get_m_positionWorldOnB=D.prototype.NA=function(){return k(mx(this.hy),p)};D.prototype.set_m_positionWorldOnB=D.prototype.tD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nx(c,a)};Object.defineProperty(D.prototype,"m_positionWorldOnB",{get:D.prototype.NA,set:D.prototype.tD});
+D.prototype.get_m_positionWorldOnA=D.prototype.MA=function(){return k(ox(this.hy),p)};D.prototype.set_m_positionWorldOnA=D.prototype.sD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);px(c,a)};Object.defineProperty(D.prototype,"m_positionWorldOnA",{get:D.prototype.MA,set:D.prototype.sD});D.prototype.get_m_normalWorldOnB=D.prototype.IA=function(){return k(qx(this.hy),p)};D.prototype.set_m_normalWorldOnB=D.prototype.oD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);rx(c,a)};
+Object.defineProperty(D.prototype,"m_normalWorldOnB",{get:D.prototype.IA,set:D.prototype.oD});D.prototype.get_m_userPersistentData=D.prototype.oB=function(){return sx(this.hy)};D.prototype.set_m_userPersistentData=D.prototype.VD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);tx(c,a)};Object.defineProperty(D.prototype,"m_userPersistentData",{get:D.prototype.oB,set:D.prototype.VD});D.prototype.__destroy__=function(){ux(this.hy)};
+function fC(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=void 0===d?vx(a,c):void 0===e?_emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_3(a,c,d):wx(a,c,d,e);h(fC)[this.hy]=this}fC.prototype=Object.create(TA.prototype);fC.prototype.constructor=fC;fC.prototype.iy=fC;fC.jy={};b.btPoint2PointConstraint=fC;
+fC.prototype.setPivotA=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xx(c,a)};fC.prototype.setPivotB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yx(c,a)};fC.prototype.getPivotInA=function(){return k(zx(this.hy),p)};fC.prototype.getPivotInB=function(){return k(Ax(this.hy),p)};fC.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bx(c,a)};fC.prototype.getBreakingImpulseThreshold=function(){return Cx(this.hy)};
+fC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dx(c,a)};fC.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return Ex(d,a,c)};fC.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Fx(e,a,c,d)};fC.prototype.get_m_setting=fC.prototype.VA=function(){return k(Gx(this.hy),H)};
+fC.prototype.set_m_setting=fC.prototype.BD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Hx(c,a)};Object.defineProperty(fC.prototype,"m_setting",{get:fC.prototype.VA,set:fC.prototype.BD});fC.prototype.__destroy__=function(){Ix(this.hy)};function gC(){this.hy=Jx();h(gC)[this.hy]=this}gC.prototype=Object.create(f.prototype);gC.prototype.constructor=gC;gC.prototype.iy=gC;gC.jy={};b.btSoftBodyHelpers=gC;
+gC.prototype.CreateRope=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);return k(Kx(n,a,c,d,e,g),R)};
+gC.prototype.CreatePatch=function(a,c,d,e,g,n,F,aa,ta){var Rb=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);aa&&"object"===typeof aa&&(aa=aa.hy);ta&&"object"===typeof ta&&(ta=ta.hy);return k(Lx(Rb,a,c,d,e,g,n,F,aa,ta),R)};
+gC.prototype.CreatePatchUV=function(a,c,d,e,g,n,F,aa,ta,Rb){var nC=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);aa&&"object"===typeof aa&&(aa=aa.hy);ta&&"object"===typeof ta&&(ta=ta.hy);"object"==typeof Rb&&(Rb=MA(Rb));return k(Mx(nC,a,c,d,e,g,n,F,aa,ta,Rb),R)};
+gC.prototype.CreateEllipsoid=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);return k(Nx(g,a,c,d,e),R)};
+gC.prototype.CreateFromTriMesh=function(a,c,d,e,g){var n=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);"object"==typeof c&&(c=MA(c));if("object"==typeof d&&"object"===typeof d){var F=JA(d,Aa);KA(d,Aa,F);d=F}e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);return k(Ox(n,a,c,d,e,g),R)};
+gC.prototype.CreateFromConvexHull=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);return k(Px(g,a,c,d,e),R)};gC.prototype.__destroy__=function(){Qx(this.hy)};function t(){throw"cannot construct a btBroadphaseProxy, no constructor in IDL";}t.prototype=Object.create(f.prototype);t.prototype.constructor=t;t.prototype.iy=t;t.jy={};b.btBroadphaseProxy=t;
+t.prototype.get_m_collisionFilterGroup=t.prototype.ky=function(){return Rx(this.hy)};t.prototype.set_m_collisionFilterGroup=t.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sx(c,a)};Object.defineProperty(t.prototype,"m_collisionFilterGroup",{get:t.prototype.ky,set:t.prototype.my});t.prototype.get_m_collisionFilterMask=t.prototype.ly=function(){return Tx(this.hy)};
+t.prototype.set_m_collisionFilterMask=t.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ux(c,a)};Object.defineProperty(t.prototype,"m_collisionFilterMask",{get:t.prototype.ly,set:t.prototype.ny});t.prototype.__destroy__=function(){Vx(this.hy)};function TB(){throw"cannot construct a tNodeArray, no constructor in IDL";}TB.prototype=Object.create(f.prototype);TB.prototype.constructor=TB;TB.prototype.iy=TB;TB.jy={};b.tNodeArray=TB;TB.prototype.size=TB.prototype.size=function(){return Wx(this.hy)};
+TB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Xx(c,a),Node)};TB.prototype.__destroy__=function(){Yx(this.hy)};function hC(a){a&&"object"===typeof a&&(a=a.hy);this.hy=Zx(a);h(hC)[this.hy]=this}hC.prototype=Object.create(m.prototype);hC.prototype.constructor=hC;hC.prototype.iy=hC;hC.jy={};b.btBoxShape=hC;hC.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$x(c,a)};hC.prototype.getMargin=function(){return ay(this.hy)};
+hC.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);by(c,a)};hC.prototype.getLocalScaling=function(){return k(cy(this.hy),p)};hC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);dy(d,a,c)};hC.prototype.__destroy__=function(){ey(this.hy)};function ZB(){throw"cannot construct a btFace, no constructor in IDL";}ZB.prototype=Object.create(f.prototype);ZB.prototype.constructor=ZB;
+ZB.prototype.iy=ZB;ZB.jy={};b.btFace=ZB;ZB.prototype.get_m_indices=ZB.prototype.rA=function(){return k(fy(this.hy),VB)};ZB.prototype.set_m_indices=ZB.prototype.YC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gy(c,a)};Object.defineProperty(ZB.prototype,"m_indices",{get:ZB.prototype.rA,set:ZB.prototype.YC});ZB.prototype.get_m_plane=ZB.prototype.LA=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return hy(c,a)};
+ZB.prototype.set_m_plane=ZB.prototype.rD=function(a,c){var d=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);iy(d,a,c)};Object.defineProperty(ZB.prototype,"m_plane",{get:ZB.prototype.LA,set:ZB.prototype.rD});ZB.prototype.__destroy__=function(){jy(this.hy)};function iC(){this.hy=ky();h(iC)[this.hy]=this}iC.prototype=Object.create(RA.prototype);iC.prototype.constructor=iC;iC.prototype.iy=iC;iC.jy={};b.DebugDrawer=iC;
+iC.prototype.drawLine=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);ly(e,a,c,d)};iC.prototype.drawContactPoint=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);my(n,a,c,d,e,g)};
+iC.prototype.reportErrorWarning=function(a){var c=this.hy;IA();a=a&&"object"===typeof a?a.hy:LA(a);ny(c,a)};iC.prototype.draw3dText=function(a,c){var d=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);c=c&&"object"===typeof c?c.hy:LA(c);oy(d,a,c)};iC.prototype.setDebugMode=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);py(c,a)};iC.prototype.getDebugMode=function(){return qy(this.hy)};iC.prototype.__destroy__=function(){ry(this.hy)};
+function jC(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=sy(a,c);h(jC)[this.hy]=this}jC.prototype=Object.create(VA.prototype);jC.prototype.constructor=jC;jC.prototype.iy=jC;jC.jy={};b.btCapsuleShapeX=jC;jC.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ty(c,a)};jC.prototype.getMargin=function(){return uy(this.hy)};jC.prototype.getUpAxis=function(){return vy(this.hy)};jC.prototype.getRadius=function(){return wy(this.hy)};
+jC.prototype.getHalfHeight=function(){return xy(this.hy)};jC.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yy(c,a)};jC.prototype.getLocalScaling=function(){return k(zy(this.hy),p)};jC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ay(d,a,c)};jC.prototype.__destroy__=function(){By(this.hy)};
+function W(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=Cy(a,c,d,e);h(W)[this.hy]=this}W.prototype=Object.create(aB.prototype);W.prototype.constructor=W;W.prototype.iy=W;W.jy={};b.btQuaternion=W;W.prototype.setValue=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);Dy(g,a,c,d,e)};
+W.prototype.setEulerZYX=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Ey(e,a,c,d)};W.prototype.setRotation=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Fy(d,a,c)};W.prototype.normalize=W.prototype.normalize=function(){Gy(this.hy)};W.prototype.length2=function(){return Hy(this.hy)};W.prototype.length=W.prototype.length=function(){return Iy(this.hy)};
+W.prototype.dot=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Jy(c,a)};W.prototype.normalized=function(){return k(Ky(this.hy),W)};W.prototype.getAxis=function(){return k(Ly(this.hy),p)};W.prototype.inverse=W.prototype.inverse=function(){return k(My(this.hy),W)};W.prototype.getAngle=function(){return Ny(this.hy)};W.prototype.getAngleShortestPath=function(){return Oy(this.hy)};
+W.prototype.angle=W.prototype.angle=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Py(c,a)};W.prototype.angleShortestPath=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Qy(c,a)};W.prototype.op_add=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Ry(c,a),W)};W.prototype.op_sub=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Sy(c,a),W)};
+W.prototype.op_mul=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Ty(c,a),W)};W.prototype.op_mulq=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Uy(c,a),W)};W.prototype.op_div=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Vy(c,a),W)};W.prototype.x=W.prototype.x=function(){return Wy(this.hy)};W.prototype.y=W.prototype.y=function(){return Xy(this.hy)};W.prototype.z=W.prototype.z=function(){return Yy(this.hy)};W.prototype.w=function(){return Zy(this.hy)};
+W.prototype.setX=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$y(c,a)};W.prototype.setY=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);az(c,a)};W.prototype.setZ=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bz(c,a)};W.prototype.setW=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);cz(c,a)};W.prototype.__destroy__=function(){dz(this.hy)};
+function kC(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=ez(a,c);h(kC)[this.hy]=this}kC.prototype=Object.create(VA.prototype);kC.prototype.constructor=kC;kC.prototype.iy=kC;kC.jy={};b.btCapsuleShapeZ=kC;kC.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fz(c,a)};kC.prototype.getMargin=function(){return gz(this.hy)};kC.prototype.getUpAxis=function(){return hz(this.hy)};kC.prototype.getRadius=function(){return iz(this.hy)};
+kC.prototype.getHalfHeight=function(){return jz(this.hy)};kC.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kz(c,a)};kC.prototype.getLocalScaling=function(){return k(lz(this.hy),p)};kC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);mz(d,a,c)};kC.prototype.__destroy__=function(){nz(this.hy)};function v(){throw"cannot construct a btContactSolverInfo, no constructor in IDL";}
+v.prototype=Object.create(f.prototype);v.prototype.constructor=v;v.prototype.iy=v;v.jy={};b.btContactSolverInfo=v;v.prototype.get_m_splitImpulse=v.prototype.YA=function(){return!!oz(this.hy)};v.prototype.set_m_splitImpulse=v.prototype.ED=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pz(c,a)};Object.defineProperty(v.prototype,"m_splitImpulse",{get:v.prototype.YA,set:v.prototype.ED});v.prototype.get_m_splitImpulsePenetrationThreshold=v.prototype.ZA=function(){return qz(this.hy)};
+v.prototype.set_m_splitImpulsePenetrationThreshold=v.prototype.FD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);rz(c,a)};Object.defineProperty(v.prototype,"m_splitImpulsePenetrationThreshold",{get:v.prototype.ZA,set:v.prototype.FD});v.prototype.get_m_numIterations=v.prototype.JA=function(){return sz(this.hy)};v.prototype.set_m_numIterations=v.prototype.pD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);tz(c,a)};
+Object.defineProperty(v.prototype,"m_numIterations",{get:v.prototype.JA,set:v.prototype.pD});v.prototype.__destroy__=function(){uz(this.hy)};function lC(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=void 0===e?vz(a,c,d):void 0===g?_emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_4(a,c,d,e):wz(a,c,d,e,g);h(lC)[this.hy]=this}
+lC.prototype=Object.create(eB.prototype);lC.prototype.constructor=lC;lC.prototype.iy=lC;lC.jy={};b.btGeneric6DofSpringConstraint=lC;lC.prototype.enableSpring=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);xz(d,a,c)};lC.prototype.setStiffness=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);yz(d,a,c)};
+lC.prototype.setDamping=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);zz(d,a,c)};lC.prototype.setEquilibriumPoint=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===a?Az(d):void 0===c?Bz(d,a):Cz(d,a,c)};lC.prototype.setLinearLowerLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dz(c,a)};
+lC.prototype.setLinearUpperLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ez(c,a)};lC.prototype.setAngularLowerLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fz(c,a)};lC.prototype.setAngularUpperLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gz(c,a)};lC.prototype.getFrameOffsetA=function(){return k(Hz(this.hy),r)};lC.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Iz(c,a)};
+lC.prototype.getBreakingImpulseThreshold=function(){return Jz(this.hy)};lC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Kz(c,a)};lC.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return Lz(d,a,c)};lC.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Mz(e,a,c,d)};
+lC.prototype.__destroy__=function(){Nz(this.hy)};function mC(a){a&&"object"===typeof a&&(a=a.hy);this.hy=Oz(a);h(mC)[this.hy]=this}mC.prototype=Object.create(m.prototype);mC.prototype.constructor=mC;mC.prototype.iy=mC;mC.jy={};b.btSphereShape=mC;mC.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pz(c,a)};mC.prototype.getMargin=function(){return Qz(this.hy)};mC.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rz(c,a)};
+mC.prototype.getLocalScaling=function(){return k(Sz(this.hy),p)};mC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Tz(d,a,c)};mC.prototype.__destroy__=function(){Uz(this.hy)};function Y(){throw"cannot construct a Face, no constructor in IDL";}Y.prototype=Object.create(f.prototype);Y.prototype.constructor=Y;Y.prototype.iy=Y;Y.jy={};b.Face=Y;
+Y.prototype.get_m_n=Y.prototype.Hy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Vz(c,a),Node)};Y.prototype.set_m_n=Y.prototype.Qy=function(a,c){var d=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Wz(d,a,c)};Object.defineProperty(Y.prototype,"m_n",{get:Y.prototype.Hy,set:Y.prototype.Qy});Y.prototype.get_m_normal=Y.prototype.HA=function(){return k(Xz(this.hy),p)};
+Y.prototype.set_m_normal=Y.prototype.nD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yz(c,a)};Object.defineProperty(Y.prototype,"m_normal",{get:Y.prototype.HA,set:Y.prototype.nD});Y.prototype.get_m_ra=Y.prototype.PA=function(){return Zz(this.hy)};Y.prototype.set_m_ra=Y.prototype.vD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$z(c,a)};Object.defineProperty(Y.prototype,"m_ra",{get:Y.prototype.PA,set:Y.prototype.vD});Y.prototype.__destroy__=function(){aA(this.hy)};
+function UB(){throw"cannot construct a tFaceArray, no constructor in IDL";}UB.prototype=Object.create(f.prototype);UB.prototype.constructor=UB;UB.prototype.iy=UB;UB.jy={};b.tFaceArray=UB;UB.prototype.size=UB.prototype.size=function(){return bA(this.hy)};UB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(cA(c,a),Y)};UB.prototype.__destroy__=function(){dA(this.hy)};
+function Z(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=eA(a,c,d,e,g);h(Z)[this.hy]=this}Z.prototype=Object.create(f.prototype);Z.prototype.constructor=Z;Z.prototype.iy=Z;Z.jy={};b.LocalConvexResult=Z;Z.prototype.get_m_hitCollisionObject=Z.prototype.iA=function(){return k(fA(this.hy),q)};
+Z.prototype.set_m_hitCollisionObject=Z.prototype.PC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gA(c,a)};Object.defineProperty(Z.prototype,"m_hitCollisionObject",{get:Z.prototype.iA,set:Z.prototype.PC});Z.prototype.get_m_localShapeInfo=Z.prototype.CA=function(){return k(hA(this.hy),tB)};Z.prototype.set_m_localShapeInfo=Z.prototype.iD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);iA(c,a)};Object.defineProperty(Z.prototype,"m_localShapeInfo",{get:Z.prototype.CA,set:Z.prototype.iD});
+Z.prototype.get_m_hitNormalLocal=Z.prototype.mA=function(){return k(jA(this.hy),p)};Z.prototype.set_m_hitNormalLocal=Z.prototype.TC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kA(c,a)};Object.defineProperty(Z.prototype,"m_hitNormalLocal",{get:Z.prototype.mA,set:Z.prototype.TC});Z.prototype.get_m_hitPointLocal=Z.prototype.oA=function(){return k(lA(this.hy),p)};Z.prototype.set_m_hitPointLocal=Z.prototype.VC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mA(c,a)};
+Object.defineProperty(Z.prototype,"m_hitPointLocal",{get:Z.prototype.oA,set:Z.prototype.VC});Z.prototype.get_m_hitFraction=Z.prototype.jA=function(){return nA(this.hy)};Z.prototype.set_m_hitFraction=Z.prototype.QC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);oA(c,a)};Object.defineProperty(Z.prototype,"m_hitFraction",{get:Z.prototype.jA,set:Z.prototype.QC});Z.prototype.__destroy__=function(){pA(this.hy)};
+(function(){function a(){b.BT_CONSTRAINT_ERP=qA();b.BT_CONSTRAINT_STOP_ERP=rA();b.BT_CONSTRAINT_CFM=sA();b.BT_CONSTRAINT_STOP_CFM=tA();b.PHY_FLOAT=uA();b.PHY_DOUBLE=vA();b.PHY_INTEGER=wA();b.PHY_SHORT=xA();b.PHY_FIXEDPOINT88=yA();b.PHY_UCHAR=zA()}Ka?a():Ia.unshift(a)})();this.Ammo=b;
+
+
+  return Ammo.ready
+}
+);
+})();
+if (typeof exports === 'object' && typeof module === 'object')
+      module.exports = Ammo;
+    else if (typeof define === 'function' && define['amd'])
+      define([], function() { return Ammo; });
+    else if (typeof exports === 'object')
+      exports["Ammo"] = Ammo;
+    

BIN
examples/js/libs/ammo.wasm.wasm


+ 0 - 13687
examples/js/libs/cannon.js

@@ -1,13687 +0,0 @@
-/*
- * Copyright (c) 2015 cannon.js Authors
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&false)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.CANNON=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-module.exports={
-  "name": "cannon",
-  "version": "0.6.2",
-  "description": "A lightweight 3D physics engine written in JavaScript.",
-  "homepage": "https://github.com/schteppe/cannon.js",
-  "author": "Stefan Hedman <[email protected]> (http://steffe.se)",
-  "keywords": [
-    "cannon.js",
-    "cannon",
-    "physics",
-    "engine",
-    "3d"
-  ],
-  "main": "./build/cannon.js",
-  "engines": {
-    "node": "*"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/schteppe/cannon.js.git"
-  },
-  "bugs": {
-    "url": "https://github.com/schteppe/cannon.js/issues"
-  },
-  "licenses": [
-    {
-      "type": "MIT"
-    }
-  ],
-  "devDependencies": {
-    "jshint": "latest",
-    "uglify-js": "latest",
-    "nodeunit": "^0.9.0",
-    "grunt": "~0.4.0",
-    "grunt-contrib-jshint": "~0.1.1",
-    "grunt-contrib-nodeunit": "^0.4.1",
-    "grunt-contrib-concat": "~0.1.3",
-    "grunt-contrib-uglify": "^0.5.1",
-    "grunt-browserify": "^2.1.4",
-    "grunt-contrib-yuidoc": "^0.5.2",
-    "browserify": "*"
-  },
-  "dependencies": {}
-}
-
-},{}],2:[function(_dereq_,module,exports){
-// Export classes
-module.exports = {
-    version :                       _dereq_('../package.json').version,
-
-    AABB :                          _dereq_('./collision/AABB'),
-    ArrayCollisionMatrix :          _dereq_('./collision/ArrayCollisionMatrix'),
-    Body :                          _dereq_('./objects/Body'),
-    Box :                           _dereq_('./shapes/Box'),
-    Broadphase :                    _dereq_('./collision/Broadphase'),
-    Constraint :                    _dereq_('./constraints/Constraint'),
-    ContactEquation :               _dereq_('./equations/ContactEquation'),
-    Narrowphase :                   _dereq_('./world/Narrowphase'),
-    ConeTwistConstraint :           _dereq_('./constraints/ConeTwistConstraint'),
-    ContactMaterial :               _dereq_('./material/ContactMaterial'),
-    ConvexPolyhedron :              _dereq_('./shapes/ConvexPolyhedron'),
-    Cylinder :                      _dereq_('./shapes/Cylinder'),
-    DistanceConstraint :            _dereq_('./constraints/DistanceConstraint'),
-    Equation :                      _dereq_('./equations/Equation'),
-    EventTarget :                   _dereq_('./utils/EventTarget'),
-    FrictionEquation :              _dereq_('./equations/FrictionEquation'),
-    GSSolver :                      _dereq_('./solver/GSSolver'),
-    GridBroadphase :                _dereq_('./collision/GridBroadphase'),
-    Heightfield :                   _dereq_('./shapes/Heightfield'),
-    HingeConstraint :               _dereq_('./constraints/HingeConstraint'),
-    LockConstraint :                _dereq_('./constraints/LockConstraint'),
-    Mat3 :                          _dereq_('./math/Mat3'),
-    Material :                      _dereq_('./material/Material'),
-    NaiveBroadphase :               _dereq_('./collision/NaiveBroadphase'),
-    ObjectCollisionMatrix :         _dereq_('./collision/ObjectCollisionMatrix'),
-    Pool :                          _dereq_('./utils/Pool'),
-    Particle :                      _dereq_('./shapes/Particle'),
-    Plane :                         _dereq_('./shapes/Plane'),
-    PointToPointConstraint :        _dereq_('./constraints/PointToPointConstraint'),
-    Quaternion :                    _dereq_('./math/Quaternion'),
-    Ray :                           _dereq_('./collision/Ray'),
-    RaycastVehicle :                _dereq_('./objects/RaycastVehicle'),
-    RaycastResult :                 _dereq_('./collision/RaycastResult'),
-    RigidVehicle :                  _dereq_('./objects/RigidVehicle'),
-    RotationalEquation :            _dereq_('./equations/RotationalEquation'),
-    RotationalMotorEquation :       _dereq_('./equations/RotationalMotorEquation'),
-    SAPBroadphase :                 _dereq_('./collision/SAPBroadphase'),
-    SPHSystem :                     _dereq_('./objects/SPHSystem'),
-    Shape :                         _dereq_('./shapes/Shape'),
-    Solver :                        _dereq_('./solver/Solver'),
-    Sphere :                        _dereq_('./shapes/Sphere'),
-    SplitSolver :                   _dereq_('./solver/SplitSolver'),
-    Spring :                        _dereq_('./objects/Spring'),
-    Trimesh :                       _dereq_('./shapes/Trimesh'),
-    Vec3 :                          _dereq_('./math/Vec3'),
-    Vec3Pool :                      _dereq_('./utils/Vec3Pool'),
-    World :                         _dereq_('./world/World'),
-};
-
-},{"../package.json":1,"./collision/AABB":3,"./collision/ArrayCollisionMatrix":4,"./collision/Broadphase":5,"./collision/GridBroadphase":6,"./collision/NaiveBroadphase":7,"./collision/ObjectCollisionMatrix":8,"./collision/Ray":9,"./collision/RaycastResult":10,"./collision/SAPBroadphase":11,"./constraints/ConeTwistConstraint":12,"./constraints/Constraint":13,"./constraints/DistanceConstraint":14,"./constraints/HingeConstraint":15,"./constraints/LockConstraint":16,"./constraints/PointToPointConstraint":17,"./equations/ContactEquation":19,"./equations/Equation":20,"./equations/FrictionEquation":21,"./equations/RotationalEquation":22,"./equations/RotationalMotorEquation":23,"./material/ContactMaterial":24,"./material/Material":25,"./math/Mat3":27,"./math/Quaternion":28,"./math/Vec3":30,"./objects/Body":31,"./objects/RaycastVehicle":32,"./objects/RigidVehicle":33,"./objects/SPHSystem":34,"./objects/Spring":35,"./shapes/Box":37,"./shapes/ConvexPolyhedron":38,"./shapes/Cylinder":39,"./shapes/Heightfield":40,"./shapes/Particle":41,"./shapes/Plane":42,"./shapes/Shape":43,"./shapes/Sphere":44,"./shapes/Trimesh":45,"./solver/GSSolver":46,"./solver/Solver":47,"./solver/SplitSolver":48,"./utils/EventTarget":49,"./utils/Pool":51,"./utils/Vec3Pool":54,"./world/Narrowphase":55,"./world/World":56}],3:[function(_dereq_,module,exports){
-var Vec3 = _dereq_('../math/Vec3');
-var Utils = _dereq_('../utils/Utils');
-
-module.exports = AABB;
-
-/**
- * Axis aligned bounding box class.
- * @class AABB
- * @constructor
- * @param {Object} [options]
- * @param {Vec3}   [options.upperBound]
- * @param {Vec3}   [options.lowerBound]
- */
-function AABB(options){
-    options = options || {};
-
-    /**
-     * The lower bound of the bounding box.
-     * @property lowerBound
-     * @type {Vec3}
-     */
-    this.lowerBound = new Vec3();
-    if(options.lowerBound){
-        this.lowerBound.copy(options.lowerBound);
-    }
-
-    /**
-     * The upper bound of the bounding box.
-     * @property upperBound
-     * @type {Vec3}
-     */
-    this.upperBound = new Vec3();
-    if(options.upperBound){
-        this.upperBound.copy(options.upperBound);
-    }
-}
-
-var tmp = new Vec3();
-
-/**
- * Set the AABB bounds from a set of points.
- * @method setFromPoints
- * @param {Array} points An array of Vec3's.
- * @param {Vec3} position
- * @param {Quaternion} quaternion
- * @param {number} skinSize
- * @return {AABB} The self object
- */
-AABB.prototype.setFromPoints = function(points, position, quaternion, skinSize){
-    var l = this.lowerBound,
-        u = this.upperBound,
-        q = quaternion;
-
-    // Set to the first point
-    l.copy(points[0]);
-    if(q){
-        q.vmult(l, l);
-    }
-    u.copy(l);
-
-    for(var i = 1; i<points.length; i++){
-        var p = points[i];
-
-        if(q){
-            q.vmult(p, tmp);
-            p = tmp;
-        }
-
-        if(p.x > u.x){ u.x = p.x; }
-        if(p.x < l.x){ l.x = p.x; }
-        if(p.y > u.y){ u.y = p.y; }
-        if(p.y < l.y){ l.y = p.y; }
-        if(p.z > u.z){ u.z = p.z; }
-        if(p.z < l.z){ l.z = p.z; }
-    }
-
-    // Add offset
-    if (position) {
-        position.vadd(l, l);
-        position.vadd(u, u);
-    }
-
-    if(skinSize){
-        l.x -= skinSize;
-        l.y -= skinSize;
-        l.z -= skinSize;
-        u.x += skinSize;
-        u.y += skinSize;
-        u.z += skinSize;
-    }
-
-    return this;
-};
-
-/**
- * Copy bounds from an AABB to this AABB
- * @method copy
- * @param  {AABB} aabb Source to copy from
- * @return {AABB} The this object, for chainability
- */
-AABB.prototype.copy = function(aabb){
-    this.lowerBound.copy(aabb.lowerBound);
-    this.upperBound.copy(aabb.upperBound);
-    return this;
-};
-
-/**
- * Clone an AABB
- * @method clone
- */
-AABB.prototype.clone = function(){
-    return new AABB().copy(this);
-};
-
-/**
- * Extend this AABB so that it covers the given AABB too.
- * @method extend
- * @param  {AABB} aabb
- */
-AABB.prototype.extend = function(aabb){
-    // Extend lower bound
-    var l = aabb.lowerBound.x;
-    if(this.lowerBound.x > l){
-        this.lowerBound.x = l;
-    }
-
-    // Upper
-    var u = aabb.upperBound.x;
-    if(this.upperBound.x < u){
-        this.upperBound.x = u;
-    }
-
-    // Extend lower bound
-    var l = aabb.lowerBound.y;
-    if(this.lowerBound.y > l){
-        this.lowerBound.y = l;
-    }
-
-    // Upper
-    var u = aabb.upperBound.y;
-    if(this.upperBound.y < u){
-        this.upperBound.y = u;
-    }
-
-    // Extend lower bound
-    var l = aabb.lowerBound.z;
-    if(this.lowerBound.z > l){
-        this.lowerBound.z = l;
-    }
-
-    // Upper
-    var u = aabb.upperBound.z;
-    if(this.upperBound.z < u){
-        this.upperBound.z = u;
-    }
-};
-
-/**
- * Returns true if the given AABB overlaps this AABB.
- * @method overlaps
- * @param  {AABB} aabb
- * @return {Boolean}
- */
-AABB.prototype.overlaps = function(aabb){
-    var l1 = this.lowerBound,
-        u1 = this.upperBound,
-        l2 = aabb.lowerBound,
-        u2 = aabb.upperBound;
-
-    //      l2        u2
-    //      |---------|
-    // |--------|
-    // l1       u1
-
-    return ((l2.x <= u1.x && u1.x <= u2.x) || (l1.x <= u2.x && u2.x <= u1.x)) &&
-           ((l2.y <= u1.y && u1.y <= u2.y) || (l1.y <= u2.y && u2.y <= u1.y)) &&
-           ((l2.z <= u1.z && u1.z <= u2.z) || (l1.z <= u2.z && u2.z <= u1.z));
-};
-
-/**
- * Returns true if the given AABB is fully contained in this AABB.
- * @method contains
- * @param {AABB} aabb
- * @return {Boolean}
- */
-AABB.prototype.contains = function(aabb){
-    var l1 = this.lowerBound,
-        u1 = this.upperBound,
-        l2 = aabb.lowerBound,
-        u2 = aabb.upperBound;
-
-    //      l2        u2
-    //      |---------|
-    // |---------------|
-    // l1              u1
-
-    return (
-        (l1.x <= l2.x && u1.x >= u2.x) &&
-        (l1.y <= l2.y && u1.y >= u2.y) &&
-        (l1.z <= l2.z && u1.z >= u2.z)
-    );
-};
-
-/**
- * @method getCorners
- * @param {Vec3} a
- * @param {Vec3} b
- * @param {Vec3} c
- * @param {Vec3} d
- * @param {Vec3} e
- * @param {Vec3} f
- * @param {Vec3} g
- * @param {Vec3} h
- */
-AABB.prototype.getCorners = function(a, b, c, d, e, f, g, h){
-    var l = this.lowerBound,
-        u = this.upperBound;
-
-    a.copy(l);
-    b.set( u.x, l.y, l.z );
-    c.set( u.x, u.y, l.z );
-    d.set( l.x, u.y, u.z );
-    e.set( u.x, l.y, l.z );
-    f.set( l.x, u.y, l.z );
-    g.set( l.x, l.y, u.z );
-    h.copy(u);
-};
-
-var transformIntoFrame_corners = [
-    new Vec3(),
-    new Vec3(),
-    new Vec3(),
-    new Vec3(),
-    new Vec3(),
-    new Vec3(),
-    new Vec3(),
-    new Vec3()
-];
-
-/**
- * Get the representation of an AABB in another frame.
- * @method toLocalFrame
- * @param  {Transform} frame
- * @param  {AABB} target
- * @return {AABB} The "target" AABB object.
- */
-AABB.prototype.toLocalFrame = function(frame, target){
-
-    var corners = transformIntoFrame_corners;
-    var a = corners[0];
-    var b = corners[1];
-    var c = corners[2];
-    var d = corners[3];
-    var e = corners[4];
-    var f = corners[5];
-    var g = corners[6];
-    var h = corners[7];
-
-    // Get corners in current frame
-    this.getCorners(a, b, c, d, e, f, g, h);
-
-    // Transform them to new local frame
-    for(var i=0; i !== 8; i++){
-        var corner = corners[i];
-        frame.pointToLocal(corner, corner);
-    }
-
-    return target.setFromPoints(corners);
-};
-
-/**
- * Get the representation of an AABB in the global frame.
- * @method toWorldFrame
- * @param  {Transform} frame
- * @param  {AABB} target
- * @return {AABB} The "target" AABB object.
- */
-AABB.prototype.toWorldFrame = function(frame, target){
-
-    var corners = transformIntoFrame_corners;
-    var a = corners[0];
-    var b = corners[1];
-    var c = corners[2];
-    var d = corners[3];
-    var e = corners[4];
-    var f = corners[5];
-    var g = corners[6];
-    var h = corners[7];
-
-    // Get corners in current frame
-    this.getCorners(a, b, c, d, e, f, g, h);
-
-    // Transform them to new local frame
-    for(var i=0; i !== 8; i++){
-        var corner = corners[i];
-        frame.pointToWorld(corner, corner);
-    }
-
-    return target.setFromPoints(corners);
-};
-
-},{"../math/Vec3":30,"../utils/Utils":53}],4:[function(_dereq_,module,exports){
-module.exports = ArrayCollisionMatrix;
-
-/**
- * Collision "matrix". It's actually a triangular-shaped array of whether two bodies are touching this step, for reference next step
- * @class ArrayCollisionMatrix
- * @constructor
- */
-function ArrayCollisionMatrix() {
-
-    /**
-     * The matrix storage
-     * @property matrix
-     * @type {Array}
-     */
-	this.matrix = [];
-}
-
-/**
- * Get an element
- * @method get
- * @param  {Number} i
- * @param  {Number} j
- * @return {Number}
- */
-ArrayCollisionMatrix.prototype.get = function(i, j) {
-	i = i.index;
-	j = j.index;
-    if (j > i) {
-        var temp = j;
-        j = i;
-        i = temp;
-    }
-	return this.matrix[(i*(i + 1)>>1) + j-1];
-};
-
-/**
- * Set an element
- * @method set
- * @param {Number} i
- * @param {Number} j
- * @param {Number} value
- */
-ArrayCollisionMatrix.prototype.set = function(i, j, value) {
-	i = i.index;
-	j = j.index;
-    if (j > i) {
-        var temp = j;
-        j = i;
-        i = temp;
-    }
-	this.matrix[(i*(i + 1)>>1) + j-1] = value ? 1 : 0;
-};
-
-/**
- * Sets all elements to zero
- * @method reset
- */
-ArrayCollisionMatrix.prototype.reset = function() {
-	for (var i=0, l=this.matrix.length; i!==l; i++) {
-		this.matrix[i]=0;
-	}
-};
-
-/**
- * Sets the max number of objects
- * @method setNumObjects
- * @param {Number} n
- */
-ArrayCollisionMatrix.prototype.setNumObjects = function(n) {
-	this.matrix.length = n*(n-1)>>1;
-};
-
-},{}],5:[function(_dereq_,module,exports){
-var Body = _dereq_('../objects/Body');
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var Shape = _dereq_('../shapes/Shape');
-var Plane = _dereq_('../shapes/Plane');
-
-module.exports = Broadphase;
-
-/**
- * Base class for broadphase implementations
- * @class Broadphase
- * @constructor
- * @author schteppe
- */
-function Broadphase(){
-    /**
-    * The world to search for collisions in.
-    * @property world
-    * @type {World}
-    */
-    this.world = null;
-
-    /**
-     * If set to true, the broadphase uses bounding boxes for intersection test, else it uses bounding spheres.
-     * @property useBoundingBoxes
-     * @type {Boolean}
-     */
-    this.useBoundingBoxes = false;
-
-    /**
-     * Set to true if the objects in the world moved.
-     * @property {Boolean} dirty
-     */
-    this.dirty = true;
-}
-
-/**
- * Get the collision pairs from the world
- * @method collisionPairs
- * @param {World} world The world to search in
- * @param {Array} p1 Empty array to be filled with body objects
- * @param {Array} p2 Empty array to be filled with body objects
- */
-Broadphase.prototype.collisionPairs = function(world,p1,p2){
-    throw new Error("collisionPairs not implemented for this BroadPhase class!");
-};
-
-/**
- * Check if a body pair needs to be intersection tested at all.
- * @method needBroadphaseCollision
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @return {bool}
- */
-var Broadphase_needBroadphaseCollision_STATIC_OR_KINEMATIC = Body.STATIC | Body.KINEMATIC;
-Broadphase.prototype.needBroadphaseCollision = function(bodyA,bodyB){
-
-    // Check collision filter masks
-    if( (bodyA.collisionFilterGroup & bodyB.collisionFilterMask)===0 || (bodyB.collisionFilterGroup & bodyA.collisionFilterMask)===0){
-        return false;
-    }
-
-    // Check types
-    if(((bodyA.type & Broadphase_needBroadphaseCollision_STATIC_OR_KINEMATIC)!==0 || bodyA.sleepState === Body.SLEEPING) &&
-       ((bodyB.type & Broadphase_needBroadphaseCollision_STATIC_OR_KINEMATIC)!==0 || bodyB.sleepState === Body.SLEEPING)) {
-        // Both bodies are static, kinematic or sleeping. Skip.
-        return false;
-    }
-
-    return true;
-};
-
-/**
- * Check if the bounding volumes of two bodies intersect.
- * @method intersectionTest
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {array} pairs1
- * @param {array} pairs2
-  */
-Broadphase.prototype.intersectionTest = function(bodyA, bodyB, pairs1, pairs2){
-    if(this.useBoundingBoxes){
-        this.doBoundingBoxBroadphase(bodyA,bodyB,pairs1,pairs2);
-    } else {
-        this.doBoundingSphereBroadphase(bodyA,bodyB,pairs1,pairs2);
-    }
-};
-
-/**
- * Check if the bounding spheres of two bodies are intersecting.
- * @method doBoundingSphereBroadphase
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {Array} pairs1 bodyA is appended to this array if intersection
- * @param {Array} pairs2 bodyB is appended to this array if intersection
- */
-var Broadphase_collisionPairs_r = new Vec3(), // Temp objects
-    Broadphase_collisionPairs_normal =  new Vec3(),
-    Broadphase_collisionPairs_quat =  new Quaternion(),
-    Broadphase_collisionPairs_relpos  =  new Vec3();
-Broadphase.prototype.doBoundingSphereBroadphase = function(bodyA,bodyB,pairs1,pairs2){
-    var r = Broadphase_collisionPairs_r;
-    bodyB.position.vsub(bodyA.position,r);
-    var boundingRadiusSum2 = Math.pow(bodyA.boundingRadius + bodyB.boundingRadius, 2);
-    var norm2 = r.norm2();
-    if(norm2 < boundingRadiusSum2){
-        pairs1.push(bodyA);
-        pairs2.push(bodyB);
-    }
-};
-
-/**
- * Check if the bounding boxes of two bodies are intersecting.
- * @method doBoundingBoxBroadphase
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {Array} pairs1
- * @param {Array} pairs2
- */
-Broadphase.prototype.doBoundingBoxBroadphase = function(bodyA,bodyB,pairs1,pairs2){
-    if(bodyA.aabbNeedsUpdate){
-        bodyA.computeAABB();
-    }
-    if(bodyB.aabbNeedsUpdate){
-        bodyB.computeAABB();
-    }
-
-    // Check AABB / AABB
-    if(bodyA.aabb.overlaps(bodyB.aabb)){
-        pairs1.push(bodyA);
-        pairs2.push(bodyB);
-    }
-};
-
-/**
- * Removes duplicate pairs from the pair arrays.
- * @method makePairsUnique
- * @param {Array} pairs1
- * @param {Array} pairs2
- */
-var Broadphase_makePairsUnique_temp = { keys:[] },
-    Broadphase_makePairsUnique_p1 = [],
-    Broadphase_makePairsUnique_p2 = [];
-Broadphase.prototype.makePairsUnique = function(pairs1,pairs2){
-    var t = Broadphase_makePairsUnique_temp,
-        p1 = Broadphase_makePairsUnique_p1,
-        p2 = Broadphase_makePairsUnique_p2,
-        N = pairs1.length;
-
-    for(var i=0; i!==N; i++){
-        p1[i] = pairs1[i];
-        p2[i] = pairs2[i];
-    }
-
-    pairs1.length = 0;
-    pairs2.length = 0;
-
-    for(var i=0; i!==N; i++){
-        var id1 = p1[i].id,
-            id2 = p2[i].id;
-        var key = id1 < id2 ? id1+","+id2 :  id2+","+id1;
-        t[key] = i;
-        t.keys.push(key);
-    }
-
-    for(var i=0; i!==t.keys.length; i++){
-        var key = t.keys.pop(),
-            pairIndex = t[key];
-        pairs1.push(p1[pairIndex]);
-        pairs2.push(p2[pairIndex]);
-        delete t[key];
-    }
-};
-
-/**
- * To be implemented by subcasses
- * @method setWorld
- * @param {World} world
- */
-Broadphase.prototype.setWorld = function(world){
-};
-
-/**
- * Check if the bounding spheres of two bodies overlap.
- * @method boundingSphereCheck
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @return {boolean}
- */
-var bsc_dist = new Vec3();
-Broadphase.boundingSphereCheck = function(bodyA,bodyB){
-    var dist = bsc_dist;
-    bodyA.position.vsub(bodyB.position,dist);
-    return Math.pow(bodyA.shape.boundingSphereRadius + bodyB.shape.boundingSphereRadius,2) > dist.norm2();
-};
-
-/**
- * Returns all the bodies within the AABB.
- * @method aabbQuery
- * @param  {World} world
- * @param  {AABB} aabb
- * @param  {array} result An array to store resulting bodies in.
- * @return {array}
- */
-Broadphase.prototype.aabbQuery = function(world, aabb, result){
-    console.warn('.aabbQuery is not implemented in this Broadphase subclass.');
-    return [];
-};
-},{"../math/Quaternion":28,"../math/Vec3":30,"../objects/Body":31,"../shapes/Plane":42,"../shapes/Shape":43}],6:[function(_dereq_,module,exports){
-module.exports = GridBroadphase;
-
-var Broadphase = _dereq_('./Broadphase');
-var Vec3 = _dereq_('../math/Vec3');
-var Shape = _dereq_('../shapes/Shape');
-
-/**
- * Axis aligned uniform grid broadphase.
- * @class GridBroadphase
- * @constructor
- * @extends Broadphase
- * @todo Needs support for more than just planes and spheres.
- * @param {Vec3} aabbMin
- * @param {Vec3} aabbMax
- * @param {Number} nx Number of boxes along x
- * @param {Number} ny Number of boxes along y
- * @param {Number} nz Number of boxes along z
- */
-function GridBroadphase(aabbMin,aabbMax,nx,ny,nz){
-    Broadphase.apply(this);
-    this.nx = nx || 10;
-    this.ny = ny || 10;
-    this.nz = nz || 10;
-    this.aabbMin = aabbMin || new Vec3(100,100,100);
-    this.aabbMax = aabbMax || new Vec3(-100,-100,-100);
-	var nbins = this.nx * this.ny * this.nz;
-	if (nbins <= 0) {
-		throw "GridBroadphase: Each dimension's n must be >0";
-	}
-    this.bins = [];
-	this.binLengths = []; //Rather than continually resizing arrays (thrashing the memory), just record length and allow them to grow
-	this.bins.length = nbins;
-	this.binLengths.length = nbins;
-	for (var i=0;i<nbins;i++) {
-		this.bins[i]=[];
-		this.binLengths[i]=0;
-	}
-}
-GridBroadphase.prototype = new Broadphase();
-GridBroadphase.prototype.constructor = GridBroadphase;
-
-/**
- * Get all the collision pairs in the physics world
- * @method collisionPairs
- * @param {World} world
- * @param {Array} pairs1
- * @param {Array} pairs2
- */
-var GridBroadphase_collisionPairs_d = new Vec3();
-var GridBroadphase_collisionPairs_binPos = new Vec3();
-GridBroadphase.prototype.collisionPairs = function(world,pairs1,pairs2){
-    var N = world.numObjects(),
-        bodies = world.bodies;
-
-    var max = this.aabbMax,
-        min = this.aabbMin,
-        nx = this.nx,
-        ny = this.ny,
-        nz = this.nz;
-
-	var xstep = ny*nz;
-	var ystep = nz;
-	var zstep = 1;
-
-    var xmax = max.x,
-        ymax = max.y,
-        zmax = max.z,
-        xmin = min.x,
-        ymin = min.y,
-        zmin = min.z;
-
-    var xmult = nx / (xmax-xmin),
-        ymult = ny / (ymax-ymin),
-        zmult = nz / (zmax-zmin);
-
-    var binsizeX = (xmax - xmin) / nx,
-        binsizeY = (ymax - ymin) / ny,
-        binsizeZ = (zmax - zmin) / nz;
-
-	var binRadius = Math.sqrt(binsizeX*binsizeX + binsizeY*binsizeY + binsizeZ*binsizeZ) * 0.5;
-
-    var types = Shape.types;
-    var SPHERE =            types.SPHERE,
-        PLANE =             types.PLANE,
-        BOX =               types.BOX,
-        COMPOUND =          types.COMPOUND,
-        CONVEXPOLYHEDRON =  types.CONVEXPOLYHEDRON;
-
-    var bins=this.bins,
-		binLengths=this.binLengths,
-        Nbins=this.bins.length;
-
-    // Reset bins
-    for(var i=0; i!==Nbins; i++){
-        binLengths[i] = 0;
-    }
-
-    var ceil = Math.ceil;
-	var min = Math.min;
-	var max = Math.max;
-
-	function addBoxToBins(x0,y0,z0,x1,y1,z1,bi) {
-		var xoff0 = ((x0 - xmin) * xmult)|0,
-			yoff0 = ((y0 - ymin) * ymult)|0,
-			zoff0 = ((z0 - zmin) * zmult)|0,
-			xoff1 = ceil((x1 - xmin) * xmult),
-			yoff1 = ceil((y1 - ymin) * ymult),
-			zoff1 = ceil((z1 - zmin) * zmult);
-
-		if (xoff0 < 0) { xoff0 = 0; } else if (xoff0 >= nx) { xoff0 = nx - 1; }
-		if (yoff0 < 0) { yoff0 = 0; } else if (yoff0 >= ny) { yoff0 = ny - 1; }
-		if (zoff0 < 0) { zoff0 = 0; } else if (zoff0 >= nz) { zoff0 = nz - 1; }
-		if (xoff1 < 0) { xoff1 = 0; } else if (xoff1 >= nx) { xoff1 = nx - 1; }
-		if (yoff1 < 0) { yoff1 = 0; } else if (yoff1 >= ny) { yoff1 = ny - 1; }
-		if (zoff1 < 0) { zoff1 = 0; } else if (zoff1 >= nz) { zoff1 = nz - 1; }
-
-		xoff0 *= xstep;
-		yoff0 *= ystep;
-		zoff0 *= zstep;
-		xoff1 *= xstep;
-		yoff1 *= ystep;
-		zoff1 *= zstep;
-
-		for (var xoff = xoff0; xoff <= xoff1; xoff += xstep) {
-			for (var yoff = yoff0; yoff <= yoff1; yoff += ystep) {
-				for (var zoff = zoff0; zoff <= zoff1; zoff += zstep) {
-					var idx = xoff+yoff+zoff;
-					bins[idx][binLengths[idx]++] = bi;
-				}
-			}
-		}
-	}
-
-    // Put all bodies into the bins
-    for(var i=0; i!==N; i++){
-        var bi = bodies[i];
-        var si = bi.shape;
-
-        switch(si.type){
-        case SPHERE:
-            // Put in bin
-            // check if overlap with other bins
-            var x = bi.position.x,
-                y = bi.position.y,
-                z = bi.position.z;
-            var r = si.radius;
-
-			addBoxToBins(x-r, y-r, z-r, x+r, y+r, z+r, bi);
-            break;
-
-        case PLANE:
-            if(si.worldNormalNeedsUpdate){
-                si.computeWorldNormal(bi.quaternion);
-            }
-            var planeNormal = si.worldNormal;
-
-			//Relative position from origin of plane object to the first bin
-			//Incremented as we iterate through the bins
-			var xreset = xmin + binsizeX*0.5 - bi.position.x,
-				yreset = ymin + binsizeY*0.5 - bi.position.y,
-				zreset = zmin + binsizeZ*0.5 - bi.position.z;
-
-            var d = GridBroadphase_collisionPairs_d;
-			d.set(xreset, yreset, zreset);
-
-			for (var xi = 0, xoff = 0; xi !== nx; xi++, xoff += xstep, d.y = yreset, d.x += binsizeX) {
-				for (var yi = 0, yoff = 0; yi !== ny; yi++, yoff += ystep, d.z = zreset, d.y += binsizeY) {
-					for (var zi = 0, zoff = 0; zi !== nz; zi++, zoff += zstep, d.z += binsizeZ) {
-						if (d.dot(planeNormal) < binRadius) {
-							var idx = xoff + yoff + zoff;
-							bins[idx][binLengths[idx]++] = bi;
-						}
-					}
-				}
-			}
-            break;
-
-        default:
-			if (bi.aabbNeedsUpdate) {
-				bi.computeAABB();
-			}
-
-			addBoxToBins(
-				bi.aabb.lowerBound.x,
-				bi.aabb.lowerBound.y,
-				bi.aabb.lowerBound.z,
-				bi.aabb.upperBound.x,
-				bi.aabb.upperBound.y,
-				bi.aabb.upperBound.z,
-				bi);
-            break;
-        }
-    }
-
-    // Check each bin
-    for(var i=0; i!==Nbins; i++){
-		var binLength = binLengths[i];
-		//Skip bins with no potential collisions
-		if (binLength > 1) {
-			var bin = bins[i];
-
-			// Do N^2 broadphase inside
-			for(var xi=0; xi!==binLength; xi++){
-				var bi = bin[xi];
-				for(var yi=0; yi!==xi; yi++){
-					var bj = bin[yi];
-					if(this.needBroadphaseCollision(bi,bj)){
-						this.intersectionTest(bi,bj,pairs1,pairs2);
-					}
-				}
-			}
-		}
-    }
-
-//	for (var zi = 0, zoff=0; zi < nz; zi++, zoff+= zstep) {
-//		console.log("layer "+zi);
-//		for (var yi = 0, yoff=0; yi < ny; yi++, yoff += ystep) {
-//			var row = '';
-//			for (var xi = 0, xoff=0; xi < nx; xi++, xoff += xstep) {
-//				var idx = xoff + yoff + zoff;
-//				row += ' ' + binLengths[idx];
-//			}
-//			console.log(row);
-//		}
-//	}
-
-    this.makePairsUnique(pairs1,pairs2);
-};
-
-},{"../math/Vec3":30,"../shapes/Shape":43,"./Broadphase":5}],7:[function(_dereq_,module,exports){
-module.exports = NaiveBroadphase;
-
-var Broadphase = _dereq_('./Broadphase');
-var AABB = _dereq_('./AABB');
-
-/**
- * Naive broadphase implementation, used in lack of better ones.
- * @class NaiveBroadphase
- * @constructor
- * @description The naive broadphase looks at all possible pairs without restriction, therefore it has complexity N^2 (which is bad)
- * @extends Broadphase
- */
-function NaiveBroadphase(){
-    Broadphase.apply(this);
-}
-NaiveBroadphase.prototype = new Broadphase();
-NaiveBroadphase.prototype.constructor = NaiveBroadphase;
-
-/**
- * Get all the collision pairs in the physics world
- * @method collisionPairs
- * @param {World} world
- * @param {Array} pairs1
- * @param {Array} pairs2
- */
-NaiveBroadphase.prototype.collisionPairs = function(world,pairs1,pairs2){
-    var bodies = world.bodies,
-        n = bodies.length,
-        i,j,bi,bj;
-
-    // Naive N^2 ftw!
-    for(i=0; i!==n; i++){
-        for(j=0; j!==i; j++){
-
-            bi = bodies[i];
-            bj = bodies[j];
-
-            if(!this.needBroadphaseCollision(bi,bj)){
-                continue;
-            }
-
-            this.intersectionTest(bi,bj,pairs1,pairs2);
-        }
-    }
-};
-
-var tmpAABB = new AABB();
-
-/**
- * Returns all the bodies within an AABB.
- * @method aabbQuery
- * @param  {World} world
- * @param  {AABB} aabb
- * @param {array} result An array to store resulting bodies in.
- * @return {array}
- */
-NaiveBroadphase.prototype.aabbQuery = function(world, aabb, result){
-    result = result || [];
-
-    for(var i = 0; i < world.bodies.length; i++){
-        var b = world.bodies[i];
-
-        if(b.aabbNeedsUpdate){
-            b.computeAABB();
-        }
-
-        // Ugly hack until Body gets aabb
-        if(b.aabb.overlaps(aabb)){
-            result.push(b);
-        }
-    }
-
-    return result;
-};
-},{"./AABB":3,"./Broadphase":5}],8:[function(_dereq_,module,exports){
-module.exports = ObjectCollisionMatrix;
-
-/**
- * Records what objects are colliding with each other
- * @class ObjectCollisionMatrix
- * @constructor
- */
-function ObjectCollisionMatrix() {
-
-    /**
-     * The matrix storage
-     * @property matrix
-     * @type {Object}
-     */
-	this.matrix = {};
-}
-
-/**
- * @method get
- * @param  {Number} i
- * @param  {Number} j
- * @return {Number}
- */
-ObjectCollisionMatrix.prototype.get = function(i, j) {
-	i = i.id;
-	j = j.id;
-    if (j > i) {
-        var temp = j;
-        j = i;
-        i = temp;
-    }
-	return i+'-'+j in this.matrix;
-};
-
-/**
- * @method set
- * @param  {Number} i
- * @param  {Number} j
- * @param {Number} value
- */
-ObjectCollisionMatrix.prototype.set = function(i, j, value) {
-	i = i.id;
-	j = j.id;
-    if (j > i) {
-        var temp = j;
-        j = i;
-        i = temp;
-	}
-	if (value) {
-		this.matrix[i+'-'+j] = true;
-	}
-	else {
-		delete this.matrix[i+'-'+j];
-	}
-};
-
-/**
- * Empty the matrix
- * @method reset
- */
-ObjectCollisionMatrix.prototype.reset = function() {
-	this.matrix = {};
-};
-
-/**
- * Set max number of objects
- * @method setNumObjects
- * @param {Number} n
- */
-ObjectCollisionMatrix.prototype.setNumObjects = function(n) {
-};
-
-},{}],9:[function(_dereq_,module,exports){
-module.exports = Ray;
-
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var Transform = _dereq_('../math/Transform');
-var ConvexPolyhedron = _dereq_('../shapes/ConvexPolyhedron');
-var Box = _dereq_('../shapes/Box');
-var RaycastResult = _dereq_('../collision/RaycastResult');
-var Shape = _dereq_('../shapes/Shape');
-var AABB = _dereq_('../collision/AABB');
-
-/**
- * A line in 3D space that intersects bodies and return points.
- * @class Ray
- * @constructor
- * @param {Vec3} from
- * @param {Vec3} to
- */
-function Ray(from, to){
-    /**
-     * @property {Vec3} from
-     */
-    this.from = from ? from.clone() : new Vec3();
-
-    /**
-     * @property {Vec3} to
-     */
-    this.to = to ? to.clone() : new Vec3();
-
-    /**
-     * @private
-     * @property {Vec3} _direction
-     */
-    this._direction = new Vec3();
-
-    /**
-     * The precision of the ray. Used when checking parallelity etc.
-     * @property {Number} precision
-     */
-    this.precision = 0.0001;
-
-    /**
-     * Set to true if you want the Ray to take .collisionResponse flags into account on bodies and shapes.
-     * @property {Boolean} checkCollisionResponse
-     */
-    this.checkCollisionResponse = true;
-
-    /**
-     * If set to true, the ray skips any hits with normal.dot(rayDirection) < 0.
-     * @property {Boolean} skipBackfaces
-     */
-    this.skipBackfaces = false;
-
-    /**
-     * @property {number} collisionFilterMask
-     * @default -1
-     */
-    this.collisionFilterMask = -1;
-
-    /**
-     * @property {number} collisionFilterGroup
-     * @default -1
-     */
-    this.collisionFilterGroup = -1;
-
-    /**
-     * The intersection mode. Should be Ray.ANY, Ray.ALL or Ray.CLOSEST.
-     * @property {number} mode
-     */
-    this.mode = Ray.ANY;
-
-    /**
-     * Current result object.
-     * @property {RaycastResult} result
-     */
-    this.result = new RaycastResult();
-
-    /**
-     * Will be set to true during intersectWorld() if the ray hit anything.
-     * @property {Boolean} hasHit
-     */
-    this.hasHit = false;
-
-    /**
-     * Current, user-provided result callback. Will be used if mode is Ray.ALL.
-     * @property {Function} callback
-     */
-    this.callback = function(result){};
-}
-Ray.prototype.constructor = Ray;
-
-Ray.CLOSEST = 1;
-Ray.ANY = 2;
-Ray.ALL = 4;
-
-var tmpAABB = new AABB();
-var tmpArray = [];
-
-/**
- * Do itersection against all bodies in the given World.
- * @method intersectWorld
- * @param  {World} world
- * @param  {object} options
- * @return {Boolean} True if the ray hit anything, otherwise false.
- */
-Ray.prototype.intersectWorld = function (world, options) {
-    this.mode = options.mode || Ray.ANY;
-    this.result = options.result || new RaycastResult();
-    this.skipBackfaces = !!options.skipBackfaces;
-    this.collisionFilterMask = typeof(options.collisionFilterMask) !== 'undefined' ? options.collisionFilterMask : -1;
-    this.collisionFilterGroup = typeof(options.collisionFilterGroup) !== 'undefined' ? options.collisionFilterGroup : -1;
-    if(options.from){
-        this.from.copy(options.from);
-    }
-    if(options.to){
-        this.to.copy(options.to);
-    }
-    this.callback = options.callback || function(){};
-    this.hasHit = false;
-
-    this.result.reset();
-    this._updateDirection();
-
-    this.getAABB(tmpAABB);
-    tmpArray.length = 0;
-    world.broadphase.aabbQuery(world, tmpAABB, tmpArray);
-    this.intersectBodies(tmpArray);
-
-    return this.hasHit;
-};
-
-var v1 = new Vec3(),
-    v2 = new Vec3();
-
-/*
- * As per "Barycentric Technique" as named here http://www.blackpawn.com/texts/pointinpoly/default.html But without the division
- */
-Ray.pointInTriangle = pointInTriangle;
-function pointInTriangle(p, a, b, c) {
-    c.vsub(a,v0);
-    b.vsub(a,v1);
-    p.vsub(a,v2);
-
-    var dot00 = v0.dot( v0 );
-    var dot01 = v0.dot( v1 );
-    var dot02 = v0.dot( v2 );
-    var dot11 = v1.dot( v1 );
-    var dot12 = v1.dot( v2 );
-
-    var u,v;
-
-    return  ( (u = dot11 * dot02 - dot01 * dot12) >= 0 ) &&
-            ( (v = dot00 * dot12 - dot01 * dot02) >= 0 ) &&
-            ( u + v < ( dot00 * dot11 - dot01 * dot01 ) );
-}
-
-/**
- * Shoot a ray at a body, get back information about the hit.
- * @method intersectBody
- * @private
- * @param {Body} body
- * @param {RaycastResult} [result] Deprecated - set the result property of the Ray instead.
- */
-var intersectBody_xi = new Vec3();
-var intersectBody_qi = new Quaternion();
-Ray.prototype.intersectBody = function (body, result) {
-    if(result){
-        this.result = result;
-        this._updateDirection();
-    }
-    var checkCollisionResponse = this.checkCollisionResponse;
-
-    if(checkCollisionResponse && !body.collisionResponse){
-        return;
-    }
-
-    if((this.collisionFilterGroup & body.collisionFilterMask)===0 || (body.collisionFilterGroup & this.collisionFilterMask)===0){
-        return;
-    }
-
-    var xi = intersectBody_xi;
-    var qi = intersectBody_qi;
-
-    for (var i = 0, N = body.shapes.length; i < N; i++) {
-        var shape = body.shapes[i];
-
-        if(checkCollisionResponse && !shape.collisionResponse){
-            continue; // Skip
-        }
-
-        body.quaternion.mult(body.shapeOrientations[i], qi);
-        body.quaternion.vmult(body.shapeOffsets[i], xi);
-        xi.vadd(body.position, xi);
-
-        this.intersectShape(
-            shape,
-            qi,
-            xi,
-            body
-        );
-
-        if(this.result._shouldStop){
-            break;
-        }
-    }
-};
-
-/**
- * @method intersectBodies
- * @param {Array} bodies An array of Body objects.
- * @param {RaycastResult} [result] Deprecated
- */
-Ray.prototype.intersectBodies = function (bodies, result) {
-    if(result){
-        this.result = result;
-        this._updateDirection();
-    }
-
-    for ( var i = 0, l = bodies.length; !this.result._shouldStop && i < l; i ++ ) {
-        this.intersectBody(bodies[i]);
-    }
-};
-
-/**
- * Updates the _direction vector.
- * @private
- * @method _updateDirection
- */
-Ray.prototype._updateDirection = function(){
-    this.to.vsub(this.from, this._direction);
-    this._direction.normalize();
-};
-
-/**
- * @method intersectShape
- * @private
- * @param {Shape} shape
- * @param {Quaternion} quat
- * @param {Vec3} position
- * @param {Body} body
- */
-Ray.prototype.intersectShape = function(shape, quat, position, body){
-    var from = this.from;
-
-
-    // Checking boundingSphere
-    var distance = distanceFromIntersection(from, this._direction, position);
-    if ( distance > shape.boundingSphereRadius ) {
-        return;
-    }
-
-    var intersectMethod = this[shape.type];
-    if(intersectMethod){
-        intersectMethod.call(this, shape, quat, position, body);
-    }
-};
-
-var vector = new Vec3();
-var normal = new Vec3();
-var intersectPoint = new Vec3();
-
-var a = new Vec3();
-var b = new Vec3();
-var c = new Vec3();
-var d = new Vec3();
-
-var tmpRaycastResult = new RaycastResult();
-
-/**
- * @method intersectBox
- * @private
- * @param  {Shape} shape
- * @param  {Quaternion} quat
- * @param  {Vec3} position
- * @param  {Body} body
- */
-Ray.prototype.intersectBox = function(shape, quat, position, body){
-    return this.intersectConvex(shape.convexPolyhedronRepresentation, quat, position, body);
-};
-Ray.prototype[Shape.types.BOX] = Ray.prototype.intersectBox;
-
-/**
- * @method intersectPlane
- * @private
- * @param  {Shape} shape
- * @param  {Quaternion} quat
- * @param  {Vec3} position
- * @param  {Body} body
- */
-Ray.prototype.intersectPlane = function(shape, quat, position, body){
-    var from = this.from;
-    var to = this.to;
-    var direction = this._direction;
-
-    // Get plane normal
-    var worldNormal = new Vec3(0, 0, 1);
-    quat.vmult(worldNormal, worldNormal);
-
-    var len = new Vec3();
-    from.vsub(position, len);
-    var planeToFrom = len.dot(worldNormal);
-    to.vsub(position, len);
-    var planeToTo = len.dot(worldNormal);
-
-    if(planeToFrom * planeToTo > 0){
-        // "from" and "to" are on the same side of the plane... bail out
-        return;
-    }
-
-    if(from.distanceTo(to) < planeToFrom){
-        return;
-    }
-
-    var n_dot_dir = worldNormal.dot(direction);
-
-    if (Math.abs(n_dot_dir) < this.precision) {
-        // No intersection
-        return;
-    }
-
-    var planePointToFrom = new Vec3();
-    var dir_scaled_with_t = new Vec3();
-    var hitPointWorld = new Vec3();
-
-    from.vsub(position, planePointToFrom);
-    var t = -worldNormal.dot(planePointToFrom) / n_dot_dir;
-    direction.scale(t, dir_scaled_with_t);
-    from.vadd(dir_scaled_with_t, hitPointWorld);
-
-    this.reportIntersection(worldNormal, hitPointWorld, shape, body, -1);
-};
-Ray.prototype[Shape.types.PLANE] = Ray.prototype.intersectPlane;
-
-/**
- * Get the world AABB of the ray.
- * @method getAABB
- * @param  {AABB} aabb
- */
-Ray.prototype.getAABB = function(result){
-    var to = this.to;
-    var from = this.from;
-    result.lowerBound.x = Math.min(to.x, from.x);
-    result.lowerBound.y = Math.min(to.y, from.y);
-    result.lowerBound.z = Math.min(to.z, from.z);
-    result.upperBound.x = Math.max(to.x, from.x);
-    result.upperBound.y = Math.max(to.y, from.y);
-    result.upperBound.z = Math.max(to.z, from.z);
-};
-
-var intersectConvexOptions = {
-    faceList: [0]
-};
-
-/**
- * @method intersectHeightfield
- * @private
- * @param  {Shape} shape
- * @param  {Quaternion} quat
- * @param  {Vec3} position
- * @param  {Body} body
- */
-Ray.prototype.intersectHeightfield = function(shape, quat, position, body){
-    var data = shape.data,
-        w = shape.elementSize,
-        worldPillarOffset = new Vec3();
-
-    // Convert the ray to local heightfield coordinates
-    var localRay = new Ray(this.from, this.to);
-    Transform.pointToLocalFrame(position, quat, localRay.from, localRay.from);
-    Transform.pointToLocalFrame(position, quat, localRay.to, localRay.to);
-
-    // Get the index of the data points to test against
-    var index = [];
-    var iMinX = null;
-    var iMinY = null;
-    var iMaxX = null;
-    var iMaxY = null;
-
-    var inside = shape.getIndexOfPosition(localRay.from.x, localRay.from.y, index, false);
-    if(inside){
-        iMinX = index[0];
-        iMinY = index[1];
-        iMaxX = index[0];
-        iMaxY = index[1];
-    }
-    inside = shape.getIndexOfPosition(localRay.to.x, localRay.to.y, index, false);
-    if(inside){
-        if (iMinX === null || index[0] < iMinX) { iMinX = index[0]; }
-        if (iMaxX === null || index[0] > iMaxX) { iMaxX = index[0]; }
-        if (iMinY === null || index[1] < iMinY) { iMinY = index[1]; }
-        if (iMaxY === null || index[1] > iMaxY) { iMaxY = index[1]; }
-    }
-
-    if(iMinX === null){
-        return;
-    }
-
-    var minMax = [];
-    shape.getRectMinMax(iMinX, iMinY, iMaxX, iMaxY, minMax);
-    var min = minMax[0];
-    var max = minMax[1];
-
-    // // Bail out if the ray can't touch the bounding box
-    // // TODO
-    // var aabb = new AABB();
-    // this.getAABB(aabb);
-    // if(aabb.intersects()){
-    //     return;
-    // }
-
-    for(var i = iMinX; i <= iMaxX; i++){
-        for(var j = iMinY; j <= iMaxY; j++){
-
-            if(this.result._shouldStop){
-                return;
-            }
-
-            // Lower triangle
-            shape.getConvexTrianglePillar(i, j, false);
-            Transform.pointToWorldFrame(position, quat, shape.pillarOffset, worldPillarOffset);
-            this.intersectConvex(shape.pillarConvex, quat, worldPillarOffset, body, intersectConvexOptions);
-
-            if(this.result._shouldStop){
-                return;
-            }
-
-            // Upper triangle
-            shape.getConvexTrianglePillar(i, j, true);
-            Transform.pointToWorldFrame(position, quat, shape.pillarOffset, worldPillarOffset);
-            this.intersectConvex(shape.pillarConvex, quat, worldPillarOffset, body, intersectConvexOptions);
-        }
-    }
-};
-Ray.prototype[Shape.types.HEIGHTFIELD] = Ray.prototype.intersectHeightfield;
-
-var Ray_intersectSphere_intersectionPoint = new Vec3();
-var Ray_intersectSphere_normal = new Vec3();
-
-/**
- * @method intersectSphere
- * @private
- * @param  {Shape} shape
- * @param  {Quaternion} quat
- * @param  {Vec3} position
- * @param  {Body} body
- */
-Ray.prototype.intersectSphere = function(shape, quat, position, body){
-    var from = this.from,
-        to = this.to,
-        r = shape.radius;
-
-    var a = Math.pow(to.x - from.x, 2) + Math.pow(to.y - from.y, 2) + Math.pow(to.z - from.z, 2);
-    var b = 2 * ((to.x - from.x) * (from.x - position.x) + (to.y - from.y) * (from.y - position.y) + (to.z - from.z) * (from.z - position.z));
-    var c = Math.pow(from.x - position.x, 2) + Math.pow(from.y - position.y, 2) + Math.pow(from.z - position.z, 2) - Math.pow(r, 2);
-
-    var delta = Math.pow(b, 2) - 4 * a * c;
-
-    var intersectionPoint = Ray_intersectSphere_intersectionPoint;
-    var normal = Ray_intersectSphere_normal;
-
-    if(delta < 0){
-        // No intersection
-        return;
-
-    } else if(delta === 0){
-        // single intersection point
-        from.lerp(to, delta, intersectionPoint);
-
-        intersectionPoint.vsub(position, normal);
-        normal.normalize();
-
-        this.reportIntersection(normal, intersectionPoint, shape, body, -1);
-
-    } else {
-        var d1 = (- b - Math.sqrt(delta)) / (2 * a);
-        var d2 = (- b + Math.sqrt(delta)) / (2 * a);
-
-        if(d1 >= 0 && d1 <= 1){
-            from.lerp(to, d1, intersectionPoint);
-            intersectionPoint.vsub(position, normal);
-            normal.normalize();
-            this.reportIntersection(normal, intersectionPoint, shape, body, -1);
-        }
-
-        if(this.result._shouldStop){
-            return;
-        }
-
-        if(d2 >= 0 && d2 <= 1){
-            from.lerp(to, d2, intersectionPoint);
-            intersectionPoint.vsub(position, normal);
-            normal.normalize();
-            this.reportIntersection(normal, intersectionPoint, shape, body, -1);
-        }
-    }
-};
-Ray.prototype[Shape.types.SPHERE] = Ray.prototype.intersectSphere;
-
-
-var intersectConvex_normal = new Vec3();
-var intersectConvex_minDistNormal = new Vec3();
-var intersectConvex_minDistIntersect = new Vec3();
-var intersectConvex_vector = new Vec3();
-
-/**
- * @method intersectConvex
- * @private
- * @param  {Shape} shape
- * @param  {Quaternion} quat
- * @param  {Vec3} position
- * @param  {Body} body
- * @param {object} [options]
- * @param {array} [options.faceList]
- */
-Ray.prototype.intersectConvex = function intersectConvex(
-    shape,
-    quat,
-    position,
-    body,
-    options
-){
-    var minDistNormal = intersectConvex_minDistNormal;
-    var normal = intersectConvex_normal;
-    var vector = intersectConvex_vector;
-    var minDistIntersect = intersectConvex_minDistIntersect;
-    var faceList = (options && options.faceList) || null;
-
-    // Checking faces
-    var faces = shape.faces,
-        vertices = shape.vertices,
-        normals = shape.faceNormals;
-    var direction = this._direction;
-
-    var from = this.from;
-    var to = this.to;
-    var fromToDistance = from.distanceTo(to);
-
-    var minDist = -1;
-    var Nfaces = faceList ? faceList.length : faces.length;
-    var result = this.result;
-
-    for (var j = 0; !result._shouldStop && j < Nfaces; j++) {
-        var fi = faceList ? faceList[j] : j;
-
-        var face = faces[fi];
-        var faceNormal = normals[fi];
-        var q = quat;
-        var x = position;
-
-        // determine if ray intersects the plane of the face
-        // note: this works regardless of the direction of the face normal
-
-        // Get plane point in world coordinates...
-        vector.copy(vertices[face[0]]);
-        q.vmult(vector,vector);
-        vector.vadd(x,vector);
-
-        // ...but make it relative to the ray from. We'll fix this later.
-        vector.vsub(from,vector);
-
-        // Get plane normal
-        q.vmult(faceNormal,normal);
-
-        // If this dot product is negative, we have something interesting
-        var dot = direction.dot(normal);
-
-        // Bail out if ray and plane are parallel
-        if ( Math.abs( dot ) < this.precision ){
-            continue;
-        }
-
-        // calc distance to plane
-        var scalar = normal.dot(vector) / dot;
-
-        // if negative distance, then plane is behind ray
-        if (scalar < 0){
-            continue;
-        }
-
-        // if (dot < 0) {
-
-        // Intersection point is from + direction * scalar
-        direction.mult(scalar,intersectPoint);
-        intersectPoint.vadd(from,intersectPoint);
-
-        // a is the point we compare points b and c with.
-        a.copy(vertices[face[0]]);
-        q.vmult(a,a);
-        x.vadd(a,a);
-
-        for(var i = 1; !result._shouldStop && i < face.length - 1; i++){
-            // Transform 3 vertices to world coords
-            b.copy(vertices[face[i]]);
-            c.copy(vertices[face[i+1]]);
-            q.vmult(b,b);
-            q.vmult(c,c);
-            x.vadd(b,b);
-            x.vadd(c,c);
-
-            var distance = intersectPoint.distanceTo(from);
-
-            if(!(pointInTriangle(intersectPoint, a, b, c) || pointInTriangle(intersectPoint, b, a, c)) || distance > fromToDistance){
-                continue;
-            }
-
-            this.reportIntersection(normal, intersectPoint, shape, body, fi);
-        }
-        // }
-    }
-};
-Ray.prototype[Shape.types.CONVEXPOLYHEDRON] = Ray.prototype.intersectConvex;
-
-var intersectTrimesh_normal = new Vec3();
-var intersectTrimesh_localDirection = new Vec3();
-var intersectTrimesh_localFrom = new Vec3();
-var intersectTrimesh_localTo = new Vec3();
-var intersectTrimesh_worldNormal = new Vec3();
-var intersectTrimesh_worldIntersectPoint = new Vec3();
-var intersectTrimesh_localAABB = new AABB();
-var intersectTrimesh_triangles = [];
-var intersectTrimesh_treeTransform = new Transform();
-
-/**
- * @method intersectTrimesh
- * @private
- * @param  {Shape} shape
- * @param  {Quaternion} quat
- * @param  {Vec3} position
- * @param  {Body} body
- * @param {object} [options]
- * @todo Optimize by transforming the world to local space first.
- * @todo Use Octree lookup
- */
-Ray.prototype.intersectTrimesh = function intersectTrimesh(
-    mesh,
-    quat,
-    position,
-    body,
-    options
-){
-    var normal = intersectTrimesh_normal;
-    var triangles = intersectTrimesh_triangles;
-    var treeTransform = intersectTrimesh_treeTransform;
-    var minDistNormal = intersectConvex_minDistNormal;
-    var vector = intersectConvex_vector;
-    var minDistIntersect = intersectConvex_minDistIntersect;
-    var localAABB = intersectTrimesh_localAABB;
-    var localDirection = intersectTrimesh_localDirection;
-    var localFrom = intersectTrimesh_localFrom;
-    var localTo = intersectTrimesh_localTo;
-    var worldIntersectPoint = intersectTrimesh_worldIntersectPoint;
-    var worldNormal = intersectTrimesh_worldNormal;
-    var faceList = (options && options.faceList) || null;
-
-    // Checking faces
-    var indices = mesh.indices,
-        vertices = mesh.vertices,
-        normals = mesh.faceNormals;
-
-    var from = this.from;
-    var to = this.to;
-    var direction = this._direction;
-
-    var minDist = -1;
-    treeTransform.position.copy(position);
-    treeTransform.quaternion.copy(quat);
-
-    // Transform ray to local space!
-    Transform.vectorToLocalFrame(position, quat, direction, localDirection);
-    //body.vectorToLocalFrame(direction, localDirection);
-    Transform.pointToLocalFrame(position, quat, from, localFrom);
-    //body.pointToLocalFrame(from, localFrom);
-    Transform.pointToLocalFrame(position, quat, to, localTo);
-    //body.pointToLocalFrame(to, localTo);
-    var fromToDistanceSquared = localFrom.distanceSquared(localTo);
-
-    mesh.tree.rayQuery(this, treeTransform, triangles);
-
-    for (var i = 0, N = triangles.length; !this.result._shouldStop && i !== N; i++) {
-        var trianglesIndex = triangles[i];
-
-        mesh.getNormal(trianglesIndex, normal);
-
-        // determine if ray intersects the plane of the face
-        // note: this works regardless of the direction of the face normal
-
-        // Get plane point in world coordinates...
-        mesh.getVertex(indices[trianglesIndex * 3], a);
-
-        // ...but make it relative to the ray from. We'll fix this later.
-        a.vsub(localFrom,vector);
-
-        // Get plane normal
-        // quat.vmult(normal, normal);
-
-        // If this dot product is negative, we have something interesting
-        var dot = localDirection.dot(normal);
-
-        // Bail out if ray and plane are parallel
-        // if (Math.abs( dot ) < this.precision){
-        //     continue;
-        // }
-
-        // calc distance to plane
-        var scalar = normal.dot(vector) / dot;
-
-        // if negative distance, then plane is behind ray
-        if (scalar < 0){
-            continue;
-        }
-
-        // Intersection point is from + direction * scalar
-        localDirection.scale(scalar,intersectPoint);
-        intersectPoint.vadd(localFrom,intersectPoint);
-
-        // Get triangle vertices
-        mesh.getVertex(indices[trianglesIndex * 3 + 1], b);
-        mesh.getVertex(indices[trianglesIndex * 3 + 2], c);
-
-        var squaredDistance = intersectPoint.distanceSquared(localFrom);
-
-        if(!(pointInTriangle(intersectPoint, b, a, c) || pointInTriangle(intersectPoint, a, b, c)) || squaredDistance > fromToDistanceSquared){
-            continue;
-        }
-
-        // transform intersectpoint and normal to world
-        Transform.vectorToWorldFrame(quat, normal, worldNormal);
-        //body.vectorToWorldFrame(normal, worldNormal);
-        Transform.pointToWorldFrame(position, quat, intersectPoint, worldIntersectPoint);
-        //body.pointToWorldFrame(intersectPoint, worldIntersectPoint);
-        this.reportIntersection(worldNormal, worldIntersectPoint, mesh, body, trianglesIndex);
-    }
-    triangles.length = 0;
-};
-Ray.prototype[Shape.types.TRIMESH] = Ray.prototype.intersectTrimesh;
-
-
-/**
- * @method reportIntersection
- * @private
- * @param  {Vec3} normal
- * @param  {Vec3} hitPointWorld
- * @param  {Shape} shape
- * @param  {Body} body
- * @return {boolean} True if the intersections should continue
- */
-Ray.prototype.reportIntersection = function(normal, hitPointWorld, shape, body, hitFaceIndex){
-    var from = this.from;
-    var to = this.to;
-    var distance = from.distanceTo(hitPointWorld);
-    var result = this.result;
-
-    // Skip back faces?
-    if(this.skipBackfaces && normal.dot(this._direction) > 0){
-        return;
-    }
-
-    result.hitFaceIndex = typeof(hitFaceIndex) !== 'undefined' ? hitFaceIndex : -1;
-
-    switch(this.mode){
-    case Ray.ALL:
-        this.hasHit = true;
-        result.set(
-            from,
-            to,
-            normal,
-            hitPointWorld,
-            shape,
-            body,
-            distance
-        );
-        result.hasHit = true;
-        this.callback(result);
-        break;
-
-    case Ray.CLOSEST:
-
-        // Store if closer than current closest
-        if(distance < result.distance || !result.hasHit){
-            this.hasHit = true;
-            result.hasHit = true;
-            result.set(
-                from,
-                to,
-                normal,
-                hitPointWorld,
-                shape,
-                body,
-                distance
-            );
-        }
-        break;
-
-    case Ray.ANY:
-
-        // Report and stop.
-        this.hasHit = true;
-        result.hasHit = true;
-        result.set(
-            from,
-            to,
-            normal,
-            hitPointWorld,
-            shape,
-            body,
-            distance
-        );
-        result._shouldStop = true;
-        break;
-    }
-};
-
-var v0 = new Vec3(),
-    intersect = new Vec3();
-function distanceFromIntersection(from, direction, position) {
-
-    // v0 is vector from from to position
-    position.vsub(from,v0);
-    var dot = v0.dot(direction);
-
-    // intersect = direction*dot + from
-    direction.mult(dot,intersect);
-    intersect.vadd(from,intersect);
-
-    var distance = position.distanceTo(intersect);
-
-    return distance;
-}
-
-
-},{"../collision/AABB":3,"../collision/RaycastResult":10,"../math/Quaternion":28,"../math/Transform":29,"../math/Vec3":30,"../shapes/Box":37,"../shapes/ConvexPolyhedron":38,"../shapes/Shape":43}],10:[function(_dereq_,module,exports){
-var Vec3 = _dereq_('../math/Vec3');
-
-module.exports = RaycastResult;
-
-/**
- * Storage for Ray casting data.
- * @class RaycastResult
- * @constructor
- */
-function RaycastResult(){
-
-	/**
-	 * @property {Vec3} rayFromWorld
-	 */
-	this.rayFromWorld = new Vec3();
-
-	/**
-	 * @property {Vec3} rayToWorld
-	 */
-	this.rayToWorld = new Vec3();
-
-	/**
-	 * @property {Vec3} hitNormalWorld
-	 */
-	this.hitNormalWorld = new Vec3();
-
-	/**
-	 * @property {Vec3} hitPointWorld
-	 */
-	this.hitPointWorld = new Vec3();
-
-	/**
-	 * @property {boolean} hasHit
-	 */
-	this.hasHit = false;
-
-	/**
-	 * The hit shape, or null.
-	 * @property {Shape} shape
-	 */
-	this.shape = null;
-
-	/**
-	 * The hit body, or null.
-	 * @property {Body} body
-	 */
-	this.body = null;
-
-	/**
-	 * The index of the hit triangle, if the hit shape was a trimesh.
-	 * @property {number} hitFaceIndex
-	 * @default -1
-	 */
-	this.hitFaceIndex = -1;
-
-	/**
-	 * Distance to the hit. Will be set to -1 if there was no hit.
-	 * @property {number} distance
-	 * @default -1
-	 */
-	this.distance = -1;
-
-	/**
-	 * If the ray should stop traversing the bodies.
-	 * @private
-	 * @property {Boolean} _shouldStop
-	 * @default false
-	 */
-	this._shouldStop = false;
-}
-
-/**
- * Reset all result data.
- * @method reset
- */
-RaycastResult.prototype.reset = function () {
-	this.rayFromWorld.setZero();
-	this.rayToWorld.setZero();
-	this.hitNormalWorld.setZero();
-	this.hitPointWorld.setZero();
-	this.hasHit = false;
-	this.shape = null;
-	this.body = null;
-	this.hitFaceIndex = -1;
-	this.distance = -1;
-	this._shouldStop = false;
-};
-
-/**
- * @method abort
- */
-RaycastResult.prototype.abort = function(){
-	this._shouldStop = true;
-};
-
-/**
- * @method set
- * @param {Vec3} rayFromWorld
- * @param {Vec3} rayToWorld
- * @param {Vec3} hitNormalWorld
- * @param {Vec3} hitPointWorld
- * @param {Shape} shape
- * @param {Body} body
- * @param {number} distance
- */
-RaycastResult.prototype.set = function(
-	rayFromWorld,
-	rayToWorld,
-	hitNormalWorld,
-	hitPointWorld,
-	shape,
-	body,
-	distance
-){
-	this.rayFromWorld.copy(rayFromWorld);
-	this.rayToWorld.copy(rayToWorld);
-	this.hitNormalWorld.copy(hitNormalWorld);
-	this.hitPointWorld.copy(hitPointWorld);
-	this.shape = shape;
-	this.body = body;
-	this.distance = distance;
-};
-},{"../math/Vec3":30}],11:[function(_dereq_,module,exports){
-var Shape = _dereq_('../shapes/Shape');
-var Broadphase = _dereq_('../collision/Broadphase');
-
-module.exports = SAPBroadphase;
-
-/**
- * Sweep and prune broadphase along one axis.
- *
- * @class SAPBroadphase
- * @constructor
- * @param {World} [world]
- * @extends Broadphase
- */
-function SAPBroadphase(world){
-    Broadphase.apply(this);
-
-    /**
-     * List of bodies currently in the broadphase.
-     * @property axisList
-     * @type {Array}
-     */
-    this.axisList = [];
-
-    /**
-     * The world to search in.
-     * @property world
-     * @type {World}
-     */
-    this.world = null;
-
-    /**
-     * Axis to sort the bodies along. Set to 0 for x axis, and 1 for y axis. For best performance, choose an axis that the bodies are spread out more on.
-     * @property axisIndex
-     * @type {Number}
-     */
-    this.axisIndex = 0;
-
-    var axisList = this.axisList;
-
-    this._addBodyHandler = function(e){
-        axisList.push(e.body);
-    };
-
-    this._removeBodyHandler = function(e){
-        var idx = axisList.indexOf(e.body);
-        if(idx !== -1){
-            axisList.splice(idx,1);
-        }
-    };
-
-    if(world){
-        this.setWorld(world);
-    }
-}
-SAPBroadphase.prototype = new Broadphase();
-
-/**
- * Change the world
- * @method setWorld
- * @param  {World} world
- */
-SAPBroadphase.prototype.setWorld = function(world){
-    // Clear the old axis array
-    this.axisList.length = 0;
-
-    // Add all bodies from the new world
-    for(var i=0; i<world.bodies.length; i++){
-        this.axisList.push(world.bodies[i]);
-    }
-
-    // Remove old handlers, if any
-    world.removeEventListener("addBody", this._addBodyHandler);
-    world.removeEventListener("removeBody", this._removeBodyHandler);
-
-    // Add handlers to update the list of bodies.
-    world.addEventListener("addBody", this._addBodyHandler);
-    world.addEventListener("removeBody", this._removeBodyHandler);
-
-    this.world = world;
-    this.dirty = true;
-};
-
-/**
- * @static
- * @method insertionSortX
- * @param  {Array} a
- * @return {Array}
- */
-SAPBroadphase.insertionSortX = function(a) {
-    for(var i=1,l=a.length;i<l;i++) {
-        var v = a[i];
-        for(var j=i - 1;j>=0;j--) {
-            if(a[j].aabb.lowerBound.x <= v.aabb.lowerBound.x){
-                break;
-            }
-            a[j+1] = a[j];
-        }
-        a[j+1] = v;
-    }
-    return a;
-};
-
-/**
- * @static
- * @method insertionSortY
- * @param  {Array} a
- * @return {Array}
- */
-SAPBroadphase.insertionSortY = function(a) {
-    for(var i=1,l=a.length;i<l;i++) {
-        var v = a[i];
-        for(var j=i - 1;j>=0;j--) {
-            if(a[j].aabb.lowerBound.y <= v.aabb.lowerBound.y){
-                break;
-            }
-            a[j+1] = a[j];
-        }
-        a[j+1] = v;
-    }
-    return a;
-};
-
-/**
- * @static
- * @method insertionSortZ
- * @param  {Array} a
- * @return {Array}
- */
-SAPBroadphase.insertionSortZ = function(a) {
-    for(var i=1,l=a.length;i<l;i++) {
-        var v = a[i];
-        for(var j=i - 1;j>=0;j--) {
-            if(a[j].aabb.lowerBound.z <= v.aabb.lowerBound.z){
-                break;
-            }
-            a[j+1] = a[j];
-        }
-        a[j+1] = v;
-    }
-    return a;
-};
-
-/**
- * Collect all collision pairs
- * @method collisionPairs
- * @param  {World} world
- * @param  {Array} p1
- * @param  {Array} p2
- */
-SAPBroadphase.prototype.collisionPairs = function(world,p1,p2){
-    var bodies = this.axisList,
-        N = bodies.length,
-        axisIndex = this.axisIndex,
-        i, j;
-
-    if(this.dirty){
-        this.sortList();
-        this.dirty = false;
-    }
-
-    // Look through the list
-    for(i=0; i !== N; i++){
-        var bi = bodies[i];
-
-        for(j=i+1; j < N; j++){
-            var bj = bodies[j];
-
-            if(!this.needBroadphaseCollision(bi,bj)){
-                continue;
-            }
-
-            if(!SAPBroadphase.checkBounds(bi,bj,axisIndex)){
-                break;
-            }
-
-            this.intersectionTest(bi,bj,p1,p2);
-        }
-    }
-};
-
-SAPBroadphase.prototype.sortList = function(){
-    var axisList = this.axisList;
-    var axisIndex = this.axisIndex;
-    var N = axisList.length;
-
-    // Update AABBs
-    for(var i = 0; i!==N; i++){
-        var bi = axisList[i];
-        if(bi.aabbNeedsUpdate){
-            bi.computeAABB();
-        }
-    }
-
-    // Sort the list
-    if(axisIndex === 0){
-        SAPBroadphase.insertionSortX(axisList);
-    } else if(axisIndex === 1){
-        SAPBroadphase.insertionSortY(axisList);
-    } else if(axisIndex === 2){
-        SAPBroadphase.insertionSortZ(axisList);
-    }
-};
-
-/**
- * Check if the bounds of two bodies overlap, along the given SAP axis.
- * @static
- * @method checkBounds
- * @param  {Body} bi
- * @param  {Body} bj
- * @param  {Number} axisIndex
- * @return {Boolean}
- */
-SAPBroadphase.checkBounds = function(bi, bj, axisIndex){
-    var biPos;
-    var bjPos;
-
-    if(axisIndex === 0){
-        biPos = bi.position.x;
-        bjPos = bj.position.x;
-    } else if(axisIndex === 1){
-        biPos = bi.position.y;
-        bjPos = bj.position.y;
-    } else if(axisIndex === 2){
-        biPos = bi.position.z;
-        bjPos = bj.position.z;
-    }
-
-    var ri = bi.boundingRadius,
-        rj = bj.boundingRadius,
-        boundA1 = biPos - ri,
-        boundA2 = biPos + ri,
-        boundB1 = bjPos - rj,
-        boundB2 = bjPos + rj;
-
-    return boundB1 < boundA2;
-};
-
-/**
- * Computes the variance of the body positions and estimates the best
- * axis to use. Will automatically set property .axisIndex.
- * @method autoDetectAxis
- */
-SAPBroadphase.prototype.autoDetectAxis = function(){
-    var sumX=0,
-        sumX2=0,
-        sumY=0,
-        sumY2=0,
-        sumZ=0,
-        sumZ2=0,
-        bodies = this.axisList,
-        N = bodies.length,
-        invN=1/N;
-
-    for(var i=0; i!==N; i++){
-        var b = bodies[i];
-
-        var centerX = b.position.x;
-        sumX += centerX;
-        sumX2 += centerX*centerX;
-
-        var centerY = b.position.y;
-        sumY += centerY;
-        sumY2 += centerY*centerY;
-
-        var centerZ = b.position.z;
-        sumZ += centerZ;
-        sumZ2 += centerZ*centerZ;
-    }
-
-    var varianceX = sumX2 - sumX*sumX*invN,
-        varianceY = sumY2 - sumY*sumY*invN,
-        varianceZ = sumZ2 - sumZ*sumZ*invN;
-
-    if(varianceX > varianceY){
-        if(varianceX > varianceZ){
-            this.axisIndex = 0;
-        } else{
-            this.axisIndex = 2;
-        }
-    } else if(varianceY > varianceZ){
-        this.axisIndex = 1;
-    } else{
-        this.axisIndex = 2;
-    }
-};
-
-/**
- * Returns all the bodies within an AABB.
- * @method aabbQuery
- * @param  {World} world
- * @param  {AABB} aabb
- * @param {array} result An array to store resulting bodies in.
- * @return {array}
- */
-SAPBroadphase.prototype.aabbQuery = function(world, aabb, result){
-    result = result || [];
-
-    if(this.dirty){
-        this.sortList();
-        this.dirty = false;
-    }
-
-    var axisIndex = this.axisIndex, axis = 'x';
-    if(axisIndex === 1){ axis = 'y'; }
-    if(axisIndex === 2){ axis = 'z'; }
-
-    var axisList = this.axisList;
-    var lower = aabb.lowerBound[axis];
-    var upper = aabb.upperBound[axis];
-    for(var i = 0; i < axisList.length; i++){
-        var b = axisList[i];
-
-        if(b.aabbNeedsUpdate){
-            b.computeAABB();
-        }
-
-        if(b.aabb.overlaps(aabb)){
-            result.push(b);
-        }
-    }
-
-    return result;
-};
-},{"../collision/Broadphase":5,"../shapes/Shape":43}],12:[function(_dereq_,module,exports){
-module.exports = ConeTwistConstraint;
-
-var Constraint = _dereq_('./Constraint');
-var PointToPointConstraint = _dereq_('./PointToPointConstraint');
-var ConeEquation = _dereq_('../equations/ConeEquation');
-var RotationalEquation = _dereq_('../equations/RotationalEquation');
-var ContactEquation = _dereq_('../equations/ContactEquation');
-var Vec3 = _dereq_('../math/Vec3');
-
-/**
- * @class ConeTwistConstraint
- * @constructor
- * @author schteppe
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {object} [options]
- * @param {Vec3} [options.pivotA]
- * @param {Vec3} [options.pivotB]
- * @param {Vec3} [options.axisA]
- * @param {Vec3} [options.axisB]
- * @param {Number} [options.maxForce=1e6]
- * @extends PointToPointConstraint
- */
-function ConeTwistConstraint(bodyA, bodyB, options){
-    options = options || {};
-    var maxForce = typeof(options.maxForce) !== 'undefined' ? options.maxForce : 1e6;
-
-    // Set pivot point in between
-    var pivotA = options.pivotA ? options.pivotA.clone() : new Vec3();
-    var pivotB = options.pivotB ? options.pivotB.clone() : new Vec3();
-    this.axisA = options.axisA ? options.axisA.clone() : new Vec3();
-    this.axisB = options.axisB ? options.axisB.clone() : new Vec3();
-
-    PointToPointConstraint.call(this, bodyA, pivotA, bodyB, pivotB, maxForce);
-
-    this.collideConnected = !!options.collideConnected;
-
-    this.angle = typeof(options.angle) !== 'undefined' ? options.angle : 0;
-
-    /**
-     * @property {ConeEquation} coneEquation
-     */
-    var c = this.coneEquation = new ConeEquation(bodyA,bodyB,options);
-
-    /**
-     * @property {RotationalEquation} twistEquation
-     */
-    var t = this.twistEquation = new RotationalEquation(bodyA,bodyB,options);
-    this.twistAngle = typeof(options.twistAngle) !== 'undefined' ? options.twistAngle : 0;
-
-    // Make the cone equation push the bodies toward the cone axis, not outward
-    c.maxForce = 0;
-    c.minForce = -maxForce;
-
-    // Make the twist equation add torque toward the initial position
-    t.maxForce = 0;
-    t.minForce = -maxForce;
-
-    this.equations.push(c, t);
-}
-ConeTwistConstraint.prototype = new PointToPointConstraint();
-ConeTwistConstraint.constructor = ConeTwistConstraint;
-
-var ConeTwistConstraint_update_tmpVec1 = new Vec3();
-var ConeTwistConstraint_update_tmpVec2 = new Vec3();
-
-ConeTwistConstraint.prototype.update = function(){
-    var bodyA = this.bodyA,
-        bodyB = this.bodyB,
-        cone = this.coneEquation,
-        twist = this.twistEquation;
-
-    PointToPointConstraint.prototype.update.call(this);
-
-    // Update the axes to the cone constraint
-    bodyA.vectorToWorldFrame(this.axisA, cone.axisA);
-    bodyB.vectorToWorldFrame(this.axisB, cone.axisB);
-
-    // Update the world axes in the twist constraint
-    this.axisA.tangents(twist.axisA, twist.axisA);
-    bodyA.vectorToWorldFrame(twist.axisA, twist.axisA);
-
-    this.axisB.tangents(twist.axisB, twist.axisB);
-    bodyB.vectorToWorldFrame(twist.axisB, twist.axisB);
-
-    cone.angle = this.angle;
-    twist.maxAngle = this.twistAngle;
-};
-
-
-},{"../equations/ConeEquation":18,"../equations/ContactEquation":19,"../equations/RotationalEquation":22,"../math/Vec3":30,"./Constraint":13,"./PointToPointConstraint":17}],13:[function(_dereq_,module,exports){
-module.exports = Constraint;
-
-var Utils = _dereq_('../utils/Utils');
-
-/**
- * Constraint base class
- * @class Constraint
- * @author schteppe
- * @constructor
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {object} [options]
- * @param {boolean} [options.collideConnected=true]
- * @param {boolean} [options.wakeUpBodies=true]
- */
-function Constraint(bodyA, bodyB, options){
-    options = Utils.defaults(options,{
-        collideConnected : true,
-        wakeUpBodies : true,
-    });
-
-    /**
-     * Equations to be solved in this constraint
-     * @property equations
-     * @type {Array}
-     */
-    this.equations = [];
-
-    /**
-     * @property {Body} bodyA
-     */
-    this.bodyA = bodyA;
-
-    /**
-     * @property {Body} bodyB
-     */
-    this.bodyB = bodyB;
-
-    /**
-     * @property {Number} id
-     */
-    this.id = Constraint.idCounter++;
-
-    /**
-     * Set to true if you want the bodies to collide when they are connected.
-     * @property collideConnected
-     * @type {boolean}
-     */
-    this.collideConnected = options.collideConnected;
-
-    if(options.wakeUpBodies){
-        if(bodyA){
-            bodyA.wakeUp();
-        }
-        if(bodyB){
-            bodyB.wakeUp();
-        }
-    }
-}
-
-/**
- * Update all the equations with data.
- * @method update
- */
-Constraint.prototype.update = function(){
-    throw new Error("method update() not implmemented in this Constraint subclass!");
-};
-
-/**
- * Enables all equations in the constraint.
- * @method enable
- */
-Constraint.prototype.enable = function(){
-    var eqs = this.equations;
-    for(var i=0; i<eqs.length; i++){
-        eqs[i].enabled = true;
-    }
-};
-
-/**
- * Disables all equations in the constraint.
- * @method disable
- */
-Constraint.prototype.disable = function(){
-    var eqs = this.equations;
-    for(var i=0; i<eqs.length; i++){
-        eqs[i].enabled = false;
-    }
-};
-
-Constraint.idCounter = 0;
-
-},{"../utils/Utils":53}],14:[function(_dereq_,module,exports){
-module.exports = DistanceConstraint;
-
-var Constraint = _dereq_('./Constraint');
-var ContactEquation = _dereq_('../equations/ContactEquation');
-
-/**
- * Constrains two bodies to be at a constant distance from each others center of mass.
- * @class DistanceConstraint
- * @constructor
- * @author schteppe
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {Number} [distance] The distance to keep. If undefined, it will be set to the current distance between bodyA and bodyB
- * @param {Number} [maxForce=1e6]
- * @extends Constraint
- */
-function DistanceConstraint(bodyA,bodyB,distance,maxForce){
-    Constraint.call(this,bodyA,bodyB);
-
-    if(typeof(distance)==="undefined") {
-        distance = bodyA.position.distanceTo(bodyB.position);
-    }
-
-    if(typeof(maxForce)==="undefined") {
-        maxForce = 1e6;
-    }
-
-    /**
-     * @property {number} distance
-     */
-    this.distance = distance;
-
-    /**
-     * @property {ContactEquation} distanceEquation
-     */
-    var eq = this.distanceEquation = new ContactEquation(bodyA, bodyB);
-    this.equations.push(eq);
-
-    // Make it bidirectional
-    eq.minForce = -maxForce;
-    eq.maxForce =  maxForce;
-}
-DistanceConstraint.prototype = new Constraint();
-
-DistanceConstraint.prototype.update = function(){
-    var bodyA = this.bodyA;
-    var bodyB = this.bodyB;
-    var eq = this.distanceEquation;
-    var halfDist = this.distance * 0.5;
-    var normal = eq.ni;
-
-    bodyB.position.vsub(bodyA.position, normal);
-    normal.normalize();
-    normal.mult(halfDist, eq.ri);
-    normal.mult(-halfDist, eq.rj);
-};
-},{"../equations/ContactEquation":19,"./Constraint":13}],15:[function(_dereq_,module,exports){
-module.exports = HingeConstraint;
-
-var Constraint = _dereq_('./Constraint');
-var PointToPointConstraint = _dereq_('./PointToPointConstraint');
-var RotationalEquation = _dereq_('../equations/RotationalEquation');
-var RotationalMotorEquation = _dereq_('../equations/RotationalMotorEquation');
-var ContactEquation = _dereq_('../equations/ContactEquation');
-var Vec3 = _dereq_('../math/Vec3');
-
-/**
- * Hinge constraint. Think of it as a door hinge. It tries to keep the door in the correct place and with the correct orientation.
- * @class HingeConstraint
- * @constructor
- * @author schteppe
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {object} [options]
- * @param {Vec3} [options.pivotA] A point defined locally in bodyA. This defines the offset of axisA.
- * @param {Vec3} [options.axisA] An axis that bodyA can rotate around, defined locally in bodyA.
- * @param {Vec3} [options.pivotB]
- * @param {Vec3} [options.axisB]
- * @param {Number} [options.maxForce=1e6]
- * @extends PointToPointConstraint
- */
-function HingeConstraint(bodyA, bodyB, options){
-    options = options || {};
-    var maxForce = typeof(options.maxForce) !== 'undefined' ? options.maxForce : 1e6;
-    var pivotA = options.pivotA ? options.pivotA.clone() : new Vec3();
-    var pivotB = options.pivotB ? options.pivotB.clone() : new Vec3();
-
-    PointToPointConstraint.call(this, bodyA, pivotA, bodyB, pivotB, maxForce);
-
-    /**
-     * Rotation axis, defined locally in bodyA.
-     * @property {Vec3} axisA
-     */
-    var axisA = this.axisA = options.axisA ? options.axisA.clone() : new Vec3(1,0,0);
-    axisA.normalize();
-
-    /**
-     * Rotation axis, defined locally in bodyB.
-     * @property {Vec3} axisB
-     */
-    var axisB = this.axisB = options.axisB ? options.axisB.clone() : new Vec3(1,0,0);
-    axisB.normalize();
-
-    /**
-     * @property {RotationalEquation} rotationalEquation1
-     */
-    var r1 = this.rotationalEquation1 = new RotationalEquation(bodyA,bodyB,options);
-
-    /**
-     * @property {RotationalEquation} rotationalEquation2
-     */
-    var r2 = this.rotationalEquation2 = new RotationalEquation(bodyA,bodyB,options);
-
-    /**
-     * @property {RotationalMotorEquation} motorEquation
-     */
-    var motor = this.motorEquation = new RotationalMotorEquation(bodyA,bodyB,maxForce);
-    motor.enabled = false; // Not enabled by default
-
-    // Equations to be fed to the solver
-    this.equations.push(
-        r1, // rotational1
-        r2, // rotational2
-        motor
-    );
-}
-HingeConstraint.prototype = new PointToPointConstraint();
-HingeConstraint.constructor = HingeConstraint;
-
-/**
- * @method enableMotor
- */
-HingeConstraint.prototype.enableMotor = function(){
-    this.motorEquation.enabled = true;
-};
-
-/**
- * @method disableMotor
- */
-HingeConstraint.prototype.disableMotor = function(){
-    this.motorEquation.enabled = false;
-};
-
-/**
- * @method setMotorSpeed
- * @param {number} speed
- */
-HingeConstraint.prototype.setMotorSpeed = function(speed){
-    this.motorEquation.targetVelocity = speed;
-};
-
-/**
- * @method setMotorMaxForce
- * @param {number} maxForce
- */
-HingeConstraint.prototype.setMotorMaxForce = function(maxForce){
-    this.motorEquation.maxForce = maxForce;
-    this.motorEquation.minForce = -maxForce;
-};
-
-var HingeConstraint_update_tmpVec1 = new Vec3();
-var HingeConstraint_update_tmpVec2 = new Vec3();
-
-HingeConstraint.prototype.update = function(){
-    var bodyA = this.bodyA,
-        bodyB = this.bodyB,
-        motor = this.motorEquation,
-        r1 = this.rotationalEquation1,
-        r2 = this.rotationalEquation2,
-        worldAxisA = HingeConstraint_update_tmpVec1,
-        worldAxisB = HingeConstraint_update_tmpVec2;
-
-    var axisA = this.axisA;
-    var axisB = this.axisB;
-
-    PointToPointConstraint.prototype.update.call(this);
-
-    // Get world axes
-    bodyA.quaternion.vmult(axisA, worldAxisA);
-    bodyB.quaternion.vmult(axisB, worldAxisB);
-
-    worldAxisA.tangents(r1.axisA, r2.axisA);
-    r1.axisB.copy(worldAxisB);
-    r2.axisB.copy(worldAxisB);
-
-    if(this.motorEquation.enabled){
-        bodyA.quaternion.vmult(this.axisA, motor.axisA);
-        bodyB.quaternion.vmult(this.axisB, motor.axisB);
-    }
-};
-
-
-},{"../equations/ContactEquation":19,"../equations/RotationalEquation":22,"../equations/RotationalMotorEquation":23,"../math/Vec3":30,"./Constraint":13,"./PointToPointConstraint":17}],16:[function(_dereq_,module,exports){
-module.exports = LockConstraint;
-
-var Constraint = _dereq_('./Constraint');
-var PointToPointConstraint = _dereq_('./PointToPointConstraint');
-var RotationalEquation = _dereq_('../equations/RotationalEquation');
-var RotationalMotorEquation = _dereq_('../equations/RotationalMotorEquation');
-var ContactEquation = _dereq_('../equations/ContactEquation');
-var Vec3 = _dereq_('../math/Vec3');
-
-/**
- * Lock constraint. Will remove all degrees of freedom between the bodies.
- * @class LockConstraint
- * @constructor
- * @author schteppe
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {object} [options]
- * @param {Number} [options.maxForce=1e6]
- * @extends PointToPointConstraint
- */
-function LockConstraint(bodyA, bodyB, options){
-    options = options || {};
-    var maxForce = typeof(options.maxForce) !== 'undefined' ? options.maxForce : 1e6;
-
-    // Set pivot point in between
-    var pivotA = new Vec3();
-    var pivotB = new Vec3();
-    var halfWay = new Vec3();
-    bodyA.position.vadd(bodyB.position, halfWay);
-    halfWay.scale(0.5, halfWay);
-    bodyB.pointToLocalFrame(halfWay, pivotB);
-    bodyA.pointToLocalFrame(halfWay, pivotA);
-    PointToPointConstraint.call(this, bodyA, pivotA, bodyB, pivotB, maxForce);
-
-    /**
-     * @property {RotationalEquation} rotationalEquation1
-     */
-    var r1 = this.rotationalEquation1 = new RotationalEquation(bodyA,bodyB,options);
-
-    /**
-     * @property {RotationalEquation} rotationalEquation2
-     */
-    var r2 = this.rotationalEquation2 = new RotationalEquation(bodyA,bodyB,options);
-
-    /**
-     * @property {RotationalEquation} rotationalEquation3
-     */
-    var r3 = this.rotationalEquation3 = new RotationalEquation(bodyA,bodyB,options);
-
-    this.equations.push(r1, r2, r3);
-}
-LockConstraint.prototype = new PointToPointConstraint();
-LockConstraint.constructor = LockConstraint;
-
-var LockConstraint_update_tmpVec1 = new Vec3();
-var LockConstraint_update_tmpVec2 = new Vec3();
-
-LockConstraint.prototype.update = function(){
-    var bodyA = this.bodyA,
-        bodyB = this.bodyB,
-        motor = this.motorEquation,
-        r1 = this.rotationalEquation1,
-        r2 = this.rotationalEquation2,
-        r3 = this.rotationalEquation3,
-        worldAxisA = LockConstraint_update_tmpVec1,
-        worldAxisB = LockConstraint_update_tmpVec2;
-
-    PointToPointConstraint.prototype.update.call(this);
-
-    bodyA.vectorToWorldFrame(Vec3.UNIT_X, r1.axisA);
-    bodyB.vectorToWorldFrame(Vec3.UNIT_Y, r1.axisB);
-
-    bodyA.vectorToWorldFrame(Vec3.UNIT_Y, r2.axisA);
-    bodyB.vectorToWorldFrame(Vec3.UNIT_Z, r2.axisB);
-
-    bodyA.vectorToWorldFrame(Vec3.UNIT_Z, r3.axisA);
-    bodyB.vectorToWorldFrame(Vec3.UNIT_X, r3.axisB);
-};
-
-
-},{"../equations/ContactEquation":19,"../equations/RotationalEquation":22,"../equations/RotationalMotorEquation":23,"../math/Vec3":30,"./Constraint":13,"./PointToPointConstraint":17}],17:[function(_dereq_,module,exports){
-module.exports = PointToPointConstraint;
-
-var Constraint = _dereq_('./Constraint');
-var ContactEquation = _dereq_('../equations/ContactEquation');
-var Vec3 = _dereq_('../math/Vec3');
-
-/**
- * Connects two bodies at given offset points.
- * @class PointToPointConstraint
- * @extends Constraint
- * @constructor
- * @param {Body} bodyA
- * @param {Vec3} pivotA The point relative to the center of mass of bodyA which bodyA is constrained to.
- * @param {Body} bodyB Body that will be constrained in a similar way to the same point as bodyA. We will therefore get a link between bodyA and bodyB. If not specified, bodyA will be constrained to a static point.
- * @param {Vec3} pivotB See pivotA.
- * @param {Number} maxForce The maximum force that should be applied to constrain the bodies.
- *
- * @example
- *     var bodyA = new Body({ mass: 1 });
- *     var bodyB = new Body({ mass: 1 });
- *     bodyA.position.set(-1, 0, 0);
- *     bodyB.position.set(1, 0, 0);
- *     bodyA.addShape(shapeA);
- *     bodyB.addShape(shapeB);
- *     world.addBody(bodyA);
- *     world.addBody(bodyB);
- *     var localPivotA = new Vec3(1, 0, 0);
- *     var localPivotB = new Vec3(-1, 0, 0);
- *     var constraint = new PointToPointConstraint(bodyA, localPivotA, bodyB, localPivotB);
- *     world.addConstraint(constraint);
- */
-function PointToPointConstraint(bodyA,pivotA,bodyB,pivotB,maxForce){
-    Constraint.call(this,bodyA,bodyB);
-
-    maxForce = typeof(maxForce) !== 'undefined' ? maxForce : 1e6;
-
-    /**
-     * Pivot, defined locally in bodyA.
-     * @property {Vec3} pivotA
-     */
-    this.pivotA = pivotA ? pivotA.clone() : new Vec3();
-
-    /**
-     * Pivot, defined locally in bodyB.
-     * @property {Vec3} pivotB
-     */
-    this.pivotB = pivotB ? pivotB.clone() : new Vec3();
-
-    /**
-     * @property {ContactEquation} equationX
-     */
-    var x = this.equationX = new ContactEquation(bodyA,bodyB);
-
-    /**
-     * @property {ContactEquation} equationY
-     */
-    var y = this.equationY = new ContactEquation(bodyA,bodyB);
-
-    /**
-     * @property {ContactEquation} equationZ
-     */
-    var z = this.equationZ = new ContactEquation(bodyA,bodyB);
-
-    // Equations to be fed to the solver
-    this.equations.push(x, y, z);
-
-    // Make the equations bidirectional
-    x.minForce = y.minForce = z.minForce = -maxForce;
-    x.maxForce = y.maxForce = z.maxForce =  maxForce;
-
-    x.ni.set(1, 0, 0);
-    y.ni.set(0, 1, 0);
-    z.ni.set(0, 0, 1);
-}
-PointToPointConstraint.prototype = new Constraint();
-
-PointToPointConstraint.prototype.update = function(){
-    var bodyA = this.bodyA;
-    var bodyB = this.bodyB;
-    var x = this.equationX;
-    var y = this.equationY;
-    var z = this.equationZ;
-
-    // Rotate the pivots to world space
-    bodyA.quaternion.vmult(this.pivotA,x.ri);
-    bodyB.quaternion.vmult(this.pivotB,x.rj);
-
-    y.ri.copy(x.ri);
-    y.rj.copy(x.rj);
-    z.ri.copy(x.ri);
-    z.rj.copy(x.rj);
-};
-},{"../equations/ContactEquation":19,"../math/Vec3":30,"./Constraint":13}],18:[function(_dereq_,module,exports){
-module.exports = ConeEquation;
-
-var Vec3 = _dereq_('../math/Vec3');
-var Mat3 = _dereq_('../math/Mat3');
-var Equation = _dereq_('./Equation');
-
-/**
- * Cone equation. Works to keep the given body world vectors aligned, or tilted within a given angle from each other.
- * @class ConeEquation
- * @constructor
- * @author schteppe
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {Vec3} [options.axisA] Local axis in A
- * @param {Vec3} [options.axisB] Local axis in B
- * @param {Vec3} [options.angle] The "cone angle" to keep
- * @param {number} [options.maxForce=1e6]
- * @extends Equation
- */
-function ConeEquation(bodyA, bodyB, options){
-    options = options || {};
-    var maxForce = typeof(options.maxForce) !== 'undefined' ? options.maxForce : 1e6;
-
-    Equation.call(this,bodyA,bodyB,-maxForce, maxForce);
-
-    this.axisA = options.axisA ? options.axisA.clone() : new Vec3(1, 0, 0);
-    this.axisB = options.axisB ? options.axisB.clone() : new Vec3(0, 1, 0);
-
-    /**
-     * The cone angle to keep
-     * @property {number} angle
-     */
-    this.angle = typeof(options.angle) !== 'undefined' ? options.angle : 0;
-}
-
-ConeEquation.prototype = new Equation();
-ConeEquation.prototype.constructor = ConeEquation;
-
-var tmpVec1 = new Vec3();
-var tmpVec2 = new Vec3();
-
-ConeEquation.prototype.computeB = function(h){
-    var a = this.a,
-        b = this.b,
-
-        ni = this.axisA,
-        nj = this.axisB,
-
-        nixnj = tmpVec1,
-        njxni = tmpVec2,
-
-        GA = this.jacobianElementA,
-        GB = this.jacobianElementB;
-
-    // Caluclate cross products
-    ni.cross(nj, nixnj);
-    nj.cross(ni, njxni);
-
-    // The angle between two vector is:
-    // cos(theta) = a * b / (length(a) * length(b) = { len(a) = len(b) = 1 } = a * b
-
-    // g = a * b
-    // gdot = (b x a) * wi + (a x b) * wj
-    // G = [0 bxa 0 axb]
-    // W = [vi wi vj wj]
-    GA.rotational.copy(njxni);
-    GB.rotational.copy(nixnj);
-
-    var g = Math.cos(this.angle) - ni.dot(nj),
-        GW = this.computeGW(),
-        GiMf = this.computeGiMf();
-
-    var B = - g * a - GW * b - h * GiMf;
-
-    return B;
-};
-
-
-},{"../math/Mat3":27,"../math/Vec3":30,"./Equation":20}],19:[function(_dereq_,module,exports){
-module.exports = ContactEquation;
-
-var Equation = _dereq_('./Equation');
-var Vec3 = _dereq_('../math/Vec3');
-var Mat3 = _dereq_('../math/Mat3');
-
-/**
- * Contact/non-penetration constraint equation
- * @class ContactEquation
- * @constructor
- * @author schteppe
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @extends Equation
- */
-function ContactEquation(bodyA, bodyB, maxForce){
-    maxForce = typeof(maxForce) !== 'undefined' ? maxForce : 1e6;
-    Equation.call(this, bodyA, bodyB, 0, maxForce);
-
-    /**
-     * @property restitution
-     * @type {Number}
-     */
-    this.restitution = 0.0; // "bounciness": u1 = -e*u0
-
-    /**
-     * World-oriented vector that goes from the center of bi to the contact point.
-     * @property {Vec3} ri
-     */
-    this.ri = new Vec3();
-
-    /**
-     * World-oriented vector that starts in body j position and goes to the contact point.
-     * @property {Vec3} rj
-     */
-    this.rj = new Vec3();
-
-    /**
-     * Contact normal, pointing out of body i.
-     * @property {Vec3} ni
-     */
-    this.ni = new Vec3();
-}
-
-ContactEquation.prototype = new Equation();
-ContactEquation.prototype.constructor = ContactEquation;
-
-var ContactEquation_computeB_temp1 = new Vec3(); // Temp vectors
-var ContactEquation_computeB_temp2 = new Vec3();
-var ContactEquation_computeB_temp3 = new Vec3();
-ContactEquation.prototype.computeB = function(h){
-    var a = this.a,
-        b = this.b,
-        bi = this.bi,
-        bj = this.bj,
-        ri = this.ri,
-        rj = this.rj,
-        rixn = ContactEquation_computeB_temp1,
-        rjxn = ContactEquation_computeB_temp2,
-
-        vi = bi.velocity,
-        wi = bi.angularVelocity,
-        fi = bi.force,
-        taui = bi.torque,
-
-        vj = bj.velocity,
-        wj = bj.angularVelocity,
-        fj = bj.force,
-        tauj = bj.torque,
-
-        penetrationVec = ContactEquation_computeB_temp3,
-
-        GA = this.jacobianElementA,
-        GB = this.jacobianElementB,
-
-        n = this.ni;
-
-    // Caluclate cross products
-    ri.cross(n,rixn);
-    rj.cross(n,rjxn);
-
-    // g = xj+rj -(xi+ri)
-    // G = [ -ni  -rixn  ni  rjxn ]
-    n.negate(GA.spatial);
-    rixn.negate(GA.rotational);
-    GB.spatial.copy(n);
-    GB.rotational.copy(rjxn);
-
-    // Calculate the penetration vector
-    penetrationVec.copy(bj.position);
-    penetrationVec.vadd(rj,penetrationVec);
-    penetrationVec.vsub(bi.position,penetrationVec);
-    penetrationVec.vsub(ri,penetrationVec);
-
-    var g = n.dot(penetrationVec);
-
-    // Compute iteration
-    var ePlusOne = this.restitution + 1;
-    var GW = ePlusOne * vj.dot(n) - ePlusOne * vi.dot(n) + wj.dot(rjxn) - wi.dot(rixn);
-    var GiMf = this.computeGiMf();
-
-    var B = - g * a - GW * b - h*GiMf;
-
-    return B;
-};
-
-var ContactEquation_getImpactVelocityAlongNormal_vi = new Vec3();
-var ContactEquation_getImpactVelocityAlongNormal_vj = new Vec3();
-var ContactEquation_getImpactVelocityAlongNormal_xi = new Vec3();
-var ContactEquation_getImpactVelocityAlongNormal_xj = new Vec3();
-var ContactEquation_getImpactVelocityAlongNormal_relVel = new Vec3();
-
-/**
- * Get the current relative velocity in the contact point.
- * @method getImpactVelocityAlongNormal
- * @return {number}
- */
-ContactEquation.prototype.getImpactVelocityAlongNormal = function(){
-    var vi = ContactEquation_getImpactVelocityAlongNormal_vi;
-    var vj = ContactEquation_getImpactVelocityAlongNormal_vj;
-    var xi = ContactEquation_getImpactVelocityAlongNormal_xi;
-    var xj = ContactEquation_getImpactVelocityAlongNormal_xj;
-    var relVel = ContactEquation_getImpactVelocityAlongNormal_relVel;
-
-    this.bi.position.vadd(this.ri, xi);
-    this.bj.position.vadd(this.rj, xj);
-
-    this.bi.getVelocityAtWorldPoint(xi, vi);
-    this.bj.getVelocityAtWorldPoint(xj, vj);
-
-    vi.vsub(vj, relVel);
-
-    return this.ni.dot(relVel);
-};
-
-
-},{"../math/Mat3":27,"../math/Vec3":30,"./Equation":20}],20:[function(_dereq_,module,exports){
-module.exports = Equation;
-
-var JacobianElement = _dereq_('../math/JacobianElement'),
-    Vec3 = _dereq_('../math/Vec3');
-
-/**
- * Equation base class
- * @class Equation
- * @constructor
- * @author schteppe
- * @param {Body} bi
- * @param {Body} bj
- * @param {Number} minForce Minimum (read: negative max) force to be applied by the constraint.
- * @param {Number} maxForce Maximum (read: positive max) force to be applied by the constraint.
- */
-function Equation(bi,bj,minForce,maxForce){
-    this.id = Equation.id++;
-
-    /**
-     * @property {number} minForce
-     */
-    this.minForce = typeof(minForce)==="undefined" ? -1e6 : minForce;
-
-    /**
-     * @property {number} maxForce
-     */
-    this.maxForce = typeof(maxForce)==="undefined" ? 1e6 : maxForce;
-
-    /**
-     * @property bi
-     * @type {Body}
-     */
-    this.bi = bi;
-
-    /**
-     * @property bj
-     * @type {Body}
-     */
-    this.bj = bj;
-
-    /**
-     * SPOOK parameter
-     * @property {number} a
-     */
-    this.a = 0.0;
-
-    /**
-     * SPOOK parameter
-     * @property {number} b
-     */
-    this.b = 0.0;
-
-    /**
-     * SPOOK parameter
-     * @property {number} eps
-     */
-    this.eps = 0.0;
-
-    /**
-     * @property {JacobianElement} jacobianElementA
-     */
-    this.jacobianElementA = new JacobianElement();
-
-    /**
-     * @property {JacobianElement} jacobianElementB
-     */
-    this.jacobianElementB = new JacobianElement();
-
-    /**
-     * @property {boolean} enabled
-     * @default true
-     */
-    this.enabled = true;
-
-    // Set typical spook params
-    this.setSpookParams(1e7,4,1/60);
-}
-Equation.prototype.constructor = Equation;
-
-Equation.id = 0;
-
-/**
- * Recalculates a,b,eps.
- * @method setSpookParams
- */
-Equation.prototype.setSpookParams = function(stiffness,relaxation,timeStep){
-    var d = relaxation,
-        k = stiffness,
-        h = timeStep;
-    this.a = 4.0 / (h * (1 + 4 * d));
-    this.b = (4.0 * d) / (1 + 4 * d);
-    this.eps = 4.0 / (h * h * k * (1 + 4 * d));
-};
-
-/**
- * Computes the RHS of the SPOOK equation
- * @method computeB
- * @return {Number}
- */
-Equation.prototype.computeB = function(a,b,h){
-    var GW = this.computeGW(),
-        Gq = this.computeGq(),
-        GiMf = this.computeGiMf();
-    return - Gq * a - GW * b - GiMf*h;
-};
-
-/**
- * Computes G*q, where q are the generalized body coordinates
- * @method computeGq
- * @return {Number}
- */
-Equation.prototype.computeGq = function(){
-    var GA = this.jacobianElementA,
-        GB = this.jacobianElementB,
-        bi = this.bi,
-        bj = this.bj,
-        xi = bi.position,
-        xj = bj.position;
-    return GA.spatial.dot(xi) + GB.spatial.dot(xj);
-};
-
-var zero = new Vec3();
-
-/**
- * Computes G*W, where W are the body velocities
- * @method computeGW
- * @return {Number}
- */
-Equation.prototype.computeGW = function(){
-    var GA = this.jacobianElementA,
-        GB = this.jacobianElementB,
-        bi = this.bi,
-        bj = this.bj,
-        vi = bi.velocity,
-        vj = bj.velocity,
-        wi = bi.angularVelocity || zero,
-        wj = bj.angularVelocity || zero;
-    return GA.multiplyVectors(vi,wi) + GB.multiplyVectors(vj,wj);
-};
-
-
-/**
- * Computes G*Wlambda, where W are the body velocities
- * @method computeGWlambda
- * @return {Number}
- */
-Equation.prototype.computeGWlambda = function(){
-    var GA = this.jacobianElementA,
-        GB = this.jacobianElementB,
-        bi = this.bi,
-        bj = this.bj,
-        vi = bi.vlambda,
-        vj = bj.vlambda,
-        wi = bi.wlambda || zero,
-        wj = bj.wlambda || zero;
-    return GA.multiplyVectors(vi,wi) + GB.multiplyVectors(vj,wj);
-};
-
-/**
- * Computes G*inv(M)*f, where M is the mass matrix with diagonal blocks for each body, and f are the forces on the bodies.
- * @method computeGiMf
- * @return {Number}
- */
-var iMfi = new Vec3(),
-    iMfj = new Vec3(),
-    invIi_vmult_taui = new Vec3(),
-    invIj_vmult_tauj = new Vec3();
-Equation.prototype.computeGiMf = function(){
-    var GA = this.jacobianElementA,
-        GB = this.jacobianElementB,
-        bi = this.bi,
-        bj = this.bj,
-        fi = bi.force,
-        ti = bi.torque,
-        fj = bj.force,
-        tj = bj.torque,
-        invMassi = bi.invMassSolve,
-        invMassj = bj.invMassSolve;
-
-    if(bi.invInertiaWorldSolve){ bi.invInertiaWorldSolve.vmult(ti,invIi_vmult_taui); }
-    else { invIi_vmult_taui.set(0,0,0); }
-    if(bj.invInertiaWorldSolve){ bj.invInertiaWorldSolve.vmult(tj,invIj_vmult_tauj); }
-    else { invIj_vmult_tauj.set(0,0,0); }
-
-    fi.mult(invMassi,iMfi);
-    fj.mult(invMassj,iMfj);
-
-    return GA.multiplyVectors(iMfi,invIi_vmult_taui) + GB.multiplyVectors(iMfj,invIj_vmult_tauj);
-};
-
-/**
- * Computes G*inv(M)*G'
- * @method computeGiMGt
- * @return {Number}
- */
-var tmp = new Vec3();
-Equation.prototype.computeGiMGt = function(){
-    var GA = this.jacobianElementA,
-        GB = this.jacobianElementB,
-        bi = this.bi,
-        bj = this.bj,
-        invMassi = bi.invMassSolve,
-        invMassj = bj.invMassSolve,
-        invIi = bi.invInertiaWorldSolve,
-        invIj = bj.invInertiaWorldSolve,
-        result = invMassi + invMassj;
-
-    if(invIi){
-        invIi.vmult(GA.rotational,tmp);
-        result += tmp.dot(GA.rotational);
-    }
-
-    if(invIj){
-        invIj.vmult(GB.rotational,tmp);
-        result += tmp.dot(GB.rotational);
-    }
-
-    return  result;
-};
-
-var addToWlambda_temp = new Vec3(),
-    addToWlambda_Gi = new Vec3(),
-    addToWlambda_Gj = new Vec3(),
-    addToWlambda_ri = new Vec3(),
-    addToWlambda_rj = new Vec3(),
-    addToWlambda_Mdiag = new Vec3();
-
-/**
- * Add constraint velocity to the bodies.
- * @method addToWlambda
- * @param {Number} deltalambda
- */
-Equation.prototype.addToWlambda = function(deltalambda){
-    var GA = this.jacobianElementA,
-        GB = this.jacobianElementB,
-        bi = this.bi,
-        bj = this.bj,
-        temp = addToWlambda_temp;
-
-    // Add to linear velocity
-    // v_lambda += inv(M) * delta_lamba * G
-    GA.spatial.mult(bi.invMassSolve * deltalambda,temp);
-    bi.vlambda.vadd(temp, bi.vlambda);
-
-    GB.spatial.mult(bj.invMassSolve * deltalambda,temp);
-    bj.vlambda.vadd(temp, bj.vlambda);
-
-    // Add to angular velocity
-    if(bi.invInertiaWorldSolve){
-        bi.invInertiaWorldSolve.vmult(GA.rotational,temp);
-        temp.mult(deltalambda,temp);
-        bi.wlambda.vadd(temp,bi.wlambda);
-    }
-
-    if(bj.invInertiaWorldSolve){
-        bj.invInertiaWorldSolve.vmult(GB.rotational,temp);
-        temp.mult(deltalambda,temp);
-        bj.wlambda.vadd(temp,bj.wlambda);
-    }
-};
-
-/**
- * Compute the denominator part of the SPOOK equation: C = G*inv(M)*G' + eps
- * @method computeInvC
- * @param  {Number} eps
- * @return {Number}
- */
-Equation.prototype.computeC = function(){
-    return this.computeGiMGt() + this.eps;
-};
-
-},{"../math/JacobianElement":26,"../math/Vec3":30}],21:[function(_dereq_,module,exports){
-module.exports = FrictionEquation;
-
-var Equation = _dereq_('./Equation');
-var Vec3 = _dereq_('../math/Vec3');
-var Mat3 = _dereq_('../math/Mat3');
-
-/**
- * Constrains the slipping in a contact along a tangent
- * @class FrictionEquation
- * @constructor
- * @author schteppe
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {Number} slipForce should be +-F_friction = +-mu * F_normal = +-mu * m * g
- * @extends Equation
- */
-function FrictionEquation(bodyA, bodyB, slipForce){
-    Equation.call(this,bodyA, bodyB, -slipForce, slipForce);
-    this.ri = new Vec3();
-    this.rj = new Vec3();
-    this.t = new Vec3(); // tangent
-}
-
-FrictionEquation.prototype = new Equation();
-FrictionEquation.prototype.constructor = FrictionEquation;
-
-var FrictionEquation_computeB_temp1 = new Vec3();
-var FrictionEquation_computeB_temp2 = new Vec3();
-FrictionEquation.prototype.computeB = function(h){
-    var a = this.a,
-        b = this.b,
-        bi = this.bi,
-        bj = this.bj,
-        ri = this.ri,
-        rj = this.rj,
-        rixt = FrictionEquation_computeB_temp1,
-        rjxt = FrictionEquation_computeB_temp2,
-        t = this.t;
-
-    // Caluclate cross products
-    ri.cross(t,rixt);
-    rj.cross(t,rjxt);
-
-    // G = [-t -rixt t rjxt]
-    // And remember, this is a pure velocity constraint, g is always zero!
-    var GA = this.jacobianElementA,
-        GB = this.jacobianElementB;
-    t.negate(GA.spatial);
-    rixt.negate(GA.rotational);
-    GB.spatial.copy(t);
-    GB.rotational.copy(rjxt);
-
-    var GW = this.computeGW();
-    var GiMf = this.computeGiMf();
-
-    var B = - GW * b - h * GiMf;
-
-    return B;
-};
-
-},{"../math/Mat3":27,"../math/Vec3":30,"./Equation":20}],22:[function(_dereq_,module,exports){
-module.exports = RotationalEquation;
-
-var Vec3 = _dereq_('../math/Vec3');
-var Mat3 = _dereq_('../math/Mat3');
-var Equation = _dereq_('./Equation');
-
-/**
- * Rotational constraint. Works to keep the local vectors orthogonal to each other in world space.
- * @class RotationalEquation
- * @constructor
- * @author schteppe
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {Vec3} [options.axisA]
- * @param {Vec3} [options.axisB]
- * @param {number} [options.maxForce]
- * @extends Equation
- */
-function RotationalEquation(bodyA, bodyB, options){
-    options = options || {};
-    var maxForce = typeof(options.maxForce) !== 'undefined' ? options.maxForce : 1e6;
-
-    Equation.call(this,bodyA,bodyB,-maxForce, maxForce);
-
-    this.axisA = options.axisA ? options.axisA.clone() : new Vec3(1, 0, 0);
-    this.axisB = options.axisB ? options.axisB.clone() : new Vec3(0, 1, 0);
-
-    this.maxAngle = Math.PI / 2;
-}
-
-RotationalEquation.prototype = new Equation();
-RotationalEquation.prototype.constructor = RotationalEquation;
-
-var tmpVec1 = new Vec3();
-var tmpVec2 = new Vec3();
-
-RotationalEquation.prototype.computeB = function(h){
-    var a = this.a,
-        b = this.b,
-
-        ni = this.axisA,
-        nj = this.axisB,
-
-        nixnj = tmpVec1,
-        njxni = tmpVec2,
-
-        GA = this.jacobianElementA,
-        GB = this.jacobianElementB;
-
-    // Caluclate cross products
-    ni.cross(nj, nixnj);
-    nj.cross(ni, njxni);
-
-    // g = ni * nj
-    // gdot = (nj x ni) * wi + (ni x nj) * wj
-    // G = [0 njxni 0 nixnj]
-    // W = [vi wi vj wj]
-    GA.rotational.copy(njxni);
-    GB.rotational.copy(nixnj);
-
-    var g = Math.cos(this.maxAngle) - ni.dot(nj),
-        GW = this.computeGW(),
-        GiMf = this.computeGiMf();
-
-    var B = - g * a - GW * b - h * GiMf;
-
-    return B;
-};
-
-
-},{"../math/Mat3":27,"../math/Vec3":30,"./Equation":20}],23:[function(_dereq_,module,exports){
-module.exports = RotationalMotorEquation;
-
-var Vec3 = _dereq_('../math/Vec3');
-var Mat3 = _dereq_('../math/Mat3');
-var Equation = _dereq_('./Equation');
-
-/**
- * Rotational motor constraint. Tries to keep the relative angular velocity of the bodies to a given value.
- * @class RotationalMotorEquation
- * @constructor
- * @author schteppe
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {Number} maxForce
- * @extends Equation
- */
-function RotationalMotorEquation(bodyA, bodyB, maxForce){
-    maxForce = typeof(maxForce)!=='undefined' ? maxForce : 1e6;
-    Equation.call(this,bodyA,bodyB,-maxForce,maxForce);
-
-    /**
-     * World oriented rotational axis
-     * @property {Vec3} axisA
-     */
-    this.axisA = new Vec3();
-
-    /**
-     * World oriented rotational axis
-     * @property {Vec3} axisB
-     */
-    this.axisB = new Vec3(); // World oriented rotational axis
-
-    /**
-     * Motor velocity
-     * @property {Number} targetVelocity
-     */
-    this.targetVelocity = 0;
-}
-
-RotationalMotorEquation.prototype = new Equation();
-RotationalMotorEquation.prototype.constructor = RotationalMotorEquation;
-
-RotationalMotorEquation.prototype.computeB = function(h){
-    var a = this.a,
-        b = this.b,
-        bi = this.bi,
-        bj = this.bj,
-
-        axisA = this.axisA,
-        axisB = this.axisB,
-
-        GA = this.jacobianElementA,
-        GB = this.jacobianElementB;
-
-    // g = 0
-    // gdot = axisA * wi - axisB * wj
-    // gdot = G * W = G * [vi wi vj wj]
-    // =>
-    // G = [0 axisA 0 -axisB]
-
-    GA.rotational.copy(axisA);
-    axisB.negate(GB.rotational);
-
-    var GW = this.computeGW() - this.targetVelocity,
-        GiMf = this.computeGiMf();
-
-    var B = - GW * b - h * GiMf;
-
-    return B;
-};
-
-},{"../math/Mat3":27,"../math/Vec3":30,"./Equation":20}],24:[function(_dereq_,module,exports){
-var Utils = _dereq_('../utils/Utils');
-
-module.exports = ContactMaterial;
-
-/**
- * Defines what happens when two materials meet.
- * @class ContactMaterial
- * @constructor
- * @param {Material} m1
- * @param {Material} m2
- * @param {object} [options]
- * @param {Number} [options.friction=0.3]
- * @param {Number} [options.restitution=0.3]
- * @param {number} [options.contactEquationStiffness=1e7]
- * @param {number} [options.contactEquationRelaxation=3]
- * @param {number} [options.frictionEquationStiffness=1e7]
- * @param {Number} [options.frictionEquationRelaxation=3]
- */
-function ContactMaterial(m1, m2, options){
-    options = Utils.defaults(options, {
-        friction: 0.3,
-        restitution: 0.3,
-        contactEquationStiffness: 1e7,
-        contactEquationRelaxation: 3,
-        frictionEquationStiffness: 1e7,
-        frictionEquationRelaxation: 3
-    });
-
-    /**
-     * Identifier of this material
-     * @property {Number} id
-     */
-    this.id = ContactMaterial.idCounter++;
-
-    /**
-     * Participating materials
-     * @property {Array} materials
-     * @todo  Should be .materialA and .materialB instead
-     */
-    this.materials = [m1, m2];
-
-    /**
-     * Friction coefficient
-     * @property {Number} friction
-     */
-    this.friction = options.friction;
-
-    /**
-     * Restitution coefficient
-     * @property {Number} restitution
-     */
-    this.restitution = options.restitution;
-
-    /**
-     * Stiffness of the produced contact equations
-     * @property {Number} contactEquationStiffness
-     */
-    this.contactEquationStiffness = options.contactEquationStiffness;
-
-    /**
-     * Relaxation time of the produced contact equations
-     * @property {Number} contactEquationRelaxation
-     */
-    this.contactEquationRelaxation = options.contactEquationRelaxation;
-
-    /**
-     * Stiffness of the produced friction equations
-     * @property {Number} frictionEquationStiffness
-     */
-    this.frictionEquationStiffness = options.frictionEquationStiffness;
-
-    /**
-     * Relaxation time of the produced friction equations
-     * @property {Number} frictionEquationRelaxation
-     */
-    this.frictionEquationRelaxation = options.frictionEquationRelaxation;
-}
-
-ContactMaterial.idCounter = 0;
-
-},{"../utils/Utils":53}],25:[function(_dereq_,module,exports){
-module.exports = Material;
-
-/**
- * Defines a physics material.
- * @class Material
- * @constructor
- * @param {object} [options]
- * @author schteppe
- */
-function Material(options){
-    var name = '';
-    options = options || {};
-
-    // Backwards compatibility fix
-    if(typeof(options) === 'string'){
-        name = options;
-        options = {};
-    } else if(typeof(options) === 'object') {
-        name = '';
-    }
-
-    /**
-     * @property name
-     * @type {String}
-     */
-    this.name = name;
-
-    /**
-     * material id.
-     * @property id
-     * @type {number}
-     */
-    this.id = Material.idCounter++;
-
-    /**
-     * Friction for this material. If non-negative, it will be used instead of the friction given by ContactMaterials. If there's no matching ContactMaterial, the value from .defaultContactMaterial in the World will be used.
-     * @property {number} friction
-     */
-    this.friction = typeof(options.friction) !== 'undefined' ? options.friction : -1;
-
-    /**
-     * Restitution for this material. If non-negative, it will be used instead of the restitution given by ContactMaterials. If there's no matching ContactMaterial, the value from .defaultContactMaterial in the World will be used.
-     * @property {number} restitution
-     */
-    this.restitution = typeof(options.restitution) !== 'undefined' ? options.restitution : -1;
-}
-
-Material.idCounter = 0;
-
-},{}],26:[function(_dereq_,module,exports){
-module.exports = JacobianElement;
-
-var Vec3 = _dereq_('./Vec3');
-
-/**
- * An element containing 6 entries, 3 spatial and 3 rotational degrees of freedom.
- * @class JacobianElement
- * @constructor
- */
-function JacobianElement(){
-
-    /**
-     * @property {Vec3} spatial
-     */
-    this.spatial = new Vec3();
-
-    /**
-     * @property {Vec3} rotational
-     */
-    this.rotational = new Vec3();
-}
-
-/**
- * Multiply with other JacobianElement
- * @method multiplyElement
- * @param  {JacobianElement} element
- * @return {Number}
- */
-JacobianElement.prototype.multiplyElement = function(element){
-    return element.spatial.dot(this.spatial) + element.rotational.dot(this.rotational);
-};
-
-/**
- * Multiply with two vectors
- * @method multiplyVectors
- * @param  {Vec3} spatial
- * @param  {Vec3} rotational
- * @return {Number}
- */
-JacobianElement.prototype.multiplyVectors = function(spatial,rotational){
-    return spatial.dot(this.spatial) + rotational.dot(this.rotational);
-};
-
-},{"./Vec3":30}],27:[function(_dereq_,module,exports){
-module.exports = Mat3;
-
-var Vec3 = _dereq_('./Vec3');
-
-/**
- * A 3x3 matrix.
- * @class Mat3
- * @constructor
- * @param array elements Array of nine elements. Optional.
- * @author schteppe / http://github.com/schteppe
- */
-function Mat3(elements){
-    /**
-     * A vector of length 9, containing all matrix elements
-     * @property {Array} elements
-     */
-    if(elements){
-        this.elements = elements;
-    } else {
-        this.elements = [0,0,0,0,0,0,0,0,0];
-    }
-}
-
-/**
- * Sets the matrix to identity
- * @method identity
- * @todo Should perhaps be renamed to setIdentity() to be more clear.
- * @todo Create another function that immediately creates an identity matrix eg. eye()
- */
-Mat3.prototype.identity = function(){
-    var e = this.elements;
-    e[0] = 1;
-    e[1] = 0;
-    e[2] = 0;
-
-    e[3] = 0;
-    e[4] = 1;
-    e[5] = 0;
-
-    e[6] = 0;
-    e[7] = 0;
-    e[8] = 1;
-};
-
-/**
- * Set all elements to zero
- * @method setZero
- */
-Mat3.prototype.setZero = function(){
-    var e = this.elements;
-    e[0] = 0;
-    e[1] = 0;
-    e[2] = 0;
-    e[3] = 0;
-    e[4] = 0;
-    e[5] = 0;
-    e[6] = 0;
-    e[7] = 0;
-    e[8] = 0;
-};
-
-/**
- * Sets the matrix diagonal elements from a Vec3
- * @method setTrace
- * @param {Vec3} vec3
- */
-Mat3.prototype.setTrace = function(vec3){
-    var e = this.elements;
-    e[0] = vec3.x;
-    e[4] = vec3.y;
-    e[8] = vec3.z;
-};
-
-/**
- * Gets the matrix diagonal elements
- * @method getTrace
- * @return {Vec3}
- */
-Mat3.prototype.getTrace = function(target){
-    var target = target || new Vec3();
-    var e = this.elements;
-    target.x = e[0];
-    target.y = e[4];
-    target.z = e[8];
-};
-
-/**
- * Matrix-Vector multiplication
- * @method vmult
- * @param {Vec3} v The vector to multiply with
- * @param {Vec3} target Optional, target to save the result in.
- */
-Mat3.prototype.vmult = function(v,target){
-    target = target || new Vec3();
-
-    var e = this.elements,
-        x = v.x,
-        y = v.y,
-        z = v.z;
-    target.x = e[0]*x + e[1]*y + e[2]*z;
-    target.y = e[3]*x + e[4]*y + e[5]*z;
-    target.z = e[6]*x + e[7]*y + e[8]*z;
-
-    return target;
-};
-
-/**
- * Matrix-scalar multiplication
- * @method smult
- * @param {Number} s
- */
-Mat3.prototype.smult = function(s){
-    for(var i=0; i<this.elements.length; i++){
-        this.elements[i] *= s;
-    }
-};
-
-/**
- * Matrix multiplication
- * @method mmult
- * @param {Mat3} m Matrix to multiply with from left side.
- * @return {Mat3} The result.
- */
-Mat3.prototype.mmult = function(m,target){
-    var r = target || new Mat3();
-    for(var i=0; i<3; i++){
-        for(var j=0; j<3; j++){
-            var sum = 0.0;
-            for(var k=0; k<3; k++){
-                sum += m.elements[i+k*3] * this.elements[k+j*3];
-            }
-            r.elements[i+j*3] = sum;
-        }
-    }
-    return r;
-};
-
-/**
- * Scale each column of the matrix
- * @method scale
- * @param {Vec3} v
- * @return {Mat3} The result.
- */
-Mat3.prototype.scale = function(v,target){
-    target = target || new Mat3();
-    var e = this.elements,
-        t = target.elements;
-    for(var i=0; i!==3; i++){
-        t[3*i + 0] = v.x * e[3*i + 0];
-        t[3*i + 1] = v.y * e[3*i + 1];
-        t[3*i + 2] = v.z * e[3*i + 2];
-    }
-    return target;
-};
-
-/**
- * Solve Ax=b
- * @method solve
- * @param {Vec3} b The right hand side
- * @param {Vec3} target Optional. Target vector to save in.
- * @return {Vec3} The solution x
- * @todo should reuse arrays
- */
-Mat3.prototype.solve = function(b,target){
-    target = target || new Vec3();
-
-    // Construct equations
-    var nr = 3; // num rows
-    var nc = 4; // num cols
-    var eqns = [];
-    for(var i=0; i<nr*nc; i++){
-        eqns.push(0);
-    }
-    var i,j;
-    for(i=0; i<3; i++){
-        for(j=0; j<3; j++){
-            eqns[i+nc*j] = this.elements[i+3*j];
-        }
-    }
-    eqns[3+4*0] = b.x;
-    eqns[3+4*1] = b.y;
-    eqns[3+4*2] = b.z;
-
-    // Compute right upper triangular version of the matrix - Gauss elimination
-    var n = 3, k = n, np;
-    var kp = 4; // num rows
-    var p, els;
-    do {
-        i = k - n;
-        if (eqns[i+nc*i] === 0) {
-            // the pivot is null, swap lines
-            for (j = i + 1; j < k; j++) {
-                if (eqns[i+nc*j] !== 0) {
-                    np = kp;
-                    do {  // do ligne( i ) = ligne( i ) + ligne( k )
-                        p = kp - np;
-                        eqns[p+nc*i] += eqns[p+nc*j];
-                    } while (--np);
-                    break;
-                }
-            }
-        }
-        if (eqns[i+nc*i] !== 0) {
-            for (j = i + 1; j < k; j++) {
-                var multiplier = eqns[i+nc*j] / eqns[i+nc*i];
-                np = kp;
-                do {  // do ligne( k ) = ligne( k ) - multiplier * ligne( i )
-                    p = kp - np;
-                    eqns[p+nc*j] = p <= i ? 0 : eqns[p+nc*j] - eqns[p+nc*i] * multiplier ;
-                } while (--np);
-            }
-        }
-    } while (--n);
-
-    // Get the solution
-    target.z = eqns[2*nc+3] / eqns[2*nc+2];
-    target.y = (eqns[1*nc+3] - eqns[1*nc+2]*target.z) / eqns[1*nc+1];
-    target.x = (eqns[0*nc+3] - eqns[0*nc+2]*target.z - eqns[0*nc+1]*target.y) / eqns[0*nc+0];
-
-    if(isNaN(target.x) || isNaN(target.y) || isNaN(target.z) || target.x===Infinity || target.y===Infinity || target.z===Infinity){
-        throw "Could not solve equation! Got x=["+target.toString()+"], b=["+b.toString()+"], A=["+this.toString()+"]";
-    }
-
-    return target;
-};
-
-/**
- * Get an element in the matrix by index. Index starts at 0, not 1!!!
- * @method e
- * @param {Number} row
- * @param {Number} column
- * @param {Number} value Optional. If provided, the matrix element will be set to this value.
- * @return {Number}
- */
-Mat3.prototype.e = function( row , column ,value){
-    if(value===undefined){
-        return this.elements[column+3*row];
-    } else {
-        // Set value
-        this.elements[column+3*row] = value;
-    }
-};
-
-/**
- * Copy another matrix into this matrix object.
- * @method copy
- * @param {Mat3} source
- * @return {Mat3} this
- */
-Mat3.prototype.copy = function(source){
-    for(var i=0; i < source.elements.length; i++){
-        this.elements[i] = source.elements[i];
-    }
-    return this;
-};
-
-/**
- * Returns a string representation of the matrix.
- * @method toString
- * @return string
- */
-Mat3.prototype.toString = function(){
-    var r = "";
-    var sep = ",";
-    for(var i=0; i<9; i++){
-        r += this.elements[i] + sep;
-    }
-    return r;
-};
-
-/**
- * reverse the matrix
- * @method reverse
- * @param {Mat3} target Optional. Target matrix to save in.
- * @return {Mat3} The solution x
- */
-Mat3.prototype.reverse = function(target){
-
-    target = target || new Mat3();
-
-    // Construct equations
-    var nr = 3; // num rows
-    var nc = 6; // num cols
-    var eqns = [];
-    for(var i=0; i<nr*nc; i++){
-        eqns.push(0);
-    }
-    var i,j;
-    for(i=0; i<3; i++){
-        for(j=0; j<3; j++){
-            eqns[i+nc*j] = this.elements[i+3*j];
-        }
-    }
-    eqns[3+6*0] = 1;
-    eqns[3+6*1] = 0;
-    eqns[3+6*2] = 0;
-    eqns[4+6*0] = 0;
-    eqns[4+6*1] = 1;
-    eqns[4+6*2] = 0;
-    eqns[5+6*0] = 0;
-    eqns[5+6*1] = 0;
-    eqns[5+6*2] = 1;
-
-    // Compute right upper triangular version of the matrix - Gauss elimination
-    var n = 3, k = n, np;
-    var kp = nc; // num rows
-    var p;
-    do {
-        i = k - n;
-        if (eqns[i+nc*i] === 0) {
-            // the pivot is null, swap lines
-            for (j = i + 1; j < k; j++) {
-                if (eqns[i+nc*j] !== 0) {
-                    np = kp;
-                    do { // do line( i ) = line( i ) + line( k )
-                        p = kp - np;
-                        eqns[p+nc*i] += eqns[p+nc*j];
-                    } while (--np);
-                    break;
-                }
-            }
-        }
-        if (eqns[i+nc*i] !== 0) {
-            for (j = i + 1; j < k; j++) {
-                var multiplier = eqns[i+nc*j] / eqns[i+nc*i];
-                np = kp;
-                do { // do line( k ) = line( k ) - multiplier * line( i )
-                    p = kp - np;
-                    eqns[p+nc*j] = p <= i ? 0 : eqns[p+nc*j] - eqns[p+nc*i] * multiplier ;
-                } while (--np);
-            }
-        }
-    } while (--n);
-
-    // eliminate the upper left triangle of the matrix
-    i = 2;
-    do {
-        j = i-1;
-        do {
-            var multiplier = eqns[i+nc*j] / eqns[i+nc*i];
-            np = nc;
-            do {
-                p = nc - np;
-                eqns[p+nc*j] =  eqns[p+nc*j] - eqns[p+nc*i] * multiplier ;
-            } while (--np);
-        } while (j--);
-    } while (--i);
-
-    // operations on the diagonal
-    i = 2;
-    do {
-        var multiplier = 1 / eqns[i+nc*i];
-        np = nc;
-        do {
-            p = nc - np;
-            eqns[p+nc*i] = eqns[p+nc*i] * multiplier ;
-        } while (--np);
-    } while (i--);
-
-    i = 2;
-    do {
-        j = 2;
-        do {
-            p = eqns[nr+j+nc*i];
-            if( isNaN( p ) || p ===Infinity ){
-                throw "Could not reverse! A=["+this.toString()+"]";
-            }
-            target.e( i , j , p );
-        } while (j--);
-    } while (i--);
-
-    return target;
-};
-
-/**
- * Set the matrix from a quaterion
- * @method setRotationFromQuaternion
- * @param {Quaternion} q
- */
-Mat3.prototype.setRotationFromQuaternion = function( q ) {
-    var x = q.x, y = q.y, z = q.z, w = q.w,
-        x2 = x + x, y2 = y + y, z2 = z + z,
-        xx = x * x2, xy = x * y2, xz = x * z2,
-        yy = y * y2, yz = y * z2, zz = z * z2,
-        wx = w * x2, wy = w * y2, wz = w * z2,
-        e = this.elements;
-
-    e[3*0 + 0] = 1 - ( yy + zz );
-    e[3*0 + 1] = xy - wz;
-    e[3*0 + 2] = xz + wy;
-
-    e[3*1 + 0] = xy + wz;
-    e[3*1 + 1] = 1 - ( xx + zz );
-    e[3*1 + 2] = yz - wx;
-
-    e[3*2 + 0] = xz - wy;
-    e[3*2 + 1] = yz + wx;
-    e[3*2 + 2] = 1 - ( xx + yy );
-
-    return this;
-};
-
-/**
- * Transpose the matrix
- * @method transpose
- * @param  {Mat3} target Where to store the result.
- * @return {Mat3} The target Mat3, or a new Mat3 if target was omitted.
- */
-Mat3.prototype.transpose = function( target ) {
-    target = target || new Mat3();
-
-    var Mt = target.elements,
-        M = this.elements;
-
-    for(var i=0; i!==3; i++){
-        for(var j=0; j!==3; j++){
-            Mt[3*i + j] = M[3*j + i];
-        }
-    }
-
-    return target;
-};
-
-},{"./Vec3":30}],28:[function(_dereq_,module,exports){
-module.exports = Quaternion;
-
-var Vec3 = _dereq_('./Vec3');
-
-/**
- * A Quaternion describes a rotation in 3D space. The Quaternion is mathematically defined as Q = x*i + y*j + z*k + w, where (i,j,k) are imaginary basis vectors. (x,y,z) can be seen as a vector related to the axis of rotation, while the real multiplier, w, is related to the amount of rotation.
- * @class Quaternion
- * @constructor
- * @param {Number} x Multiplier of the imaginary basis vector i.
- * @param {Number} y Multiplier of the imaginary basis vector j.
- * @param {Number} z Multiplier of the imaginary basis vector k.
- * @param {Number} w Multiplier of the real part.
- * @see http://en.wikipedia.org/wiki/Quaternion
- */
-function Quaternion(x,y,z,w){
-    /**
-     * @property {Number} x
-     */
-    this.x = x!==undefined ? x : 0;
-
-    /**
-     * @property {Number} y
-     */
-    this.y = y!==undefined ? y : 0;
-
-    /**
-     * @property {Number} z
-     */
-    this.z = z!==undefined ? z : 0;
-
-    /**
-     * The multiplier of the real quaternion basis vector.
-     * @property {Number} w
-     */
-    this.w = w!==undefined ? w : 1;
-}
-
-/**
- * Set the value of the quaternion.
- * @method set
- * @param {Number} x
- * @param {Number} y
- * @param {Number} z
- * @param {Number} w
- */
-Quaternion.prototype.set = function(x,y,z,w){
-    this.x = x;
-    this.y = y;
-    this.z = z;
-    this.w = w;
-};
-
-/**
- * Convert to a readable format
- * @method toString
- * @return string
- */
-Quaternion.prototype.toString = function(){
-    return this.x+","+this.y+","+this.z+","+this.w;
-};
-
-/**
- * Convert to an Array
- * @method toArray
- * @return Array
- */
-Quaternion.prototype.toArray = function(){
-    return [this.x, this.y, this.z, this.w];
-};
-
-/**
- * Set the quaternion components given an axis and an angle.
- * @method setFromAxisAngle
- * @param {Vec3} axis
- * @param {Number} angle in radians
- */
-Quaternion.prototype.setFromAxisAngle = function(axis,angle){
-    var s = Math.sin(angle*0.5);
-    this.x = axis.x * s;
-    this.y = axis.y * s;
-    this.z = axis.z * s;
-    this.w = Math.cos(angle*0.5);
-};
-
-/**
- * Converts the quaternion to axis/angle representation.
- * @method toAxisAngle
- * @param {Vec3} targetAxis Optional. A vector object to reuse for storing the axis.
- * @return Array An array, first elemnt is the axis and the second is the angle in radians.
- */
-Quaternion.prototype.toAxisAngle = function(targetAxis){
-    targetAxis = targetAxis || new Vec3();
-    this.normalize(); // if w>1 acos and sqrt will produce errors, this cant happen if quaternion is normalised
-    var angle = 2 * Math.acos(this.w);
-    var s = Math.sqrt(1-this.w*this.w); // assuming quaternion normalised then w is less than 1, so term always positive.
-    if (s < 0.001) { // test to avoid divide by zero, s is always positive due to sqrt
-        // if s close to zero then direction of axis not important
-        targetAxis.x = this.x; // if it is important that axis is normalised then replace with x=1; y=z=0;
-        targetAxis.y = this.y;
-        targetAxis.z = this.z;
-    } else {
-        targetAxis.x = this.x / s; // normalise axis
-        targetAxis.y = this.y / s;
-        targetAxis.z = this.z / s;
-    }
-    return [targetAxis,angle];
-};
-
-var sfv_t1 = new Vec3(),
-    sfv_t2 = new Vec3();
-
-/**
- * Set the quaternion value given two vectors. The resulting rotation will be the needed rotation to rotate u to v.
- * @method setFromVectors
- * @param {Vec3} u
- * @param {Vec3} v
- */
-Quaternion.prototype.setFromVectors = function(u,v){
-    if(u.isAntiparallelTo(v)){
-        var t1 = sfv_t1;
-        var t2 = sfv_t2;
-
-        u.tangents(t1,t2);
-        this.setFromAxisAngle(t1,Math.PI);
-    } else {
-        var a = u.cross(v);
-        this.x = a.x;
-        this.y = a.y;
-        this.z = a.z;
-        this.w = Math.sqrt(Math.pow(u.norm(),2) * Math.pow(v.norm(),2)) + u.dot(v);
-        this.normalize();
-    }
-};
-
-/**
- * Quaternion multiplication
- * @method mult
- * @param {Quaternion} q
- * @param {Quaternion} target Optional.
- * @return {Quaternion}
- */
-var Quaternion_mult_va = new Vec3();
-var Quaternion_mult_vb = new Vec3();
-var Quaternion_mult_vaxvb = new Vec3();
-Quaternion.prototype.mult = function(q,target){
-    target = target || new Quaternion();
-    var w = this.w,
-        va = Quaternion_mult_va,
-        vb = Quaternion_mult_vb,
-        vaxvb = Quaternion_mult_vaxvb;
-
-    va.set(this.x,this.y,this.z);
-    vb.set(q.x,q.y,q.z);
-    target.w = w*q.w - va.dot(vb);
-    va.cross(vb,vaxvb);
-
-    target.x = w * vb.x + q.w*va.x + vaxvb.x;
-    target.y = w * vb.y + q.w*va.y + vaxvb.y;
-    target.z = w * vb.z + q.w*va.z + vaxvb.z;
-
-    return target;
-};
-
-/**
- * Get the inverse quaternion rotation.
- * @method inverse
- * @param {Quaternion} target
- * @return {Quaternion}
- */
-Quaternion.prototype.inverse = function(target){
-    var x = this.x, y = this.y, z = this.z, w = this.w;
-    target = target || new Quaternion();
-
-    this.conjugate(target);
-    var inorm2 = 1/(x*x + y*y + z*z + w*w);
-    target.x *= inorm2;
-    target.y *= inorm2;
-    target.z *= inorm2;
-    target.w *= inorm2;
-
-    return target;
-};
-
-/**
- * Get the quaternion conjugate
- * @method conjugate
- * @param {Quaternion} target
- * @return {Quaternion}
- */
-Quaternion.prototype.conjugate = function(target){
-    target = target || new Quaternion();
-
-    target.x = -this.x;
-    target.y = -this.y;
-    target.z = -this.z;
-    target.w = this.w;
-
-    return target;
-};
-
-/**
- * Normalize the quaternion. Note that this changes the values of the quaternion.
- * @method normalize
- */
-Quaternion.prototype.normalize = function(){
-    var l = Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);
-    if ( l === 0 ) {
-        this.x = 0;
-        this.y = 0;
-        this.z = 0;
-        this.w = 0;
-    } else {
-        l = 1 / l;
-        this.x *= l;
-        this.y *= l;
-        this.z *= l;
-        this.w *= l;
-    }
-};
-
-/**
- * Approximation of quaternion normalization. Works best when quat is already almost-normalized.
- * @method normalizeFast
- * @see http://jsperf.com/fast-quaternion-normalization
- * @author unphased, https://github.com/unphased
- */
-Quaternion.prototype.normalizeFast = function () {
-    var f = (3.0-(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w))/2.0;
-    if ( f === 0 ) {
-        this.x = 0;
-        this.y = 0;
-        this.z = 0;
-        this.w = 0;
-    } else {
-        this.x *= f;
-        this.y *= f;
-        this.z *= f;
-        this.w *= f;
-    }
-};
-
-/**
- * Multiply the quaternion by a vector
- * @method vmult
- * @param {Vec3} v
- * @param {Vec3} target Optional
- * @return {Vec3}
- */
-Quaternion.prototype.vmult = function(v,target){
-    target = target || new Vec3();
-
-    var x = v.x,
-        y = v.y,
-        z = v.z;
-
-    var qx = this.x,
-        qy = this.y,
-        qz = this.z,
-        qw = this.w;
-
-    // q*v
-    var ix =  qw * x + qy * z - qz * y,
-    iy =  qw * y + qz * x - qx * z,
-    iz =  qw * z + qx * y - qy * x,
-    iw = -qx * x - qy * y - qz * z;
-
-    target.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;
-    target.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;
-    target.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;
-
-    return target;
-};
-
-/**
- * Copies value of source to this quaternion.
- * @method copy
- * @param {Quaternion} source
- * @return {Quaternion} this
- */
-Quaternion.prototype.copy = function(source){
-    this.x = source.x;
-    this.y = source.y;
-    this.z = source.z;
-    this.w = source.w;
-    return this;
-};
-
-/**
- * Convert the quaternion to euler angle representation. Order: YZX, as this page describes: http://www.euclideanspace.com/maths/standards/index.htm
- * @method toEuler
- * @param {Vec3} target
- * @param string order Three-character string e.g. "YZX", which also is default.
- */
-Quaternion.prototype.toEuler = function(target,order){
-    order = order || "YZX";
-
-    var heading, attitude, bank;
-    var x = this.x, y = this.y, z = this.z, w = this.w;
-
-    switch(order){
-    case "YZX":
-        var test = x*y + z*w;
-        if (test > 0.499) { // singularity at north pole
-            heading = 2 * Math.atan2(x,w);
-            attitude = Math.PI/2;
-            bank = 0;
-        }
-        if (test < -0.499) { // singularity at south pole
-            heading = -2 * Math.atan2(x,w);
-            attitude = - Math.PI/2;
-            bank = 0;
-        }
-        if(isNaN(heading)){
-            var sqx = x*x;
-            var sqy = y*y;
-            var sqz = z*z;
-            heading = Math.atan2(2*y*w - 2*x*z , 1 - 2*sqy - 2*sqz); // Heading
-            attitude = Math.asin(2*test); // attitude
-            bank = Math.atan2(2*x*w - 2*y*z , 1 - 2*sqx - 2*sqz); // bank
-        }
-        break;
-    default:
-        throw new Error("Euler order "+order+" not supported yet.");
-    }
-
-    target.y = heading;
-    target.z = attitude;
-    target.x = bank;
-};
-
-/**
- * See http://www.mathworks.com/matlabcentral/fileexchange/20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/content/SpinCalc.m
- * @method setFromEuler
- * @param {Number} x
- * @param {Number} y
- * @param {Number} z
- * @param {String} order The order to apply angles: 'XYZ' or 'YXZ' or any other combination
- */
-Quaternion.prototype.setFromEuler = function ( x, y, z, order ) {
-    order = order || "XYZ";
-
-    var c1 = Math.cos( x / 2 );
-    var c2 = Math.cos( y / 2 );
-    var c3 = Math.cos( z / 2 );
-    var s1 = Math.sin( x / 2 );
-    var s2 = Math.sin( y / 2 );
-    var s3 = Math.sin( z / 2 );
-
-    if ( order === 'XYZ' ) {
-
-        this.x = s1 * c2 * c3 + c1 * s2 * s3;
-        this.y = c1 * s2 * c3 - s1 * c2 * s3;
-        this.z = c1 * c2 * s3 + s1 * s2 * c3;
-        this.w = c1 * c2 * c3 - s1 * s2 * s3;
-
-    } else if ( order === 'YXZ' ) {
-
-        this.x = s1 * c2 * c3 + c1 * s2 * s3;
-        this.y = c1 * s2 * c3 - s1 * c2 * s3;
-        this.z = c1 * c2 * s3 - s1 * s2 * c3;
-        this.w = c1 * c2 * c3 + s1 * s2 * s3;
-
-    } else if ( order === 'ZXY' ) {
-
-        this.x = s1 * c2 * c3 - c1 * s2 * s3;
-        this.y = c1 * s2 * c3 + s1 * c2 * s3;
-        this.z = c1 * c2 * s3 + s1 * s2 * c3;
-        this.w = c1 * c2 * c3 - s1 * s2 * s3;
-
-    } else if ( order === 'ZYX' ) {
-
-        this.x = s1 * c2 * c3 - c1 * s2 * s3;
-        this.y = c1 * s2 * c3 + s1 * c2 * s3;
-        this.z = c1 * c2 * s3 - s1 * s2 * c3;
-        this.w = c1 * c2 * c3 + s1 * s2 * s3;
-
-    } else if ( order === 'YZX' ) {
-
-        this.x = s1 * c2 * c3 + c1 * s2 * s3;
-        this.y = c1 * s2 * c3 + s1 * c2 * s3;
-        this.z = c1 * c2 * s3 - s1 * s2 * c3;
-        this.w = c1 * c2 * c3 - s1 * s2 * s3;
-
-    } else if ( order === 'XZY' ) {
-
-        this.x = s1 * c2 * c3 - c1 * s2 * s3;
-        this.y = c1 * s2 * c3 - s1 * c2 * s3;
-        this.z = c1 * c2 * s3 + s1 * s2 * c3;
-        this.w = c1 * c2 * c3 + s1 * s2 * s3;
-
-    }
-
-    return this;
-
-};
-
-Quaternion.prototype.clone = function(){
-    return new Quaternion(this.x, this.y, this.z, this.w);
-};
-},{"./Vec3":30}],29:[function(_dereq_,module,exports){
-var Vec3 = _dereq_('./Vec3');
-var Quaternion = _dereq_('./Quaternion');
-
-module.exports = Transform;
-
-/**
- * @class Transform
- * @constructor
- */
-function Transform(options) {
-    options = options || {};
-
-	/**
-	 * @property {Vec3} position
-	 */
-	this.position = new Vec3();
-    if(options.position){
-        this.position.copy(options.position);
-    }
-
-	/**
-	 * @property {Quaternion} quaternion
-	 */
-	this.quaternion = new Quaternion();
-    if(options.quaternion){
-        this.quaternion.copy(options.quaternion);
-    }
-}
-
-var tmpQuat = new Quaternion();
-
-/**
- * @static
- * @method pointToLocaFrame
- * @param {Vec3} position
- * @param {Quaternion} quaternion
- * @param {Vec3} worldPoint
- * @param {Vec3} result
- */
-Transform.pointToLocalFrame = function(position, quaternion, worldPoint, result){
-    var result = result || new Vec3();
-    worldPoint.vsub(position, result);
-    quaternion.conjugate(tmpQuat);
-    tmpQuat.vmult(result, result);
-    return result;
-};
-
-/**
- * Get a global point in local transform coordinates.
- * @method pointToLocal
- * @param  {Vec3} point
- * @param  {Vec3} result
- * @return {Vec3} The "result" vector object
- */
-Transform.prototype.pointToLocal = function(worldPoint, result){
-    return Transform.pointToLocalFrame(this.position, this.quaternion, worldPoint, result);
-};
-
-/**
- * @static
- * @method pointToWorldFrame
- * @param {Vec3} position
- * @param {Vec3} quaternion
- * @param {Vec3} localPoint
- * @param {Vec3} result
- */
-Transform.pointToWorldFrame = function(position, quaternion, localPoint, result){
-    var result = result || new Vec3();
-    quaternion.vmult(localPoint, result);
-    result.vadd(position, result);
-    return result;
-};
-
-/**
- * Get a local point in global transform coordinates.
- * @method pointToWorld
- * @param  {Vec3} point
- * @param  {Vec3} result
- * @return {Vec3} The "result" vector object
- */
-Transform.prototype.pointToWorld = function(localPoint, result){
-    return Transform.pointToWorldFrame(this.position, this.quaternion, localPoint, result);
-};
-
-
-Transform.prototype.vectorToWorldFrame = function(localVector, result){
-    var result = result || new Vec3();
-    this.quaternion.vmult(localVector, result);
-    return result;
-};
-
-Transform.vectorToWorldFrame = function(quaternion, localVector, result){
-    quaternion.vmult(localVector, result);
-    return result;
-};
-
-Transform.vectorToLocalFrame = function(position, quaternion, worldVector, result){
-    var result = result || new Vec3();
-    quaternion.w *= -1;
-    quaternion.vmult(worldVector, result);
-    quaternion.w *= -1;
-    return result;
-};
-
-},{"./Quaternion":28,"./Vec3":30}],30:[function(_dereq_,module,exports){
-module.exports = Vec3;
-
-var Mat3 = _dereq_('./Mat3');
-
-/**
- * 3-dimensional vector
- * @class Vec3
- * @constructor
- * @param {Number} x
- * @param {Number} y
- * @param {Number} z
- * @author schteppe
- * @example
- *     var v = new Vec3(1, 2, 3);
- *     console.log('x=' + v.x); // x=1
- */
-function Vec3(x,y,z){
-    /**
-     * @property x
-     * @type {Number}
-     */
-    this.x = x||0.0;
-
-    /**
-     * @property y
-     * @type {Number}
-     */
-    this.y = y||0.0;
-
-    /**
-     * @property z
-     * @type {Number}
-     */
-    this.z = z||0.0;
-}
-
-/**
- * @static
- * @property {Vec3} ZERO
- */
-Vec3.ZERO = new Vec3(0, 0, 0);
-
-/**
- * @static
- * @property {Vec3} UNIT_X
- */
-Vec3.UNIT_X = new Vec3(1, 0, 0);
-
-/**
- * @static
- * @property {Vec3} UNIT_Y
- */
-Vec3.UNIT_Y = new Vec3(0, 1, 0);
-
-/**
- * @static
- * @property {Vec3} UNIT_Z
- */
-Vec3.UNIT_Z = new Vec3(0, 0, 1);
-
-/**
- * Vector cross product
- * @method cross
- * @param {Vec3} v
- * @param {Vec3} target Optional. Target to save in.
- * @return {Vec3}
- */
-Vec3.prototype.cross = function(v,target){
-    var vx=v.x, vy=v.y, vz=v.z, x=this.x, y=this.y, z=this.z;
-    target = target || new Vec3();
-
-    target.x = (y * vz) - (z * vy);
-    target.y = (z * vx) - (x * vz);
-    target.z = (x * vy) - (y * vx);
-
-    return target;
-};
-
-/**
- * Set the vectors' 3 elements
- * @method set
- * @param {Number} x
- * @param {Number} y
- * @param {Number} z
- * @return Vec3
- */
-Vec3.prototype.set = function(x,y,z){
-    this.x = x;
-    this.y = y;
-    this.z = z;
-    return this;
-};
-
-/**
- * Set all components of the vector to zero.
- * @method setZero
- */
-Vec3.prototype.setZero = function(){
-    this.x = this.y = this.z = 0;
-};
-
-/**
- * Vector addition
- * @method vadd
- * @param {Vec3} v
- * @param {Vec3} target Optional.
- * @return {Vec3}
- */
-Vec3.prototype.vadd = function(v,target){
-    if(target){
-        target.x = v.x + this.x;
-        target.y = v.y + this.y;
-        target.z = v.z + this.z;
-    } else {
-        return new Vec3(this.x + v.x,
-                               this.y + v.y,
-                               this.z + v.z);
-    }
-};
-
-/**
- * Vector subtraction
- * @method vsub
- * @param {Vec3} v
- * @param {Vec3} target Optional. Target to save in.
- * @return {Vec3}
- */
-Vec3.prototype.vsub = function(v,target){
-    if(target){
-        target.x = this.x - v.x;
-        target.y = this.y - v.y;
-        target.z = this.z - v.z;
-    } else {
-        return new Vec3(this.x-v.x,
-                               this.y-v.y,
-                               this.z-v.z);
-    }
-};
-
-/**
- * Get the cross product matrix a_cross from a vector, such that a x b = a_cross * b = c
- * @method crossmat
- * @see http://www8.cs.umu.se/kurser/TDBD24/VT06/lectures/Lecture6.pdf
- * @return {Mat3}
- */
-Vec3.prototype.crossmat = function(){
-    return new Mat3([     0,  -this.z,   this.y,
-                            this.z,        0,  -this.x,
-                           -this.y,   this.x,        0]);
-};
-
-/**
- * Normalize the vector. Note that this changes the values in the vector.
- * @method normalize
- * @return {Number} Returns the norm of the vector
- */
-Vec3.prototype.normalize = function(){
-    var x=this.x, y=this.y, z=this.z;
-    var n = Math.sqrt(x*x + y*y + z*z);
-    if(n>0.0){
-        var invN = 1/n;
-        this.x *= invN;
-        this.y *= invN;
-        this.z *= invN;
-    } else {
-        // Make something up
-        this.x = 0;
-        this.y = 0;
-        this.z = 0;
-    }
-    return n;
-};
-
-/**
- * Get the version of this vector that is of length 1.
- * @method unit
- * @param {Vec3} target Optional target to save in
- * @return {Vec3} Returns the unit vector
- */
-Vec3.prototype.unit = function(target){
-    target = target || new Vec3();
-    var x=this.x, y=this.y, z=this.z;
-    var ninv = Math.sqrt(x*x + y*y + z*z);
-    if(ninv>0.0){
-        ninv = 1.0/ninv;
-        target.x = x * ninv;
-        target.y = y * ninv;
-        target.z = z * ninv;
-    } else {
-        target.x = 1;
-        target.y = 0;
-        target.z = 0;
-    }
-    return target;
-};
-
-/**
- * Get the length of the vector
- * @method norm
- * @return {Number}
- * @deprecated Use .length() instead
- */
-Vec3.prototype.norm = function(){
-    var x=this.x, y=this.y, z=this.z;
-    return Math.sqrt(x*x + y*y + z*z);
-};
-
-/**
- * Get the length of the vector
- * @method length
- * @return {Number}
- */
-Vec3.prototype.length = Vec3.prototype.norm;
-
-/**
- * Get the squared length of the vector
- * @method norm2
- * @return {Number}
- * @deprecated Use .lengthSquared() instead.
- */
-Vec3.prototype.norm2 = function(){
-    return this.dot(this);
-};
-
-/**
- * Get the squared length of the vector.
- * @method lengthSquared
- * @return {Number}
- */
-Vec3.prototype.lengthSquared = Vec3.prototype.norm2;
-
-/**
- * Get distance from this point to another point
- * @method distanceTo
- * @param  {Vec3} p
- * @return {Number}
- */
-Vec3.prototype.distanceTo = function(p){
-    var x=this.x, y=this.y, z=this.z;
-    var px=p.x, py=p.y, pz=p.z;
-    return Math.sqrt((px-x)*(px-x)+
-                     (py-y)*(py-y)+
-                     (pz-z)*(pz-z));
-};
-
-/**
- * Get squared distance from this point to another point
- * @method distanceSquared
- * @param  {Vec3} p
- * @return {Number}
- */
-Vec3.prototype.distanceSquared = function(p){
-    var x=this.x, y=this.y, z=this.z;
-    var px=p.x, py=p.y, pz=p.z;
-    return (px-x)*(px-x) + (py-y)*(py-y) + (pz-z)*(pz-z);
-};
-
-/**
- * Multiply all the components of the vector with a scalar.
- * @deprecated Use .scale instead
- * @method mult
- * @param {Number} scalar
- * @param {Vec3} target The vector to save the result in.
- * @return {Vec3}
- * @deprecated Use .scale() instead
- */
-Vec3.prototype.mult = function(scalar,target){
-    target = target || new Vec3();
-    var x = this.x,
-        y = this.y,
-        z = this.z;
-    target.x = scalar * x;
-    target.y = scalar * y;
-    target.z = scalar * z;
-    return target;
-};
-
-/**
- * Multiply the vector with a scalar.
- * @method scale
- * @param {Number} scalar
- * @param {Vec3} target
- * @return {Vec3}
- */
-Vec3.prototype.scale = Vec3.prototype.mult;
-
-/**
- * Calculate dot product
- * @method dot
- * @param {Vec3} v
- * @return {Number}
- */
-Vec3.prototype.dot = function(v){
-    return this.x * v.x + this.y * v.y + this.z * v.z;
-};
-
-/**
- * @method isZero
- * @return bool
- */
-Vec3.prototype.isZero = function(){
-    return this.x===0 && this.y===0 && this.z===0;
-};
-
-/**
- * Make the vector point in the opposite direction.
- * @method negate
- * @param {Vec3} target Optional target to save in
- * @return {Vec3}
- */
-Vec3.prototype.negate = function(target){
-    target = target || new Vec3();
-    target.x = -this.x;
-    target.y = -this.y;
-    target.z = -this.z;
-    return target;
-};
-
-/**
- * Compute two artificial tangents to the vector
- * @method tangents
- * @param {Vec3} t1 Vector object to save the first tangent in
- * @param {Vec3} t2 Vector object to save the second tangent in
- */
-var Vec3_tangents_n = new Vec3();
-var Vec3_tangents_randVec = new Vec3();
-Vec3.prototype.tangents = function(t1,t2){
-    var norm = this.norm();
-    if(norm>0.0){
-        var n = Vec3_tangents_n;
-        var inorm = 1/norm;
-        n.set(this.x*inorm,this.y*inorm,this.z*inorm);
-        var randVec = Vec3_tangents_randVec;
-        if(Math.abs(n.x) < 0.9){
-            randVec.set(1,0,0);
-            n.cross(randVec,t1);
-        } else {
-            randVec.set(0,1,0);
-            n.cross(randVec,t1);
-        }
-        n.cross(t1,t2);
-    } else {
-        // The normal length is zero, make something up
-        t1.set(1, 0, 0);
-        t2.set(0, 1, 0);
-    }
-};
-
-/**
- * Converts to a more readable format
- * @method toString
- * @return string
- */
-Vec3.prototype.toString = function(){
-    return this.x+","+this.y+","+this.z;
-};
-
-/**
- * Converts to an array
- * @method toArray
- * @return Array
- */
-Vec3.prototype.toArray = function(){
-    return [this.x, this.y, this.z];
-};
-
-/**
- * Copies value of source to this vector.
- * @method copy
- * @param {Vec3} source
- * @return {Vec3} this
- */
-Vec3.prototype.copy = function(source){
-    this.x = source.x;
-    this.y = source.y;
-    this.z = source.z;
-    return this;
-};
-
-
-/**
- * Do a linear interpolation between two vectors
- * @method lerp
- * @param {Vec3} v
- * @param {Number} t A number between 0 and 1. 0 will make this function return u, and 1 will make it return v. Numbers in between will generate a vector in between them.
- * @param {Vec3} target
- */
-Vec3.prototype.lerp = function(v,t,target){
-    var x=this.x, y=this.y, z=this.z;
-    target.x = x + (v.x-x)*t;
-    target.y = y + (v.y-y)*t;
-    target.z = z + (v.z-z)*t;
-};
-
-/**
- * Check if a vector equals is almost equal to another one.
- * @method almostEquals
- * @param {Vec3} v
- * @param {Number} precision
- * @return bool
- */
-Vec3.prototype.almostEquals = function(v,precision){
-    if(precision===undefined){
-        precision = 1e-6;
-    }
-    if( Math.abs(this.x-v.x)>precision ||
-        Math.abs(this.y-v.y)>precision ||
-        Math.abs(this.z-v.z)>precision){
-        return false;
-    }
-    return true;
-};
-
-/**
- * Check if a vector is almost zero
- * @method almostZero
- * @param {Number} precision
- */
-Vec3.prototype.almostZero = function(precision){
-    if(precision===undefined){
-        precision = 1e-6;
-    }
-    if( Math.abs(this.x)>precision ||
-        Math.abs(this.y)>precision ||
-        Math.abs(this.z)>precision){
-        return false;
-    }
-    return true;
-};
-
-var antip_neg = new Vec3();
-
-/**
- * Check if the vector is anti-parallel to another vector.
- * @method isAntiparallelTo
- * @param  {Vec3}  v
- * @param  {Number}  precision Set to zero for exact comparisons
- * @return {Boolean}
- */
-Vec3.prototype.isAntiparallelTo = function(v,precision){
-    this.negate(antip_neg);
-    return antip_neg.almostEquals(v,precision);
-};
-
-/**
- * Clone the vector
- * @method clone
- * @return {Vec3}
- */
-Vec3.prototype.clone = function(){
-    return new Vec3(this.x, this.y, this.z);
-};
-},{"./Mat3":27}],31:[function(_dereq_,module,exports){
-module.exports = Body;
-
-var EventTarget = _dereq_('../utils/EventTarget');
-var Shape = _dereq_('../shapes/Shape');
-var Vec3 = _dereq_('../math/Vec3');
-var Mat3 = _dereq_('../math/Mat3');
-var Quaternion = _dereq_('../math/Quaternion');
-var Material = _dereq_('../material/Material');
-var AABB = _dereq_('../collision/AABB');
-var Box = _dereq_('../shapes/Box');
-
-/**
- * Base class for all body types.
- * @class Body
- * @constructor
- * @extends EventTarget
- * @param {object} [options]
- * @param {Vec3} [options.position]
- * @param {Vec3} [options.velocity]
- * @param {Vec3} [options.angularVelocity]
- * @param {Quaternion} [options.quaternion]
- * @param {number} [options.mass]
- * @param {Material} [options.material]
- * @param {number} [options.type]
- * @param {number} [options.linearDamping=0.01]
- * @param {number} [options.angularDamping=0.01]
- * @param {boolean} [options.allowSleep=true]
- * @param {number} [options.sleepSpeedLimit=0.1]
- * @param {number} [options.sleepTimeLimit=1]
- * @param {number} [options.collisionFilterGroup=1]
- * @param {number} [options.collisionFilterMask=1]
- * @param {boolean} [options.fixedRotation=false]
- * @param {Body} [options.shape]
- * @example
- *     var body = new Body({
- *         mass: 1
- *     });
- *     var shape = new Sphere(1);
- *     body.addShape(shape);
- *     world.add(body);
- */
-function Body(options){
-    options = options || {};
-
-    EventTarget.apply(this);
-
-    this.id = Body.idCounter++;
-
-    /**
-     * Reference to the world the body is living in
-     * @property world
-     * @type {World}
-     */
-    this.world = null;
-
-    /**
-     * Callback function that is used BEFORE stepping the system. Use it to apply forces, for example. Inside the function, "this" will refer to this Body object.
-     * @property preStep
-     * @type {Function}
-     * @deprecated Use World events instead
-     */
-    this.preStep = null;
-
-    /**
-     * Callback function that is used AFTER stepping the system. Inside the function, "this" will refer to this Body object.
-     * @property postStep
-     * @type {Function}
-     * @deprecated Use World events instead
-     */
-    this.postStep = null;
-
-    this.vlambda = new Vec3();
-
-    /**
-     * @property {Number} collisionFilterGroup
-     */
-    this.collisionFilterGroup = typeof(options.collisionFilterGroup) === 'number' ? options.collisionFilterGroup : 1;
-
-    /**
-     * @property {Number} collisionFilterMask
-     */
-    this.collisionFilterMask = typeof(options.collisionFilterMask) === 'number' ? options.collisionFilterMask : 1;
-
-    /**
-     * Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled.
-     * @property {Number} collisionResponse
-     */
-	this.collisionResponse = true;
-
-    /**
-     * @property position
-     * @type {Vec3}
-     */
-    this.position = new Vec3();
-
-    if(options.position){
-        this.position.copy(options.position);
-    }
-
-    /**
-     * @property {Vec3} previousPosition
-     */
-    this.previousPosition = new Vec3();
-
-    /**
-     * Initial position of the body
-     * @property initPosition
-     * @type {Vec3}
-     */
-    this.initPosition = new Vec3();
-
-    /**
-     * @property velocity
-     * @type {Vec3}
-     */
-    this.velocity = new Vec3();
-
-    if(options.velocity){
-        this.velocity.copy(options.velocity);
-    }
-
-    /**
-     * @property initVelocity
-     * @type {Vec3}
-     */
-    this.initVelocity = new Vec3();
-
-    /**
-     * Linear force on the body
-     * @property force
-     * @type {Vec3}
-     */
-    this.force = new Vec3();
-
-    var mass = typeof(options.mass) === 'number' ? options.mass : 0;
-
-    /**
-     * @property mass
-     * @type {Number}
-     * @default 0
-     */
-    this.mass = mass;
-
-    /**
-     * @property invMass
-     * @type {Number}
-     */
-    this.invMass = mass > 0 ? 1.0 / mass : 0;
-
-    /**
-     * @property material
-     * @type {Material}
-     */
-    this.material = options.material || null;
-
-    /**
-     * @property linearDamping
-     * @type {Number}
-     */
-    this.linearDamping = typeof(options.linearDamping) === 'number' ? options.linearDamping : 0.01;
-
-    /**
-     * One of: Body.DYNAMIC, Body.STATIC and Body.KINEMATIC.
-     * @property type
-     * @type {Number}
-     */
-    this.type = (mass <= 0.0 ? Body.STATIC : Body.DYNAMIC);
-    if(typeof(options.type) === typeof(Body.STATIC)){
-        this.type = options.type;
-    }
-
-    /**
-     * If true, the body will automatically fall to sleep.
-     * @property allowSleep
-     * @type {Boolean}
-     * @default true
-     */
-    this.allowSleep = typeof(options.allowSleep) !== 'undefined' ? options.allowSleep : true;
-
-    /**
-     * Current sleep state.
-     * @property sleepState
-     * @type {Number}
-     */
-    this.sleepState = 0;
-
-    /**
-     * If the speed (the norm of the velocity) is smaller than this value, the body is considered sleepy.
-     * @property sleepSpeedLimit
-     * @type {Number}
-     * @default 0.1
-     */
-    this.sleepSpeedLimit = typeof(options.sleepSpeedLimit) !== 'undefined' ? options.sleepSpeedLimit : 0.1;
-
-    /**
-     * If the body has been sleepy for this sleepTimeLimit seconds, it is considered sleeping.
-     * @property sleepTimeLimit
-     * @type {Number}
-     * @default 1
-     */
-    this.sleepTimeLimit = typeof(options.sleepTimeLimit) !== 'undefined' ? options.sleepTimeLimit : 1;
-
-    this.timeLastSleepy = 0;
-
-    this._wakeUpAfterNarrowphase = false;
-
-
-    /**
-     * Rotational force on the body, around center of mass
-     * @property {Vec3} torque
-     */
-    this.torque = new Vec3();
-
-    /**
-     * Orientation of the body
-     * @property quaternion
-     * @type {Quaternion}
-     */
-    this.quaternion = new Quaternion();
-
-    if(options.quaternion){
-        this.quaternion.copy(options.quaternion);
-    }
-
-    /**
-     * @property initQuaternion
-     * @type {Quaternion}
-     */
-    this.initQuaternion = new Quaternion();
-
-    /**
-     * @property angularVelocity
-     * @type {Vec3}
-     */
-    this.angularVelocity = new Vec3();
-
-    if(options.angularVelocity){
-        this.angularVelocity.copy(options.angularVelocity);
-    }
-
-    /**
-     * @property initAngularVelocity
-     * @type {Vec3}
-     */
-    this.initAngularVelocity = new Vec3();
-
-    this.interpolatedPosition = new Vec3();
-    this.interpolatedQuaternion = new Quaternion();
-
-    /**
-     * @property shapes
-     * @type {array}
-     */
-    this.shapes = [];
-
-    /**
-     * @property shapeOffsets
-     * @type {array}
-     */
-    this.shapeOffsets = [];
-
-    /**
-     * @property shapeOrientations
-     * @type {array}
-     */
-    this.shapeOrientations = [];
-
-    /**
-     * @property inertia
-     * @type {Vec3}
-     */
-    this.inertia = new Vec3();
-
-    /**
-     * @property {Vec3} invInertia
-     */
-    this.invInertia = new Vec3();
-
-    /**
-     * @property {Mat3} invInertiaWorld
-     */
-    this.invInertiaWorld = new Mat3();
-
-    this.invMassSolve = 0;
-
-    /**
-     * @property {Vec3} invInertiaSolve
-     */
-    this.invInertiaSolve = new Vec3();
-
-    /**
-     * @property {Mat3} invInertiaWorldSolve
-     */
-    this.invInertiaWorldSolve = new Mat3();
-
-    /**
-     * Set to true if you don't want the body to rotate. Make sure to run .updateMassProperties() after changing this.
-     * @property {Boolean} fixedRotation
-     * @default false
-     */
-    this.fixedRotation = typeof(options.fixedRotation) !== "undefined" ? options.fixedRotation : false;
-
-    /**
-     * @property {Number} angularDamping
-     */
-    this.angularDamping = typeof(options.angularDamping) !== 'undefined' ? options.angularDamping : 0.01;
-
-    /**
-     * @property aabb
-     * @type {AABB}
-     */
-    this.aabb = new AABB();
-
-    /**
-     * Indicates if the AABB needs to be updated before use.
-     * @property aabbNeedsUpdate
-     * @type {Boolean}
-     */
-    this.aabbNeedsUpdate = true;
-
-    this.wlambda = new Vec3();
-
-    if(options.shape){
-        this.addShape(options.shape);
-    }
-
-    this.updateMassProperties();
-}
-Body.prototype = new EventTarget();
-Body.prototype.constructor = Body;
-
-/**
- * A dynamic body is fully simulated. Can be moved manually by the user, but normally they move according to forces. A dynamic body can collide with all body types. A dynamic body always has finite, non-zero mass.
- * @static
- * @property DYNAMIC
- * @type {Number}
- */
-Body.DYNAMIC = 1;
-
-/**
- * A static body does not move during simulation and behaves as if it has infinite mass. Static bodies can be moved manually by setting the position of the body. The velocity of a static body is always zero. Static bodies do not collide with other static or kinematic bodies.
- * @static
- * @property STATIC
- * @type {Number}
- */
-Body.STATIC = 2;
-
-/**
- * A kinematic body moves under simulation according to its velocity. They do not respond to forces. They can be moved manually, but normally a kinematic body is moved by setting its velocity. A kinematic body behaves as if it has infinite mass. Kinematic bodies do not collide with other static or kinematic bodies.
- * @static
- * @property KINEMATIC
- * @type {Number}
- */
-Body.KINEMATIC = 4;
-
-
-
-/**
- * @static
- * @property AWAKE
- * @type {number}
- */
-Body.AWAKE = 0;
-
-/**
- * @static
- * @property SLEEPY
- * @type {number}
- */
-Body.SLEEPY = 1;
-
-/**
- * @static
- * @property SLEEPING
- * @type {number}
- */
-Body.SLEEPING = 2;
-
-Body.idCounter = 0;
-
-/**
- * Wake the body up.
- * @method wakeUp
- */
-Body.prototype.wakeUp = function(){
-    var s = this.sleepState;
-    this.sleepState = 0;
-    if(s === Body.SLEEPING){
-        this.dispatchEvent({type:"wakeup"});
-    }
-};
-
-/**
- * Force body sleep
- * @method sleep
- */
-Body.prototype.sleep = function(){
-    this.sleepState = Body.SLEEPING;
-    this.velocity.set(0,0,0);
-    this.angularVelocity.set(0,0,0);
-};
-
-Body.sleepyEvent = {
-    type: "sleepy"
-};
-
-Body.sleepEvent = {
-    type: "sleep"
-};
-
-/**
- * Called every timestep to update internal sleep timer and change sleep state if needed.
- * @method sleepTick
- * @param {Number} time The world time in seconds
- */
-Body.prototype.sleepTick = function(time){
-    if(this.allowSleep){
-        var sleepState = this.sleepState;
-        var speedSquared = this.velocity.norm2() + this.angularVelocity.norm2();
-        var speedLimitSquared = Math.pow(this.sleepSpeedLimit,2);
-        if(sleepState===Body.AWAKE && speedSquared < speedLimitSquared){
-            this.sleepState = Body.SLEEPY; // Sleepy
-            this.timeLastSleepy = time;
-            this.dispatchEvent(Body.sleepyEvent);
-        } else if(sleepState===Body.SLEEPY && speedSquared > speedLimitSquared){
-            this.wakeUp(); // Wake up
-        } else if(sleepState===Body.SLEEPY && (time - this.timeLastSleepy ) > this.sleepTimeLimit){
-            this.sleep(); // Sleeping
-            this.dispatchEvent(Body.sleepEvent);
-        }
-    }
-};
-
-/**
- * If the body is sleeping, it should be immovable / have infinite mass during solve. We solve it by having a separate "solve mass".
- * @method updateSolveMassProperties
- */
-Body.prototype.updateSolveMassProperties = function(){
-    if(this.sleepState === Body.SLEEPING || this.type === Body.KINEMATIC){
-        this.invMassSolve = 0;
-        this.invInertiaSolve.setZero();
-        this.invInertiaWorldSolve.setZero();
-    } else {
-        this.invMassSolve = this.invMass;
-        this.invInertiaSolve.copy(this.invInertia);
-        this.invInertiaWorldSolve.copy(this.invInertiaWorld);
-    }
-};
-
-/**
- * Convert a world point to local body frame.
- * @method pointToLocalFrame
- * @param  {Vec3} worldPoint
- * @param  {Vec3} result
- * @return {Vec3}
- */
-Body.prototype.pointToLocalFrame = function(worldPoint,result){
-    var result = result || new Vec3();
-    worldPoint.vsub(this.position,result);
-    this.quaternion.conjugate().vmult(result,result);
-    return result;
-};
-
-/**
- * Convert a world vector to local body frame.
- * @method vectorToLocalFrame
- * @param  {Vec3} worldPoint
- * @param  {Vec3} result
- * @return {Vec3}
- */
-Body.prototype.vectorToLocalFrame = function(worldVector, result){
-    var result = result || new Vec3();
-    this.quaternion.conjugate().vmult(worldVector,result);
-    return result;
-};
-
-/**
- * Convert a local body point to world frame.
- * @method pointToWorldFrame
- * @param  {Vec3} localPoint
- * @param  {Vec3} result
- * @return {Vec3}
- */
-Body.prototype.pointToWorldFrame = function(localPoint,result){
-    var result = result || new Vec3();
-    this.quaternion.vmult(localPoint,result);
-    result.vadd(this.position,result);
-    return result;
-};
-
-/**
- * Convert a local body point to world frame.
- * @method vectorToWorldFrame
- * @param  {Vec3} localVector
- * @param  {Vec3} result
- * @return {Vec3}
- */
-Body.prototype.vectorToWorldFrame = function(localVector, result){
-    var result = result || new Vec3();
-    this.quaternion.vmult(localVector, result);
-    return result;
-};
-
-var tmpVec = new Vec3();
-var tmpQuat = new Quaternion();
-
-/**
- * Add a shape to the body with a local offset and orientation.
- * @method addShape
- * @param {Shape} shape
- * @param {Vec3} offset
- * @param {Quaternion} quaternion
- * @return {Body} The body object, for chainability.
- */
-Body.prototype.addShape = function(shape, _offset, _orientation){
-    var offset = new Vec3();
-    var orientation = new Quaternion();
-
-    if(_offset){
-        offset.copy(_offset);
-    }
-    if(_orientation){
-        orientation.copy(_orientation);
-    }
-
-    this.shapes.push(shape);
-    this.shapeOffsets.push(offset);
-    this.shapeOrientations.push(orientation);
-    this.updateMassProperties();
-    this.updateBoundingRadius();
-
-    this.aabbNeedsUpdate = true;
-
-    return this;
-};
-
-/**
- * Update the bounding radius of the body. Should be done if any of the shapes are changed.
- * @method updateBoundingRadius
- */
-Body.prototype.updateBoundingRadius = function(){
-    var shapes = this.shapes,
-        shapeOffsets = this.shapeOffsets,
-        N = shapes.length,
-        radius = 0;
-
-    for(var i=0; i!==N; i++){
-        var shape = shapes[i];
-        shape.updateBoundingSphereRadius();
-        var offset = shapeOffsets[i].norm(),
-            r = shape.boundingSphereRadius;
-        if(offset + r > radius){
-            radius = offset + r;
-        }
-    }
-
-    this.boundingRadius = radius;
-};
-
-var computeAABB_shapeAABB = new AABB();
-
-/**
- * Updates the .aabb
- * @method computeAABB
- * @todo rename to updateAABB()
- */
-Body.prototype.computeAABB = function(){
-    var shapes = this.shapes,
-        shapeOffsets = this.shapeOffsets,
-        shapeOrientations = this.shapeOrientations,
-        N = shapes.length,
-        offset = tmpVec,
-        orientation = tmpQuat,
-        bodyQuat = this.quaternion,
-        aabb = this.aabb,
-        shapeAABB = computeAABB_shapeAABB;
-
-    for(var i=0; i!==N; i++){
-        var shape = shapes[i];
-
-        // Get shape world quaternion
-        shapeOrientations[i].mult(bodyQuat, orientation);
-
-        // Get shape world position
-        orientation.vmult(shapeOffsets[i], offset);
-        offset.vadd(this.position, offset);
-
-        // vec2.rotate(offset, shapeOffsets[i], bodyAngle);
-        // vec2.add(offset, offset, this.position);
-
-        // Get shape AABB
-        shape.calculateWorldAABB(offset, orientation, shapeAABB.lowerBound, shapeAABB.upperBound);
-
-        if(i === 0){
-            aabb.copy(shapeAABB);
-        } else {
-            aabb.extend(shapeAABB);
-        }
-    }
-
-    this.aabbNeedsUpdate = false;
-};
-
-var uiw_m1 = new Mat3(),
-    uiw_m2 = new Mat3(),
-    uiw_m3 = new Mat3();
-
-/**
- * Update .inertiaWorld and .invInertiaWorld
- * @method updateInertiaWorld
- */
-Body.prototype.updateInertiaWorld = function(force){
-    var I = this.invInertia;
-    if (I.x === I.y && I.y === I.z && !force) {
-        // If inertia M = s*I, where I is identity and s a scalar, then
-        //    R*M*R' = R*(s*I)*R' = s*R*I*R' = s*R*R' = s*I = M
-        // where R is the rotation matrix.
-        // In other words, we don't have to transform the inertia if all
-        // inertia diagonal entries are equal.
-    } else {
-        var m1 = uiw_m1,
-            m2 = uiw_m2,
-            m3 = uiw_m3;
-        m1.setRotationFromQuaternion(this.quaternion);
-        m1.transpose(m2);
-        m1.scale(I,m1);
-        m1.mmult(m2,this.invInertiaWorld);
-        //m3.getTrace(this.invInertiaWorld);
-    }
-
-    /*
-    this.quaternion.vmult(this.inertia,this.inertiaWorld);
-    this.quaternion.vmult(this.invInertia,this.invInertiaWorld);
-    */
-};
-
-/**
- * Apply force to a world point. This could for example be a point on the Body surface. Applying force this way will add to Body.force and Body.torque.
- * @method applyForce
- * @param  {Vec3} force The amount of force to add.
- * @param  {Vec3} worldPoint A world point to apply the force on.
- */
-var Body_applyForce_r = new Vec3();
-var Body_applyForce_rotForce = new Vec3();
-Body.prototype.applyForce = function(force,worldPoint){
-    if(this.type !== Body.DYNAMIC){
-        return;
-    }
-
-    // Compute point position relative to the body center
-    var r = Body_applyForce_r;
-    worldPoint.vsub(this.position,r);
-
-    // Compute produced rotational force
-    var rotForce = Body_applyForce_rotForce;
-    r.cross(force,rotForce);
-
-    // Add linear force
-    this.force.vadd(force,this.force);
-
-    // Add rotational force
-    this.torque.vadd(rotForce,this.torque);
-};
-
-/**
- * Apply force to a local point in the body.
- * @method applyLocalForce
- * @param  {Vec3} force The force vector to apply, defined locally in the body frame.
- * @param  {Vec3} localPoint A local point in the body to apply the force on.
- */
-var Body_applyLocalForce_worldForce = new Vec3();
-var Body_applyLocalForce_worldPoint = new Vec3();
-Body.prototype.applyLocalForce = function(localForce, localPoint){
-    if(this.type !== Body.DYNAMIC){
-        return;
-    }
-
-    var worldForce = Body_applyLocalForce_worldForce;
-    var worldPoint = Body_applyLocalForce_worldPoint;
-
-    // Transform the force vector to world space
-    this.vectorToWorldFrame(localForce, worldForce);
-    this.pointToWorldFrame(localPoint, worldPoint);
-
-    this.applyForce(worldForce, worldPoint);
-};
-
-/**
- * Apply impulse to a world point. This could for example be a point on the Body surface. An impulse is a force added to a body during a short period of time (impulse = force * time). Impulses will be added to Body.velocity and Body.angularVelocity.
- * @method applyImpulse
- * @param  {Vec3} impulse The amount of impulse to add.
- * @param  {Vec3} worldPoint A world point to apply the force on.
- */
-var Body_applyImpulse_r = new Vec3();
-var Body_applyImpulse_velo = new Vec3();
-var Body_applyImpulse_rotVelo = new Vec3();
-Body.prototype.applyImpulse = function(impulse, worldPoint){
-    if(this.type !== Body.DYNAMIC){
-        return;
-    }
-
-    // Compute point position relative to the body center
-    var r = Body_applyImpulse_r;
-    worldPoint.vsub(this.position,r);
-
-    // Compute produced central impulse velocity
-    var velo = Body_applyImpulse_velo;
-    velo.copy(impulse);
-    velo.mult(this.invMass,velo);
-
-    // Add linear impulse
-    this.velocity.vadd(velo, this.velocity);
-
-    // Compute produced rotational impulse velocity
-    var rotVelo = Body_applyImpulse_rotVelo;
-    r.cross(impulse,rotVelo);
-
-    /*
-    rotVelo.x *= this.invInertia.x;
-    rotVelo.y *= this.invInertia.y;
-    rotVelo.z *= this.invInertia.z;
-    */
-    this.invInertiaWorld.vmult(rotVelo,rotVelo);
-
-    // Add rotational Impulse
-    this.angularVelocity.vadd(rotVelo, this.angularVelocity);
-};
-
-/**
- * Apply locally-defined impulse to a local point in the body.
- * @method applyLocalImpulse
- * @param  {Vec3} force The force vector to apply, defined locally in the body frame.
- * @param  {Vec3} localPoint A local point in the body to apply the force on.
- */
-var Body_applyLocalImpulse_worldImpulse = new Vec3();
-var Body_applyLocalImpulse_worldPoint = new Vec3();
-Body.prototype.applyLocalImpulse = function(localImpulse, localPoint){
-    if(this.type !== Body.DYNAMIC){
-        return;
-    }
-
-    var worldImpulse = Body_applyLocalImpulse_worldImpulse;
-    var worldPoint = Body_applyLocalImpulse_worldPoint;
-
-    // Transform the force vector to world space
-    this.vectorToWorldFrame(localImpulse, worldImpulse);
-    this.pointToWorldFrame(localPoint, worldPoint);
-
-    this.applyImpulse(worldImpulse, worldPoint);
-};
-
-var Body_updateMassProperties_halfExtents = new Vec3();
-
-/**
- * Should be called whenever you change the body shape or mass.
- * @method updateMassProperties
- */
-Body.prototype.updateMassProperties = function(){
-    var halfExtents = Body_updateMassProperties_halfExtents;
-
-    this.invMass = this.mass > 0 ? 1.0 / this.mass : 0;
-    var I = this.inertia;
-    var fixed = this.fixedRotation;
-
-    // Approximate with AABB box
-    this.computeAABB();
-    halfExtents.set(
-        (this.aabb.upperBound.x-this.aabb.lowerBound.x) / 2,
-        (this.aabb.upperBound.y-this.aabb.lowerBound.y) / 2,
-        (this.aabb.upperBound.z-this.aabb.lowerBound.z) / 2
-    );
-    Box.calculateInertia(halfExtents, this.mass, I);
-
-    this.invInertia.set(
-        I.x > 0 && !fixed ? 1.0 / I.x : 0,
-        I.y > 0 && !fixed ? 1.0 / I.y : 0,
-        I.z > 0 && !fixed ? 1.0 / I.z : 0
-    );
-    this.updateInertiaWorld(true);
-};
-
-/**
- * Get world velocity of a point in the body.
- * @method getVelocityAtWorldPoint
- * @param  {Vec3} worldPoint
- * @param  {Vec3} result
- * @return {Vec3} The result vector.
- */
-Body.prototype.getVelocityAtWorldPoint = function(worldPoint, result){
-    var r = new Vec3();
-    worldPoint.vsub(this.position, r);
-    this.angularVelocity.cross(r, result);
-    this.velocity.vadd(result, result);
-    return result;
-};
-
-},{"../collision/AABB":3,"../material/Material":25,"../math/Mat3":27,"../math/Quaternion":28,"../math/Vec3":30,"../shapes/Box":37,"../shapes/Shape":43,"../utils/EventTarget":49}],32:[function(_dereq_,module,exports){
-var Body = _dereq_('./Body');
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var RaycastResult = _dereq_('../collision/RaycastResult');
-var Ray = _dereq_('../collision/Ray');
-var WheelInfo = _dereq_('../objects/WheelInfo');
-
-module.exports = RaycastVehicle;
-
-/**
- * Vehicle helper class that casts rays from the wheel positions towards the ground and applies forces.
- * @class RaycastVehicle
- * @constructor
- * @param {object} [options]
- * @param {Body} [options.chassisBody] The car chassis body.
- * @param {integer} [options.indexRightAxis] Axis to use for right. x=0, y=1, z=2
- * @param {integer} [options.indexLeftAxis]
- * @param {integer} [options.indexUpAxis]
- */
-function RaycastVehicle(options){
-
-    /**
-     * @property {Body} chassisBody
-     */
-    this.chassisBody = options.chassisBody;
-
-    /**
-     * An array of WheelInfo objects.
-     * @property {array} wheelInfos
-     */
-    this.wheelInfos = [];
-
-    /**
-     * Will be set to true if the car is sliding.
-     * @property {boolean} sliding
-     */
-    this.sliding = false;
-
-    /**
-     * @property {World} world
-     */
-    this.world = null;
-
-    /**
-     * Index of the right axis, 0=x, 1=y, 2=z
-     * @property {integer} indexRightAxis
-     * @default 1
-     */
-    this.indexRightAxis = typeof(options.indexRightAxis) !== 'undefined' ? options.indexRightAxis : 1;
-
-    /**
-     * Index of the forward axis, 0=x, 1=y, 2=z
-     * @property {integer} indexForwardAxis
-     * @default 0
-     */
-    this.indexForwardAxis = typeof(options.indexForwardAxis) !== 'undefined' ? options.indexForwardAxis : 0;
-
-    /**
-     * Index of the up axis, 0=x, 1=y, 2=z
-     * @property {integer} indexUpAxis
-     * @default 2
-     */
-    this.indexUpAxis = typeof(options.indexUpAxis) !== 'undefined' ? options.indexUpAxis : 2;
-}
-
-var tmpVec1 = new Vec3();
-var tmpVec2 = new Vec3();
-var tmpVec3 = new Vec3();
-var tmpVec4 = new Vec3();
-var tmpVec5 = new Vec3();
-var tmpVec6 = new Vec3();
-var tmpRay = new Ray();
-
-/**
- * Add a wheel. For information about the options, see WheelInfo.
- * @method addWheel
- * @param {object} [options]
- */
-RaycastVehicle.prototype.addWheel = function(options){
-    options = options || {};
-
-    var info = new WheelInfo(options);
-    var index = this.wheelInfos.length;
-    this.wheelInfos.push(info);
-
-    return index;
-};
-
-/**
- * Set the steering value of a wheel.
- * @method setSteeringValue
- * @param {number} value
- * @param {integer} wheelIndex
- */
-RaycastVehicle.prototype.setSteeringValue = function(value, wheelIndex){
-    var wheel = this.wheelInfos[wheelIndex];
-    wheel.steering = value;
-};
-
-var torque = new Vec3();
-
-/**
- * Set the wheel force to apply on one of the wheels each time step
- * @method applyEngineForce
- * @param  {number} value
- * @param  {integer} wheelIndex
- */
-RaycastVehicle.prototype.applyEngineForce = function(value, wheelIndex){
-    this.wheelInfos[wheelIndex].engineForce = value;
-};
-
-/**
- * Set the braking force of a wheel
- * @method setBrake
- * @param {number} brake
- * @param {integer} wheelIndex
- */
-RaycastVehicle.prototype.setBrake = function(brake, wheelIndex){
-    this.wheelInfos[wheelIndex].brake = brake;
-};
-
-/**
- * Add the vehicle including its constraints to the world.
- * @method addToWorld
- * @param {World} world
- */
-RaycastVehicle.prototype.addToWorld = function(world){
-    var constraints = this.constraints;
-    world.add(this.chassisBody);
-    var that = this;
-    this.preStepCallback = function(){
-        that.updateVehicle(world.dt);
-    };
-    world.addEventListener('preStep', this.preStepCallback);
-    this.world = world;
-};
-
-/**
- * Get one of the wheel axles, world-oriented.
- * @private
- * @method getVehicleAxisWorld
- * @param  {integer} axisIndex
- * @param  {Vec3} result
- */
-RaycastVehicle.prototype.getVehicleAxisWorld = function(axisIndex, result){
-    result.set(
-        axisIndex === 0 ? 1 : 0,
-        axisIndex === 1 ? 1 : 0,
-        axisIndex === 2 ? 1 : 0
-    );
-    this.chassisBody.vectorToWorldFrame(result, result);
-};
-
-RaycastVehicle.prototype.updateVehicle = function(timeStep){
-    var wheelInfos = this.wheelInfos;
-    var numWheels = wheelInfos.length;
-    var chassisBody = this.chassisBody;
-
-    for (var i = 0; i < numWheels; i++) {
-        this.updateWheelTransform(i);
-    }
-
-    this.currentVehicleSpeedKmHour = 3.6 * chassisBody.velocity.norm();
-
-    var forwardWorld = new Vec3();
-    this.getVehicleAxisWorld(this.indexForwardAxis, forwardWorld);
-
-    if (forwardWorld.dot(chassisBody.velocity) < 0){
-        this.currentVehicleSpeedKmHour *= -1;
-    }
-
-    // simulate suspension
-    for (var i = 0; i < numWheels; i++) {
-        this.castRay(wheelInfos[i]);
-    }
-
-    this.updateSuspension(timeStep);
-
-    var impulse = new Vec3();
-    var relpos = new Vec3();
-    for (var i = 0; i < numWheels; i++) {
-        //apply suspension force
-        var wheel = wheelInfos[i];
-        var suspensionForce = wheel.suspensionForce;
-        if (suspensionForce > wheel.maxSuspensionForce) {
-            suspensionForce = wheel.maxSuspensionForce;
-        }
-        wheel.raycastResult.hitNormalWorld.scale(suspensionForce * timeStep, impulse);
-
-        wheel.raycastResult.hitPointWorld.vsub(chassisBody.position, relpos);
-        chassisBody.applyImpulse(impulse, wheel.raycastResult.hitPointWorld/*relpos*/);
-    }
-
-    this.updateFriction(timeStep);
-
-    var hitNormalWorldScaledWithProj = new Vec3();
-    var fwd  = new Vec3();
-    var vel = new Vec3();
-    for (i = 0; i < numWheels; i++) {
-        var wheel = wheelInfos[i];
-        //var relpos = new Vec3();
-        //wheel.chassisConnectionPointWorld.vsub(chassisBody.position, relpos);
-        chassisBody.getVelocityAtWorldPoint(wheel.chassisConnectionPointWorld, vel);
-
-        // Hack to get the rotation in the correct direction
-        var m = 1;
-        switch(this.indexUpAxis){
-        case 1:
-            m = -1;
-            break;
-        }
-
-        if (wheel.isInContact) {
-
-            this.getVehicleAxisWorld(this.indexForwardAxis, fwd);
-            var proj = fwd.dot(wheel.raycastResult.hitNormalWorld);
-            wheel.raycastResult.hitNormalWorld.scale(proj, hitNormalWorldScaledWithProj);
-
-            fwd.vsub(hitNormalWorldScaledWithProj, fwd);
-
-            var proj2 = fwd.dot(vel);
-            wheel.deltaRotation = m * proj2 * timeStep / wheel.radius;
-        }
-
-        if((wheel.sliding || !wheel.isInContact) && wheel.engineForce !== 0 && wheel.useCustomSlidingRotationalSpeed){
-            // Apply custom rotation when accelerating and sliding
-            wheel.deltaRotation = (wheel.engineForce > 0 ? 1 : -1) * wheel.customSlidingRotationalSpeed * timeStep;
-        }
-
-        // Lock wheels
-        if(Math.abs(wheel.brake) > Math.abs(wheel.engineForce)){
-            wheel.deltaRotation = 0;
-        }
-
-        wheel.rotation += wheel.deltaRotation; // Use the old value
-        wheel.deltaRotation *= 0.99; // damping of rotation when not in contact
-    }
-};
-
-RaycastVehicle.prototype.updateSuspension = function(deltaTime) {
-    var chassisBody = this.chassisBody;
-    var chassisMass = chassisBody.mass;
-    var wheelInfos = this.wheelInfos;
-    var numWheels = wheelInfos.length;
-
-    for (var w_it = 0; w_it < numWheels; w_it++){
-        var wheel = wheelInfos[w_it];
-
-        if (wheel.isInContact){
-            var force;
-
-            // Spring
-            var susp_length = wheel.suspensionRestLength;
-            var current_length = wheel.suspensionLength;
-            var length_diff = (susp_length - current_length);
-
-            force = wheel.suspensionStiffness * length_diff * wheel.clippedInvContactDotSuspension;
-
-            // Damper
-            var projected_rel_vel = wheel.suspensionRelativeVelocity;
-            var susp_damping;
-            if (projected_rel_vel < 0) {
-                susp_damping = wheel.dampingCompression;
-            } else {
-                susp_damping = wheel.dampingRelaxation;
-            }
-            force -= susp_damping * projected_rel_vel;
-
-            wheel.suspensionForce = force * chassisMass;
-            if (wheel.suspensionForce < 0) {
-                wheel.suspensionForce = 0;
-            }
-        } else {
-            wheel.suspensionForce = 0;
-        }
-    }
-};
-
-/**
- * Remove the vehicle including its constraints from the world.
- * @method removeFromWorld
- * @param {World} world
- */
-RaycastVehicle.prototype.removeFromWorld = function(world){
-    var constraints = this.constraints;
-    world.remove(this.chassisBody);
-    world.removeEventListener('preStep', this.preStepCallback);
-    this.world = null;
-};
-
-var castRay_rayvector = new Vec3();
-var castRay_target = new Vec3();
-RaycastVehicle.prototype.castRay = function(wheel) {
-    var rayvector = castRay_rayvector;
-    var target = castRay_target;
-
-    this.updateWheelTransformWorld(wheel);
-    var chassisBody = this.chassisBody;
-
-    var depth = -1;
-
-    var raylen = wheel.suspensionRestLength + wheel.radius;
-
-    wheel.directionWorld.scale(raylen, rayvector);
-    var source = wheel.chassisConnectionPointWorld;
-    source.vadd(rayvector, target);
-    var raycastResult = wheel.raycastResult;
-
-    var param = 0;
-
-    raycastResult.reset();
-    // Turn off ray collision with the chassis temporarily
-    var oldState = chassisBody.collisionResponse;
-    chassisBody.collisionResponse = false;
-
-    // Cast ray against world
-    this.world.rayTest(source, target, raycastResult);
-    chassisBody.collisionResponse = oldState;
-
-    var object = raycastResult.body;
-
-    wheel.raycastResult.groundObject = 0;
-
-    if (object) {
-        depth = raycastResult.distance;
-        wheel.raycastResult.hitNormalWorld  = raycastResult.hitNormalWorld;
-        wheel.isInContact = true;
-
-        var hitDistance = raycastResult.distance;
-        wheel.suspensionLength = hitDistance - wheel.radius;
-
-        // clamp on max suspension travel
-        var minSuspensionLength = wheel.suspensionRestLength - wheel.maxSuspensionTravel;
-        var maxSuspensionLength = wheel.suspensionRestLength + wheel.maxSuspensionTravel;
-        if (wheel.suspensionLength < minSuspensionLength) {
-            wheel.suspensionLength = minSuspensionLength;
-        }
-        if (wheel.suspensionLength > maxSuspensionLength) {
-            wheel.suspensionLength = maxSuspensionLength;
-            wheel.raycastResult.reset();
-        }
-
-        var denominator = wheel.raycastResult.hitNormalWorld.dot(wheel.directionWorld);
-
-        var chassis_velocity_at_contactPoint = new Vec3();
-        chassisBody.getVelocityAtWorldPoint(wheel.raycastResult.hitPointWorld, chassis_velocity_at_contactPoint);
-
-        var projVel = wheel.raycastResult.hitNormalWorld.dot( chassis_velocity_at_contactPoint );
-
-        if (denominator >= -0.1) {
-            wheel.suspensionRelativeVelocity = 0;
-            wheel.clippedInvContactDotSuspension = 1 / 0.1;
-        } else {
-            var inv = -1 / denominator;
-            wheel.suspensionRelativeVelocity = projVel * inv;
-            wheel.clippedInvContactDotSuspension = inv;
-        }
-
-    } else {
-
-        //put wheel info as in rest position
-        wheel.suspensionLength = wheel.suspensionRestLength + 0 * wheel.maxSuspensionTravel;
-        wheel.suspensionRelativeVelocity = 0.0;
-        wheel.directionWorld.scale(-1, wheel.raycastResult.hitNormalWorld);
-        wheel.clippedInvContactDotSuspension = 1.0;
-    }
-
-    return depth;
-};
-
-RaycastVehicle.prototype.updateWheelTransformWorld = function(wheel){
-    wheel.isInContact = false;
-    var chassisBody = this.chassisBody;
-    chassisBody.pointToWorldFrame(wheel.chassisConnectionPointLocal, wheel.chassisConnectionPointWorld);
-    chassisBody.vectorToWorldFrame(wheel.directionLocal, wheel.directionWorld);
-    chassisBody.vectorToWorldFrame(wheel.axleLocal, wheel.axleWorld);
-};
-
-
-/**
- * Update one of the wheel transform.
- * Note when rendering wheels: during each step, wheel transforms are updated BEFORE the chassis; ie. their position becomes invalid after the step. Thus when you render wheels, you must update wheel transforms before rendering them. See raycastVehicle demo for an example.
- * @method updateWheelTransform
- * @param {integer} wheelIndex The wheel index to update.
- */
-RaycastVehicle.prototype.updateWheelTransform = function(wheelIndex){
-    var up = tmpVec4;
-    var right = tmpVec5;
-    var fwd = tmpVec6;
-
-    var wheel = this.wheelInfos[wheelIndex];
-    this.updateWheelTransformWorld(wheel);
-
-    wheel.directionLocal.scale(-1, up);
-    right.copy(wheel.axleLocal);
-    up.cross(right, fwd);
-    fwd.normalize();
-    right.normalize();
-
-    // Rotate around steering over the wheelAxle
-    var steering = wheel.steering;
-    var steeringOrn = new Quaternion();
-    steeringOrn.setFromAxisAngle(up, steering);
-
-    var rotatingOrn = new Quaternion();
-    rotatingOrn.setFromAxisAngle(right, wheel.rotation);
-
-    // World rotation of the wheel
-    var q = wheel.worldTransform.quaternion;
-    this.chassisBody.quaternion.mult(steeringOrn, q);
-    q.mult(rotatingOrn, q);
-
-    q.normalize();
-
-    // world position of the wheel
-    var p = wheel.worldTransform.position;
-    p.copy(wheel.directionWorld);
-    p.scale(wheel.suspensionLength, p);
-    p.vadd(wheel.chassisConnectionPointWorld, p);
-};
-
-var directions = [
-    new Vec3(1, 0, 0),
-    new Vec3(0, 1, 0),
-    new Vec3(0, 0, 1)
-];
-
-/**
- * Get the world transform of one of the wheels
- * @method getWheelTransformWorld
- * @param  {integer} wheelIndex
- * @return {Transform}
- */
-RaycastVehicle.prototype.getWheelTransformWorld = function(wheelIndex) {
-    return this.wheelInfos[wheelIndex].worldTransform;
-};
-
-
-var updateFriction_surfNormalWS_scaled_proj = new Vec3();
-var updateFriction_axle = [];
-var updateFriction_forwardWS = [];
-var sideFrictionStiffness2 = 1;
-RaycastVehicle.prototype.updateFriction = function(timeStep) {
-    var surfNormalWS_scaled_proj = updateFriction_surfNormalWS_scaled_proj;
-
-    //calculate the impulse, so that the wheels don't move sidewards
-    var wheelInfos = this.wheelInfos;
-    var numWheels = wheelInfos.length;
-    var chassisBody = this.chassisBody;
-    var forwardWS = updateFriction_forwardWS;
-    var axle = updateFriction_axle;
-
-    var numWheelsOnGround = 0;
-
-    for (var i = 0; i < numWheels; i++) {
-        var wheel = wheelInfos[i];
-
-        var groundObject = wheel.raycastResult.body;
-        if (groundObject){
-            numWheelsOnGround++;
-        }
-
-        wheel.sideImpulse = 0;
-        wheel.forwardImpulse = 0;
-        if(!forwardWS[i]){
-            forwardWS[i] = new Vec3();
-        }
-        if(!axle[i]){
-            axle[i] = new Vec3();
-        }
-    }
-
-    for (var i = 0; i < numWheels; i++){
-        var wheel = wheelInfos[i];
-
-        var groundObject = wheel.raycastResult.body;
-
-        if (groundObject) {
-            var axlei = axle[i];
-            var wheelTrans = this.getWheelTransformWorld(i);
-
-            // Get world axle
-            wheelTrans.vectorToWorldFrame(directions[this.indexRightAxis], axlei);
-
-            var surfNormalWS = wheel.raycastResult.hitNormalWorld;
-            var proj = axlei.dot(surfNormalWS);
-            surfNormalWS.scale(proj, surfNormalWS_scaled_proj);
-            axlei.vsub(surfNormalWS_scaled_proj, axlei);
-            axlei.normalize();
-
-            surfNormalWS.cross(axlei, forwardWS[i]);
-            forwardWS[i].normalize();
-
-            wheel.sideImpulse = resolveSingleBilateral(
-                chassisBody,
-                wheel.raycastResult.hitPointWorld,
-                groundObject,
-                wheel.raycastResult.hitPointWorld,
-                axlei
-            );
-
-            wheel.sideImpulse *= sideFrictionStiffness2;
-        }
-    }
-
-    var sideFactor = 1;
-    var fwdFactor = 0.5;
-
-    this.sliding = false;
-    for (var i = 0; i < numWheels; i++) {
-        var wheel = wheelInfos[i];
-        var groundObject = wheel.raycastResult.body;
-
-        var rollingFriction = 0;
-
-        wheel.slipInfo = 1;
-        if (groundObject) {
-            var defaultRollingFrictionImpulse = 0;
-            var maxImpulse = wheel.brake ? wheel.brake : defaultRollingFrictionImpulse;
-
-            // btWheelContactPoint contactPt(chassisBody,groundObject,wheelInfraycastInfo.hitPointWorld,forwardWS[wheel],maxImpulse);
-            // rollingFriction = calcRollingFriction(contactPt);
-            rollingFriction = calcRollingFriction(chassisBody, groundObject, wheel.raycastResult.hitPointWorld, forwardWS[i], maxImpulse);
-
-            rollingFriction += wheel.engineForce * timeStep;
-
-            // rollingFriction = 0;
-            var factor = maxImpulse / rollingFriction;
-            wheel.slipInfo *= factor;
-        }
-
-        //switch between active rolling (throttle), braking and non-active rolling friction (nthrottle/break)
-
-        wheel.forwardImpulse = 0;
-        wheel.skidInfo = 1;
-
-        if (groundObject) {
-            wheel.skidInfo = 1;
-
-            var maximp = wheel.suspensionForce * timeStep * wheel.frictionSlip;
-            var maximpSide = maximp;
-
-            var maximpSquared = maximp * maximpSide;
-
-            wheel.forwardImpulse = rollingFriction;//wheelInfo.engineForce* timeStep;
-
-            var x = wheel.forwardImpulse * fwdFactor;
-            var y = wheel.sideImpulse * sideFactor;
-
-            var impulseSquared = x * x + y * y;
-
-            wheel.sliding = false;
-            if (impulseSquared > maximpSquared) {
-                this.sliding = true;
-                wheel.sliding = true;
-
-                var factor = maximp / Math.sqrt(impulseSquared);
-
-                wheel.skidInfo *= factor;
-            }
-        }
-    }
-
-    if (this.sliding) {
-        for (var i = 0; i < numWheels; i++) {
-            var wheel = wheelInfos[i];
-            if (wheel.sideImpulse !== 0) {
-                if (wheel.skidInfo < 1){
-                    wheel.forwardImpulse *= wheel.skidInfo;
-                    wheel.sideImpulse *= wheel.skidInfo;
-                }
-            }
-        }
-    }
-
-    // apply the impulses
-    for (var i = 0; i < numWheels; i++) {
-        var wheel = wheelInfos[i];
-
-        var rel_pos = new Vec3();
-        //wheel.raycastResult.hitPointWorld.vsub(chassisBody.position, rel_pos);
-        // cannons applyimpulse is using world coord for the position
-        rel_pos.copy(wheel.raycastResult.hitPointWorld);
-
-        if (wheel.forwardImpulse !== 0) {
-            var impulse = new Vec3();
-            forwardWS[i].scale(wheel.forwardImpulse, impulse);
-            chassisBody.applyImpulse(impulse, rel_pos);
-        }
-
-        if (wheel.sideImpulse !== 0){
-            var groundObject = wheel.raycastResult.body;
-
-            var rel_pos2 = new Vec3();
-            //wheel.raycastResult.hitPointWorld.vsub(groundObject.position, rel_pos2);
-            rel_pos2.copy(wheel.raycastResult.hitPointWorld);
-            var sideImp = new Vec3();
-            axle[i].scale(wheel.sideImpulse, sideImp);
-
-            // Scale the relative position in the up direction with rollInfluence.
-            // If rollInfluence is 1, the impulse will be applied on the hitPoint (easy to roll over), if it is zero it will be applied in the same plane as the center of mass (not easy to roll over).
-            chassisBody.pointToLocalFrame(rel_pos, rel_pos);
-            rel_pos['xyz'[this.indexUpAxis]] *= wheel.rollInfluence;
-            chassisBody.pointToWorldFrame(rel_pos, rel_pos);
-            chassisBody.applyImpulse(sideImp, rel_pos);
-
-            //apply friction impulse on the ground
-            sideImp.scale(-1, sideImp);
-            groundObject.applyImpulse(sideImp, rel_pos2);
-        }
-    }
-};
-
-var calcRollingFriction_vel1 = new Vec3();
-var calcRollingFriction_vel2 = new Vec3();
-var calcRollingFriction_vel = new Vec3();
-
-function calcRollingFriction(body0, body1, frictionPosWorld, frictionDirectionWorld, maxImpulse) {
-    var j1 = 0;
-    var contactPosWorld = frictionPosWorld;
-
-    // var rel_pos1 = new Vec3();
-    // var rel_pos2 = new Vec3();
-    var vel1 = calcRollingFriction_vel1;
-    var vel2 = calcRollingFriction_vel2;
-    var vel = calcRollingFriction_vel;
-    // contactPosWorld.vsub(body0.position, rel_pos1);
-    // contactPosWorld.vsub(body1.position, rel_pos2);
-
-    body0.getVelocityAtWorldPoint(contactPosWorld, vel1);
-    body1.getVelocityAtWorldPoint(contactPosWorld, vel2);
-    vel1.vsub(vel2, vel);
-
-    var vrel = frictionDirectionWorld.dot(vel);
-
-    var denom0 = computeImpulseDenominator(body0, frictionPosWorld, frictionDirectionWorld);
-    var denom1 = computeImpulseDenominator(body1, frictionPosWorld, frictionDirectionWorld);
-    var relaxation = 1;
-    var jacDiagABInv = relaxation / (denom0 + denom1);
-
-    // calculate j that moves us to zero relative velocity
-    j1 = -vrel * jacDiagABInv;
-
-    if (maxImpulse < j1) {
-        j1 = maxImpulse;
-    }
-    if (j1 < -maxImpulse) {
-        j1 = -maxImpulse;
-    }
-
-    return j1;
-}
-
-var computeImpulseDenominator_r0 = new Vec3();
-var computeImpulseDenominator_c0 = new Vec3();
-var computeImpulseDenominator_vec = new Vec3();
-var computeImpulseDenominator_m = new Vec3();
-function computeImpulseDenominator(body, pos, normal) {
-    var r0 = computeImpulseDenominator_r0;
-    var c0 = computeImpulseDenominator_c0;
-    var vec = computeImpulseDenominator_vec;
-    var m = computeImpulseDenominator_m;
-
-    pos.vsub(body.position, r0);
-    r0.cross(normal, c0);
-    body.invInertiaWorld.vmult(c0, m);
-    m.cross(r0, vec);
-
-    return body.invMass + normal.dot(vec);
-}
-
-
-var resolveSingleBilateral_vel1 = new Vec3();
-var resolveSingleBilateral_vel2 = new Vec3();
-var resolveSingleBilateral_vel = new Vec3();
-
-//bilateral constraint between two dynamic objects
-function resolveSingleBilateral(body1, pos1, body2, pos2, normal, impulse){
-    var normalLenSqr = normal.norm2();
-    if (normalLenSqr > 1.1){
-        return 0; // no impulse
-    }
-    // var rel_pos1 = new Vec3();
-    // var rel_pos2 = new Vec3();
-    // pos1.vsub(body1.position, rel_pos1);
-    // pos2.vsub(body2.position, rel_pos2);
-
-    var vel1 = resolveSingleBilateral_vel1;
-    var vel2 = resolveSingleBilateral_vel2;
-    var vel = resolveSingleBilateral_vel;
-    body1.getVelocityAtWorldPoint(pos1, vel1);
-    body2.getVelocityAtWorldPoint(pos2, vel2);
-
-    vel1.vsub(vel2, vel);
-
-    var rel_vel = normal.dot(vel);
-
-    var contactDamping = 0.2;
-    var massTerm = 1 / (body1.invMass + body2.invMass);
-    var impulse = - contactDamping * rel_vel * massTerm;
-
-    return impulse;
-}
-},{"../collision/Ray":9,"../collision/RaycastResult":10,"../math/Quaternion":28,"../math/Vec3":30,"../objects/WheelInfo":36,"./Body":31}],33:[function(_dereq_,module,exports){
-var Body = _dereq_('./Body');
-var Sphere = _dereq_('../shapes/Sphere');
-var Box = _dereq_('../shapes/Box');
-var Vec3 = _dereq_('../math/Vec3');
-var HingeConstraint = _dereq_('../constraints/HingeConstraint');
-
-module.exports = RigidVehicle;
-
-/**
- * Simple vehicle helper class with spherical rigid body wheels.
- * @class RigidVehicle
- * @constructor
- * @param {Body} [options.chassisBody]
- */
-function RigidVehicle(options){
-    this.wheelBodies = [];
-
-    /**
-     * @property coordinateSystem
-     * @type {Vec3}
-     */
-    this.coordinateSystem = typeof(options.coordinateSystem)==='undefined' ? new Vec3(1, 2, 3) : options.coordinateSystem.clone();
-
-    /**
-     * @property {Body} chassisBody
-     */
-    this.chassisBody = options.chassisBody;
-
-    if(!this.chassisBody){
-        // No chassis body given. Create it!
-        var chassisShape = new Box(new Vec3(5, 2, 0.5));
-        this.chassisBody = new Body(1, chassisShape);
-    }
-
-    /**
-     * @property constraints
-     * @type {Array}
-     */
-    this.constraints = [];
-
-    this.wheelAxes = [];
-    this.wheelForces = [];
-}
-
-/**
- * Add a wheel
- * @method addWheel
- * @param {object} options
- * @param {boolean} [options.isFrontWheel]
- * @param {Vec3} [options.position] Position of the wheel, locally in the chassis body.
- * @param {Vec3} [options.direction] Slide direction of the wheel along the suspension.
- * @param {Vec3} [options.axis] Axis of rotation of the wheel, locally defined in the chassis.
- * @param {Body} [options.body] The wheel body.
- */
-RigidVehicle.prototype.addWheel = function(options){
-    options = options || {};
-    var wheelBody = options.body;
-    if(!wheelBody){
-        wheelBody =  new Body(1, new Sphere(1.2));
-    }
-    this.wheelBodies.push(wheelBody);
-    this.wheelForces.push(0);
-
-    // Position constrain wheels
-    var zero = new Vec3();
-    var position = typeof(options.position) !== 'undefined' ? options.position.clone() : new Vec3();
-
-    // Set position locally to the chassis
-    var worldPosition = new Vec3();
-    this.chassisBody.pointToWorldFrame(position, worldPosition);
-    wheelBody.position.set(worldPosition.x, worldPosition.y, worldPosition.z);
-
-    // Constrain wheel
-    var axis = typeof(options.axis) !== 'undefined' ? options.axis.clone() : new Vec3(0, 1, 0);
-    this.wheelAxes.push(axis);
-
-    var hingeConstraint = new HingeConstraint(this.chassisBody, wheelBody, {
-        pivotA: position,
-        axisA: axis,
-        pivotB: Vec3.ZERO,
-        axisB: axis,
-        collideConnected: false
-    });
-    this.constraints.push(hingeConstraint);
-
-    return this.wheelBodies.length - 1;
-};
-
-/**
- * Set the steering value of a wheel.
- * @method setSteeringValue
- * @param {number} value
- * @param {integer} wheelIndex
- * @todo check coordinateSystem
- */
-RigidVehicle.prototype.setSteeringValue = function(value, wheelIndex){
-    // Set angle of the hinge axis
-    var axis = this.wheelAxes[wheelIndex];
-
-    var c = Math.cos(value),
-        s = Math.sin(value),
-        x = axis.x,
-        y = axis.y;
-    this.constraints[wheelIndex].axisA.set(
-        c*x -s*y,
-        s*x +c*y,
-        0
-    );
-};
-
-/**
- * Set the target rotational speed of the hinge constraint.
- * @method setMotorSpeed
- * @param {number} value
- * @param {integer} wheelIndex
- */
-RigidVehicle.prototype.setMotorSpeed = function(value, wheelIndex){
-    var hingeConstraint = this.constraints[wheelIndex];
-    hingeConstraint.enableMotor();
-    hingeConstraint.motorTargetVelocity = value;
-};
-
-/**
- * Set the target rotational speed of the hinge constraint.
- * @method disableMotor
- * @param {number} value
- * @param {integer} wheelIndex
- */
-RigidVehicle.prototype.disableMotor = function(wheelIndex){
-    var hingeConstraint = this.constraints[wheelIndex];
-    hingeConstraint.disableMotor();
-};
-
-var torque = new Vec3();
-
-/**
- * Set the wheel force to apply on one of the wheels each time step
- * @method setWheelForce
- * @param  {number} value
- * @param  {integer} wheelIndex
- */
-RigidVehicle.prototype.setWheelForce = function(value, wheelIndex){
-    this.wheelForces[wheelIndex] = value;
-};
-
-/**
- * Apply a torque on one of the wheels.
- * @method applyWheelForce
- * @param  {number} value
- * @param  {integer} wheelIndex
- */
-RigidVehicle.prototype.applyWheelForce = function(value, wheelIndex){
-    var axis = this.wheelAxes[wheelIndex];
-    var wheelBody = this.wheelBodies[wheelIndex];
-    var bodyTorque = wheelBody.torque;
-
-    axis.scale(value, torque);
-    wheelBody.vectorToWorldFrame(torque, torque);
-    bodyTorque.vadd(torque, bodyTorque);
-};
-
-/**
- * Add the vehicle including its constraints to the world.
- * @method addToWorld
- * @param {World} world
- */
-RigidVehicle.prototype.addToWorld = function(world){
-    var constraints = this.constraints;
-    var bodies = this.wheelBodies.concat([this.chassisBody]);
-
-    for (var i = 0; i < bodies.length; i++) {
-        world.add(bodies[i]);
-    }
-
-    for (var i = 0; i < constraints.length; i++) {
-        world.addConstraint(constraints[i]);
-    }
-
-    world.addEventListener('preStep', this._update.bind(this));
-};
-
-RigidVehicle.prototype._update = function(){
-    var wheelForces = this.wheelForces;
-    for (var i = 0; i < wheelForces.length; i++) {
-        this.applyWheelForce(wheelForces[i], i);
-    }
-};
-
-/**
- * Remove the vehicle including its constraints from the world.
- * @method removeFromWorld
- * @param {World} world
- */
-RigidVehicle.prototype.removeFromWorld = function(world){
-    var constraints = this.constraints;
-    var bodies = this.wheelBodies.concat([this.chassisBody]);
-
-    for (var i = 0; i < bodies.length; i++) {
-        world.remove(bodies[i]);
-    }
-
-    for (var i = 0; i < constraints.length; i++) {
-        world.removeConstraint(constraints[i]);
-    }
-};
-
-var worldAxis = new Vec3();
-
-/**
- * Get current rotational velocity of a wheel
- * @method getWheelSpeed
- * @param {integer} wheelIndex
- */
-RigidVehicle.prototype.getWheelSpeed = function(wheelIndex){
-    var axis = this.wheelAxes[wheelIndex];
-    var wheelBody = this.wheelBodies[wheelIndex];
-    var w = wheelBody.angularVelocity;
-    this.chassisBody.vectorToWorldFrame(axis, worldAxis);
-    return w.dot(worldAxis);
-};
-
-},{"../constraints/HingeConstraint":15,"../math/Vec3":30,"../shapes/Box":37,"../shapes/Sphere":44,"./Body":31}],34:[function(_dereq_,module,exports){
-module.exports = SPHSystem;
-
-var Shape = _dereq_('../shapes/Shape');
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var Particle = _dereq_('../shapes/Particle');
-var Body = _dereq_('../objects/Body');
-var Material = _dereq_('../material/Material');
-
-/**
- * Smoothed-particle hydrodynamics system
- * @class SPHSystem
- * @constructor
- */
-function SPHSystem(){
-    this.particles = [];
-	
-    /**
-     * Density of the system (kg/m3).
-     * @property {number} density
-     */
-    this.density = 1;
-	
-    /**
-     * Distance below which two particles are considered to be neighbors.
-     * It should be adjusted so there are about 15-20 neighbor particles within this radius.
-     * @property {number} smoothingRadius
-     */
-    this.smoothingRadius = 1;
-    this.speedOfSound = 1;
-	
-    /**
-     * Viscosity of the system.
-     * @property {number} viscosity
-     */
-    this.viscosity = 0.01;
-    this.eps = 0.000001;
-
-    // Stuff Computed per particle
-    this.pressures = [];
-    this.densities = [];
-    this.neighbors = [];
-}
-
-/**
- * Add a particle to the system.
- * @method add
- * @param {Body} particle
- */
-SPHSystem.prototype.add = function(particle){
-    this.particles.push(particle);
-    if(this.neighbors.length < this.particles.length){
-        this.neighbors.push([]);
-    }
-};
-
-/**
- * Remove a particle from the system.
- * @method remove
- * @param {Body} particle
- */
-SPHSystem.prototype.remove = function(particle){
-    var idx = this.particles.indexOf(particle);
-    if(idx !== -1){
-        this.particles.splice(idx,1);
-        if(this.neighbors.length > this.particles.length){
-            this.neighbors.pop();
-        }
-    }
-};
-
-/**
- * Get neighbors within smoothing volume, save in the array neighbors
- * @method getNeighbors
- * @param {Body} particle
- * @param {Array} neighbors
- */
-var SPHSystem_getNeighbors_dist = new Vec3();
-SPHSystem.prototype.getNeighbors = function(particle,neighbors){
-    var N = this.particles.length,
-        id = particle.id,
-        R2 = this.smoothingRadius * this.smoothingRadius,
-        dist = SPHSystem_getNeighbors_dist;
-    for(var i=0; i!==N; i++){
-        var p = this.particles[i];
-        p.position.vsub(particle.position,dist);
-        if(id!==p.id && dist.norm2() < R2){
-            neighbors.push(p);
-        }
-    }
-};
-
-// Temp vectors for calculation
-var SPHSystem_update_dist = new Vec3(),
-    SPHSystem_update_a_pressure = new Vec3(),
-    SPHSystem_update_a_visc = new Vec3(),
-    SPHSystem_update_gradW = new Vec3(),
-    SPHSystem_update_r_vec = new Vec3(),
-    SPHSystem_update_u = new Vec3(); // Relative velocity
-SPHSystem.prototype.update = function(){
-    var N = this.particles.length,
-        dist = SPHSystem_update_dist,
-        cs = this.speedOfSound,
-        eps = this.eps;
-
-    for(var i=0; i!==N; i++){
-        var p = this.particles[i]; // Current particle
-        var neighbors = this.neighbors[i];
-
-        // Get neighbors
-        neighbors.length = 0;
-        this.getNeighbors(p,neighbors);
-        neighbors.push(this.particles[i]); // Add current too
-        var numNeighbors = neighbors.length;
-
-        // Accumulate density for the particle
-        var sum = 0.0;
-        for(var j=0; j!==numNeighbors; j++){
-
-            //printf("Current particle has position %f %f %f\n",objects[id].pos.x(),objects[id].pos.y(),objects[id].pos.z());
-            p.position.vsub(neighbors[j].position, dist);
-            var len = dist.norm();
-
-            var weight = this.w(len);
-            sum += neighbors[j].mass * weight;
-        }
-
-        // Save
-        this.densities[i] = sum;
-        this.pressures[i] = cs * cs * (this.densities[i] - this.density);
-    }
-
-    // Add forces
-
-    // Sum to these accelerations
-    var a_pressure= SPHSystem_update_a_pressure;
-    var a_visc =    SPHSystem_update_a_visc;
-    var gradW =     SPHSystem_update_gradW;
-    var r_vec =     SPHSystem_update_r_vec;
-    var u =         SPHSystem_update_u;
-
-    for(var i=0; i!==N; i++){
-
-        var particle = this.particles[i];
-
-        a_pressure.set(0,0,0);
-        a_visc.set(0,0,0);
-
-        // Init vars
-        var Pij;
-        var nabla;
-        var Vij;
-
-        // Sum up for all other neighbors
-        var neighbors = this.neighbors[i];
-        var numNeighbors = neighbors.length;
-
-        //printf("Neighbors: ");
-        for(var j=0; j!==numNeighbors; j++){
-
-            var neighbor = neighbors[j];
-            //printf("%d ",nj);
-
-            // Get r once for all..
-            particle.position.vsub(neighbor.position,r_vec);
-            var r = r_vec.norm();
-
-            // Pressure contribution
-            Pij = -neighbor.mass * (this.pressures[i] / (this.densities[i]*this.densities[i] + eps) + this.pressures[j] / (this.densities[j]*this.densities[j] + eps));
-            this.gradw(r_vec, gradW);
-            // Add to pressure acceleration
-            gradW.mult(Pij , gradW);
-            a_pressure.vadd(gradW, a_pressure);
-
-            // Viscosity contribution
-            neighbor.velocity.vsub(particle.velocity, u);
-            u.mult( 1.0 / (0.0001+this.densities[i] * this.densities[j]) * this.viscosity * neighbor.mass , u );
-            nabla = this.nablaw(r);
-            u.mult(nabla,u);
-            // Add to viscosity acceleration
-            a_visc.vadd( u, a_visc );
-        }
-
-        // Calculate force
-        a_visc.mult(particle.mass, a_visc);
-        a_pressure.mult(particle.mass, a_pressure);
-
-        // Add force to particles
-        particle.force.vadd(a_visc, particle.force);
-        particle.force.vadd(a_pressure, particle.force);
-    }
-};
-
-// Calculate the weight using the W(r) weightfunction
-SPHSystem.prototype.w = function(r){
-    // 315
-    var h = this.smoothingRadius;
-    return 315.0/(64.0*Math.PI*Math.pow(h,9)) * Math.pow(h*h-r*r,3);
-};
-
-// calculate gradient of the weight function
-SPHSystem.prototype.gradw = function(rVec,resultVec){
-    var r = rVec.norm(),
-        h = this.smoothingRadius;
-    rVec.mult(945.0/(32.0*Math.PI*Math.pow(h,9)) * Math.pow((h*h-r*r),2) , resultVec);
-};
-
-// Calculate nabla(W)
-SPHSystem.prototype.nablaw = function(r){
-    var h = this.smoothingRadius;
-    var nabla = 945.0/(32.0*Math.PI*Math.pow(h,9)) * (h*h-r*r)*(7*r*r - 3*h*h);
-    return nabla;
-};
-
-},{"../material/Material":25,"../math/Quaternion":28,"../math/Vec3":30,"../objects/Body":31,"../shapes/Particle":41,"../shapes/Shape":43}],35:[function(_dereq_,module,exports){
-var Vec3 = _dereq_('../math/Vec3');
-
-module.exports = Spring;
-
-/**
- * A spring, connecting two bodies.
- *
- * @class Spring
- * @constructor
- * @param {Body} bodyA
- * @param {Body} bodyB
- * @param {Object} [options]
- * @param {number} [options.restLength]   A number > 0. Default: 1
- * @param {number} [options.stiffness]    A number >= 0. Default: 100
- * @param {number} [options.damping]      A number >= 0. Default: 1
- * @param {Vec3}  [options.worldAnchorA] Where to hook the spring to body A, in world coordinates.
- * @param {Vec3}  [options.worldAnchorB]
- * @param {Vec3}  [options.localAnchorA] Where to hook the spring to body A, in local body coordinates.
- * @param {Vec3}  [options.localAnchorB]
- */
-function Spring(bodyA,bodyB,options){
-    options = options || {};
-
-    /**
-     * Rest length of the spring.
-     * @property restLength
-     * @type {number}
-     */
-    this.restLength = typeof(options.restLength) === "number" ? options.restLength : 1;
-
-    /**
-     * Stiffness of the spring.
-     * @property stiffness
-     * @type {number}
-     */
-    this.stiffness = options.stiffness || 100;
-
-    /**
-     * Damping of the spring.
-     * @property damping
-     * @type {number}
-     */
-    this.damping = options.damping || 1;
-
-    /**
-     * First connected body.
-     * @property bodyA
-     * @type {Body}
-     */
-    this.bodyA = bodyA;
-
-    /**
-     * Second connected body.
-     * @property bodyB
-     * @type {Body}
-     */
-    this.bodyB = bodyB;
-
-    /**
-     * Anchor for bodyA in local bodyA coordinates.
-     * @property localAnchorA
-     * @type {Vec3}
-     */
-    this.localAnchorA = new Vec3();
-
-    /**
-     * Anchor for bodyB in local bodyB coordinates.
-     * @property localAnchorB
-     * @type {Vec3}
-     */
-    this.localAnchorB = new Vec3();
-
-    if(options.localAnchorA){
-        this.localAnchorA.copy(options.localAnchorA);
-    }
-    if(options.localAnchorB){
-        this.localAnchorB.copy(options.localAnchorB);
-    }
-    if(options.worldAnchorA){
-        this.setWorldAnchorA(options.worldAnchorA);
-    }
-    if(options.worldAnchorB){
-        this.setWorldAnchorB(options.worldAnchorB);
-    }
-}
-
-/**
- * Set the anchor point on body A, using world coordinates.
- * @method setWorldAnchorA
- * @param {Vec3} worldAnchorA
- */
-Spring.prototype.setWorldAnchorA = function(worldAnchorA){
-    this.bodyA.pointToLocalFrame(worldAnchorA,this.localAnchorA);
-};
-
-/**
- * Set the anchor point on body B, using world coordinates.
- * @method setWorldAnchorB
- * @param {Vec3} worldAnchorB
- */
-Spring.prototype.setWorldAnchorB = function(worldAnchorB){
-    this.bodyB.pointToLocalFrame(worldAnchorB,this.localAnchorB);
-};
-
-/**
- * Get the anchor point on body A, in world coordinates.
- * @method getWorldAnchorA
- * @param {Vec3} result The vector to store the result in.
- */
-Spring.prototype.getWorldAnchorA = function(result){
-    this.bodyA.pointToWorldFrame(this.localAnchorA,result);
-};
-
-/**
- * Get the anchor point on body B, in world coordinates.
- * @method getWorldAnchorB
- * @param {Vec3} result The vector to store the result in.
- */
-Spring.prototype.getWorldAnchorB = function(result){
-    this.bodyB.pointToWorldFrame(this.localAnchorB,result);
-};
-
-var applyForce_r =              new Vec3(),
-    applyForce_r_unit =         new Vec3(),
-    applyForce_u =              new Vec3(),
-    applyForce_f =              new Vec3(),
-    applyForce_worldAnchorA =   new Vec3(),
-    applyForce_worldAnchorB =   new Vec3(),
-    applyForce_ri =             new Vec3(),
-    applyForce_rj =             new Vec3(),
-    applyForce_ri_x_f =         new Vec3(),
-    applyForce_rj_x_f =         new Vec3(),
-    applyForce_tmp =            new Vec3();
-
-/**
- * Apply the spring force to the connected bodies.
- * @method applyForce
- */
-Spring.prototype.applyForce = function(){
-    var k = this.stiffness,
-        d = this.damping,
-        l = this.restLength,
-        bodyA = this.bodyA,
-        bodyB = this.bodyB,
-        r = applyForce_r,
-        r_unit = applyForce_r_unit,
-        u = applyForce_u,
-        f = applyForce_f,
-        tmp = applyForce_tmp;
-
-    var worldAnchorA = applyForce_worldAnchorA,
-        worldAnchorB = applyForce_worldAnchorB,
-        ri = applyForce_ri,
-        rj = applyForce_rj,
-        ri_x_f = applyForce_ri_x_f,
-        rj_x_f = applyForce_rj_x_f;
-
-    // Get world anchors
-    this.getWorldAnchorA(worldAnchorA);
-    this.getWorldAnchorB(worldAnchorB);
-
-    // Get offset points
-    worldAnchorA.vsub(bodyA.position,ri);
-    worldAnchorB.vsub(bodyB.position,rj);
-
-    // Compute distance vector between world anchor points
-    worldAnchorB.vsub(worldAnchorA,r);
-    var rlen = r.norm();
-    r_unit.copy(r);
-    r_unit.normalize();
-
-    // Compute relative velocity of the anchor points, u
-    bodyB.velocity.vsub(bodyA.velocity,u);
-    // Add rotational velocity
-
-    bodyB.angularVelocity.cross(rj,tmp);
-    u.vadd(tmp,u);
-    bodyA.angularVelocity.cross(ri,tmp);
-    u.vsub(tmp,u);
-
-    // F = - k * ( x - L ) - D * ( u )
-    r_unit.mult(-k*(rlen-l) - d*u.dot(r_unit), f);
-
-    // Add forces to bodies
-    bodyA.force.vsub(f,bodyA.force);
-    bodyB.force.vadd(f,bodyB.force);
-
-    // Angular force
-    ri.cross(f,ri_x_f);
-    rj.cross(f,rj_x_f);
-    bodyA.torque.vsub(ri_x_f,bodyA.torque);
-    bodyB.torque.vadd(rj_x_f,bodyB.torque);
-};
-
-},{"../math/Vec3":30}],36:[function(_dereq_,module,exports){
-var Vec3 = _dereq_('../math/Vec3');
-var Transform = _dereq_('../math/Transform');
-var RaycastResult = _dereq_('../collision/RaycastResult');
-var Utils = _dereq_('../utils/Utils');
-
-module.exports = WheelInfo;
-
-/**
- * @class WheelInfo
- * @constructor
- * @param {Object} [options]
- *
- * @param {Vec3} [options.chassisConnectionPointLocal]
- * @param {Vec3} [options.chassisConnectionPointWorld]
- * @param {Vec3} [options.directionLocal]
- * @param {Vec3} [options.directionWorld]
- * @param {Vec3} [options.axleLocal]
- * @param {Vec3} [options.axleWorld]
- * @param {number} [options.suspensionRestLength=1]
- * @param {number} [options.suspensionMaxLength=2]
- * @param {number} [options.radius=1]
- * @param {number} [options.suspensionStiffness=100]
- * @param {number} [options.dampingCompression=10]
- * @param {number} [options.dampingRelaxation=10]
- * @param {number} [options.frictionSlip=10000]
- * @param {number} [options.steering=0]
- * @param {number} [options.rotation=0]
- * @param {number} [options.deltaRotation=0]
- * @param {number} [options.rollInfluence=0.01]
- * @param {number} [options.maxSuspensionForce]
- * @param {boolean} [options.isFrontWheel=true]
- * @param {number} [options.clippedInvContactDotSuspension=1]
- * @param {number} [options.suspensionRelativeVelocity=0]
- * @param {number} [options.suspensionForce=0]
- * @param {number} [options.skidInfo=0]
- * @param {number} [options.suspensionLength=0]
- * @param {number} [options.maxSuspensionTravel=1]
- * @param {boolean} [options.useCustomSlidingRotationalSpeed=false]
- * @param {number} [options.customSlidingRotationalSpeed=-0.1]
- */
-function WheelInfo(options){
-    options = Utils.defaults(options, {
-        chassisConnectionPointLocal: new Vec3(),
-        chassisConnectionPointWorld: new Vec3(),
-        directionLocal: new Vec3(),
-        directionWorld: new Vec3(),
-        axleLocal: new Vec3(),
-        axleWorld: new Vec3(),
-        suspensionRestLength: 1,
-        suspensionMaxLength: 2,
-        radius: 1,
-        suspensionStiffness: 100,
-        dampingCompression: 10,
-        dampingRelaxation: 10,
-        frictionSlip: 10000,
-        steering: 0,
-        rotation: 0,
-        deltaRotation: 0,
-        rollInfluence: 0.01,
-        maxSuspensionForce: Number.MAX_VALUE,
-        isFrontWheel: true,
-        clippedInvContactDotSuspension: 1,
-        suspensionRelativeVelocity: 0,
-        suspensionForce: 0,
-        skidInfo: 0,
-        suspensionLength: 0,
-        maxSuspensionTravel: 1,
-        useCustomSlidingRotationalSpeed: false,
-        customSlidingRotationalSpeed: -0.1
-    });
-
-    /**
-     * Max travel distance of the suspension, in meters.
-     * @property {number} maxSuspensionTravel
-     */
-    this.maxSuspensionTravel = options.maxSuspensionTravel;
-
-    /**
-     * Speed to apply to the wheel rotation when the wheel is sliding.
-     * @property {number} customSlidingRotationalSpeed
-     */
-    this.customSlidingRotationalSpeed = options.customSlidingRotationalSpeed;
-
-    /**
-     * If the customSlidingRotationalSpeed should be used.
-     * @property {Boolean} useCustomSlidingRotationalSpeed
-     */
-    this.useCustomSlidingRotationalSpeed = options.useCustomSlidingRotationalSpeed;
-
-    /**
-     * @property {Boolean} sliding
-     */
-    this.sliding = false;
-
-    /**
-     * Connection point, defined locally in the chassis body frame.
-     * @property {Vec3} chassisConnectionPointLocal
-     */
-    this.chassisConnectionPointLocal = options.chassisConnectionPointLocal.clone();
-
-    /**
-     * @property {Vec3} chassisConnectionPointWorld
-     */
-    this.chassisConnectionPointWorld = options.chassisConnectionPointWorld.clone();
-
-    /**
-     * @property {Vec3} directionLocal
-     */
-    this.directionLocal = options.directionLocal.clone();
-
-    /**
-     * @property {Vec3} directionWorld
-     */
-    this.directionWorld = options.directionWorld.clone();
-
-    /**
-     * @property {Vec3} axleLocal
-     */
-    this.axleLocal = options.axleLocal.clone();
-
-    /**
-     * @property {Vec3} axleWorld
-     */
-    this.axleWorld = options.axleWorld.clone();
-
-    /**
-     * @property {number} suspensionRestLength
-     */
-    this.suspensionRestLength = options.suspensionRestLength;
-
-    /**
-     * @property {number} suspensionMaxLength
-     */
-    this.suspensionMaxLength = options.suspensionMaxLength;
-
-    /**
-     * @property {number} radius
-     */
-    this.radius = options.radius;
-
-    /**
-     * @property {number} suspensionStiffness
-     */
-    this.suspensionStiffness = options.suspensionStiffness;
-
-    /**
-     * @property {number} dampingCompression
-     */
-    this.dampingCompression = options.dampingCompression;
-
-    /**
-     * @property {number} dampingRelaxation
-     */
-    this.dampingRelaxation = options.dampingRelaxation;
-
-    /**
-     * @property {number} frictionSlip
-     */
-    this.frictionSlip = options.frictionSlip;
-
-    /**
-     * @property {number} steering
-     */
-    this.steering = 0;
-
-    /**
-     * Rotation value, in radians.
-     * @property {number} rotation
-     */
-    this.rotation = 0;
-
-    /**
-     * @property {number} deltaRotation
-     */
-    this.deltaRotation = 0;
-
-    /**
-     * @property {number} rollInfluence
-     */
-    this.rollInfluence = options.rollInfluence;
-
-    /**
-     * @property {number} maxSuspensionForce
-     */
-    this.maxSuspensionForce = options.maxSuspensionForce;
-
-    /**
-     * @property {number} engineForce
-     */
-    this.engineForce = 0;
-
-    /**
-     * @property {number} brake
-     */
-    this.brake = 0;
-
-    /**
-     * @property {number} isFrontWheel
-     */
-    this.isFrontWheel = options.isFrontWheel;
-
-    /**
-     * @property {number} clippedInvContactDotSuspension
-     */
-    this.clippedInvContactDotSuspension = 1;
-
-    /**
-     * @property {number} suspensionRelativeVelocity
-     */
-    this.suspensionRelativeVelocity = 0;
-
-    /**
-     * @property {number} suspensionForce
-     */
-    this.suspensionForce = 0;
-
-    /**
-     * @property {number} skidInfo
-     */
-    this.skidInfo = 0;
-
-    /**
-     * @property {number} suspensionLength
-     */
-    this.suspensionLength = 0;
-
-    /**
-     * @property {number} sideImpulse
-     */
-    this.sideImpulse = 0;
-
-    /**
-     * @property {number} forwardImpulse
-     */
-    this.forwardImpulse = 0;
-
-    /**
-     * The result from raycasting
-     * @property {RaycastResult} raycastResult
-     */
-    this.raycastResult = new RaycastResult();
-
-    /**
-     * Wheel world transform
-     * @property {Transform} worldTransform
-     */
-    this.worldTransform = new Transform();
-
-    /**
-     * @property {boolean} isInContact
-     */
-    this.isInContact = false;
-}
-
-var chassis_velocity_at_contactPoint = new Vec3();
-var relpos = new Vec3();
-var chassis_velocity_at_contactPoint = new Vec3();
-WheelInfo.prototype.updateWheel = function(chassis){
-    var raycastResult = this.raycastResult;
-
-    if (this.isInContact){
-        var project= raycastResult.hitNormalWorld.dot(raycastResult.directionWorld);
-        raycastResult.hitPointWorld.vsub(chassis.position, relpos);
-        chassis.getVelocityAtWorldPoint(relpos, chassis_velocity_at_contactPoint);
-        var projVel = raycastResult.hitNormalWorld.dot( chassis_velocity_at_contactPoint );
-        if (project >= -0.1) {
-            this.suspensionRelativeVelocity = 0.0;
-            this.clippedInvContactDotSuspension = 1.0 / 0.1;
-        } else {
-            var inv = -1 / project;
-            this.suspensionRelativeVelocity = projVel * inv;
-            this.clippedInvContactDotSuspension = inv;
-        }
-
-    } else {
-        // Not in contact : position wheel in a nice (rest length) position
-        raycastResult.suspensionLength = this.suspensionRestLength;
-        this.suspensionRelativeVelocity = 0.0;
-        raycastResult.directionWorld.scale(-1, raycastResult.hitNormalWorld);
-        this.clippedInvContactDotSuspension = 1.0;
-    }
-};
-},{"../collision/RaycastResult":10,"../math/Transform":29,"../math/Vec3":30,"../utils/Utils":53}],37:[function(_dereq_,module,exports){
-module.exports = Box;
-
-var Shape = _dereq_('./Shape');
-var Vec3 = _dereq_('../math/Vec3');
-var ConvexPolyhedron = _dereq_('./ConvexPolyhedron');
-
-/**
- * A 3d box shape.
- * @class Box
- * @constructor
- * @param {Vec3} halfExtents
- * @author schteppe
- * @extends Shape
- */
-function Box(halfExtents){
-    Shape.call(this);
-
-    this.type = Shape.types.BOX;
-
-    /**
-     * @property halfExtents
-     * @type {Vec3}
-     */
-    this.halfExtents = halfExtents;
-
-    /**
-     * Used by the contact generator to make contacts with other convex polyhedra for example
-     * @property convexPolyhedronRepresentation
-     * @type {ConvexPolyhedron}
-     */
-    this.convexPolyhedronRepresentation = null;
-
-    this.updateConvexPolyhedronRepresentation();
-    this.updateBoundingSphereRadius();
-}
-Box.prototype = new Shape();
-Box.prototype.constructor = Box;
-
-/**
- * Updates the local convex polyhedron representation used for some collisions.
- * @method updateConvexPolyhedronRepresentation
- */
-Box.prototype.updateConvexPolyhedronRepresentation = function(){
-    var sx = this.halfExtents.x;
-    var sy = this.halfExtents.y;
-    var sz = this.halfExtents.z;
-    var V = Vec3;
-
-    var vertices = [
-        new V(-sx,-sy,-sz),
-        new V( sx,-sy,-sz),
-        new V( sx, sy,-sz),
-        new V(-sx, sy,-sz),
-        new V(-sx,-sy, sz),
-        new V( sx,-sy, sz),
-        new V( sx, sy, sz),
-        new V(-sx, sy, sz)
-    ];
-
-    var indices = [
-        [3,2,1,0], // -z
-        [4,5,6,7], // +z
-        [5,4,0,1], // -y
-        [2,3,7,6], // +y
-        [0,4,7,3], // -x
-        [1,2,6,5], // +x
-    ];
-
-    var axes = [
-        new V(0, 0, 1),
-        new V(0, 1, 0),
-        new V(1, 0, 0)
-    ];
-
-    var h = new ConvexPolyhedron(vertices, indices);
-    this.convexPolyhedronRepresentation = h;
-    h.material = this.material;
-};
-
-/**
- * @method calculateLocalInertia
- * @param  {Number} mass
- * @param  {Vec3} target
- * @return {Vec3}
- */
-Box.prototype.calculateLocalInertia = function(mass,target){
-    target = target || new Vec3();
-    Box.calculateInertia(this.halfExtents, mass, target);
-    return target;
-};
-
-Box.calculateInertia = function(halfExtents,mass,target){
-    var e = halfExtents;
-    target.x = 1.0 / 12.0 * mass * (   2*e.y*2*e.y + 2*e.z*2*e.z );
-    target.y = 1.0 / 12.0 * mass * (   2*e.x*2*e.x + 2*e.z*2*e.z );
-    target.z = 1.0 / 12.0 * mass * (   2*e.y*2*e.y + 2*e.x*2*e.x );
-};
-
-/**
- * Get the box 6 side normals
- * @method getSideNormals
- * @param {array}      sixTargetVectors An array of 6 vectors, to store the resulting side normals in.
- * @param {Quaternion} quat             Orientation to apply to the normal vectors. If not provided, the vectors will be in respect to the local frame.
- * @return {array}
- */
-Box.prototype.getSideNormals = function(sixTargetVectors,quat){
-    var sides = sixTargetVectors;
-    var ex = this.halfExtents;
-    sides[0].set(  ex.x,     0,     0);
-    sides[1].set(     0,  ex.y,     0);
-    sides[2].set(     0,     0,  ex.z);
-    sides[3].set( -ex.x,     0,     0);
-    sides[4].set(     0, -ex.y,     0);
-    sides[5].set(     0,     0, -ex.z);
-
-    if(quat!==undefined){
-        for(var i=0; i!==sides.length; i++){
-            quat.vmult(sides[i],sides[i]);
-        }
-    }
-
-    return sides;
-};
-
-Box.prototype.volume = function(){
-    return 8.0 * this.halfExtents.x * this.halfExtents.y * this.halfExtents.z;
-};
-
-Box.prototype.updateBoundingSphereRadius = function(){
-    this.boundingSphereRadius = this.halfExtents.norm();
-};
-
-var worldCornerTempPos = new Vec3();
-var worldCornerTempNeg = new Vec3();
-Box.prototype.forEachWorldCorner = function(pos,quat,callback){
-
-    var e = this.halfExtents;
-    var corners = [[  e.x,  e.y,  e.z],
-                   [ -e.x,  e.y,  e.z],
-                   [ -e.x, -e.y,  e.z],
-                   [ -e.x, -e.y, -e.z],
-                   [  e.x, -e.y, -e.z],
-                   [  e.x,  e.y, -e.z],
-                   [ -e.x,  e.y, -e.z],
-                   [  e.x, -e.y,  e.z]];
-    for(var i=0; i<corners.length; i++){
-        worldCornerTempPos.set(corners[i][0],corners[i][1],corners[i][2]);
-        quat.vmult(worldCornerTempPos,worldCornerTempPos);
-        pos.vadd(worldCornerTempPos,worldCornerTempPos);
-        callback(worldCornerTempPos.x,
-                 worldCornerTempPos.y,
-                 worldCornerTempPos.z);
-    }
-};
-
-var worldCornersTemp = [
-    new Vec3(),
-    new Vec3(),
-    new Vec3(),
-    new Vec3(),
-    new Vec3(),
-    new Vec3(),
-    new Vec3(),
-    new Vec3()
-];
-Box.prototype.calculateWorldAABB = function(pos,quat,min,max){
-
-    var e = this.halfExtents;
-    worldCornersTemp[0].set(e.x, e.y, e.z);
-    worldCornersTemp[1].set(-e.x,  e.y, e.z);
-    worldCornersTemp[2].set(-e.x, -e.y, e.z);
-    worldCornersTemp[3].set(-e.x, -e.y, -e.z);
-    worldCornersTemp[4].set(e.x, -e.y, -e.z);
-    worldCornersTemp[5].set(e.x,  e.y, -e.z);
-    worldCornersTemp[6].set(-e.x,  e.y, -e.z);
-    worldCornersTemp[7].set(e.x, -e.y,  e.z);
-
-    var wc = worldCornersTemp[0];
-    quat.vmult(wc, wc);
-    pos.vadd(wc, wc);
-    max.copy(wc);
-    min.copy(wc);
-    for(var i=1; i<8; i++){
-        var wc = worldCornersTemp[i];
-        quat.vmult(wc, wc);
-        pos.vadd(wc, wc);
-        var x = wc.x;
-        var y = wc.y;
-        var z = wc.z;
-        if(x > max.x){
-            max.x = x;
-        }
-        if(y > max.y){
-            max.y = y;
-        }
-        if(z > max.z){
-            max.z = z;
-        }
-
-        if(x < min.x){
-            min.x = x;
-        }
-        if(y < min.y){
-            min.y = y;
-        }
-        if(z < min.z){
-            min.z = z;
-        }
-    }
-
-    // Get each axis max
-    // min.set(Infinity,Infinity,Infinity);
-    // max.set(-Infinity,-Infinity,-Infinity);
-    // this.forEachWorldCorner(pos,quat,function(x,y,z){
-    //     if(x > max.x){
-    //         max.x = x;
-    //     }
-    //     if(y > max.y){
-    //         max.y = y;
-    //     }
-    //     if(z > max.z){
-    //         max.z = z;
-    //     }
-
-    //     if(x < min.x){
-    //         min.x = x;
-    //     }
-    //     if(y < min.y){
-    //         min.y = y;
-    //     }
-    //     if(z < min.z){
-    //         min.z = z;
-    //     }
-    // });
-};
-
-},{"../math/Vec3":30,"./ConvexPolyhedron":38,"./Shape":43}],38:[function(_dereq_,module,exports){
-module.exports = ConvexPolyhedron;
-
-var Shape = _dereq_('./Shape');
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var Transform = _dereq_('../math/Transform');
-
-/**
- * A set of polygons describing a convex shape.
- * @class ConvexPolyhedron
- * @constructor
- * @extends Shape
- * @description The shape MUST be convex for the code to work properly. No polygons may be coplanar (contained
- * in the same 3D plane), instead these should be merged into one polygon.
- *
- * @param {array} points An array of Vec3's
- * @param {array} faces Array of integer arrays, describing which vertices that is included in each face.
- *
- * @author qiao / https://github.com/qiao (original author, see https://github.com/qiao/three.js/commit/85026f0c769e4000148a67d45a9e9b9c5108836f)
- * @author schteppe / https://github.com/schteppe
- * @see http://www.altdevblogaday.com/2011/05/13/contact-generation-between-3d-convex-meshes/
- * @see http://bullet.googlecode.com/svn/trunk/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
- *
- * @todo Move the clipping functions to ContactGenerator?
- * @todo Automatically merge coplanar polygons in constructor.
- */
-function ConvexPolyhedron(points, faces, uniqueAxes) {
-    var that = this;
-    Shape.call(this);
-    this.type = Shape.types.CONVEXPOLYHEDRON;
-
-    /**
-     * Array of Vec3
-     * @property vertices
-     * @type {Array}
-     */
-    this.vertices = points||[];
-
-    this.worldVertices = []; // World transformed version of .vertices
-    this.worldVerticesNeedsUpdate = true;
-
-    /**
-     * Array of integer arrays, indicating which vertices each face consists of
-     * @property faces
-     * @type {Array}
-     */
-    this.faces = faces||[];
-
-    /**
-     * Array of Vec3
-     * @property faceNormals
-     * @type {Array}
-     */
-    this.faceNormals = [];
-    this.computeNormals();
-
-    this.worldFaceNormalsNeedsUpdate = true;
-    this.worldFaceNormals = []; // World transformed version of .faceNormals
-
-    /**
-     * Array of Vec3
-     * @property uniqueEdges
-     * @type {Array}
-     */
-    this.uniqueEdges = [];
-
-    /**
-     * If given, these locally defined, normalized axes are the only ones being checked when doing separating axis check.
-     * @property {Array} uniqueAxes
-     */
-    this.uniqueAxes = uniqueAxes ? uniqueAxes.slice() : null;
-
-    this.computeEdges();
-    this.updateBoundingSphereRadius();
-}
-ConvexPolyhedron.prototype = new Shape();
-ConvexPolyhedron.prototype.constructor = ConvexPolyhedron;
-
-var computeEdges_tmpEdge = new Vec3();
-/**
- * Computes uniqueEdges
- * @method computeEdges
- */
-ConvexPolyhedron.prototype.computeEdges = function(){
-    var faces = this.faces;
-    var vertices = this.vertices;
-    var nv = vertices.length;
-    var edges = this.uniqueEdges;
-
-    edges.length = 0;
-
-    var edge = computeEdges_tmpEdge;
-
-    for(var i=0; i !== faces.length; i++){
-        var face = faces[i];
-        var numVertices = face.length;
-        for(var j = 0; j !== numVertices; j++){
-            var k = ( j+1 ) % numVertices;
-            vertices[face[j]].vsub(vertices[face[k]], edge);
-            edge.normalize();
-            var found = false;
-            for(var p=0; p !== edges.length; p++){
-                if (edges[p].almostEquals(edge) || edges[p].almostEquals(edge)){
-                    found = true;
-                    break;
-                }
-            }
-
-            if (!found){
-                edges.push(edge.clone());
-            }
-        }
-    }
-};
-
-/**
- * Compute the normals of the faces. Will reuse existing Vec3 objects in the .faceNormals array if they exist.
- * @method computeNormals
- */
-ConvexPolyhedron.prototype.computeNormals = function(){
-    this.faceNormals.length = this.faces.length;
-
-    // Generate normals
-    for(var i=0; i<this.faces.length; i++){
-
-        // Check so all vertices exists for this face
-        for(var j=0; j<this.faces[i].length; j++){
-            if(!this.vertices[this.faces[i][j]]){
-                throw new Error("Vertex "+this.faces[i][j]+" not found!");
-            }
-        }
-
-        var n = this.faceNormals[i] || new Vec3();
-        this.getFaceNormal(i,n);
-        n.negate(n);
-        this.faceNormals[i] = n;
-        var vertex = this.vertices[this.faces[i][0]];
-        if(n.dot(vertex) < 0){
-            console.error(".faceNormals[" + i + "] = Vec3("+n.toString()+") looks like it points into the shape? The vertices follow. Make sure they are ordered CCW around the normal, using the right hand rule.");
-            for(var j=0; j<this.faces[i].length; j++){
-                console.warn(".vertices["+this.faces[i][j]+"] = Vec3("+this.vertices[this.faces[i][j]].toString()+")");
-            }
-        }
-    }
-};
-
-/**
- * Get face normal given 3 vertices
- * @static
- * @method getFaceNormal
- * @param {Vec3} va
- * @param {Vec3} vb
- * @param {Vec3} vc
- * @param {Vec3} target
- */
-var cb = new Vec3();
-var ab = new Vec3();
-ConvexPolyhedron.computeNormal = function ( va, vb, vc, target ) {
-    vb.vsub(va,ab);
-    vc.vsub(vb,cb);
-    cb.cross(ab,target);
-    if ( !target.isZero() ) {
-        target.normalize();
-    }
-};
-
-/**
- * Compute the normal of a face from its vertices
- * @method getFaceNormal
- * @param  {Number} i
- * @param  {Vec3} target
- */
-ConvexPolyhedron.prototype.getFaceNormal = function(i,target){
-    var f = this.faces[i];
-    var va = this.vertices[f[0]];
-    var vb = this.vertices[f[1]];
-    var vc = this.vertices[f[2]];
-    return ConvexPolyhedron.computeNormal(va,vb,vc,target);
-};
-
-/**
- * @method clipAgainstHull
- * @param {Vec3} posA
- * @param {Quaternion} quatA
- * @param {ConvexPolyhedron} hullB
- * @param {Vec3} posB
- * @param {Quaternion} quatB
- * @param {Vec3} separatingNormal
- * @param {Number} minDist Clamp distance
- * @param {Number} maxDist
- * @param {array} result The an array of contact point objects, see clipFaceAgainstHull
- * @see http://bullet.googlecode.com/svn/trunk/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
- */
-var cah_WorldNormal = new Vec3();
-ConvexPolyhedron.prototype.clipAgainstHull = function(posA,quatA,hullB,posB,quatB,separatingNormal,minDist,maxDist,result){
-    var WorldNormal = cah_WorldNormal;
-    var hullA = this;
-    var curMaxDist = maxDist;
-    var closestFaceB = -1;
-    var dmax = -Number.MAX_VALUE;
-    for(var face=0; face < hullB.faces.length; face++){
-        WorldNormal.copy(hullB.faceNormals[face]);
-        quatB.vmult(WorldNormal,WorldNormal);
-        //posB.vadd(WorldNormal,WorldNormal);
-        var d = WorldNormal.dot(separatingNormal);
-        if (d > dmax){
-            dmax = d;
-            closestFaceB = face;
-        }
-    }
-    var worldVertsB1 = [];
-    var polyB = hullB.faces[closestFaceB];
-    var numVertices = polyB.length;
-    for(var e0=0; e0<numVertices; e0++){
-        var b = hullB.vertices[polyB[e0]];
-        var worldb = new Vec3();
-        worldb.copy(b);
-        quatB.vmult(worldb,worldb);
-        posB.vadd(worldb,worldb);
-        worldVertsB1.push(worldb);
-    }
-
-    if (closestFaceB>=0){
-        this.clipFaceAgainstHull(separatingNormal,
-                                 posA,
-                                 quatA,
-                                 worldVertsB1,
-                                 minDist,
-                                 maxDist,
-                                 result);
-    }
-};
-
-/**
- * Find the separating axis between this hull and another
- * @method findSeparatingAxis
- * @param {ConvexPolyhedron} hullB
- * @param {Vec3} posA
- * @param {Quaternion} quatA
- * @param {Vec3} posB
- * @param {Quaternion} quatB
- * @param {Vec3} target The target vector to save the axis in
- * @return {bool} Returns false if a separation is found, else true
- */
-var fsa_faceANormalWS3 = new Vec3(),
-    fsa_Worldnormal1 = new Vec3(),
-    fsa_deltaC = new Vec3(),
-    fsa_worldEdge0 = new Vec3(),
-    fsa_worldEdge1 = new Vec3(),
-    fsa_Cross = new Vec3();
-ConvexPolyhedron.prototype.findSeparatingAxis = function(hullB,posA,quatA,posB,quatB,target, faceListA, faceListB){
-    var faceANormalWS3 = fsa_faceANormalWS3,
-        Worldnormal1 = fsa_Worldnormal1,
-        deltaC = fsa_deltaC,
-        worldEdge0 = fsa_worldEdge0,
-        worldEdge1 = fsa_worldEdge1,
-        Cross = fsa_Cross;
-
-    var dmin = Number.MAX_VALUE;
-    var hullA = this;
-    var curPlaneTests=0;
-
-    if(!hullA.uniqueAxes){
-
-        var numFacesA = faceListA ? faceListA.length : hullA.faces.length;
-
-        // Test face normals from hullA
-        for(var i=0; i<numFacesA; i++){
-            var fi = faceListA ? faceListA[i] : i;
-
-            // Get world face normal
-            faceANormalWS3.copy(hullA.faceNormals[fi]);
-            quatA.vmult(faceANormalWS3,faceANormalWS3);
-
-            var d = hullA.testSepAxis(faceANormalWS3, hullB, posA, quatA, posB, quatB);
-            if(d===false){
-                return false;
-            }
-
-            if(d<dmin){
-                dmin = d;
-                target.copy(faceANormalWS3);
-            }
-        }
-
-    } else {
-
-        // Test unique axes
-        for(var i = 0; i !== hullA.uniqueAxes.length; i++){
-
-            // Get world axis
-            quatA.vmult(hullA.uniqueAxes[i],faceANormalWS3);
-
-            var d = hullA.testSepAxis(faceANormalWS3, hullB, posA, quatA, posB, quatB);
-            if(d===false){
-                return false;
-            }
-
-            if(d<dmin){
-                dmin = d;
-                target.copy(faceANormalWS3);
-            }
-        }
-    }
-
-    if(!hullB.uniqueAxes){
-
-        // Test face normals from hullB
-        var numFacesB = faceListB ? faceListB.length : hullB.faces.length;
-        for(var i=0;i<numFacesB;i++){
-
-            var fi = faceListB ? faceListB[i] : i;
-
-            Worldnormal1.copy(hullB.faceNormals[fi]);
-            quatB.vmult(Worldnormal1,Worldnormal1);
-            curPlaneTests++;
-            var d = hullA.testSepAxis(Worldnormal1, hullB,posA,quatA,posB,quatB);
-            if(d===false){
-                return false;
-            }
-
-            if(d<dmin){
-                dmin = d;
-                target.copy(Worldnormal1);
-            }
-        }
-    } else {
-
-        // Test unique axes in B
-        for(var i = 0; i !== hullB.uniqueAxes.length; i++){
-            quatB.vmult(hullB.uniqueAxes[i],Worldnormal1);
-
-            curPlaneTests++;
-            var d = hullA.testSepAxis(Worldnormal1, hullB,posA,quatA,posB,quatB);
-            if(d===false){
-                return false;
-            }
-
-            if(d<dmin){
-                dmin = d;
-                target.copy(Worldnormal1);
-            }
-        }
-    }
-
-    // Test edges
-    for(var e0=0; e0 !== hullA.uniqueEdges.length; e0++){
-
-        // Get world edge
-        quatA.vmult(hullA.uniqueEdges[e0],worldEdge0);
-
-        for(var e1=0; e1 !== hullB.uniqueEdges.length; e1++){
-
-            // Get world edge 2
-            quatB.vmult(hullB.uniqueEdges[e1], worldEdge1);
-            worldEdge0.cross(worldEdge1,Cross);
-
-            if(!Cross.almostZero()){
-                Cross.normalize();
-                var dist = hullA.testSepAxis(Cross, hullB, posA, quatA, posB, quatB);
-                if(dist === false){
-                    return false;
-                }
-                if(dist < dmin){
-                    dmin = dist;
-                    target.copy(Cross);
-                }
-            }
-        }
-    }
-
-    posB.vsub(posA,deltaC);
-    if((deltaC.dot(target))>0.0){
-        target.negate(target);
-    }
-
-    return true;
-};
-
-var maxminA=[], maxminB=[];
-
-/**
- * Test separating axis against two hulls. Both hulls are projected onto the axis and the overlap size is returned if there is one.
- * @method testSepAxis
- * @param {Vec3} axis
- * @param {ConvexPolyhedron} hullB
- * @param {Vec3} posA
- * @param {Quaternion} quatA
- * @param {Vec3} posB
- * @param {Quaternion} quatB
- * @return {number} The overlap depth, or FALSE if no penetration.
- */
-ConvexPolyhedron.prototype.testSepAxis = function(axis, hullB, posA, quatA, posB, quatB){
-    var hullA=this;
-    ConvexPolyhedron.project(hullA, axis, posA, quatA, maxminA);
-    ConvexPolyhedron.project(hullB, axis, posB, quatB, maxminB);
-    var maxA = maxminA[0];
-    var minA = maxminA[1];
-    var maxB = maxminB[0];
-    var minB = maxminB[1];
-    if(maxA<minB || maxB<minA){
-        return false; // Separated
-    }
-    var d0 = maxA - minB;
-    var d1 = maxB - minA;
-    var depth = d0<d1 ? d0:d1;
-    return depth;
-};
-
-var cli_aabbmin = new Vec3(),
-    cli_aabbmax = new Vec3();
-
-/**
- * @method calculateLocalInertia
- * @param  {Number} mass
- * @param  {Vec3} target
- */
-ConvexPolyhedron.prototype.calculateLocalInertia = function(mass,target){
-    // Approximate with box inertia
-    // Exact inertia calculation is overkill, but see http://geometrictools.com/Documentation/PolyhedralMassProperties.pdf for the correct way to do it
-    this.computeLocalAABB(cli_aabbmin,cli_aabbmax);
-    var x = cli_aabbmax.x - cli_aabbmin.x,
-        y = cli_aabbmax.y - cli_aabbmin.y,
-        z = cli_aabbmax.z - cli_aabbmin.z;
-    target.x = 1.0 / 12.0 * mass * ( 2*y*2*y + 2*z*2*z );
-    target.y = 1.0 / 12.0 * mass * ( 2*x*2*x + 2*z*2*z );
-    target.z = 1.0 / 12.0 * mass * ( 2*y*2*y + 2*x*2*x );
-};
-
-/**
- * @method getPlaneConstantOfFace
- * @param  {Number} face_i Index of the face
- * @return {Number}
- */
-ConvexPolyhedron.prototype.getPlaneConstantOfFace = function(face_i){
-    var f = this.faces[face_i];
-    var n = this.faceNormals[face_i];
-    var v = this.vertices[f[0]];
-    var c = -n.dot(v);
-    return c;
-};
-
-/**
- * Clip a face against a hull.
- * @method clipFaceAgainstHull
- * @param {Vec3} separatingNormal
- * @param {Vec3} posA
- * @param {Quaternion} quatA
- * @param {Array} worldVertsB1 An array of Vec3 with vertices in the world frame.
- * @param {Number} minDist Distance clamping
- * @param {Number} maxDist
- * @param Array result Array to store resulting contact points in. Will be objects with properties: point, depth, normal. These are represented in world coordinates.
- */
-var cfah_faceANormalWS = new Vec3(),
-    cfah_edge0 = new Vec3(),
-    cfah_WorldEdge0 = new Vec3(),
-    cfah_worldPlaneAnormal1 = new Vec3(),
-    cfah_planeNormalWS1 = new Vec3(),
-    cfah_worldA1 = new Vec3(),
-    cfah_localPlaneNormal = new Vec3(),
-    cfah_planeNormalWS = new Vec3();
-ConvexPolyhedron.prototype.clipFaceAgainstHull = function(separatingNormal, posA, quatA, worldVertsB1, minDist, maxDist,result){
-    var faceANormalWS = cfah_faceANormalWS,
-        edge0 = cfah_edge0,
-        WorldEdge0 = cfah_WorldEdge0,
-        worldPlaneAnormal1 = cfah_worldPlaneAnormal1,
-        planeNormalWS1 = cfah_planeNormalWS1,
-        worldA1 = cfah_worldA1,
-        localPlaneNormal = cfah_localPlaneNormal,
-        planeNormalWS = cfah_planeNormalWS;
-
-    var hullA = this;
-    var worldVertsB2 = [];
-    var pVtxIn = worldVertsB1;
-    var pVtxOut = worldVertsB2;
-    // Find the face with normal closest to the separating axis
-    var closestFaceA = -1;
-    var dmin = Number.MAX_VALUE;
-    for(var face=0; face<hullA.faces.length; face++){
-        faceANormalWS.copy(hullA.faceNormals[face]);
-        quatA.vmult(faceANormalWS,faceANormalWS);
-        //posA.vadd(faceANormalWS,faceANormalWS);
-        var d = faceANormalWS.dot(separatingNormal);
-        if (d < dmin){
-            dmin = d;
-            closestFaceA = face;
-        }
-    }
-    if (closestFaceA < 0){
-        // console.log("--- did not find any closest face... ---");
-        return;
-    }
-    //console.log("closest A: ",closestFaceA);
-    // Get the face and construct connected faces
-    var polyA = hullA.faces[closestFaceA];
-    polyA.connectedFaces = [];
-    for(var i=0; i<hullA.faces.length; i++){
-        for(var j=0; j<hullA.faces[i].length; j++){
-            if(polyA.indexOf(hullA.faces[i][j])!==-1 /* Sharing a vertex*/ && i!==closestFaceA /* Not the one we are looking for connections from */ && polyA.connectedFaces.indexOf(i)===-1 /* Not already added */ ){
-                polyA.connectedFaces.push(i);
-            }
-        }
-    }
-    // Clip the polygon to the back of the planes of all faces of hull A, that are adjacent to the witness face
-    var numContacts = pVtxIn.length;
-    var numVerticesA = polyA.length;
-    var res = [];
-    for(var e0=0; e0<numVerticesA; e0++){
-        var a = hullA.vertices[polyA[e0]];
-        var b = hullA.vertices[polyA[(e0+1)%numVerticesA]];
-        a.vsub(b,edge0);
-        WorldEdge0.copy(edge0);
-        quatA.vmult(WorldEdge0,WorldEdge0);
-        posA.vadd(WorldEdge0,WorldEdge0);
-        worldPlaneAnormal1.copy(this.faceNormals[closestFaceA]);//transA.getBasis()* btVector3(polyA.m_plane[0],polyA.m_plane[1],polyA.m_plane[2]);
-        quatA.vmult(worldPlaneAnormal1,worldPlaneAnormal1);
-        posA.vadd(worldPlaneAnormal1,worldPlaneAnormal1);
-        WorldEdge0.cross(worldPlaneAnormal1,planeNormalWS1);
-        planeNormalWS1.negate(planeNormalWS1);
-        worldA1.copy(a);
-        quatA.vmult(worldA1,worldA1);
-        posA.vadd(worldA1,worldA1);
-        var planeEqWS1 = -worldA1.dot(planeNormalWS1);
-        var planeEqWS;
-        if(true){
-            var otherFace = polyA.connectedFaces[e0];
-            localPlaneNormal.copy(this.faceNormals[otherFace]);
-            var localPlaneEq = this.getPlaneConstantOfFace(otherFace);
-
-            planeNormalWS.copy(localPlaneNormal);
-            quatA.vmult(planeNormalWS,planeNormalWS);
-            //posA.vadd(planeNormalWS,planeNormalWS);
-            var planeEqWS = localPlaneEq - planeNormalWS.dot(posA);
-        } else  {
-            planeNormalWS.copy(planeNormalWS1);
-            planeEqWS = planeEqWS1;
-        }
-
-        // Clip face against our constructed plane
-        this.clipFaceAgainstPlane(pVtxIn, pVtxOut, planeNormalWS, planeEqWS);
-
-        // Throw away all clipped points, but save the reamining until next clip
-        while(pVtxIn.length){
-            pVtxIn.shift();
-        }
-        while(pVtxOut.length){
-            pVtxIn.push(pVtxOut.shift());
-        }
-    }
-
-    //console.log("Resulting points after clip:",pVtxIn);
-
-    // only keep contact points that are behind the witness face
-    localPlaneNormal.copy(this.faceNormals[closestFaceA]);
-
-    var localPlaneEq = this.getPlaneConstantOfFace(closestFaceA);
-    planeNormalWS.copy(localPlaneNormal);
-    quatA.vmult(planeNormalWS,planeNormalWS);
-
-    var planeEqWS = localPlaneEq - planeNormalWS.dot(posA);
-    for (var i=0; i<pVtxIn.length; i++){
-        var depth = planeNormalWS.dot(pVtxIn[i]) + planeEqWS; //???
-        /*console.log("depth calc from normal=",planeNormalWS.toString()," and constant "+planeEqWS+" and vertex ",pVtxIn[i].toString()," gives "+depth);*/
-        if (depth <=minDist){
-            console.log("clamped: depth="+depth+" to minDist="+(minDist+""));
-            depth = minDist;
-        }
-
-        if (depth <=maxDist){
-            var point = pVtxIn[i];
-            if(depth<=0){
-                /*console.log("Got contact point ",point.toString(),
-                  ", depth=",depth,
-                  "contact normal=",separatingNormal.toString(),
-                  "plane",planeNormalWS.toString(),
-                  "planeConstant",planeEqWS);*/
-                var p = {
-                    point:point,
-                    normal:planeNormalWS,
-                    depth: depth,
-                };
-                result.push(p);
-            }
-        }
-    }
-};
-
-/**
- * Clip a face in a hull against the back of a plane.
- * @method clipFaceAgainstPlane
- * @param {Array} inVertices
- * @param {Array} outVertices
- * @param {Vec3} planeNormal
- * @param {Number} planeConstant The constant in the mathematical plane equation
- */
-ConvexPolyhedron.prototype.clipFaceAgainstPlane = function(inVertices,outVertices, planeNormal, planeConstant){
-    var n_dot_first, n_dot_last;
-    var numVerts = inVertices.length;
-
-    if(numVerts < 2){
-        return outVertices;
-    }
-
-    var firstVertex = inVertices[inVertices.length-1],
-        lastVertex =   inVertices[0];
-
-    n_dot_first = planeNormal.dot(firstVertex) + planeConstant;
-
-    for(var vi = 0; vi < numVerts; vi++){
-        lastVertex = inVertices[vi];
-        n_dot_last = planeNormal.dot(lastVertex) + planeConstant;
-        if(n_dot_first < 0){
-            if(n_dot_last < 0){
-                // Start < 0, end < 0, so output lastVertex
-                var newv = new Vec3();
-                newv.copy(lastVertex);
-                outVertices.push(newv);
-            } else {
-                // Start < 0, end >= 0, so output intersection
-                var newv = new Vec3();
-                firstVertex.lerp(lastVertex,
-                                 n_dot_first / (n_dot_first - n_dot_last),
-                                 newv);
-                outVertices.push(newv);
-            }
-        } else {
-            if(n_dot_last<0){
-                // Start >= 0, end < 0 so output intersection and end
-                var newv = new Vec3();
-                firstVertex.lerp(lastVertex,
-                                 n_dot_first / (n_dot_first - n_dot_last),
-                                 newv);
-                outVertices.push(newv);
-                outVertices.push(lastVertex);
-            }
-        }
-        firstVertex = lastVertex;
-        n_dot_first = n_dot_last;
-    }
-    return outVertices;
-};
-
-// Updates .worldVertices and sets .worldVerticesNeedsUpdate to false.
-ConvexPolyhedron.prototype.computeWorldVertices = function(position,quat){
-    var N = this.vertices.length;
-    while(this.worldVertices.length < N){
-        this.worldVertices.push( new Vec3() );
-    }
-
-    var verts = this.vertices,
-        worldVerts = this.worldVertices;
-    for(var i=0; i!==N; i++){
-        quat.vmult( verts[i] , worldVerts[i] );
-        position.vadd( worldVerts[i] , worldVerts[i] );
-    }
-
-    this.worldVerticesNeedsUpdate = false;
-};
-
-var computeLocalAABB_worldVert = new Vec3();
-ConvexPolyhedron.prototype.computeLocalAABB = function(aabbmin,aabbmax){
-    var n = this.vertices.length,
-        vertices = this.vertices,
-        worldVert = computeLocalAABB_worldVert;
-
-    aabbmin.set(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
-    aabbmax.set(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);
-
-    for(var i=0; i<n; i++){
-        var v = vertices[i];
-        if     (v.x < aabbmin.x){
-            aabbmin.x = v.x;
-        } else if(v.x > aabbmax.x){
-            aabbmax.x = v.x;
-        }
-        if     (v.y < aabbmin.y){
-            aabbmin.y = v.y;
-        } else if(v.y > aabbmax.y){
-            aabbmax.y = v.y;
-        }
-        if     (v.z < aabbmin.z){
-            aabbmin.z = v.z;
-        } else if(v.z > aabbmax.z){
-            aabbmax.z = v.z;
-        }
-    }
-};
-
-/**
- * Updates .worldVertices and sets .worldVerticesNeedsUpdate to false.
- * @method computeWorldFaceNormals
- * @param  {Quaternion} quat
- */
-ConvexPolyhedron.prototype.computeWorldFaceNormals = function(quat){
-    var N = this.faceNormals.length;
-    while(this.worldFaceNormals.length < N){
-        this.worldFaceNormals.push( new Vec3() );
-    }
-
-    var normals = this.faceNormals,
-        worldNormals = this.worldFaceNormals;
-    for(var i=0; i!==N; i++){
-        quat.vmult( normals[i] , worldNormals[i] );
-    }
-
-    this.worldFaceNormalsNeedsUpdate = false;
-};
-
-/**
- * @method updateBoundingSphereRadius
- */
-ConvexPolyhedron.prototype.updateBoundingSphereRadius = function(){
-    // Assume points are distributed with local (0,0,0) as center
-    var max2 = 0;
-    var verts = this.vertices;
-    for(var i=0, N=verts.length; i!==N; i++) {
-        var norm2 = verts[i].norm2();
-        if(norm2 > max2){
-            max2 = norm2;
-        }
-    }
-    this.boundingSphereRadius = Math.sqrt(max2);
-};
-
-var tempWorldVertex = new Vec3();
-
-/**
- * @method calculateWorldAABB
- * @param {Vec3}        pos
- * @param {Quaternion}  quat
- * @param {Vec3}        min
- * @param {Vec3}        max
- */
-ConvexPolyhedron.prototype.calculateWorldAABB = function(pos,quat,min,max){
-    var n = this.vertices.length, verts = this.vertices;
-    var minx,miny,minz,maxx,maxy,maxz;
-    for(var i=0; i<n; i++){
-        tempWorldVertex.copy(verts[i]);
-        quat.vmult(tempWorldVertex,tempWorldVertex);
-        pos.vadd(tempWorldVertex,tempWorldVertex);
-        var v = tempWorldVertex;
-        if     (v.x < minx || minx===undefined){
-            minx = v.x;
-        } else if(v.x > maxx || maxx===undefined){
-            maxx = v.x;
-        }
-
-        if     (v.y < miny || miny===undefined){
-            miny = v.y;
-        } else if(v.y > maxy || maxy===undefined){
-            maxy = v.y;
-        }
-
-        if     (v.z < minz || minz===undefined){
-            minz = v.z;
-        } else if(v.z > maxz || maxz===undefined){
-            maxz = v.z;
-        }
-    }
-    min.set(minx,miny,minz);
-    max.set(maxx,maxy,maxz);
-};
-
-/**
- * Get approximate convex volume
- * @method volume
- * @return {Number}
- */
-ConvexPolyhedron.prototype.volume = function(){
-    return 4.0 * Math.PI * this.boundingSphereRadius / 3.0;
-};
-
-/**
- * Get an average of all the vertices positions
- * @method getAveragePointLocal
- * @param  {Vec3} target
- * @return {Vec3}
- */
-ConvexPolyhedron.prototype.getAveragePointLocal = function(target){
-    target = target || new Vec3();
-    var n = this.vertices.length,
-        verts = this.vertices;
-    for(var i=0; i<n; i++){
-        target.vadd(verts[i],target);
-    }
-    target.mult(1/n,target);
-    return target;
-};
-
-/**
- * Transform all local points. Will change the .vertices
- * @method transformAllPoints
- * @param  {Vec3} offset
- * @param  {Quaternion} quat
- */
-ConvexPolyhedron.prototype.transformAllPoints = function(offset,quat){
-    var n = this.vertices.length,
-        verts = this.vertices;
-
-    // Apply rotation
-    if(quat){
-        // Rotate vertices
-        for(var i=0; i<n; i++){
-            var v = verts[i];
-            quat.vmult(v,v);
-        }
-        // Rotate face normals
-        for(var i=0; i<this.faceNormals.length; i++){
-            var v = this.faceNormals[i];
-            quat.vmult(v,v);
-        }
-        /*
-        // Rotate edges
-        for(var i=0; i<this.uniqueEdges.length; i++){
-            var v = this.uniqueEdges[i];
-            quat.vmult(v,v);
-        }*/
-    }
-
-    // Apply offset
-    if(offset){
-        for(var i=0; i<n; i++){
-            var v = verts[i];
-            v.vadd(offset,v);
-        }
-    }
-};
-
-/**
- * Checks whether p is inside the polyhedra. Must be in local coords. The point lies outside of the convex hull of the other points if and only if the direction of all the vectors from it to those other points are on less than one half of a sphere around it.
- * @method pointIsInside
- * @param  {Vec3} p      A point given in local coordinates
- * @return {Boolean}
- */
-var ConvexPolyhedron_pointIsInside = new Vec3();
-var ConvexPolyhedron_vToP = new Vec3();
-var ConvexPolyhedron_vToPointInside = new Vec3();
-ConvexPolyhedron.prototype.pointIsInside = function(p){
-    var n = this.vertices.length,
-        verts = this.vertices,
-        faces = this.faces,
-        normals = this.faceNormals;
-    var positiveResult = null;
-    var N = this.faces.length;
-    var pointInside = ConvexPolyhedron_pointIsInside;
-    this.getAveragePointLocal(pointInside);
-    for(var i=0; i<N; i++){
-        var numVertices = this.faces[i].length;
-        var n = normals[i];
-        var v = verts[faces[i][0]]; // We only need one point in the face
-
-        // This dot product determines which side of the edge the point is
-        var vToP = ConvexPolyhedron_vToP;
-        p.vsub(v,vToP);
-        var r1 = n.dot(vToP);
-
-        var vToPointInside = ConvexPolyhedron_vToPointInside;
-        pointInside.vsub(v,vToPointInside);
-        var r2 = n.dot(vToPointInside);
-
-        if((r1<0 && r2>0) || (r1>0 && r2<0)){
-            return false; // Encountered some other sign. Exit.
-        } else {
-        }
-    }
-
-    // If we got here, all dot products were of the same sign.
-    return positiveResult ? 1 : -1;
-};
-
-/**
- * Get max and min dot product of a convex hull at position (pos,quat) projected onto an axis. Results are saved in the array maxmin.
- * @static
- * @method project
- * @param {ConvexPolyhedron} hull
- * @param {Vec3} axis
- * @param {Vec3} pos
- * @param {Quaternion} quat
- * @param {array} result result[0] and result[1] will be set to maximum and minimum, respectively.
- */
-var project_worldVertex = new Vec3();
-var project_localAxis = new Vec3();
-var project_localOrigin = new Vec3();
-ConvexPolyhedron.project = function(hull, axis, pos, quat, result){
-    var n = hull.vertices.length,
-        worldVertex = project_worldVertex,
-        localAxis = project_localAxis,
-        max = 0,
-        min = 0,
-        localOrigin = project_localOrigin,
-        vs = hull.vertices;
-
-    localOrigin.setZero();
-
-    // Transform the axis to local
-    Transform.vectorToLocalFrame(pos, quat, axis, localAxis);
-    Transform.pointToLocalFrame(pos, quat, localOrigin, localOrigin);
-    var add = localOrigin.dot(localAxis);
-
-    min = max = vs[0].dot(localAxis);
-
-    for(var i = 1; i < n; i++){
-        var val = vs[i].dot(localAxis);
-
-        if(val > max){
-            max = val;
-        }
-
-        if(val < min){
-            min = val;
-        }
-    }
-
-    min -= add;
-    max -= add;
-
-    if(min > max){
-        // Inconsistent - swap
-        var temp = min;
-        min = max;
-        max = temp;
-    }
-    // Output
-    result[0] = max;
-    result[1] = min;
-};
-
-},{"../math/Quaternion":28,"../math/Transform":29,"../math/Vec3":30,"./Shape":43}],39:[function(_dereq_,module,exports){
-module.exports = Cylinder;
-
-var Shape = _dereq_('./Shape');
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var ConvexPolyhedron = _dereq_('./ConvexPolyhedron');
-
-/**
- * @class Cylinder
- * @constructor
- * @extends ConvexPolyhedron
- * @author schteppe / https://github.com/schteppe
- * @param {Number} radiusTop
- * @param {Number} radiusBottom
- * @param {Number} height
- * @param {Number} numSegments The number of segments to build the cylinder out of
- */
-function Cylinder( radiusTop, radiusBottom, height , numSegments ) {
-    var N = numSegments,
-        verts = [],
-        axes = [],
-        faces = [],
-        bottomface = [],
-        topface = [],
-        cos = Math.cos,
-        sin = Math.sin;
-
-    // First bottom point
-    verts.push(new Vec3(radiusBottom*cos(0),
-                               radiusBottom*sin(0),
-                               -height*0.5));
-    bottomface.push(0);
-
-    // First top point
-    verts.push(new Vec3(radiusTop*cos(0),
-                               radiusTop*sin(0),
-                               height*0.5));
-    topface.push(1);
-
-    for(var i=0; i<N; i++){
-        var theta = 2*Math.PI/N * (i+1);
-        var thetaN = 2*Math.PI/N * (i+0.5);
-        if(i<N-1){
-            // Bottom
-            verts.push(new Vec3(radiusBottom*cos(theta),
-                                       radiusBottom*sin(theta),
-                                       -height*0.5));
-            bottomface.push(2*i+2);
-            // Top
-            verts.push(new Vec3(radiusTop*cos(theta),
-                                       radiusTop*sin(theta),
-                                       height*0.5));
-            topface.push(2*i+3);
-
-            // Face
-            faces.push([2*i+2, 2*i+3, 2*i+1,2*i]);
-        } else {
-            faces.push([0,1, 2*i+1, 2*i]); // Connect
-        }
-
-        // Axis: we can cut off half of them if we have even number of segments
-        if(N % 2 === 1 || i < N / 2){
-            axes.push(new Vec3(cos(thetaN), sin(thetaN), 0));
-        }
-    }
-    faces.push(topface);
-    axes.push(new Vec3(0,0,1));
-
-    // Reorder bottom face
-    var temp = [];
-    for(var i=0; i<bottomface.length; i++){
-        temp.push(bottomface[bottomface.length - i - 1]);
-    }
-    faces.push(temp);
-
-    this.type = Shape.types.CONVEXPOLYHEDRON;
-    ConvexPolyhedron.call( this, verts, faces, axes );
-}
-
-Cylinder.prototype = new ConvexPolyhedron();
-
-},{"../math/Quaternion":28,"../math/Vec3":30,"./ConvexPolyhedron":38,"./Shape":43}],40:[function(_dereq_,module,exports){
-var Shape = _dereq_('./Shape');
-var ConvexPolyhedron = _dereq_('./ConvexPolyhedron');
-var Vec3 = _dereq_('../math/Vec3');
-var Utils = _dereq_('../utils/Utils');
-
-module.exports = Heightfield;
-
-/**
- * Heightfield shape class. Height data is given as an array. These data points are spread out evenly with a given distance.
- * @class Heightfield
- * @extends Shape
- * @constructor
- * @param {Array} data An array of Y values that will be used to construct the terrain.
- * @param {object} options
- * @param {Number} [options.minValue] Minimum value of the data points in the data array. Will be computed automatically if not given.
- * @param {Number} [options.maxValue] Maximum value.
- * @param {Number} [options.elementSize=0.1] World spacing between the data points in X direction.
- * @todo Should be possible to use along all axes, not just y
- *
- * @example
- *     // Generate some height data (y-values).
- *     var data = [];
- *     for(var i = 0; i < 1000; i++){
- *         var y = 0.5 * Math.cos(0.2 * i);
- *         data.push(y);
- *     }
- *
- *     // Create the heightfield shape
- *     var heightfieldShape = new Heightfield(data, {
- *         elementSize: 1 // Distance between the data points in X and Y directions
- *     });
- *     var heightfieldBody = new Body();
- *     heightfieldBody.addShape(heightfieldShape);
- *     world.addBody(heightfieldBody);
- */
-function Heightfield(data, options){
-    options = Utils.defaults(options, {
-        maxValue : null,
-        minValue : null,
-        elementSize : 1
-    });
-
-    /**
-     * An array of numbers, or height values, that are spread out along the x axis.
-     * @property {array} data
-     */
-    this.data = data;
-
-    /**
-     * Max value of the data
-     * @property {number} maxValue
-     */
-    this.maxValue = options.maxValue;
-
-    /**
-     * Max value of the data
-     * @property {number} minValue
-     */
-    this.minValue = options.minValue;
-
-    /**
-     * The width of each element
-     * @property {number} elementSize
-     * @todo elementSizeX and Y
-     */
-    this.elementSize = options.elementSize;
-
-    if(options.minValue === null){
-        this.updateMinValue();
-    }
-    if(options.maxValue === null){
-        this.updateMaxValue();
-    }
-
-    this.cacheEnabled = true;
-
-    Shape.call(this);
-
-    this.pillarConvex = new ConvexPolyhedron();
-    this.pillarOffset = new Vec3();
-
-    this.type = Shape.types.HEIGHTFIELD;
-    this.updateBoundingSphereRadius();
-
-    // "i_j_isUpper" => { convex: ..., offset: ... }
-    // for example:
-    // _cachedPillars["0_2_1"]
-    this._cachedPillars = {};
-}
-Heightfield.prototype = new Shape();
-
-/**
- * Call whenever you change the data array.
- * @method update
- */
-Heightfield.prototype.update = function(){
-    this._cachedPillars = {};
-};
-
-/**
- * Update the .minValue property
- * @method updateMinValue
- */
-Heightfield.prototype.updateMinValue = function(){
-    var data = this.data;
-    var minValue = data[0][0];
-    for(var i=0; i !== data.length; i++){
-        for(var j=0; j !== data[i].length; j++){
-            var v = data[i][j];
-            if(v < minValue){
-                minValue = v;
-            }
-        }
-    }
-    this.minValue = minValue;
-};
-
-/**
- * Update the .maxValue property
- * @method updateMaxValue
- */
-Heightfield.prototype.updateMaxValue = function(){
-    var data = this.data;
-    var maxValue = data[0][0];
-    for(var i=0; i !== data.length; i++){
-        for(var j=0; j !== data[i].length; j++){
-            var v = data[i][j];
-            if(v > maxValue){
-                maxValue = v;
-            }
-        }
-    }
-    this.maxValue = maxValue;
-};
-
-/**
- * Set the height value at an index. Don't forget to update maxValue and minValue after you're done.
- * @method setHeightValueAtIndex
- * @param {integer} xi
- * @param {integer} yi
- * @param {number} value
- */
-Heightfield.prototype.setHeightValueAtIndex = function(xi, yi, value){
-    var data = this.data;
-    data[xi][yi] = value;
-
-    // Invalidate cache
-    this.clearCachedConvexTrianglePillar(xi, yi, false);
-    if(xi > 0){
-        this.clearCachedConvexTrianglePillar(xi - 1, yi, true);
-        this.clearCachedConvexTrianglePillar(xi - 1, yi, false);
-    }
-    if(yi > 0){
-        this.clearCachedConvexTrianglePillar(xi, yi - 1, true);
-        this.clearCachedConvexTrianglePillar(xi, yi - 1, false);
-    }
-    if(yi > 0 && xi > 0){
-        this.clearCachedConvexTrianglePillar(xi - 1, yi - 1, true);
-    }
-};
-
-/**
- * Get max/min in a rectangle in the matrix data
- * @method getRectMinMax
- * @param  {integer} iMinX
- * @param  {integer} iMinY
- * @param  {integer} iMaxX
- * @param  {integer} iMaxY
- * @param  {array} [result] An array to store the results in.
- * @return {array} The result array, if it was passed in. Minimum will be at position 0 and max at 1.
- */
-Heightfield.prototype.getRectMinMax = function (iMinX, iMinY, iMaxX, iMaxY, result) {
-    result = result || [];
-
-    // Get max and min of the data
-    var data = this.data,
-        max = this.minValue; // Set first value
-    for(var i = iMinX; i <= iMaxX; i++){
-        for(var j = iMinY; j <= iMaxY; j++){
-            var height = data[i][j];
-            if(height > max){
-                max = height;
-            }
-        }
-    }
-
-    result[0] = this.minValue;
-    result[1] = max;
-};
-
-/**
- * Get the index of a local position on the heightfield. The indexes indicate the rectangles, so if your terrain is made of N x N height data points, you will have rectangle indexes ranging from 0 to N-1.
- * @method getIndexOfPosition
- * @param  {number} x
- * @param  {number} y
- * @param  {array} result Two-element array
- * @param  {boolean} clamp If the position should be clamped to the heightfield edge.
- * @return {boolean}
- */
-Heightfield.prototype.getIndexOfPosition = function (x, y, result, clamp) {
-
-    // Get the index of the data points to test against
-    var w = this.elementSize;
-    var data = this.data;
-    var xi = Math.floor(x / w);
-    var yi = Math.floor(y / w);
-
-    result[0] = xi;
-    result[1] = yi;
-
-    if(clamp){
-        // Clamp index to edges
-        if(xi < 0){ xi = 0; }
-        if(yi < 0){ yi = 0; }
-        if(xi >= data.length - 1){ xi = data.length - 1; }
-        if(yi >= data[0].length - 1){ yi = data[0].length - 1; }
-    }
-
-    // Bail out if we are out of the terrain
-    if(xi < 0 || yi < 0 || xi >= data.length-1 || yi >= data[0].length-1){
-        return false;
-    }
-
-    return true;
-};
-
-Heightfield.prototype.getHeightAt = function(x, y, edgeClamp){
-    var idx = [];
-    this.getIndexOfPosition(x, y, idx, edgeClamp);
-
-    // TODO: get upper or lower triangle, then use barycentric interpolation to get the height in the triangle.
-    var minmax = [];
-    this.getRectMinMax(idx[0], idx[1] + 1, idx[0], idx[1] + 1, minmax);
-
-    return (minmax[0] + minmax[1]) / 2; // average
-};
-
-Heightfield.prototype.getCacheConvexTrianglePillarKey = function(xi, yi, getUpperTriangle){
-    return xi + '_' + yi + '_' + (getUpperTriangle ? 1 : 0);
-};
-
-Heightfield.prototype.getCachedConvexTrianglePillar = function(xi, yi, getUpperTriangle){
-    return this._cachedPillars[this.getCacheConvexTrianglePillarKey(xi, yi, getUpperTriangle)];
-};
-
-Heightfield.prototype.setCachedConvexTrianglePillar = function(xi, yi, getUpperTriangle, convex, offset){
-    this._cachedPillars[this.getCacheConvexTrianglePillarKey(xi, yi, getUpperTriangle)] = {
-        convex: convex,
-        offset: offset
-    };
-};
-
-Heightfield.prototype.clearCachedConvexTrianglePillar = function(xi, yi, getUpperTriangle){
-    delete this._cachedPillars[this.getCacheConvexTrianglePillarKey(xi, yi, getUpperTriangle)];
-};
-
-/**
- * Get a triangle in the terrain in the form of a triangular convex shape.
- * @method getConvexTrianglePillar
- * @param  {integer} i
- * @param  {integer} j
- * @param  {boolean} getUpperTriangle
- */
-Heightfield.prototype.getConvexTrianglePillar = function(xi, yi, getUpperTriangle){
-    var result = this.pillarConvex;
-    var offsetResult = this.pillarOffset;
-
-    if(this.cacheEnabled){
-        var data = this.getCachedConvexTrianglePillar(xi, yi, getUpperTriangle);
-        if(data){
-            this.pillarConvex = data.convex;
-            this.pillarOffset = data.offset;
-            return;
-        }
-
-        result = new ConvexPolyhedron();
-        offsetResult = new Vec3();
-
-        this.pillarConvex = result;
-        this.pillarOffset = offsetResult;
-    }
-
-    var data = this.data;
-    var elementSize = this.elementSize;
-    var faces = result.faces;
-
-    // Reuse verts if possible
-    result.vertices.length = 6;
-    for (var i = 0; i < 6; i++) {
-        if(!result.vertices[i]){
-            result.vertices[i] = new Vec3();
-        }
-    }
-
-    // Reuse faces if possible
-    faces.length = 5;
-    for (var i = 0; i < 5; i++) {
-        if(!faces[i]){
-            faces[i] = [];
-        }
-    }
-
-    var verts = result.vertices;
-
-    var h = (Math.min(
-        data[xi][yi],
-        data[xi+1][yi],
-        data[xi][yi+1],
-        data[xi+1][yi+1]
-    ) - this.minValue ) / 2 + this.minValue;
-
-    if (!getUpperTriangle) {
-
-        // Center of the triangle pillar - all polygons are given relative to this one
-        offsetResult.set(
-            (xi + 0.25) * elementSize, // sort of center of a triangle
-            (yi + 0.25) * elementSize,
-            h // vertical center
-        );
-
-        // Top triangle verts
-        verts[0].set(
-            -0.25 * elementSize,
-            -0.25 * elementSize,
-            data[xi][yi] - h
-        );
-        verts[1].set(
-            0.75 * elementSize,
-            -0.25 * elementSize,
-            data[xi + 1][yi] - h
-        );
-        verts[2].set(
-            -0.25 * elementSize,
-            0.75 * elementSize,
-            data[xi][yi + 1] - h
-        );
-
-        // bottom triangle verts
-        verts[3].set(
-            -0.25 * elementSize,
-            -0.25 * elementSize,
-            -h-1
-        );
-        verts[4].set(
-            0.75 * elementSize,
-            -0.25 * elementSize,
-            -h-1
-        );
-        verts[5].set(
-            -0.25 * elementSize,
-            0.75  * elementSize,
-            -h-1
-        );
-
-        // top triangle
-        faces[0][0] = 0;
-        faces[0][1] = 1;
-        faces[0][2] = 2;
-
-        // bottom triangle
-        faces[1][0] = 5;
-        faces[1][1] = 4;
-        faces[1][2] = 3;
-
-        // -x facing quad
-        faces[2][0] = 0;
-        faces[2][1] = 2;
-        faces[2][2] = 5;
-        faces[2][3] = 3;
-
-        // -y facing quad
-        faces[3][0] = 1;
-        faces[3][1] = 0;
-        faces[3][2] = 3;
-        faces[3][3] = 4;
-
-        // +xy facing quad
-        faces[4][0] = 4;
-        faces[4][1] = 5;
-        faces[4][2] = 2;
-        faces[4][3] = 1;
-
-
-    } else {
-
-        // Center of the triangle pillar - all polygons are given relative to this one
-        offsetResult.set(
-            (xi + 0.75) * elementSize, // sort of center of a triangle
-            (yi + 0.75) * elementSize,
-            h // vertical center
-        );
-
-        // Top triangle verts
-        verts[0].set(
-            0.25 * elementSize,
-            0.25 * elementSize,
-            data[xi + 1][yi + 1] - h
-        );
-        verts[1].set(
-            -0.75 * elementSize,
-            0.25 * elementSize,
-            data[xi][yi + 1] - h
-        );
-        verts[2].set(
-            0.25 * elementSize,
-            -0.75 * elementSize,
-            data[xi + 1][yi] - h
-        );
-
-        // bottom triangle verts
-        verts[3].set(
-            0.25 * elementSize,
-            0.25 * elementSize,
-            - h-1
-        );
-        verts[4].set(
-            -0.75 * elementSize,
-            0.25 * elementSize,
-            - h-1
-        );
-        verts[5].set(
-            0.25 * elementSize,
-            -0.75 * elementSize,
-            - h-1
-        );
-
-        // Top triangle
-        faces[0][0] = 0;
-        faces[0][1] = 1;
-        faces[0][2] = 2;
-
-        // bottom triangle
-        faces[1][0] = 5;
-        faces[1][1] = 4;
-        faces[1][2] = 3;
-
-        // +x facing quad
-        faces[2][0] = 2;
-        faces[2][1] = 5;
-        faces[2][2] = 3;
-        faces[2][3] = 0;
-
-        // +y facing quad
-        faces[3][0] = 3;
-        faces[3][1] = 4;
-        faces[3][2] = 1;
-        faces[3][3] = 0;
-
-        // -xy facing quad
-        faces[4][0] = 1;
-        faces[4][1] = 4;
-        faces[4][2] = 5;
-        faces[4][3] = 2;
-    }
-
-    result.computeNormals();
-    result.computeEdges();
-    result.updateBoundingSphereRadius();
-
-    this.setCachedConvexTrianglePillar(xi, yi, getUpperTriangle, result, offsetResult);
-};
-
-Heightfield.prototype.calculateLocalInertia = function(mass, target){
-    target = target || new Vec3();
-    target.set(0, 0, 0);
-    return target;
-};
-
-Heightfield.prototype.volume = function(){
-    return Number.MAX_VALUE; // The terrain is infinite
-};
-
-Heightfield.prototype.calculateWorldAABB = function(pos, quat, min, max){
-    // TODO: do it properly
-    min.set(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);
-    max.set(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
-};
-
-Heightfield.prototype.updateBoundingSphereRadius = function(){
-    // Use the bounding box of the min/max values
-    var data = this.data,
-        s = this.elementSize;
-    this.boundingSphereRadius = new Vec3(data.length * s, data[0].length * s, Math.max(Math.abs(this.maxValue), Math.abs(this.minValue))).norm();
-};
-
-},{"../math/Vec3":30,"../utils/Utils":53,"./ConvexPolyhedron":38,"./Shape":43}],41:[function(_dereq_,module,exports){
-module.exports = Particle;
-
-var Shape = _dereq_('./Shape');
-var Vec3 = _dereq_('../math/Vec3');
-
-/**
- * Particle shape.
- * @class Particle
- * @constructor
- * @author schteppe
- * @extends Shape
- */
-function Particle(){
-    Shape.call(this);
-
-    this.type = Shape.types.PARTICLE;
-}
-Particle.prototype = new Shape();
-Particle.prototype.constructor = Particle;
-
-/**
- * @method calculateLocalInertia
- * @param  {Number} mass
- * @param  {Vec3} target
- * @return {Vec3}
- */
-Particle.prototype.calculateLocalInertia = function(mass,target){
-    target = target || new Vec3();
-    target.set(0, 0, 0);
-    return target;
-};
-
-Particle.prototype.volume = function(){
-    return 0;
-};
-
-Particle.prototype.updateBoundingSphereRadius = function(){
-    this.boundingSphereRadius = 0;
-};
-
-Particle.prototype.calculateWorldAABB = function(pos,quat,min,max){
-    // Get each axis max
-    min.copy(pos);
-    max.copy(pos);
-};
-
-},{"../math/Vec3":30,"./Shape":43}],42:[function(_dereq_,module,exports){
-module.exports = Plane;
-
-var Shape = _dereq_('./Shape');
-var Vec3 = _dereq_('../math/Vec3');
-
-/**
- * A plane, facing in the Z direction. The plane has its surface at z=0 and everything below z=0 is assumed to be solid plane. To make the plane face in some other direction than z, you must put it inside a RigidBody and rotate that body. See the demos.
- * @class Plane
- * @constructor
- * @extends Shape
- * @author schteppe
- */
-function Plane(){
-    Shape.call(this);
-    this.type = Shape.types.PLANE;
-
-    // World oriented normal
-    this.worldNormal = new Vec3();
-    this.worldNormalNeedsUpdate = true;
-
-    this.boundingSphereRadius = Number.MAX_VALUE;
-}
-Plane.prototype = new Shape();
-Plane.prototype.constructor = Plane;
-
-Plane.prototype.computeWorldNormal = function(quat){
-    var n = this.worldNormal;
-    n.set(0,0,1);
-    quat.vmult(n,n);
-    this.worldNormalNeedsUpdate = false;
-};
-
-Plane.prototype.calculateLocalInertia = function(mass,target){
-    target = target || new Vec3();
-    return target;
-};
-
-Plane.prototype.volume = function(){
-    return Number.MAX_VALUE; // The plane is infinite...
-};
-
-var tempNormal = new Vec3();
-Plane.prototype.calculateWorldAABB = function(pos, quat, min, max){
-    // The plane AABB is infinite, except if the normal is pointing along any axis
-    tempNormal.set(0,0,1); // Default plane normal is z
-    quat.vmult(tempNormal,tempNormal);
-    var maxVal = Number.MAX_VALUE;
-    min.set(-maxVal, -maxVal, -maxVal);
-    max.set(maxVal, maxVal, maxVal);
-
-    if(tempNormal.x === 1){ max.x = pos.x; }
-    if(tempNormal.y === 1){ max.y = pos.y; }
-    if(tempNormal.z === 1){ max.z = pos.z; }
-
-    if(tempNormal.x === -1){ min.x = pos.x; }
-    if(tempNormal.y === -1){ min.y = pos.y; }
-    if(tempNormal.z === -1){ min.z = pos.z; }
-};
-
-Plane.prototype.updateBoundingSphereRadius = function(){
-    this.boundingSphereRadius = Number.MAX_VALUE;
-};
-},{"../math/Vec3":30,"./Shape":43}],43:[function(_dereq_,module,exports){
-module.exports = Shape;
-
-var Shape = _dereq_('./Shape');
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var Material = _dereq_('../material/Material');
-
-/**
- * Base class for shapes
- * @class Shape
- * @constructor
- * @author schteppe
- * @todo Should have a mechanism for caching bounding sphere radius instead of calculating it each time
- */
-function Shape(){
-
-    /**
-     * Identifyer of the Shape.
-     * @property {number} id
-     */
-    this.id = Shape.idCounter++;
-
-    /**
-     * The type of this shape. Must be set to an int > 0 by subclasses.
-     * @property type
-     * @type {Number}
-     * @see Shape.types
-     */
-    this.type = 0;
-
-    /**
-     * The local bounding sphere radius of this shape.
-     * @property {Number} boundingSphereRadius
-     */
-    this.boundingSphereRadius = 0;
-
-    /**
-     * Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled.
-     * @property {boolean} collisionResponse
-     */
-    this.collisionResponse = true;
-
-    /**
-     * @property {Material} material
-     */
-    this.material = null;
-}
-Shape.prototype.constructor = Shape;
-
-/**
- * Computes the bounding sphere radius. The result is stored in the property .boundingSphereRadius
- * @method updateBoundingSphereRadius
- * @return {Number}
- */
-Shape.prototype.updateBoundingSphereRadius = function(){
-    throw "computeBoundingSphereRadius() not implemented for shape type "+this.type;
-};
-
-/**
- * Get the volume of this shape
- * @method volume
- * @return {Number}
- */
-Shape.prototype.volume = function(){
-    throw "volume() not implemented for shape type "+this.type;
-};
-
-/**
- * Calculates the inertia in the local frame for this shape.
- * @method calculateLocalInertia
- * @return {Vec3}
- * @see http://en.wikipedia.org/wiki/List_of_moments_of_inertia
- */
-Shape.prototype.calculateLocalInertia = function(mass,target){
-    throw "calculateLocalInertia() not implemented for shape type "+this.type;
-};
-
-Shape.idCounter = 0;
-
-/**
- * The available shape types.
- * @static
- * @property types
- * @type {Object}
- */
-Shape.types = {
-    SPHERE:1,
-    PLANE:2,
-    BOX:4,
-    COMPOUND:8,
-    CONVEXPOLYHEDRON:16,
-    HEIGHTFIELD:32,
-    PARTICLE:64,
-    CYLINDER:128,
-    TRIMESH:256
-};
-
-
-},{"../material/Material":25,"../math/Quaternion":28,"../math/Vec3":30,"./Shape":43}],44:[function(_dereq_,module,exports){
-module.exports = Sphere;
-
-var Shape = _dereq_('./Shape');
-var Vec3 = _dereq_('../math/Vec3');
-
-/**
- * Spherical shape
- * @class Sphere
- * @constructor
- * @extends Shape
- * @param {Number} radius The radius of the sphere, a non-negative number.
- * @author schteppe / http://github.com/schteppe
- */
-function Sphere(radius){
-    Shape.call(this);
-
-    /**
-     * @property {Number} radius
-     */
-    this.radius = radius!==undefined ? Number(radius) : 1.0;
-    this.type = Shape.types.SPHERE;
-
-    if(this.radius < 0){
-        throw new Error('The sphere radius cannot be negative.');
-    }
-
-    this.updateBoundingSphereRadius();
-}
-Sphere.prototype = new Shape();
-Sphere.prototype.constructor = Sphere;
-
-Sphere.prototype.calculateLocalInertia = function(mass,target){
-    target = target || new Vec3();
-    var I = 2.0*mass*this.radius*this.radius/5.0;
-    target.x = I;
-    target.y = I;
-    target.z = I;
-    return target;
-};
-
-Sphere.prototype.volume = function(){
-    return 4.0 * Math.PI * this.radius / 3.0;
-};
-
-Sphere.prototype.updateBoundingSphereRadius = function(){
-    this.boundingSphereRadius = this.radius;
-};
-
-Sphere.prototype.calculateWorldAABB = function(pos,quat,min,max){
-    var r = this.radius;
-    var axes = ['x','y','z'];
-    for(var i=0; i<axes.length; i++){
-        var ax = axes[i];
-        min[ax] = pos[ax] - r;
-        max[ax] = pos[ax] + r;
-    }
-};
-
-},{"../math/Vec3":30,"./Shape":43}],45:[function(_dereq_,module,exports){
-module.exports = Trimesh;
-
-var Shape = _dereq_('./Shape');
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var Transform = _dereq_('../math/Transform');
-var AABB = _dereq_('../collision/AABB');
-var Octree = _dereq_('../utils/Octree');
-
-/**
- * @class Trimesh
- * @constructor
- * @param {array} vertices
- * @param {array} indices
- * @extends Shape
- * @example
- *     // How to make a mesh with a single triangle
- *     var vertices = [
- *         0, 0, 0, // vertex 0
- *         1, 0, 0, // vertex 1
- *         0, 1, 0  // vertex 2
- *     ];
- *     var indices = [
- *         0, 1, 2  // triangle 0
- *     ];
- *     var trimeshShape = new Trimesh(vertices, indices);
- */
-function Trimesh(vertices, indices) {
-    Shape.call(this);
-    this.type = Shape.types.TRIMESH;
-
-    /**
-     * @property vertices
-     * @type {Array}
-     */
-    this.vertices = new Float32Array(vertices);
-
-    /**
-     * Array of integers, indicating which vertices each triangle consists of. The length of this array is thus 3 times the number of triangles.
-     * @property indices
-     * @type {Array}
-     */
-    this.indices = new Int16Array(indices);
-
-    /**
-     * The normals data.
-     * @property normals
-     * @type {Array}
-     */
-    this.normals = new Float32Array(indices.length);
-
-    /**
-     * The local AABB of the mesh.
-     * @property aabb
-     * @type {Array}
-     */
-    this.aabb = new AABB();
-
-    /**
-     * References to vertex pairs, making up all unique edges in the trimesh.
-     * @property {array} edges
-     */
-    this.edges = null;
-
-    /**
-     * Local scaling of the mesh. Use .setScale() to set it.
-     * @property {Vec3} scale
-     */
-    this.scale = new Vec3(1, 1, 1);
-
-    /**
-     * The indexed triangles. Use .updateTree() to update it.
-     * @property {Octree} tree
-     */
-    this.tree = new Octree();
-
-    this.updateEdges();
-    this.updateNormals();
-    this.updateAABB();
-    this.updateBoundingSphereRadius();
-    this.updateTree();
-}
-Trimesh.prototype = new Shape();
-Trimesh.prototype.constructor = Trimesh;
-
-var computeNormals_n = new Vec3();
-
-/**
- * @method updateTree
- */
-Trimesh.prototype.updateTree = function(){
-    var tree = this.tree;
-
-    tree.reset();
-    tree.aabb.copy(this.aabb);
-    var scale = this.scale; // The local mesh AABB is scaled, but the octree AABB should be unscaled
-    tree.aabb.lowerBound.x *= 1 / scale.x;
-    tree.aabb.lowerBound.y *= 1 / scale.y;
-    tree.aabb.lowerBound.z *= 1 / scale.z;
-    tree.aabb.upperBound.x *= 1 / scale.x;
-    tree.aabb.upperBound.y *= 1 / scale.y;
-    tree.aabb.upperBound.z *= 1 / scale.z;
-
-    // Insert all triangles
-    var triangleAABB = new AABB();
-    var a = new Vec3();
-    var b = new Vec3();
-    var c = new Vec3();
-    var points = [a, b, c];
-    for (var i = 0; i < this.indices.length / 3; i++) {
-        //this.getTriangleVertices(i, a, b, c);
-
-        // Get unscaled triangle verts
-        var i3 = i * 3;
-        this._getUnscaledVertex(this.indices[i3], a);
-        this._getUnscaledVertex(this.indices[i3 + 1], b);
-        this._getUnscaledVertex(this.indices[i3 + 2], c);
-
-        triangleAABB.setFromPoints(points);
-        tree.insert(triangleAABB, i);
-    }
-    tree.removeEmptyNodes();
-};
-
-var unscaledAABB = new AABB();
-
-/**
- * Get triangles in a local AABB from the trimesh.
- * @method getTrianglesInAABB
- * @param  {AABB} aabb
- * @param  {array} result An array of integers, referencing the queried triangles.
- */
-Trimesh.prototype.getTrianglesInAABB = function(aabb, result){
-    unscaledAABB.copy(aabb);
-
-    // Scale it to local
-    var scale = this.scale;
-    var isx = scale.x;
-    var isy = scale.y;
-    var isz = scale.z;
-    var l = unscaledAABB.lowerBound;
-    var u = unscaledAABB.upperBound;
-    l.x /= isx;
-    l.y /= isy;
-    l.z /= isz;
-    u.x /= isx;
-    u.y /= isy;
-    u.z /= isz;
-
-    return this.tree.aabbQuery(unscaledAABB, result);
-};
-
-/**
- * @method setScale
- * @param {Vec3} scale
- */
-Trimesh.prototype.setScale = function(scale){
-    var wasUniform = this.scale.x === this.scale.y === this.scale.z;
-    var isUniform = scale.x === scale.y === scale.z;
-
-    if(!(wasUniform && isUniform)){
-        // Non-uniform scaling. Need to update normals.
-        this.updateNormals();
-    }
-    this.scale.copy(scale);
-    this.updateAABB();
-    this.updateBoundingSphereRadius();
-};
-
-/**
- * Compute the normals of the faces. Will save in the .normals array.
- * @method updateNormals
- */
-Trimesh.prototype.updateNormals = function(){
-    var n = computeNormals_n;
-
-    // Generate normals
-    var normals = this.normals;
-    for(var i=0; i < this.indices.length / 3; i++){
-        var i3 = i * 3;
-
-        var a = this.indices[i3],
-            b = this.indices[i3 + 1],
-            c = this.indices[i3 + 2];
-
-        this.getVertex(a, va);
-        this.getVertex(b, vb);
-        this.getVertex(c, vc);
-
-        Trimesh.computeNormal(vb, va, vc, n);
-
-        normals[i3] = n.x;
-        normals[i3 + 1] = n.y;
-        normals[i3 + 2] = n.z;
-    }
-};
-
-/**
- * Update the .edges property
- * @method updateEdges
- */
-Trimesh.prototype.updateEdges = function(){
-    var edges = {};
-    var add = function(indexA, indexB){
-        var key = a < b ? a + '_' + b : b + '_' + a;
-        edges[key] = true;
-    };
-    for(var i=0; i < this.indices.length / 3; i++){
-        var i3 = i * 3;
-        var a = this.indices[i3],
-            b = this.indices[i3 + 1],
-            c = this.indices[i3 + 2];
-        add(a,b);
-        add(b,c);
-        add(c,a);
-    }
-    var keys = Object.keys(edges);
-    this.edges = new Int16Array(keys.length * 2);
-    for (var i = 0; i < keys.length; i++) {
-        var indices = keys[i].split('_');
-        this.edges[2 * i] = parseInt(indices[0], 10);
-        this.edges[2 * i + 1] = parseInt(indices[1], 10);
-    }
-};
-
-/**
- * Get an edge vertex
- * @method getEdgeVertex
- * @param  {number} edgeIndex
- * @param  {number} firstOrSecond 0 or 1, depending on which one of the vertices you need.
- * @param  {Vec3} vertexStore Where to store the result
- */
-Trimesh.prototype.getEdgeVertex = function(edgeIndex, firstOrSecond, vertexStore){
-    var vertexIndex = this.edges[edgeIndex * 2 + (firstOrSecond ? 1 : 0)];
-    this.getVertex(vertexIndex, vertexStore);
-};
-
-var getEdgeVector_va = new Vec3();
-var getEdgeVector_vb = new Vec3();
-
-/**
- * Get a vector along an edge.
- * @method getEdgeVector
- * @param  {number} edgeIndex
- * @param  {Vec3} vectorStore
- */
-Trimesh.prototype.getEdgeVector = function(edgeIndex, vectorStore){
-    var va = getEdgeVector_va;
-    var vb = getEdgeVector_vb;
-    this.getEdgeVertex(edgeIndex, 0, va);
-    this.getEdgeVertex(edgeIndex, 1, vb);
-    vb.vsub(va, vectorStore);
-};
-
-/**
- * Get face normal given 3 vertices
- * @static
- * @method computeNormal
- * @param {Vec3} va
- * @param {Vec3} vb
- * @param {Vec3} vc
- * @param {Vec3} target
- */
-var cb = new Vec3();
-var ab = new Vec3();
-Trimesh.computeNormal = function ( va, vb, vc, target ) {
-    vb.vsub(va,ab);
-    vc.vsub(vb,cb);
-    cb.cross(ab,target);
-    if ( !target.isZero() ) {
-        target.normalize();
-    }
-};
-
-var va = new Vec3();
-var vb = new Vec3();
-var vc = new Vec3();
-
-/**
- * Get vertex i.
- * @method getVertex
- * @param  {number} i
- * @param  {Vec3} out
- * @return {Vec3} The "out" vector object
- */
-Trimesh.prototype.getVertex = function(i, out){
-    var scale = this.scale;
-    this._getUnscaledVertex(i, out);
-    out.x *= scale.x;
-    out.y *= scale.y;
-    out.z *= scale.z;
-    return out;
-};
-
-/**
- * Get raw vertex i
- * @private
- * @method _getUnscaledVertex
- * @param  {number} i
- * @param  {Vec3} out
- * @return {Vec3} The "out" vector object
- */
-Trimesh.prototype._getUnscaledVertex = function(i, out){
-    var i3 = i * 3;
-    var vertices = this.vertices;
-    return out.set(
-        vertices[i3],
-        vertices[i3 + 1],
-        vertices[i3 + 2]
-    );
-};
-
-/**
- * Get a vertex from the trimesh,transformed by the given position and quaternion.
- * @method getWorldVertex
- * @param  {number} i
- * @param  {Vec3} pos
- * @param  {Quaternion} quat
- * @param  {Vec3} out
- * @return {Vec3} The "out" vector object
- */
-Trimesh.prototype.getWorldVertex = function(i, pos, quat, out){
-    this.getVertex(i, out);
-    Transform.pointToWorldFrame(pos, quat, out, out);
-    return out;
-};
-
-/**
- * Get the three vertices for triangle i.
- * @method getTriangleVertices
- * @param  {number} i
- * @param  {Vec3} a
- * @param  {Vec3} b
- * @param  {Vec3} c
- */
-Trimesh.prototype.getTriangleVertices = function(i, a, b, c){
-    var i3 = i * 3;
-    this.getVertex(this.indices[i3], a);
-    this.getVertex(this.indices[i3 + 1], b);
-    this.getVertex(this.indices[i3 + 2], c);
-};
-
-/**
- * Compute the normal of triangle i.
- * @method getNormal
- * @param  {Number} i
- * @param  {Vec3} target
- * @return {Vec3} The "target" vector object
- */
-Trimesh.prototype.getNormal = function(i, target){
-    var i3 = i * 3;
-    return target.set(
-        this.normals[i3],
-        this.normals[i3 + 1],
-        this.normals[i3 + 2]
-    );
-};
-
-var cli_aabb = new AABB();
-
-/**
- * @method calculateLocalInertia
- * @param  {Number} mass
- * @param  {Vec3} target
- * @return {Vec3} The "target" vector object
- */
-Trimesh.prototype.calculateLocalInertia = function(mass,target){
-    // Approximate with box inertia
-    // Exact inertia calculation is overkill, but see http://geometrictools.com/Documentation/PolyhedralMassProperties.pdf for the correct way to do it
-    this.computeLocalAABB(cli_aabb);
-    var x = cli_aabb.upperBound.x - cli_aabb.lowerBound.x,
-        y = cli_aabb.upperBound.y - cli_aabb.lowerBound.y,
-        z = cli_aabb.upperBound.z - cli_aabb.lowerBound.z;
-    return target.set(
-        1.0 / 12.0 * mass * ( 2*y*2*y + 2*z*2*z ),
-        1.0 / 12.0 * mass * ( 2*x*2*x + 2*z*2*z ),
-        1.0 / 12.0 * mass * ( 2*y*2*y + 2*x*2*x )
-    );
-};
-
-var computeLocalAABB_worldVert = new Vec3();
-
-/**
- * Compute the local AABB for the trimesh
- * @method computeLocalAABB
- * @param  {AABB} aabb
- */
-Trimesh.prototype.computeLocalAABB = function(aabb){
-    var l = aabb.lowerBound,
-        u = aabb.upperBound,
-        n = this.vertices.length,
-        vertices = this.vertices,
-        v = computeLocalAABB_worldVert;
-
-    this.getVertex(0, v);
-    l.copy(v);
-    u.copy(v);
-
-    for(var i=0; i !== n; i++){
-        this.getVertex(i, v);
-
-        if(v.x < l.x){
-            l.x = v.x;
-        } else if(v.x > u.x){
-            u.x = v.x;
-        }
-
-        if(v.y < l.y){
-            l.y = v.y;
-        } else if(v.y > u.y){
-            u.y = v.y;
-        }
-
-        if(v.z < l.z){
-            l.z = v.z;
-        } else if(v.z > u.z){
-            u.z = v.z;
-        }
-    }
-};
-
-
-/**
- * Update the .aabb property
- * @method updateAABB
- */
-Trimesh.prototype.updateAABB = function(){
-    this.computeLocalAABB(this.aabb);
-};
-
-/**
- * Will update the .boundingSphereRadius property
- * @method updateBoundingSphereRadius
- */
-Trimesh.prototype.updateBoundingSphereRadius = function(){
-    // Assume points are distributed with local (0,0,0) as center
-    var max2 = 0;
-    var vertices = this.vertices;
-    var v = new Vec3();
-    for(var i=0, N=vertices.length / 3; i !== N; i++) {
-        this.getVertex(i, v);
-        var norm2 = v.norm2();
-        if(norm2 > max2){
-            max2 = norm2;
-        }
-    }
-    this.boundingSphereRadius = Math.sqrt(max2);
-};
-
-var tempWorldVertex = new Vec3();
-var calculateWorldAABB_frame = new Transform();
-var calculateWorldAABB_aabb = new AABB();
-
-/**
- * @method calculateWorldAABB
- * @param {Vec3}        pos
- * @param {Quaternion}  quat
- * @param {Vec3}        min
- * @param {Vec3}        max
- */
-Trimesh.prototype.calculateWorldAABB = function(pos,quat,min,max){
-    /*
-    var n = this.vertices.length / 3,
-        verts = this.vertices;
-    var minx,miny,minz,maxx,maxy,maxz;
-
-    var v = tempWorldVertex;
-    for(var i=0; i<n; i++){
-        this.getVertex(i, v);
-        quat.vmult(v, v);
-        pos.vadd(v, v);
-        if (v.x < minx || minx===undefined){
-            minx = v.x;
-        } else if(v.x > maxx || maxx===undefined){
-            maxx = v.x;
-        }
-
-        if (v.y < miny || miny===undefined){
-            miny = v.y;
-        } else if(v.y > maxy || maxy===undefined){
-            maxy = v.y;
-        }
-
-        if (v.z < minz || minz===undefined){
-            minz = v.z;
-        } else if(v.z > maxz || maxz===undefined){
-            maxz = v.z;
-        }
-    }
-    min.set(minx,miny,minz);
-    max.set(maxx,maxy,maxz);
-    */
-
-    // Faster approximation using local AABB
-    var frame = calculateWorldAABB_frame;
-    var result = calculateWorldAABB_aabb;
-    frame.position = pos;
-    frame.quaternion = quat;
-    this.aabb.toWorldFrame(frame, result);
-    min.copy(result.lowerBound);
-    max.copy(result.upperBound);
-};
-
-/**
- * Get approximate volume
- * @method volume
- * @return {Number}
- */
-Trimesh.prototype.volume = function(){
-    return 4.0 * Math.PI * this.boundingSphereRadius / 3.0;
-};
-
-/**
- * Create a Trimesh instance, shaped as a torus.
- * @static
- * @method createTorus
- * @param  {number} [radius=1]
- * @param  {number} [tube=0.5]
- * @param  {number} [radialSegments=8]
- * @param  {number} [tubularSegments=6]
- * @param  {number} [arc=6.283185307179586]
- * @return {Trimesh} A torus
- */
-Trimesh.createTorus = function (radius, tube, radialSegments, tubularSegments, arc) {
-    radius = radius || 1;
-    tube = tube || 0.5;
-    radialSegments = radialSegments || 8;
-    tubularSegments = tubularSegments || 6;
-    arc = arc || Math.PI * 2;
-
-    var vertices = [];
-    var indices = [];
-
-    for ( var j = 0; j <= radialSegments; j ++ ) {
-        for ( var i = 0; i <= tubularSegments; i ++ ) {
-            var u = i / tubularSegments * arc;
-            var v = j / radialSegments * Math.PI * 2;
-
-            var x = ( radius + tube * Math.cos( v ) ) * Math.cos( u );
-            var y = ( radius + tube * Math.cos( v ) ) * Math.sin( u );
-            var z = tube * Math.sin( v );
-
-            vertices.push( x, y, z );
-        }
-    }
-
-    for ( var j = 1; j <= radialSegments; j ++ ) {
-        for ( var i = 1; i <= tubularSegments; i ++ ) {
-            var a = ( tubularSegments + 1 ) * j + i - 1;
-            var b = ( tubularSegments + 1 ) * ( j - 1 ) + i - 1;
-            var c = ( tubularSegments + 1 ) * ( j - 1 ) + i;
-            var d = ( tubularSegments + 1 ) * j + i;
-
-            indices.push(a, b, d);
-            indices.push(b, c, d);
-        }
-    }
-
-    return new Trimesh(vertices, indices);
-};
-
-},{"../collision/AABB":3,"../math/Quaternion":28,"../math/Transform":29,"../math/Vec3":30,"../utils/Octree":50,"./Shape":43}],46:[function(_dereq_,module,exports){
-module.exports = GSSolver;
-
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var Solver = _dereq_('./Solver');
-
-/**
- * Constraint equation Gauss-Seidel solver.
- * @class GSSolver
- * @constructor
- * @todo The spook parameters should be specified for each constraint, not globally.
- * @author schteppe / https://github.com/schteppe
- * @see https://www8.cs.umu.se/kurser/5DV058/VT09/lectures/spooknotes.pdf
- * @extends Solver
- */
-function GSSolver(){
-    Solver.call(this);
-
-    /**
-     * The number of solver iterations determines quality of the constraints in the world. The more iterations, the more correct simulation. More iterations need more computations though. If you have a large gravity force in your world, you will need more iterations.
-     * @property iterations
-     * @type {Number}
-     * @todo write more about solver and iterations in the wiki
-     */
-    this.iterations = 10;
-
-    /**
-     * When tolerance is reached, the system is assumed to be converged.
-     * @property tolerance
-     * @type {Number}
-     */
-    this.tolerance = 1e-7;
-}
-GSSolver.prototype = new Solver();
-
-var GSSolver_solve_lambda = []; // Just temporary number holders that we want to reuse each solve.
-var GSSolver_solve_invCs = [];
-var GSSolver_solve_Bs = [];
-GSSolver.prototype.solve = function(dt,world){
-    var iter = 0,
-        maxIter = this.iterations,
-        tolSquared = this.tolerance*this.tolerance,
-        equations = this.equations,
-        Neq = equations.length,
-        bodies = world.bodies,
-        Nbodies = bodies.length,
-        h = dt,
-        q, B, invC, deltalambda, deltalambdaTot, GWlambda, lambdaj;
-
-    // Update solve mass
-    if(Neq !== 0){
-        for(var i=0; i!==Nbodies; i++){
-            bodies[i].updateSolveMassProperties();
-        }
-    }
-
-    // Things that does not change during iteration can be computed once
-    var invCs = GSSolver_solve_invCs,
-        Bs = GSSolver_solve_Bs,
-        lambda = GSSolver_solve_lambda;
-    invCs.length = Neq;
-    Bs.length = Neq;
-    lambda.length = Neq;
-    for(var i=0; i!==Neq; i++){
-        var c = equations[i];
-        lambda[i] = 0.0;
-        Bs[i] = c.computeB(h);
-        invCs[i] = 1.0 / c.computeC();
-    }
-
-    if(Neq !== 0){
-
-        // Reset vlambda
-        for(var i=0; i!==Nbodies; i++){
-            var b=bodies[i],
-                vlambda=b.vlambda,
-                wlambda=b.wlambda;
-            vlambda.set(0,0,0);
-            if(wlambda){
-                wlambda.set(0,0,0);
-            }
-        }
-
-        // Iterate over equations
-        for(iter=0; iter!==maxIter; iter++){
-
-            // Accumulate the total error for each iteration.
-            deltalambdaTot = 0.0;
-
-            for(var j=0; j!==Neq; j++){
-
-                var c = equations[j];
-
-                // Compute iteration
-                B = Bs[j];
-                invC = invCs[j];
-                lambdaj = lambda[j];
-                GWlambda = c.computeGWlambda();
-                deltalambda = invC * ( B - GWlambda - c.eps * lambdaj );
-
-                // Clamp if we are not within the min/max interval
-                if(lambdaj + deltalambda < c.minForce){
-                    deltalambda = c.minForce - lambdaj;
-                } else if(lambdaj + deltalambda > c.maxForce){
-                    deltalambda = c.maxForce - lambdaj;
-                }
-                lambda[j] += deltalambda;
-
-                deltalambdaTot += deltalambda > 0.0 ? deltalambda : -deltalambda; // abs(deltalambda)
-
-                c.addToWlambda(deltalambda);
-            }
-
-            // If the total error is small enough - stop iterate
-            if(deltalambdaTot*deltalambdaTot < tolSquared){
-                break;
-            }
-        }
-
-        // Add result to velocity
-        for(var i=0; i!==Nbodies; i++){
-            var b=bodies[i],
-                v=b.velocity,
-                w=b.angularVelocity;
-            v.vadd(b.vlambda, v);
-            if(w){
-                w.vadd(b.wlambda, w);
-            }
-        }
-    }
-
-    return iter;
-};
-
-},{"../math/Quaternion":28,"../math/Vec3":30,"./Solver":47}],47:[function(_dereq_,module,exports){
-module.exports = Solver;
-
-/**
- * Constraint equation solver base class.
- * @class Solver
- * @constructor
- * @author schteppe / https://github.com/schteppe
- */
-function Solver(){
-    /**
-     * All equations to be solved
-     * @property {Array} equations
-     */
-    this.equations = [];
-}
-
-/**
- * Should be implemented in subclasses!
- * @method solve
- * @param  {Number} dt
- * @param  {World} world
- */
-Solver.prototype.solve = function(dt,world){
-    // Should return the number of iterations done!
-    return 0;
-};
-
-/**
- * Add an equation
- * @method addEquation
- * @param {Equation} eq
- */
-Solver.prototype.addEquation = function(eq){
-    if (eq.enabled) {
-        this.equations.push(eq);
-    }
-};
-
-/**
- * Remove an equation
- * @method removeEquation
- * @param {Equation} eq
- */
-Solver.prototype.removeEquation = function(eq){
-    var eqs = this.equations;
-    var i = eqs.indexOf(eq);
-    if(i !== -1){
-        eqs.splice(i,1);
-    }
-};
-
-/**
- * Add all equations
- * @method removeAllEquations
- */
-Solver.prototype.removeAllEquations = function(){
-    this.equations.length = 0;
-};
-
-
-},{}],48:[function(_dereq_,module,exports){
-module.exports = SplitSolver;
-
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var Solver = _dereq_('./Solver');
-var Body = _dereq_('../objects/Body');
-
-/**
- * Splits the equations into islands and solves them independently. Can improve performance.
- * @class SplitSolver
- * @constructor
- * @extends Solver
- * @param {Solver} subsolver
- */
-function SplitSolver(subsolver){
-    Solver.call(this);
-    this.iterations = 10;
-    this.tolerance = 1e-7;
-    this.subsolver = subsolver;
-    this.nodes = [];
-    this.nodePool = [];
-
-    // Create needed nodes, reuse if possible
-    while(this.nodePool.length < 128){
-        this.nodePool.push(this.createNode());
-    }
-}
-SplitSolver.prototype = new Solver();
-
-// Returns the number of subsystems
-var SplitSolver_solve_nodes = []; // All allocated node objects
-var SplitSolver_solve_nodePool = []; // All allocated node objects
-var SplitSolver_solve_eqs = [];   // Temp array
-var SplitSolver_solve_bds = [];   // Temp array
-var SplitSolver_solve_dummyWorld = {bodies:[]}; // Temp object
-
-var STATIC = Body.STATIC;
-function getUnvisitedNode(nodes){
-    var Nnodes = nodes.length;
-    for(var i=0; i!==Nnodes; i++){
-        var node = nodes[i];
-        if(!node.visited && !(node.body.type & STATIC)){
-            return node;
-        }
-    }
-    return false;
-}
-
-var queue = [];
-function bfs(root,visitFunc,bds,eqs){
-    queue.push(root);
-    root.visited = true;
-    visitFunc(root,bds,eqs);
-    while(queue.length) {
-        var node = queue.pop();
-        // Loop over unvisited child nodes
-        var child;
-        while((child = getUnvisitedNode(node.children))) {
-            child.visited = true;
-            visitFunc(child,bds,eqs);
-            queue.push(child);
-        }
-    }
-}
-
-function visitFunc(node,bds,eqs){
-    bds.push(node.body);
-    var Neqs = node.eqs.length;
-    for(var i=0; i!==Neqs; i++){
-        var eq = node.eqs[i];
-        if(eqs.indexOf(eq) === -1){
-            eqs.push(eq);
-        }
-    }
-}
-
-SplitSolver.prototype.createNode = function(){
-    return { body:null, children:[], eqs:[], visited:false };
-};
-
-/**
- * Solve the subsystems
- * @method solve
- * @param  {Number} dt
- * @param  {World} world
- */
-SplitSolver.prototype.solve = function(dt,world){
-    var nodes=SplitSolver_solve_nodes,
-        nodePool=this.nodePool,
-        bodies=world.bodies,
-        equations=this.equations,
-        Neq=equations.length,
-        Nbodies=bodies.length,
-        subsolver=this.subsolver;
-
-    // Create needed nodes, reuse if possible
-    while(nodePool.length < Nbodies){
-        nodePool.push(this.createNode());
-    }
-    nodes.length = Nbodies;
-    for (var i = 0; i < Nbodies; i++) {
-        nodes[i] = nodePool[i];
-    }
-
-    // Reset node values
-    for(var i=0; i!==Nbodies; i++){
-        var node = nodes[i];
-        node.body = bodies[i];
-        node.children.length = 0;
-        node.eqs.length = 0;
-        node.visited = false;
-    }
-    for(var k=0; k!==Neq; k++){
-        var eq=equations[k],
-            i=bodies.indexOf(eq.bi),
-            j=bodies.indexOf(eq.bj),
-            ni=nodes[i],
-            nj=nodes[j];
-        ni.children.push(nj);
-        ni.eqs.push(eq);
-        nj.children.push(ni);
-        nj.eqs.push(eq);
-    }
-
-    var child, n=0, eqs=SplitSolver_solve_eqs;
-
-    subsolver.tolerance = this.tolerance;
-    subsolver.iterations = this.iterations;
-
-    var dummyWorld = SplitSolver_solve_dummyWorld;
-    while((child = getUnvisitedNode(nodes))){
-        eqs.length = 0;
-        dummyWorld.bodies.length = 0;
-        bfs(child, visitFunc, dummyWorld.bodies, eqs);
-
-        var Neqs = eqs.length;
-
-        eqs = eqs.sort(sortById);
-
-        for(var i=0; i!==Neqs; i++){
-            subsolver.addEquation(eqs[i]);
-        }
-
-        var iter = subsolver.solve(dt,dummyWorld);
-        subsolver.removeAllEquations();
-        n++;
-    }
-
-    return n;
-};
-
-function sortById(a, b){
-    return b.id - a.id;
-}
-},{"../math/Quaternion":28,"../math/Vec3":30,"../objects/Body":31,"./Solver":47}],49:[function(_dereq_,module,exports){
-/**
- * Base class for objects that dispatches events.
- * @class EventTarget
- * @constructor
- */
-var EventTarget = function () {
-
-};
-
-module.exports = EventTarget;
-
-EventTarget.prototype = {
-    constructor: EventTarget,
-
-    /**
-     * Add an event listener
-     * @method addEventListener
-     * @param  {String} type
-     * @param  {Function} listener
-     * @return {EventTarget} The self object, for chainability.
-     */
-    addEventListener: function ( type, listener ) {
-        if ( this._listeners === undefined ){ this._listeners = {}; }
-        var listeners = this._listeners;
-        if ( listeners[ type ] === undefined ) {
-            listeners[ type ] = [];
-        }
-        if ( listeners[ type ].indexOf( listener ) === - 1 ) {
-            listeners[ type ].push( listener );
-        }
-        return this;
-    },
-
-    /**
-     * Check if an event listener is added
-     * @method hasEventListener
-     * @param  {String} type
-     * @param  {Function} listener
-     * @return {Boolean}
-     */
-    hasEventListener: function ( type, listener ) {
-        if ( this._listeners === undefined ){ return false; }
-        var listeners = this._listeners;
-        if ( listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1 ) {
-            return true;
-        }
-        return false;
-    },
-
-    /**
-     * Remove an event listener
-     * @method removeEventListener
-     * @param  {String} type
-     * @param  {Function} listener
-     * @return {EventTarget} The self object, for chainability.
-     */
-    removeEventListener: function ( type, listener ) {
-        if ( this._listeners === undefined ){ return this; }
-        var listeners = this._listeners;
-        if ( listeners[type] === undefined ){ return this; }
-        var index = listeners[ type ].indexOf( listener );
-        if ( index !== - 1 ) {
-            listeners[ type ].splice( index, 1 );
-        }
-        return this;
-    },
-
-    /**
-     * Emit an event.
-     * @method dispatchEvent
-     * @param  {Object} event
-     * @param  {String} event.type
-     * @return {EventTarget} The self object, for chainability.
-     */
-    dispatchEvent: function ( event ) {
-        if ( this._listeners === undefined ){ return this; }
-        var listeners = this._listeners;
-        var listenerArray = listeners[ event.type ];
-        if ( listenerArray !== undefined ) {
-            event.target = this;
-            for ( var i = 0, l = listenerArray.length; i < l; i ++ ) {
-                listenerArray[ i ].call( this, event );
-            }
-        }
-        return this;
-    }
-};
-
-},{}],50:[function(_dereq_,module,exports){
-var AABB = _dereq_('../collision/AABB');
-var Vec3 = _dereq_('../math/Vec3');
-
-module.exports = Octree;
-
-/**
- * @class OctreeNode
- * @param {object} [options]
- * @param {Octree} [options.root]
- * @param {AABB} [options.aabb]
- */
-function OctreeNode(options){
-    options = options || {};
-
-    /**
-     * The root node
-     * @property {OctreeNode} root
-     */
-    this.root = options.root || null;
-
-    /**
-     * Boundary of this node
-     * @property {AABB} aabb
-     */
-    this.aabb = options.aabb ? options.aabb.clone() : new AABB();
-
-    /**
-     * Contained data at the current node level.
-     * @property {Array} data
-     */
-    this.data = [];
-
-    /**
-     * Children to this node
-     * @property {Array} children
-     */
-    this.children = [];
-}
-
-/**
- * @class Octree
- * @param {AABB} aabb The total AABB of the tree
- * @param {object} [options]
- * @param {number} [options.maxDepth=8]
- * @extends OctreeNode
- */
-function Octree(aabb, options){
-    options = options || {};
-    options.root = null;
-    options.aabb = aabb;
-    OctreeNode.call(this, options);
-
-    /**
-     * Maximum subdivision depth
-     * @property {number} maxDepth
-     */
-    this.maxDepth = typeof(options.maxDepth) !== 'undefined' ? options.maxDepth : 8;
-}
-Octree.prototype = new OctreeNode();
-
-OctreeNode.prototype.reset = function(aabb, options){
-    this.children.length = this.data.length = 0;
-};
-
-/**
- * Insert data into this node
- * @method insert
- * @param  {AABB} aabb
- * @param  {object} elementData
- * @return {boolean} True if successful, otherwise false
- */
-OctreeNode.prototype.insert = function(aabb, elementData, level){
-    var nodeData = this.data;
-    level = level || 0;
-
-    // Ignore objects that do not belong in this node
-    if (!this.aabb.contains(aabb)){
-        return false; // object cannot be added
-    }
-
-    var children = this.children;
-
-    if(level < (this.maxDepth || this.root.maxDepth)){
-        // Subdivide if there are no children yet
-        var subdivided = false;
-        if (!children.length){
-            this.subdivide();
-            subdivided = true;
-        }
-
-        // add to whichever node will accept it
-        for (var i = 0; i !== 8; i++) {
-            if (children[i].insert(aabb, elementData, level + 1)){
-                return true;
-            }
-        }
-
-        if(subdivided){
-            // No children accepted! Might as well just remove em since they contain none
-            children.length = 0;
-        }
-    }
-
-    // Too deep, or children didnt want it. add it in current node
-    nodeData.push(elementData);
-
-    return true;
-};
-
-var halfDiagonal = new Vec3();
-
-/**
- * Create 8 equally sized children nodes and put them in the .children array.
- * @method subdivide
- */
-OctreeNode.prototype.subdivide = function() {
-    var aabb = this.aabb;
-    var l = aabb.lowerBound;
-    var u = aabb.upperBound;
-
-    var children = this.children;
-
-    children.push(
-        new OctreeNode({ aabb: new AABB({ lowerBound: new Vec3(0,0,0) }) }),
-        new OctreeNode({ aabb: new AABB({ lowerBound: new Vec3(1,0,0) }) }),
-        new OctreeNode({ aabb: new AABB({ lowerBound: new Vec3(1,1,0) }) }),
-        new OctreeNode({ aabb: new AABB({ lowerBound: new Vec3(1,1,1) }) }),
-        new OctreeNode({ aabb: new AABB({ lowerBound: new Vec3(0,1,1) }) }),
-        new OctreeNode({ aabb: new AABB({ lowerBound: new Vec3(0,0,1) }) }),
-        new OctreeNode({ aabb: new AABB({ lowerBound: new Vec3(1,0,1) }) }),
-        new OctreeNode({ aabb: new AABB({ lowerBound: new Vec3(0,1,0) }) })
-    );
-
-    u.vsub(l, halfDiagonal);
-    halfDiagonal.scale(0.5, halfDiagonal);
-
-    var root = this.root || this;
-
-    for (var i = 0; i !== 8; i++) {
-        var child = children[i];
-
-        // Set current node as root
-        child.root = root;
-
-        // Compute bounds
-        var lowerBound = child.aabb.lowerBound;
-        lowerBound.x *= halfDiagonal.x;
-        lowerBound.y *= halfDiagonal.y;
-        lowerBound.z *= halfDiagonal.z;
-
-        lowerBound.vadd(l, lowerBound);
-
-        // Upper bound is always lower bound + halfDiagonal
-        lowerBound.vadd(halfDiagonal, child.aabb.upperBound);
-    }
-};
-
-/**
- * Get all data, potentially within an AABB
- * @method aabbQuery
- * @param  {AABB} aabb
- * @param  {array} result
- * @return {array} The "result" object
- */
-OctreeNode.prototype.aabbQuery = function(aabb, result) {
-
-    var nodeData = this.data;
-
-    // abort if the range does not intersect this node
-    // if (!this.aabb.overlaps(aabb)){
-    //     return result;
-    // }
-
-    // Add objects at this level
-    // Array.prototype.push.apply(result, nodeData);
-
-    // Add child data
-    // @todo unwrap recursion into a queue / loop, that's faster in JS
-    var children = this.children;
-
-
-    // for (var i = 0, N = this.children.length; i !== N; i++) {
-    //     children[i].aabbQuery(aabb, result);
-    // }
-
-    var queue = [this];
-    while (queue.length) {
-        var node = queue.pop();
-        if (node.aabb.overlaps(aabb)){
-            Array.prototype.push.apply(result, node.data);
-        }
-        Array.prototype.push.apply(queue, node.children);
-    }
-
-    return result;
-};
-
-var tmpAABB = new AABB();
-
-/**
- * Get all data, potentially intersected by a ray.
- * @method rayQuery
- * @param  {Ray} ray
- * @param  {Transform} treeTransform
- * @param  {array} result
- * @return {array} The "result" object
- */
-OctreeNode.prototype.rayQuery = function(ray, treeTransform, result) {
-
-    // Use aabb query for now.
-    // @todo implement real ray query which needs less lookups
-    ray.getAABB(tmpAABB);
-    tmpAABB.toLocalFrame(treeTransform, tmpAABB);
-    this.aabbQuery(tmpAABB, result);
-
-    return result;
-};
-
-/**
- * @method removeEmptyNodes
- */
-OctreeNode.prototype.removeEmptyNodes = function() {
-    var queue = [this];
-    while (queue.length) {
-        var node = queue.pop();
-        for (var i = node.children.length - 1; i >= 0; i--) {
-            if(!node.children[i].data.length){
-                node.children.splice(i, 1);
-            }
-        }
-        Array.prototype.push.apply(queue, node.children);
-    }
-};
-
-},{"../collision/AABB":3,"../math/Vec3":30}],51:[function(_dereq_,module,exports){
-module.exports = Pool;
-
-/**
- * For pooling objects that can be reused.
- * @class Pool
- * @constructor
- */
-function Pool(){
-    /**
-     * The pooled objects
-     * @property {Array} objects
-     */
-    this.objects = [];
-
-    /**
-     * Constructor of the objects
-     * @property {mixed} type
-     */
-    this.type = Object;
-}
-
-/**
- * Release an object after use
- * @method release
- * @param {Object} obj
- */
-Pool.prototype.release = function(){
-    var Nargs = arguments.length;
-    for(var i=0; i!==Nargs; i++){
-        this.objects.push(arguments[i]);
-    }
-};
-
-/**
- * Get an object
- * @method get
- * @return {mixed}
- */
-Pool.prototype.get = function(){
-    if(this.objects.length===0){
-        return this.constructObject();
-    } else {
-        return this.objects.pop();
-    }
-};
-
-/**
- * Construct an object. Should be implmented in each subclass.
- * @method constructObject
- * @return {mixed}
- */
-Pool.prototype.constructObject = function(){
-    throw new Error("constructObject() not implemented in this Pool subclass yet!");
-};
-
-},{}],52:[function(_dereq_,module,exports){
-module.exports = TupleDictionary;
-
-/**
- * @class TupleDictionary
- * @constructor
- */
-function TupleDictionary() {
-
-    /**
-     * The data storage
-     * @property data
-     * @type {Object}
-     */
-    this.data = { keys:[] };
-}
-
-/**
- * @method get
- * @param  {Number} i
- * @param  {Number} j
- * @return {Number}
- */
-TupleDictionary.prototype.get = function(i, j) {
-    if (i > j) {
-        // swap
-        var temp = j;
-        j = i;
-        i = temp;
-    }
-    return this.data[i+'-'+j];
-};
-
-/**
- * @method set
- * @param  {Number} i
- * @param  {Number} j
- * @param {Number} value
- */
-TupleDictionary.prototype.set = function(i, j, value) {
-    if (i > j) {
-        var temp = j;
-        j = i;
-        i = temp;
-    }
-    var key = i+'-'+j;
-
-    // Check if key already exists
-    if(!this.get(i,j)){
-        this.data.keys.push(key);
-    }
-
-    this.data[key] = value;
-};
-
-/**
- * @method reset
- */
-TupleDictionary.prototype.reset = function() {
-    var data = this.data,
-        keys = data.keys;
-    while(keys.length > 0){
-        var key = keys.pop();
-        delete data[key];
-    }
-};
-
-},{}],53:[function(_dereq_,module,exports){
-function Utils(){}
-
-module.exports = Utils;
-
-/**
- * Extend an options object with default values.
- * @static
- * @method defaults
- * @param  {object} options The options object. May be falsy: in this case, a new object is created and returned.
- * @param  {object} defaults An object containing default values.
- * @return {object} The modified options object.
- */
-Utils.defaults = function(options, defaults){
-    options = options || {};
-
-    for(var key in defaults){
-        if(!(key in options)){
-            options[key] = defaults[key];
-        }
-    }
-
-    return options;
-};
-
-},{}],54:[function(_dereq_,module,exports){
-module.exports = Vec3Pool;
-
-var Vec3 = _dereq_('../math/Vec3');
-var Pool = _dereq_('./Pool');
-
-/**
- * @class Vec3Pool
- * @constructor
- * @extends Pool
- */
-function Vec3Pool(){
-    Pool.call(this);
-    this.type = Vec3;
-}
-Vec3Pool.prototype = new Pool();
-
-/**
- * Construct a vector
- * @method constructObject
- * @return {Vec3}
- */
-Vec3Pool.prototype.constructObject = function(){
-    return new Vec3();
-};
-
-},{"../math/Vec3":30,"./Pool":51}],55:[function(_dereq_,module,exports){
-module.exports = Narrowphase;
-
-var AABB = _dereq_('../collision/AABB');
-var Shape = _dereq_('../shapes/Shape');
-var Ray = _dereq_('../collision/Ray');
-var Vec3 = _dereq_('../math/Vec3');
-var Transform = _dereq_('../math/Transform');
-var ConvexPolyhedron = _dereq_('../shapes/ConvexPolyhedron');
-var Quaternion = _dereq_('../math/Quaternion');
-var Solver = _dereq_('../solver/Solver');
-var Vec3Pool = _dereq_('../utils/Vec3Pool');
-var ContactEquation = _dereq_('../equations/ContactEquation');
-var FrictionEquation = _dereq_('../equations/FrictionEquation');
-
-/**
- * Helper class for the World. Generates ContactEquations.
- * @class Narrowphase
- * @constructor
- * @todo Sphere-ConvexPolyhedron contacts
- * @todo Contact reduction
- * @todo  should move methods to prototype
- */
-function Narrowphase(world){
-
-    /**
-     * Internal storage of pooled contact points.
-     * @property {Array} contactPointPool
-     */
-    this.contactPointPool = [];
-
-    this.frictionEquationPool = [];
-
-    this.result = [];
-    this.frictionResult = [];
-
-    /**
-     * Pooled vectors.
-     * @property {Vec3Pool} v3pool
-     */
-    this.v3pool = new Vec3Pool();
-
-    this.world = world;
-    this.currentContactMaterial = null;
-
-    /**
-     * @property {Boolean} enableFrictionReduction
-     */
-    this.enableFrictionReduction = false;
-}
-
-/**
- * Make a contact object, by using the internal pool or creating a new one.
- * @method createContactEquation
- * @return {ContactEquation}
- */
-Narrowphase.prototype.createContactEquation = function(bi, bj, si, sj, rsi, rsj){
-    var c;
-    if(this.contactPointPool.length){
-        c = this.contactPointPool.pop();
-        c.bi = bi;
-        c.bj = bj;
-    } else {
-        c = new ContactEquation(bi, bj);
-    }
-
-    c.enabled = bi.collisionResponse && bj.collisionResponse && si.collisionResponse && sj.collisionResponse;
-
-    var cm = this.currentContactMaterial;
-
-    c.restitution = cm.restitution;
-
-    c.setSpookParams(
-        cm.contactEquationStiffness,
-        cm.contactEquationRelaxation,
-        this.world.dt
-    );
-
-    var matA = si.material || bi.material;
-    var matB = sj.material || bj.material;
-    if(matA && matB && matA.restitution >= 0 && matB.restitution >= 0){
-        c.restitution = matA.restitution * matB.restitution;
-    }
-
-    c.si = rsi || si;
-    c.sj = rsj || sj;
-
-    return c;
-};
-
-Narrowphase.prototype.createFrictionEquationsFromContact = function(contactEquation, outArray){
-    var bodyA = contactEquation.bi;
-    var bodyB = contactEquation.bj;
-    var shapeA = contactEquation.si;
-    var shapeB = contactEquation.sj;
-
-    var world = this.world;
-    var cm = this.currentContactMaterial;
-
-    // If friction or restitution were specified in the material, use them
-    var friction = cm.friction;
-    var matA = shapeA.material || bodyA.material;
-    var matB = shapeB.material || bodyB.material;
-    if(matA && matB && matA.friction >= 0 && matB.friction >= 0){
-        friction = matA.friction * matB.friction;
-    }
-
-    if(friction > 0){
-
-        // Create 2 tangent equations
-        var mug = friction * world.gravity.length();
-        var reducedMass = (bodyA.invMass + bodyB.invMass);
-        if(reducedMass > 0){
-            reducedMass = 1/reducedMass;
-        }
-        var pool = this.frictionEquationPool;
-        var c1 = pool.length ? pool.pop() : new FrictionEquation(bodyA,bodyB,mug*reducedMass);
-        var c2 = pool.length ? pool.pop() : new FrictionEquation(bodyA,bodyB,mug*reducedMass);
-
-        c1.bi = c2.bi = bodyA;
-        c1.bj = c2.bj = bodyB;
-        c1.minForce = c2.minForce = -mug*reducedMass;
-        c1.maxForce = c2.maxForce = mug*reducedMass;
-
-        // Copy over the relative vectors
-        c1.ri.copy(contactEquation.ri);
-        c1.rj.copy(contactEquation.rj);
-        c2.ri.copy(contactEquation.ri);
-        c2.rj.copy(contactEquation.rj);
-
-        // Construct tangents
-        contactEquation.ni.tangents(c1.t, c2.t);
-
-        // Set spook params
-        c1.setSpookParams(cm.frictionEquationStiffness, cm.frictionEquationRelaxation, world.dt);
-        c2.setSpookParams(cm.frictionEquationStiffness, cm.frictionEquationRelaxation, world.dt);
-
-        c1.enabled = c2.enabled = contactEquation.enabled;
-
-        outArray.push(c1, c2);
-
-        return true;
-    }
-
-    return false;
-};
-
-var averageNormal = new Vec3();
-var averageContactPointA = new Vec3();
-var averageContactPointB = new Vec3();
-
-// Take the average N latest contact point on the plane.
-Narrowphase.prototype.createFrictionFromAverage = function(numContacts){
-    // The last contactEquation
-    var c = this.result[this.result.length - 1];
-
-    // Create the result: two "average" friction equations
-    if (!this.createFrictionEquationsFromContact(c, this.frictionResult) || numContacts === 1) {
-        return;
-    }
-
-    var f1 = this.frictionResult[this.frictionResult.length - 2];
-    var f2 = this.frictionResult[this.frictionResult.length - 1];
-
-    averageNormal.setZero();
-    averageContactPointA.setZero();
-    averageContactPointB.setZero();
-
-    var bodyA = c.bi;
-    var bodyB = c.bj;
-    for(var i=0; i!==numContacts; i++){
-        c = this.result[this.result.length - 1 - i];
-        if(c.bodyA !== bodyA){
-            averageNormal.vadd(c.ni, averageNormal); // vec2.add(eq.t, eq.t, c.normalA);
-            averageContactPointA.vadd(c.ri, averageContactPointA); // vec2.add(eq.contactPointA, eq.contactPointA, c.contactPointA);
-            averageContactPointB.vadd(c.rj, averageContactPointB);
-        } else {
-            averageNormal.vsub(c.ni, averageNormal); // vec2.sub(eq.t, eq.t, c.normalA);
-            averageContactPointA.vadd(c.rj, averageContactPointA); // vec2.add(eq.contactPointA, eq.contactPointA, c.contactPointA);
-            averageContactPointB.vadd(c.ri, averageContactPointB);
-        }
-    }
-
-    var invNumContacts = 1 / numContacts;
-    averageContactPointA.scale(invNumContacts, f1.ri); // vec2.scale(eq.contactPointA, eq.contactPointA, invNumContacts);
-    averageContactPointB.scale(invNumContacts, f1.rj); // vec2.scale(eq.contactPointB, eq.contactPointB, invNumContacts);
-    f2.ri.copy(f1.ri); // Should be the same
-    f2.rj.copy(f1.rj);
-    averageNormal.normalize();
-    averageNormal.tangents(f1.t, f2.t);
-    // return eq;
-};
-
-
-var tmpVec1 = new Vec3();
-var tmpVec2 = new Vec3();
-var tmpQuat1 = new Quaternion();
-var tmpQuat2 = new Quaternion();
-
-/**
- * Generate all contacts between a list of body pairs
- * @method getContacts
- * @param {array} p1 Array of body indices
- * @param {array} p2 Array of body indices
- * @param {World} world
- * @param {array} result Array to store generated contacts
- * @param {array} oldcontacts Optional. Array of reusable contact objects
- */
-Narrowphase.prototype.getContacts = function(p1, p2, world, result, oldcontacts, frictionResult, frictionPool){
-    // Save old contact objects
-    this.contactPointPool = oldcontacts;
-    this.frictionEquationPool = frictionPool;
-    this.result = result;
-    this.frictionResult = frictionResult;
-
-    var qi = tmpQuat1;
-    var qj = tmpQuat2;
-    var xi = tmpVec1;
-    var xj = tmpVec2;
-
-    for(var k=0, N=p1.length; k!==N; k++){
-
-        // Get current collision bodies
-        var bi = p1[k],
-            bj = p2[k];
-
-        // Get contact material
-        var bodyContactMaterial = null;
-        if(bi.material && bj.material){
-            bodyContactMaterial = world.getContactMaterial(bi.material,bj.material) || null;
-        }
-
-        for (var i = 0; i < bi.shapes.length; i++) {
-            bi.quaternion.mult(bi.shapeOrientations[i], qi);
-            bi.quaternion.vmult(bi.shapeOffsets[i], xi);
-            xi.vadd(bi.position, xi);
-            var si = bi.shapes[i];
-
-            for (var j = 0; j < bj.shapes.length; j++) {
-
-                // Compute world transform of shapes
-                bj.quaternion.mult(bj.shapeOrientations[j], qj);
-                bj.quaternion.vmult(bj.shapeOffsets[j], xj);
-                xj.vadd(bj.position, xj);
-                var sj = bj.shapes[j];
-
-                if(xi.distanceTo(xj) > si.boundingSphereRadius + sj.boundingSphereRadius){
-                    continue;
-                }
-
-                // Get collision material
-                var shapeContactMaterial = null;
-                if(si.material && sj.material){
-                    shapeContactMaterial = world.getContactMaterial(si.material,sj.material) || null;
-                }
-
-                this.currentContactMaterial = shapeContactMaterial || bodyContactMaterial || world.defaultContactMaterial;
-
-                // Get contacts
-                var resolver = this[si.type | sj.type];
-                if(resolver){
-                    if (si.type < sj.type) {
-                        resolver.call(this, si, sj, xi, xj, qi, qj, bi, bj, si, sj);
-                    } else {
-                        resolver.call(this, sj, si, xj, xi, qj, qi, bj, bi, si, sj);
-                    }
-                }
-            }
-        }
-    }
-};
-
-var numWarnings = 0;
-var maxWarnings = 10;
-
-function warn(msg){
-    if(numWarnings > maxWarnings){
-        return;
-    }
-
-    numWarnings++;
-
-    console.warn(msg);
-}
-
-Narrowphase.prototype[Shape.types.BOX | Shape.types.BOX] =
-Narrowphase.prototype.boxBox = function(si,sj,xi,xj,qi,qj,bi,bj){
-    si.convexPolyhedronRepresentation.material = si.material;
-    sj.convexPolyhedronRepresentation.material = sj.material;
-    si.convexPolyhedronRepresentation.collisionResponse = si.collisionResponse;
-    sj.convexPolyhedronRepresentation.collisionResponse = sj.collisionResponse;
-    this.convexConvex(si.convexPolyhedronRepresentation,sj.convexPolyhedronRepresentation,xi,xj,qi,qj,bi,bj,si,sj);
-};
-
-Narrowphase.prototype[Shape.types.BOX | Shape.types.CONVEXPOLYHEDRON] =
-Narrowphase.prototype.boxConvex = function(si,sj,xi,xj,qi,qj,bi,bj){
-    si.convexPolyhedronRepresentation.material = si.material;
-    si.convexPolyhedronRepresentation.collisionResponse = si.collisionResponse;
-    this.convexConvex(si.convexPolyhedronRepresentation,sj,xi,xj,qi,qj,bi,bj,si,sj);
-};
-
-Narrowphase.prototype[Shape.types.BOX | Shape.types.PARTICLE] =
-Narrowphase.prototype.boxParticle = function(si,sj,xi,xj,qi,qj,bi,bj){
-    si.convexPolyhedronRepresentation.material = si.material;
-    si.convexPolyhedronRepresentation.collisionResponse = si.collisionResponse;
-    this.convexParticle(si.convexPolyhedronRepresentation,sj,xi,xj,qi,qj,bi,bj,si,sj);
-};
-
-/**
- * @method sphereSphere
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-Narrowphase.prototype[Shape.types.SPHERE] =
-Narrowphase.prototype.sphereSphere = function(si,sj,xi,xj,qi,qj,bi,bj){
-    // We will have only one contact in this case
-    var r = this.createContactEquation(bi,bj,si,sj);
-
-    // Contact normal
-    xj.vsub(xi, r.ni);
-    r.ni.normalize();
-
-    // Contact point locations
-    r.ri.copy(r.ni);
-    r.rj.copy(r.ni);
-    r.ri.mult(si.radius, r.ri);
-    r.rj.mult(-sj.radius, r.rj);
-
-    r.ri.vadd(xi, r.ri);
-    r.ri.vsub(bi.position, r.ri);
-
-    r.rj.vadd(xj, r.rj);
-    r.rj.vsub(bj.position, r.rj);
-
-    this.result.push(r);
-
-    this.createFrictionEquationsFromContact(r, this.frictionResult);
-};
-
-/**
- * @method planeTrimesh
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-var planeTrimesh_normal = new Vec3();
-var planeTrimesh_relpos = new Vec3();
-var planeTrimesh_projected = new Vec3();
-Narrowphase.prototype[Shape.types.PLANE | Shape.types.TRIMESH] =
-Narrowphase.prototype.planeTrimesh = function(
-    planeShape,
-    trimeshShape,
-    planePos,
-    trimeshPos,
-    planeQuat,
-    trimeshQuat,
-    planeBody,
-    trimeshBody
-){
-    // Make contacts!
-    var v = new Vec3();
-
-    var normal = planeTrimesh_normal;
-    normal.set(0,0,1);
-    planeQuat.vmult(normal,normal); // Turn normal according to plane
-
-    for(var i=0; i<trimeshShape.vertices.length / 3; i++){
-
-        // Get world vertex from trimesh
-        trimeshShape.getVertex(i, v);
-
-        // Safe up
-        var v2 = new Vec3();
-        v2.copy(v);
-        Transform.pointToWorldFrame(trimeshPos, trimeshQuat, v2, v);
-
-        // Check plane side
-        var relpos = planeTrimesh_relpos;
-        v.vsub(planePos, relpos);
-        var dot = normal.dot(relpos);
-
-        if(dot <= 0.0){
-            var r = this.createContactEquation(planeBody,trimeshBody,planeShape,trimeshShape);
-
-            r.ni.copy(normal); // Contact normal is the plane normal
-
-            // Get vertex position projected on plane
-            var projected = planeTrimesh_projected;
-            normal.scale(relpos.dot(normal), projected);
-            v.vsub(projected,projected);
-
-            // ri is the projected world position minus plane position
-            r.ri.copy(projected);
-            r.ri.vsub(planeBody.position, r.ri);
-
-            r.rj.copy(v);
-            r.rj.vsub(trimeshBody.position, r.rj);
-
-            // Store result
-            this.result.push(r);
-            this.createFrictionEquationsFromContact(r, this.frictionResult);
-        }
-    }
-};
-
-/**
- * @method sphereTrimesh
- * @param  {Shape}      sphereShape
- * @param  {Shape}      trimeshShape
- * @param  {Vec3}       spherePos
- * @param  {Vec3}       trimeshPos
- * @param  {Quaternion} sphereQuat
- * @param  {Quaternion} trimeshQuat
- * @param  {Body}       sphereBody
- * @param  {Body}       trimeshBody
- */
-var sphereTrimesh_normal = new Vec3();
-var sphereTrimesh_relpos = new Vec3();
-var sphereTrimesh_projected = new Vec3();
-var sphereTrimesh_v = new Vec3();
-var sphereTrimesh_v2 = new Vec3();
-var sphereTrimesh_edgeVertexA = new Vec3();
-var sphereTrimesh_edgeVertexB = new Vec3();
-var sphereTrimesh_edgeVector = new Vec3();
-var sphereTrimesh_edgeVectorUnit = new Vec3();
-var sphereTrimesh_localSpherePos = new Vec3();
-var sphereTrimesh_tmp = new Vec3();
-var sphereTrimesh_va = new Vec3();
-var sphereTrimesh_vb = new Vec3();
-var sphereTrimesh_vc = new Vec3();
-var sphereTrimesh_localSphereAABB = new AABB();
-var sphereTrimesh_triangles = [];
-Narrowphase.prototype[Shape.types.SPHERE | Shape.types.TRIMESH] =
-Narrowphase.prototype.sphereTrimesh = function (
-    sphereShape,
-    trimeshShape,
-    spherePos,
-    trimeshPos,
-    sphereQuat,
-    trimeshQuat,
-    sphereBody,
-    trimeshBody
-) {
-
-    var edgeVertexA = sphereTrimesh_edgeVertexA;
-    var edgeVertexB = sphereTrimesh_edgeVertexB;
-    var edgeVector = sphereTrimesh_edgeVector;
-    var edgeVectorUnit = sphereTrimesh_edgeVectorUnit;
-    var localSpherePos = sphereTrimesh_localSpherePos;
-    var tmp = sphereTrimesh_tmp;
-    var localSphereAABB = sphereTrimesh_localSphereAABB;
-    var v2 = sphereTrimesh_v2;
-    var relpos = sphereTrimesh_relpos;
-    var triangles = sphereTrimesh_triangles;
-
-    // Convert sphere position to local in the trimesh
-    Transform.pointToLocalFrame(trimeshPos, trimeshQuat, spherePos, localSpherePos);
-
-    // Get the aabb of the sphere locally in the trimesh
-    var sphereRadius = sphereShape.radius;
-    localSphereAABB.lowerBound.set(
-        localSpherePos.x - sphereRadius,
-        localSpherePos.y - sphereRadius,
-        localSpherePos.z - sphereRadius
-    );
-    localSphereAABB.upperBound.set(
-        localSpherePos.x + sphereRadius,
-        localSpherePos.y + sphereRadius,
-        localSpherePos.z + sphereRadius
-    );
-
-    trimeshShape.getTrianglesInAABB(localSphereAABB, triangles);
-    //for (var i = 0; i < trimeshShape.indices.length / 3; i++) triangles.push(i); // All
-
-    // Vertices
-    var v = sphereTrimesh_v;
-    var radiusSquared = sphereShape.radius * sphereShape.radius;
-    for(var i=0; i<triangles.length; i++){
-        for (var j = 0; j < 3; j++) {
-
-            trimeshShape.getVertex(trimeshShape.indices[triangles[i] * 3 + j], v);
-
-            // Check vertex overlap in sphere
-            v.vsub(localSpherePos, relpos);
-
-            if(relpos.norm2() <= radiusSquared){
-
-                // Safe up
-                v2.copy(v);
-                Transform.pointToWorldFrame(trimeshPos, trimeshQuat, v2, v);
-
-                v.vsub(spherePos, relpos);
-
-                var r = this.createContactEquation(sphereBody,trimeshBody,sphereShape,trimeshShape);
-                r.ni.copy(relpos);
-                r.ni.normalize();
-
-                // ri is the vector from sphere center to the sphere surface
-                r.ri.copy(r.ni);
-                r.ri.scale(sphereShape.radius, r.ri);
-                r.ri.vadd(spherePos, r.ri);
-                r.ri.vsub(sphereBody.position, r.ri);
-
-                r.rj.copy(v);
-                r.rj.vsub(trimeshBody.position, r.rj);
-
-                // Store result
-                this.result.push(r);
-                this.createFrictionEquationsFromContact(r, this.frictionResult);
-            }
-        }
-    }
-
-    // Check all edges
-    for(var i=0; i<triangles.length; i++){
-        for (var j = 0; j < 3; j++) {
-
-            trimeshShape.getVertex(trimeshShape.indices[triangles[i] * 3 + j], edgeVertexA);
-            trimeshShape.getVertex(trimeshShape.indices[triangles[i] * 3 + ((j+1)%3)], edgeVertexB);
-            edgeVertexB.vsub(edgeVertexA, edgeVector);
-
-            // Project sphere position to the edge
-            localSpherePos.vsub(edgeVertexB, tmp);
-            var positionAlongEdgeB = tmp.dot(edgeVector);
-
-            localSpherePos.vsub(edgeVertexA, tmp);
-            var positionAlongEdgeA = tmp.dot(edgeVector);
-
-            if(positionAlongEdgeA > 0 && positionAlongEdgeB < 0){
-
-                // Now check the orthogonal distance from edge to sphere center
-                localSpherePos.vsub(edgeVertexA, tmp);
-
-                edgeVectorUnit.copy(edgeVector);
-                edgeVectorUnit.normalize();
-                positionAlongEdgeA = tmp.dot(edgeVectorUnit);
-
-                edgeVectorUnit.scale(positionAlongEdgeA, tmp);
-                tmp.vadd(edgeVertexA, tmp);
-
-                // tmp is now the sphere center position projected to the edge, defined locally in the trimesh frame
-                var dist = tmp.distanceTo(localSpherePos);
-                if(dist < sphereShape.radius){
-                    var r = this.createContactEquation(sphereBody, trimeshBody, sphereShape, trimeshShape);
-
-                    tmp.vsub(localSpherePos, r.ni);
-                    r.ni.normalize();
-                    r.ni.scale(sphereShape.radius, r.ri);
-
-                    Transform.pointToWorldFrame(trimeshPos, trimeshQuat, tmp, tmp);
-                    tmp.vsub(trimeshBody.position, r.rj);
-
-                    Transform.vectorToWorldFrame(trimeshQuat, r.ni, r.ni);
-                    Transform.vectorToWorldFrame(trimeshQuat, r.ri, r.ri);
-
-                    this.result.push(r);
-                    this.createFrictionEquationsFromContact(r, this.frictionResult);
-                }
-            }
-        }
-    }
-
-    // Triangle faces
-    var va = sphereTrimesh_va;
-    var vb = sphereTrimesh_vb;
-    var vc = sphereTrimesh_vc;
-    var normal = sphereTrimesh_normal;
-    for(var i=0, N = triangles.length; i !== N; i++){
-        trimeshShape.getTriangleVertices(triangles[i], va, vb, vc);
-        trimeshShape.getNormal(triangles[i], normal);
-        localSpherePos.vsub(va, tmp);
-        var dist = tmp.dot(normal);
-        normal.scale(dist, tmp);
-        localSpherePos.vsub(tmp, tmp);
-
-        // tmp is now the sphere position projected to the triangle plane
-        dist = tmp.distanceTo(localSpherePos);
-        if(Ray.pointInTriangle(tmp, va, vb, vc) && dist < sphereShape.radius){
-            var r = this.createContactEquation(sphereBody, trimeshBody, sphereShape, trimeshShape);
-
-            tmp.vsub(localSpherePos, r.ni);
-            r.ni.normalize();
-            r.ni.scale(sphereShape.radius, r.ri);
-
-            Transform.pointToWorldFrame(trimeshPos, trimeshQuat, tmp, tmp);
-            tmp.vsub(trimeshBody.position, r.rj);
-
-            Transform.vectorToWorldFrame(trimeshQuat, r.ni, r.ni);
-            Transform.vectorToWorldFrame(trimeshQuat, r.ri, r.ri);
-
-            this.result.push(r);
-            this.createFrictionEquationsFromContact(r, this.frictionResult);
-        }
-    }
-
-    triangles.length = 0;
-};
-
-var point_on_plane_to_sphere = new Vec3();
-var plane_to_sphere_ortho = new Vec3();
-
-/**
- * @method spherePlane
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-Narrowphase.prototype[Shape.types.SPHERE | Shape.types.PLANE] =
-Narrowphase.prototype.spherePlane = function(si,sj,xi,xj,qi,qj,bi,bj){
-    // We will have one contact in this case
-    var r = this.createContactEquation(bi,bj,si,sj);
-
-    // Contact normal
-    r.ni.set(0,0,1);
-    qj.vmult(r.ni, r.ni);
-    r.ni.negate(r.ni); // body i is the sphere, flip normal
-    r.ni.normalize(); // Needed?
-
-    // Vector from sphere center to contact point
-    r.ni.mult(si.radius, r.ri);
-
-    // Project down sphere on plane
-    xi.vsub(xj, point_on_plane_to_sphere);
-    r.ni.mult(r.ni.dot(point_on_plane_to_sphere), plane_to_sphere_ortho);
-    point_on_plane_to_sphere.vsub(plane_to_sphere_ortho,r.rj); // The sphere position projected to plane
-
-    if(-point_on_plane_to_sphere.dot(r.ni) <= si.radius){
-
-        // Make it relative to the body
-        var ri = r.ri;
-        var rj = r.rj;
-        ri.vadd(xi, ri);
-        ri.vsub(bi.position, ri);
-        rj.vadd(xj, rj);
-        rj.vsub(bj.position, rj);
-
-        this.result.push(r);
-        this.createFrictionEquationsFromContact(r, this.frictionResult);
-    }
-};
-
-// See http://bulletphysics.com/Bullet/BulletFull/SphereTriangleDetector_8cpp_source.html
-var pointInPolygon_edge = new Vec3();
-var pointInPolygon_edge_x_normal = new Vec3();
-var pointInPolygon_vtp = new Vec3();
-function pointInPolygon(verts, normal, p){
-    var positiveResult = null;
-    var N = verts.length;
-    for(var i=0; i!==N; i++){
-        var v = verts[i];
-
-        // Get edge to the next vertex
-        var edge = pointInPolygon_edge;
-        verts[(i+1) % (N)].vsub(v,edge);
-
-        // Get cross product between polygon normal and the edge
-        var edge_x_normal = pointInPolygon_edge_x_normal;
-        //var edge_x_normal = new Vec3();
-        edge.cross(normal,edge_x_normal);
-
-        // Get vector between point and current vertex
-        var vertex_to_p = pointInPolygon_vtp;
-        p.vsub(v,vertex_to_p);
-
-        // This dot product determines which side of the edge the point is
-        var r = edge_x_normal.dot(vertex_to_p);
-
-        // If all such dot products have same sign, we are inside the polygon.
-        if(positiveResult===null || (r>0 && positiveResult===true) || (r<=0 && positiveResult===false)){
-            if(positiveResult===null){
-                positiveResult = r>0;
-            }
-            continue;
-        } else {
-            return false; // Encountered some other sign. Exit.
-        }
-    }
-
-    // If we got here, all dot products were of the same sign.
-    return true;
-}
-
-var box_to_sphere = new Vec3();
-var sphereBox_ns = new Vec3();
-var sphereBox_ns1 = new Vec3();
-var sphereBox_ns2 = new Vec3();
-var sphereBox_sides = [new Vec3(),new Vec3(),new Vec3(),new Vec3(),new Vec3(),new Vec3()];
-var sphereBox_sphere_to_corner = new Vec3();
-var sphereBox_side_ns = new Vec3();
-var sphereBox_side_ns1 = new Vec3();
-var sphereBox_side_ns2 = new Vec3();
-
-/**
- * @method sphereBox
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-Narrowphase.prototype[Shape.types.SPHERE | Shape.types.BOX] =
-Narrowphase.prototype.sphereBox = function(si,sj,xi,xj,qi,qj,bi,bj){
-    var v3pool = this.v3pool;
-
-    // we refer to the box as body j
-    var sides = sphereBox_sides;
-    xi.vsub(xj,box_to_sphere);
-    sj.getSideNormals(sides,qj);
-    var R =     si.radius;
-    var penetrating_sides = [];
-
-    // Check side (plane) intersections
-    var found = false;
-
-    // Store the resulting side penetration info
-    var side_ns = sphereBox_side_ns;
-    var side_ns1 = sphereBox_side_ns1;
-    var side_ns2 = sphereBox_side_ns2;
-    var side_h = null;
-    var side_penetrations = 0;
-    var side_dot1 = 0;
-    var side_dot2 = 0;
-    var side_distance = null;
-    for(var idx=0,nsides=sides.length; idx!==nsides && found===false; idx++){
-        // Get the plane side normal (ns)
-        var ns = sphereBox_ns;
-        ns.copy(sides[idx]);
-
-        var h = ns.norm();
-        ns.normalize();
-
-        // The normal/distance dot product tells which side of the plane we are
-        var dot = box_to_sphere.dot(ns);
-
-        if(dot<h+R && dot>0){
-            // Intersects plane. Now check the other two dimensions
-            var ns1 = sphereBox_ns1;
-            var ns2 = sphereBox_ns2;
-            ns1.copy(sides[(idx+1)%3]);
-            ns2.copy(sides[(idx+2)%3]);
-            var h1 = ns1.norm();
-            var h2 = ns2.norm();
-            ns1.normalize();
-            ns2.normalize();
-            var dot1 = box_to_sphere.dot(ns1);
-            var dot2 = box_to_sphere.dot(ns2);
-            if(dot1<h1 && dot1>-h1 && dot2<h2 && dot2>-h2){
-                var dist = Math.abs(dot-h-R);
-                if(side_distance===null || dist < side_distance){
-                    side_distance = dist;
-                    side_dot1 = dot1;
-                    side_dot2 = dot2;
-                    side_h = h;
-                    side_ns.copy(ns);
-                    side_ns1.copy(ns1);
-                    side_ns2.copy(ns2);
-                    side_penetrations++;
-                }
-            }
-        }
-    }
-    if(side_penetrations){
-        found = true;
-        var r = this.createContactEquation(bi,bj,si,sj);
-        side_ns.mult(-R,r.ri); // Sphere r
-        r.ni.copy(side_ns);
-        r.ni.negate(r.ni); // Normal should be out of sphere
-        side_ns.mult(side_h,side_ns);
-        side_ns1.mult(side_dot1,side_ns1);
-        side_ns.vadd(side_ns1,side_ns);
-        side_ns2.mult(side_dot2,side_ns2);
-        side_ns.vadd(side_ns2,r.rj);
-
-        // Make relative to bodies
-        r.ri.vadd(xi, r.ri);
-        r.ri.vsub(bi.position, r.ri);
-        r.rj.vadd(xj, r.rj);
-        r.rj.vsub(bj.position, r.rj);
-
-        this.result.push(r);
-        this.createFrictionEquationsFromContact(r, this.frictionResult);
-    }
-
-    // Check corners
-    var rj = v3pool.get();
-    var sphere_to_corner = sphereBox_sphere_to_corner;
-    for(var j=0; j!==2 && !found; j++){
-        for(var k=0; k!==2 && !found; k++){
-            for(var l=0; l!==2 && !found; l++){
-                rj.set(0,0,0);
-                if(j){
-                    rj.vadd(sides[0],rj);
-                } else {
-                    rj.vsub(sides[0],rj);
-                }
-                if(k){
-                    rj.vadd(sides[1],rj);
-                } else {
-                    rj.vsub(sides[1],rj);
-                }
-                if(l){
-                    rj.vadd(sides[2],rj);
-                } else {
-                    rj.vsub(sides[2],rj);
-                }
-
-                // World position of corner
-                xj.vadd(rj,sphere_to_corner);
-                sphere_to_corner.vsub(xi,sphere_to_corner);
-
-                if(sphere_to_corner.norm2() < R*R){
-                    found = true;
-                    var r = this.createContactEquation(bi,bj,si,sj);
-                    r.ri.copy(sphere_to_corner);
-                    r.ri.normalize();
-                    r.ni.copy(r.ri);
-                    r.ri.mult(R,r.ri);
-                    r.rj.copy(rj);
-
-                    // Make relative to bodies
-                    r.ri.vadd(xi, r.ri);
-                    r.ri.vsub(bi.position, r.ri);
-                    r.rj.vadd(xj, r.rj);
-                    r.rj.vsub(bj.position, r.rj);
-
-                    this.result.push(r);
-                    this.createFrictionEquationsFromContact(r, this.frictionResult);
-                }
-            }
-        }
-    }
-    v3pool.release(rj);
-    rj = null;
-
-    // Check edges
-    var edgeTangent = v3pool.get();
-    var edgeCenter = v3pool.get();
-    var r = v3pool.get(); // r = edge center to sphere center
-    var orthogonal = v3pool.get();
-    var dist = v3pool.get();
-    var Nsides = sides.length;
-    for(var j=0; j!==Nsides && !found; j++){
-        for(var k=0; k!==Nsides && !found; k++){
-            if(j%3 !== k%3){
-                // Get edge tangent
-                sides[k].cross(sides[j],edgeTangent);
-                edgeTangent.normalize();
-                sides[j].vadd(sides[k], edgeCenter);
-                r.copy(xi);
-                r.vsub(edgeCenter,r);
-                r.vsub(xj,r);
-                var orthonorm = r.dot(edgeTangent); // distance from edge center to sphere center in the tangent direction
-                edgeTangent.mult(orthonorm,orthogonal); // Vector from edge center to sphere center in the tangent direction
-
-                // Find the third side orthogonal to this one
-                var l = 0;
-                while(l===j%3 || l===k%3){
-                    l++;
-                }
-
-                // vec from edge center to sphere projected to the plane orthogonal to the edge tangent
-                dist.copy(xi);
-                dist.vsub(orthogonal,dist);
-                dist.vsub(edgeCenter,dist);
-                dist.vsub(xj,dist);
-
-                // Distances in tangent direction and distance in the plane orthogonal to it
-                var tdist = Math.abs(orthonorm);
-                var ndist = dist.norm();
-
-                if(tdist < sides[l].norm() && ndist<R){
-                    found = true;
-                    var res = this.createContactEquation(bi,bj,si,sj);
-                    edgeCenter.vadd(orthogonal,res.rj); // box rj
-                    res.rj.copy(res.rj);
-                    dist.negate(res.ni);
-                    res.ni.normalize();
-
-                    res.ri.copy(res.rj);
-                    res.ri.vadd(xj,res.ri);
-                    res.ri.vsub(xi,res.ri);
-                    res.ri.normalize();
-                    res.ri.mult(R,res.ri);
-
-                    // Make relative to bodies
-                    res.ri.vadd(xi, res.ri);
-                    res.ri.vsub(bi.position, res.ri);
-                    res.rj.vadd(xj, res.rj);
-                    res.rj.vsub(bj.position, res.rj);
-
-                    this.result.push(res);
-                    this.createFrictionEquationsFromContact(res, this.frictionResult);
-                }
-            }
-        }
-    }
-    v3pool.release(edgeTangent,edgeCenter,r,orthogonal,dist);
-};
-
-var convex_to_sphere = new Vec3();
-var sphereConvex_edge = new Vec3();
-var sphereConvex_edgeUnit = new Vec3();
-var sphereConvex_sphereToCorner = new Vec3();
-var sphereConvex_worldCorner = new Vec3();
-var sphereConvex_worldNormal = new Vec3();
-var sphereConvex_worldPoint = new Vec3();
-var sphereConvex_worldSpherePointClosestToPlane = new Vec3();
-var sphereConvex_penetrationVec = new Vec3();
-var sphereConvex_sphereToWorldPoint = new Vec3();
-
-/**
- * @method sphereConvex
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-Narrowphase.prototype[Shape.types.SPHERE | Shape.types.CONVEXPOLYHEDRON] =
-Narrowphase.prototype.sphereConvex = function(si,sj,xi,xj,qi,qj,bi,bj){
-    var v3pool = this.v3pool;
-    xi.vsub(xj,convex_to_sphere);
-    var normals = sj.faceNormals;
-    var faces = sj.faces;
-    var verts = sj.vertices;
-    var R =     si.radius;
-    var penetrating_sides = [];
-
-    // if(convex_to_sphere.norm2() > si.boundingSphereRadius + sj.boundingSphereRadius){
-    //     return;
-    // }
-
-    // Check corners
-    for(var i=0; i!==verts.length; i++){
-        var v = verts[i];
-
-        // World position of corner
-        var worldCorner = sphereConvex_worldCorner;
-        qj.vmult(v,worldCorner);
-        xj.vadd(worldCorner,worldCorner);
-        var sphere_to_corner = sphereConvex_sphereToCorner;
-        worldCorner.vsub(xi, sphere_to_corner);
-        if(sphere_to_corner.norm2() < R * R){
-            found = true;
-            var r = this.createContactEquation(bi,bj,si,sj);
-            r.ri.copy(sphere_to_corner);
-            r.ri.normalize();
-            r.ni.copy(r.ri);
-            r.ri.mult(R,r.ri);
-            worldCorner.vsub(xj,r.rj);
-
-            // Should be relative to the body.
-            r.ri.vadd(xi, r.ri);
-            r.ri.vsub(bi.position, r.ri);
-
-            // Should be relative to the body.
-            r.rj.vadd(xj, r.rj);
-            r.rj.vsub(bj.position, r.rj);
-
-            this.result.push(r);
-            this.createFrictionEquationsFromContact(r, this.frictionResult);
-            return;
-        }
-    }
-
-    // Check side (plane) intersections
-    var found = false;
-    for(var i=0, nfaces=faces.length; i!==nfaces && found===false; i++){
-        var normal = normals[i];
-        var face = faces[i];
-
-        // Get world-transformed normal of the face
-        var worldNormal = sphereConvex_worldNormal;
-        qj.vmult(normal,worldNormal);
-
-        // Get a world vertex from the face
-        var worldPoint = sphereConvex_worldPoint;
-        qj.vmult(verts[face[0]],worldPoint);
-        worldPoint.vadd(xj,worldPoint);
-
-        // Get a point on the sphere, closest to the face normal
-        var worldSpherePointClosestToPlane = sphereConvex_worldSpherePointClosestToPlane;
-        worldNormal.mult(-R, worldSpherePointClosestToPlane);
-        xi.vadd(worldSpherePointClosestToPlane, worldSpherePointClosestToPlane);
-
-        // Vector from a face point to the closest point on the sphere
-        var penetrationVec = sphereConvex_penetrationVec;
-        worldSpherePointClosestToPlane.vsub(worldPoint,penetrationVec);
-
-        // The penetration. Negative value means overlap.
-        var penetration = penetrationVec.dot(worldNormal);
-
-        var worldPointToSphere = sphereConvex_sphereToWorldPoint;
-        xi.vsub(worldPoint, worldPointToSphere);
-
-        if(penetration < 0 && worldPointToSphere.dot(worldNormal)>0){
-            // Intersects plane. Now check if the sphere is inside the face polygon
-            var faceVerts = []; // Face vertices, in world coords
-            for(var j=0, Nverts=face.length; j!==Nverts; j++){
-                var worldVertex = v3pool.get();
-                qj.vmult(verts[face[j]], worldVertex);
-                xj.vadd(worldVertex,worldVertex);
-                faceVerts.push(worldVertex);
-            }
-
-            if(pointInPolygon(faceVerts,worldNormal,xi)){ // Is the sphere center in the face polygon?
-                found = true;
-                var r = this.createContactEquation(bi,bj,si,sj);
-
-                worldNormal.mult(-R, r.ri); // Contact offset, from sphere center to contact
-                worldNormal.negate(r.ni); // Normal pointing out of sphere
-
-                var penetrationVec2 = v3pool.get();
-                worldNormal.mult(-penetration, penetrationVec2);
-                var penetrationSpherePoint = v3pool.get();
-                worldNormal.mult(-R, penetrationSpherePoint);
-
-                //xi.vsub(xj).vadd(penetrationSpherePoint).vadd(penetrationVec2 , r.rj);
-                xi.vsub(xj,r.rj);
-                r.rj.vadd(penetrationSpherePoint,r.rj);
-                r.rj.vadd(penetrationVec2 , r.rj);
-
-                // Should be relative to the body.
-                r.rj.vadd(xj, r.rj);
-                r.rj.vsub(bj.position, r.rj);
-
-                // Should be relative to the body.
-                r.ri.vadd(xi, r.ri);
-                r.ri.vsub(bi.position, r.ri);
-
-                v3pool.release(penetrationVec2);
-                v3pool.release(penetrationSpherePoint);
-
-                this.result.push(r);
-                this.createFrictionEquationsFromContact(r, this.frictionResult);
-
-                // Release world vertices
-                for(var j=0, Nfaceverts=faceVerts.length; j!==Nfaceverts; j++){
-                    v3pool.release(faceVerts[j]);
-                }
-
-                return; // We only expect *one* face contact
-            } else {
-                // Edge?
-                for(var j=0; j!==face.length; j++){
-
-                    // Get two world transformed vertices
-                    var v1 = v3pool.get();
-                    var v2 = v3pool.get();
-                    qj.vmult(verts[face[(j+1)%face.length]], v1);
-                    qj.vmult(verts[face[(j+2)%face.length]], v2);
-                    xj.vadd(v1, v1);
-                    xj.vadd(v2, v2);
-
-                    // Construct edge vector
-                    var edge = sphereConvex_edge;
-                    v2.vsub(v1,edge);
-
-                    // Construct the same vector, but normalized
-                    var edgeUnit = sphereConvex_edgeUnit;
-                    edge.unit(edgeUnit);
-
-                    // p is xi projected onto the edge
-                    var p = v3pool.get();
-                    var v1_to_xi = v3pool.get();
-                    xi.vsub(v1, v1_to_xi);
-                    var dot = v1_to_xi.dot(edgeUnit);
-                    edgeUnit.mult(dot, p);
-                    p.vadd(v1, p);
-
-                    // Compute a vector from p to the center of the sphere
-                    var xi_to_p = v3pool.get();
-                    p.vsub(xi, xi_to_p);
-
-                    // Collision if the edge-sphere distance is less than the radius
-                    // AND if p is in between v1 and v2
-                    if(dot > 0 && dot*dot<edge.norm2() && xi_to_p.norm2() < R*R){ // Collision if the edge-sphere distance is less than the radius
-                        // Edge contact!
-                        var r = this.createContactEquation(bi,bj,si,sj);
-                        p.vsub(xj,r.rj);
-
-                        p.vsub(xi,r.ni);
-                        r.ni.normalize();
-
-                        r.ni.mult(R,r.ri);
-
-                        // Should be relative to the body.
-                        r.rj.vadd(xj, r.rj);
-                        r.rj.vsub(bj.position, r.rj);
-
-                        // Should be relative to the body.
-                        r.ri.vadd(xi, r.ri);
-                        r.ri.vsub(bi.position, r.ri);
-
-                        this.result.push(r);
-                        this.createFrictionEquationsFromContact(r, this.frictionResult);
-
-                        // Release world vertices
-                        for(var j=0, Nfaceverts=faceVerts.length; j!==Nfaceverts; j++){
-                            v3pool.release(faceVerts[j]);
-                        }
-
-                        v3pool.release(v1);
-                        v3pool.release(v2);
-                        v3pool.release(p);
-                        v3pool.release(xi_to_p);
-                        v3pool.release(v1_to_xi);
-
-                        return;
-                    }
-
-                    v3pool.release(v1);
-                    v3pool.release(v2);
-                    v3pool.release(p);
-                    v3pool.release(xi_to_p);
-                    v3pool.release(v1_to_xi);
-                }
-            }
-
-            // Release world vertices
-            for(var j=0, Nfaceverts=faceVerts.length; j!==Nfaceverts; j++){
-                v3pool.release(faceVerts[j]);
-            }
-        }
-    }
-};
-
-var planeBox_normal = new Vec3();
-var plane_to_corner = new Vec3();
-
-/**
- * @method planeBox
- * @param  {Array}      result
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-Narrowphase.prototype[Shape.types.PLANE | Shape.types.BOX] =
-Narrowphase.prototype.planeBox = function(si,sj,xi,xj,qi,qj,bi,bj){
-    sj.convexPolyhedronRepresentation.material = sj.material;
-    sj.convexPolyhedronRepresentation.collisionResponse = sj.collisionResponse;
-    this.planeConvex(si,sj.convexPolyhedronRepresentation,xi,xj,qi,qj,bi,bj);
-};
-
-var planeConvex_v = new Vec3();
-var planeConvex_normal = new Vec3();
-var planeConvex_relpos = new Vec3();
-var planeConvex_projected = new Vec3();
-
-/**
- * @method planeConvex
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-Narrowphase.prototype[Shape.types.PLANE | Shape.types.CONVEXPOLYHEDRON] =
-Narrowphase.prototype.planeConvex = function(
-    planeShape,
-    convexShape,
-    planePosition,
-    convexPosition,
-    planeQuat,
-    convexQuat,
-    planeBody,
-    convexBody
-){
-    // Simply return the points behind the plane.
-    var worldVertex = planeConvex_v,
-        worldNormal = planeConvex_normal;
-    worldNormal.set(0,0,1);
-    planeQuat.vmult(worldNormal,worldNormal); // Turn normal according to plane orientation
-
-    var numContacts = 0;
-    var relpos = planeConvex_relpos;
-    for(var i = 0; i !== convexShape.vertices.length; i++){
-
-        // Get world convex vertex
-        worldVertex.copy(convexShape.vertices[i]);
-        convexQuat.vmult(worldVertex, worldVertex);
-        convexPosition.vadd(worldVertex, worldVertex);
-        worldVertex.vsub(planePosition, relpos);
-
-        var dot = worldNormal.dot(relpos);
-        if(dot <= 0.0){
-
-            var r = this.createContactEquation(planeBody, convexBody, planeShape, convexShape);
-
-            // Get vertex position projected on plane
-            var projected = planeConvex_projected;
-            worldNormal.mult(worldNormal.dot(relpos),projected);
-            worldVertex.vsub(projected, projected);
-            projected.vsub(planePosition, r.ri); // From plane to vertex projected on plane
-
-            r.ni.copy(worldNormal); // Contact normal is the plane normal out from plane
-
-            // rj is now just the vector from the convex center to the vertex
-            worldVertex.vsub(convexPosition, r.rj);
-
-            // Make it relative to the body
-            r.ri.vadd(planePosition, r.ri);
-            r.ri.vsub(planeBody.position, r.ri);
-            r.rj.vadd(convexPosition, r.rj);
-            r.rj.vsub(convexBody.position, r.rj);
-
-            this.result.push(r);
-            numContacts++;
-            if(!this.enableFrictionReduction){
-                this.createFrictionEquationsFromContact(r, this.frictionResult);
-            }
-        }
-    }
-
-    if(this.enableFrictionReduction && numContacts){
-        this.createFrictionFromAverage(numContacts);
-    }
-};
-
-var convexConvex_sepAxis = new Vec3();
-var convexConvex_q = new Vec3();
-
-/**
- * @method convexConvex
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-Narrowphase.prototype[Shape.types.CONVEXPOLYHEDRON] =
-Narrowphase.prototype.convexConvex = function(si,sj,xi,xj,qi,qj,bi,bj,rsi,rsj,faceListA,faceListB){
-    var sepAxis = convexConvex_sepAxis;
-
-    if(xi.distanceTo(xj) > si.boundingSphereRadius + sj.boundingSphereRadius){
-        return;
-    }
-
-    if(si.findSeparatingAxis(sj,xi,qi,xj,qj,sepAxis,faceListA,faceListB)){
-        var res = [];
-        var q = convexConvex_q;
-        si.clipAgainstHull(xi,qi,sj,xj,qj,sepAxis,-100,100,res);
-        var numContacts = 0;
-        for(var j = 0; j !== res.length; j++){
-            var r = this.createContactEquation(bi,bj,si,sj,rsi,rsj),
-                ri = r.ri,
-                rj = r.rj;
-            sepAxis.negate(r.ni);
-            res[j].normal.negate(q);
-            q.mult(res[j].depth, q);
-            res[j].point.vadd(q, ri);
-            rj.copy(res[j].point);
-
-            // Contact points are in world coordinates. Transform back to relative
-            ri.vsub(xi,ri);
-            rj.vsub(xj,rj);
-
-            // Make relative to bodies
-            ri.vadd(xi, ri);
-            ri.vsub(bi.position, ri);
-            rj.vadd(xj, rj);
-            rj.vsub(bj.position, rj);
-
-            this.result.push(r);
-            numContacts++;
-            if(!this.enableFrictionReduction){
-                this.createFrictionEquationsFromContact(r, this.frictionResult);
-            }
-        }
-        if(this.enableFrictionReduction && numContacts){
-            this.createFrictionFromAverage(numContacts);
-        }
-    }
-};
-
-
-/**
- * @method convexTrimesh
- * @param  {Array}      result
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-// Narrowphase.prototype[Shape.types.CONVEXPOLYHEDRON | Shape.types.TRIMESH] =
-// Narrowphase.prototype.convexTrimesh = function(si,sj,xi,xj,qi,qj,bi,bj,rsi,rsj,faceListA,faceListB){
-//     var sepAxis = convexConvex_sepAxis;
-
-//     if(xi.distanceTo(xj) > si.boundingSphereRadius + sj.boundingSphereRadius){
-//         return;
-//     }
-
-//     // Construct a temp hull for each triangle
-//     var hullB = new ConvexPolyhedron();
-
-//     hullB.faces = [[0,1,2]];
-//     var va = new Vec3();
-//     var vb = new Vec3();
-//     var vc = new Vec3();
-//     hullB.vertices = [
-//         va,
-//         vb,
-//         vc
-//     ];
-
-//     for (var i = 0; i < sj.indices.length / 3; i++) {
-
-//         var triangleNormal = new Vec3();
-//         sj.getNormal(i, triangleNormal);
-//         hullB.faceNormals = [triangleNormal];
-
-//         sj.getTriangleVertices(i, va, vb, vc);
-
-//         var d = si.testSepAxis(triangleNormal, hullB, xi, qi, xj, qj);
-//         if(!d){
-//             triangleNormal.scale(-1, triangleNormal);
-//             d = si.testSepAxis(triangleNormal, hullB, xi, qi, xj, qj);
-
-//             if(!d){
-//                 continue;
-//             }
-//         }
-
-//         var res = [];
-//         var q = convexConvex_q;
-//         si.clipAgainstHull(xi,qi,hullB,xj,qj,triangleNormal,-100,100,res);
-//         for(var j = 0; j !== res.length; j++){
-//             var r = this.createContactEquation(bi,bj,si,sj,rsi,rsj),
-//                 ri = r.ri,
-//                 rj = r.rj;
-//             r.ni.copy(triangleNormal);
-//             r.ni.negate(r.ni);
-//             res[j].normal.negate(q);
-//             q.mult(res[j].depth, q);
-//             res[j].point.vadd(q, ri);
-//             rj.copy(res[j].point);
-
-//             // Contact points are in world coordinates. Transform back to relative
-//             ri.vsub(xi,ri);
-//             rj.vsub(xj,rj);
-
-//             // Make relative to bodies
-//             ri.vadd(xi, ri);
-//             ri.vsub(bi.position, ri);
-//             rj.vadd(xj, rj);
-//             rj.vsub(bj.position, rj);
-
-//             result.push(r);
-//         }
-//     }
-// };
-
-var particlePlane_normal = new Vec3();
-var particlePlane_relpos = new Vec3();
-var particlePlane_projected = new Vec3();
-
-/**
- * @method particlePlane
- * @param  {Array}      result
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-Narrowphase.prototype[Shape.types.PLANE | Shape.types.PARTICLE] =
-Narrowphase.prototype.planeParticle = function(sj,si,xj,xi,qj,qi,bj,bi){
-    var normal = particlePlane_normal;
-    normal.set(0,0,1);
-    bj.quaternion.vmult(normal,normal); // Turn normal according to plane orientation
-    var relpos = particlePlane_relpos;
-    xi.vsub(bj.position,relpos);
-    var dot = normal.dot(relpos);
-    if(dot <= 0.0){
-        var r = this.createContactEquation(bi,bj,si,sj);
-        r.ni.copy(normal); // Contact normal is the plane normal
-        r.ni.negate(r.ni);
-        r.ri.set(0,0,0); // Center of particle
-
-        // Get particle position projected on plane
-        var projected = particlePlane_projected;
-        normal.mult(normal.dot(xi),projected);
-        xi.vsub(projected,projected);
-        //projected.vadd(bj.position,projected);
-
-        // rj is now the projected world position minus plane position
-        r.rj.copy(projected);
-        this.result.push(r);
-        this.createFrictionEquationsFromContact(r, this.frictionResult);
-    }
-};
-
-var particleSphere_normal = new Vec3();
-
-/**
- * @method particleSphere
- * @param  {Array}      result
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-Narrowphase.prototype[Shape.types.PARTICLE | Shape.types.SPHERE] =
-Narrowphase.prototype.sphereParticle = function(sj,si,xj,xi,qj,qi,bj,bi){
-    // The normal is the unit vector from sphere center to particle center
-    var normal = particleSphere_normal;
-    normal.set(0,0,1);
-    xi.vsub(xj,normal);
-    var lengthSquared = normal.norm2();
-
-    if(lengthSquared <= sj.radius * sj.radius){
-        var r = this.createContactEquation(bi,bj,si,sj);
-        normal.normalize();
-        r.rj.copy(normal);
-        r.rj.mult(sj.radius,r.rj);
-        r.ni.copy(normal); // Contact normal
-        r.ni.negate(r.ni);
-        r.ri.set(0,0,0); // Center of particle
-        this.result.push(r);
-        this.createFrictionEquationsFromContact(r, this.frictionResult);
-    }
-};
-
-// WIP
-var cqj = new Quaternion();
-var convexParticle_local = new Vec3();
-var convexParticle_normal = new Vec3();
-var convexParticle_penetratedFaceNormal = new Vec3();
-var convexParticle_vertexToParticle = new Vec3();
-var convexParticle_worldPenetrationVec = new Vec3();
-
-/**
- * @method convexParticle
- * @param  {Array}      result
- * @param  {Shape}      si
- * @param  {Shape}      sj
- * @param  {Vec3}       xi
- * @param  {Vec3}       xj
- * @param  {Quaternion} qi
- * @param  {Quaternion} qj
- * @param  {Body}       bi
- * @param  {Body}       bj
- */
-Narrowphase.prototype[Shape.types.PARTICLE | Shape.types.CONVEXPOLYHEDRON] =
-Narrowphase.prototype.convexParticle = function(sj,si,xj,xi,qj,qi,bj,bi){
-    var penetratedFaceIndex = -1;
-    var penetratedFaceNormal = convexParticle_penetratedFaceNormal;
-    var worldPenetrationVec = convexParticle_worldPenetrationVec;
-    var minPenetration = null;
-    var numDetectedFaces = 0;
-
-    // Convert particle position xi to local coords in the convex
-    var local = convexParticle_local;
-    local.copy(xi);
-    local.vsub(xj,local); // Convert position to relative the convex origin
-    qj.conjugate(cqj);
-    cqj.vmult(local,local);
-
-    if(sj.pointIsInside(local)){
-
-        if(sj.worldVerticesNeedsUpdate){
-            sj.computeWorldVertices(xj,qj);
-        }
-        if(sj.worldFaceNormalsNeedsUpdate){
-            sj.computeWorldFaceNormals(qj);
-        }
-
-        // For each world polygon in the polyhedra
-        for(var i=0,nfaces=sj.faces.length; i!==nfaces; i++){
-
-            // Construct world face vertices
-            var verts = [ sj.worldVertices[ sj.faces[i][0] ] ];
-            var normal = sj.worldFaceNormals[i];
-
-            // Check how much the particle penetrates the polygon plane.
-            xi.vsub(verts[0],convexParticle_vertexToParticle);
-            var penetration = -normal.dot(convexParticle_vertexToParticle);
-            if(minPenetration===null || Math.abs(penetration)<Math.abs(minPenetration)){
-                minPenetration = penetration;
-                penetratedFaceIndex = i;
-                penetratedFaceNormal.copy(normal);
-                numDetectedFaces++;
-            }
-        }
-
-        if(penetratedFaceIndex!==-1){
-            // Setup contact
-            var r = this.createContactEquation(bi,bj,si,sj);
-            penetratedFaceNormal.mult(minPenetration, worldPenetrationVec);
-
-            // rj is the particle position projected to the face
-            worldPenetrationVec.vadd(xi,worldPenetrationVec);
-            worldPenetrationVec.vsub(xj,worldPenetrationVec);
-            r.rj.copy(worldPenetrationVec);
-            //var projectedToFace = xi.vsub(xj).vadd(worldPenetrationVec);
-            //projectedToFace.copy(r.rj);
-
-            //qj.vmult(r.rj,r.rj);
-            penetratedFaceNormal.negate( r.ni ); // Contact normal
-            r.ri.set(0,0,0); // Center of particle
-
-            var ri = r.ri,
-                rj = r.rj;
-
-            // Make relative to bodies
-            ri.vadd(xi, ri);
-            ri.vsub(bi.position, ri);
-            rj.vadd(xj, rj);
-            rj.vsub(bj.position, rj);
-
-            this.result.push(r);
-            this.createFrictionEquationsFromContact(r, this.frictionResult);
-        } else {
-            console.warn("Point found inside convex, but did not find penetrating face!");
-        }
-    }
-};
-
-Narrowphase.prototype[Shape.types.BOX | Shape.types.HEIGHTFIELD] =
-Narrowphase.prototype.boxHeightfield = function (si,sj,xi,xj,qi,qj,bi,bj){
-    si.convexPolyhedronRepresentation.material = si.material;
-    si.convexPolyhedronRepresentation.collisionResponse = si.collisionResponse;
-    this.convexHeightfield(si.convexPolyhedronRepresentation,sj,xi,xj,qi,qj,bi,bj);
-};
-
-var convexHeightfield_tmp1 = new Vec3();
-var convexHeightfield_tmp2 = new Vec3();
-var convexHeightfield_faceList = [0];
-
-/**
- * @method convexHeightfield
- */
-Narrowphase.prototype[Shape.types.CONVEXPOLYHEDRON | Shape.types.HEIGHTFIELD] =
-Narrowphase.prototype.convexHeightfield = function (
-    convexShape,
-    hfShape,
-    convexPos,
-    hfPos,
-    convexQuat,
-    hfQuat,
-    convexBody,
-    hfBody
-){
-    var data = hfShape.data,
-        w = hfShape.elementSize,
-        radius = convexShape.boundingSphereRadius,
-        worldPillarOffset = convexHeightfield_tmp2,
-        faceList = convexHeightfield_faceList;
-
-    // Get sphere position to heightfield local!
-    var localConvexPos = convexHeightfield_tmp1;
-    Transform.pointToLocalFrame(hfPos, hfQuat, convexPos, localConvexPos);
-
-    // Get the index of the data points to test against
-    var iMinX = Math.floor((localConvexPos.x - radius) / w) - 1,
-        iMaxX = Math.ceil((localConvexPos.x + radius) / w) + 1,
-        iMinY = Math.floor((localConvexPos.y - radius) / w) - 1,
-        iMaxY = Math.ceil((localConvexPos.y + radius) / w) + 1;
-
-    // Bail out if we are out of the terrain
-    if(iMaxX < 0 || iMaxY < 0 || iMinX > data.length || iMinY > data[0].length){
-        return;
-    }
-
-    // Clamp index to edges
-    if(iMinX < 0){ iMinX = 0; }
-    if(iMaxX < 0){ iMaxX = 0; }
-    if(iMinY < 0){ iMinY = 0; }
-    if(iMaxY < 0){ iMaxY = 0; }
-    if(iMinX >= data.length){ iMinX = data.length - 1; }
-    if(iMaxX >= data.length){ iMaxX = data.length - 1; }
-    if(iMaxY >= data[0].length){ iMaxY = data[0].length - 1; }
-    if(iMinY >= data[0].length){ iMinY = data[0].length - 1; }
-
-    var minMax = [];
-    hfShape.getRectMinMax(iMinX, iMinY, iMaxX, iMaxY, minMax);
-    var min = minMax[0];
-    var max = minMax[1];
-
-    // Bail out if we're cant touch the bounding height box
-    if(localConvexPos.z - radius > max || localConvexPos.z + radius < min){
-        return;
-    }
-
-    for(var i = iMinX; i < iMaxX; i++){
-        for(var j = iMinY; j < iMaxY; j++){
-
-            // Lower triangle
-            hfShape.getConvexTrianglePillar(i, j, false);
-            Transform.pointToWorldFrame(hfPos, hfQuat, hfShape.pillarOffset, worldPillarOffset);
-            if (convexPos.distanceTo(worldPillarOffset) < hfShape.pillarConvex.boundingSphereRadius + convexShape.boundingSphereRadius) {
-                this.convexConvex(convexShape, hfShape.pillarConvex, convexPos, worldPillarOffset, convexQuat, hfQuat, convexBody, hfBody, null, null, faceList, null);
-            }
-
-            // Upper triangle
-            hfShape.getConvexTrianglePillar(i, j, true);
-            Transform.pointToWorldFrame(hfPos, hfQuat, hfShape.pillarOffset, worldPillarOffset);
-            if (convexPos.distanceTo(worldPillarOffset) < hfShape.pillarConvex.boundingSphereRadius + convexShape.boundingSphereRadius) {
-                this.convexConvex(convexShape, hfShape.pillarConvex, convexPos, worldPillarOffset, convexQuat, hfQuat, convexBody, hfBody, null, null, faceList, null);
-            }
-        }
-    }
-};
-
-var sphereHeightfield_tmp1 = new Vec3();
-var sphereHeightfield_tmp2 = new Vec3();
-
-/**
- * @method sphereHeightfield
- */
-Narrowphase.prototype[Shape.types.SPHERE | Shape.types.HEIGHTFIELD] =
-Narrowphase.prototype.sphereHeightfield = function (
-    sphereShape,
-    hfShape,
-    spherePos,
-    hfPos,
-    sphereQuat,
-    hfQuat,
-    sphereBody,
-    hfBody
-){
-    var data = hfShape.data,
-        radius = sphereShape.radius,
-        w = hfShape.elementSize,
-        worldPillarOffset = sphereHeightfield_tmp2;
-
-    // Get sphere position to heightfield local!
-    var localSpherePos = sphereHeightfield_tmp1;
-    Transform.pointToLocalFrame(hfPos, hfQuat, spherePos, localSpherePos);
-
-    // Get the index of the data points to test against
-    var iMinX = Math.floor((localSpherePos.x - radius) / w) - 1,
-        iMaxX = Math.ceil((localSpherePos.x + radius) / w) + 1,
-        iMinY = Math.floor((localSpherePos.y - radius) / w) - 1,
-        iMaxY = Math.ceil((localSpherePos.y + radius) / w) + 1;
-
-    // Bail out if we are out of the terrain
-    if(iMaxX < 0 || iMaxY < 0 || iMinX > data.length || iMaxY > data[0].length){
-        return;
-    }
-
-    // Clamp index to edges
-    if(iMinX < 0){ iMinX = 0; }
-    if(iMaxX < 0){ iMaxX = 0; }
-    if(iMinY < 0){ iMinY = 0; }
-    if(iMaxY < 0){ iMaxY = 0; }
-    if(iMinX >= data.length){ iMinX = data.length - 1; }
-    if(iMaxX >= data.length){ iMaxX = data.length - 1; }
-    if(iMaxY >= data[0].length){ iMaxY = data[0].length - 1; }
-    if(iMinY >= data[0].length){ iMinY = data[0].length - 1; }
-
-    var minMax = [];
-    hfShape.getRectMinMax(iMinX, iMinY, iMaxX, iMaxY, minMax);
-    var min = minMax[0];
-    var max = minMax[1];
-
-    // Bail out if we're cant touch the bounding height box
-    if(localSpherePos.z - radius > max || localSpherePos.z + radius < min){
-        return;
-    }
-
-    var result = this.result;
-    for(var i = iMinX; i < iMaxX; i++){
-        for(var j = iMinY; j < iMaxY; j++){
-
-            var numContactsBefore = result.length;
-
-            // Lower triangle
-            hfShape.getConvexTrianglePillar(i, j, false);
-            Transform.pointToWorldFrame(hfPos, hfQuat, hfShape.pillarOffset, worldPillarOffset);
-            if (spherePos.distanceTo(worldPillarOffset) < hfShape.pillarConvex.boundingSphereRadius + sphereShape.boundingSphereRadius) {
-                this.sphereConvex(sphereShape, hfShape.pillarConvex, spherePos, worldPillarOffset, sphereQuat, hfQuat, sphereBody, hfBody);
-            }
-
-            // Upper triangle
-            hfShape.getConvexTrianglePillar(i, j, true);
-            Transform.pointToWorldFrame(hfPos, hfQuat, hfShape.pillarOffset, worldPillarOffset);
-            if (spherePos.distanceTo(worldPillarOffset) < hfShape.pillarConvex.boundingSphereRadius + sphereShape.boundingSphereRadius) {
-                this.sphereConvex(sphereShape, hfShape.pillarConvex, spherePos, worldPillarOffset, sphereQuat, hfQuat, sphereBody, hfBody);
-            }
-
-            var numContacts = result.length - numContactsBefore;
-
-            if(numContacts > 2){
-                return;
-            }
-            /*
-            // Skip all but 1
-            for (var k = 0; k < numContacts - 1; k++) {
-                result.pop();
-            }
-            */
-        }
-    }
-};
-
-},{"../collision/AABB":3,"../collision/Ray":9,"../equations/ContactEquation":19,"../equations/FrictionEquation":21,"../math/Quaternion":28,"../math/Transform":29,"../math/Vec3":30,"../shapes/ConvexPolyhedron":38,"../shapes/Shape":43,"../solver/Solver":47,"../utils/Vec3Pool":54}],56:[function(_dereq_,module,exports){
-/* global performance */
-
-module.exports = World;
-
-var Shape = _dereq_('../shapes/Shape');
-var Vec3 = _dereq_('../math/Vec3');
-var Quaternion = _dereq_('../math/Quaternion');
-var GSSolver = _dereq_('../solver/GSSolver');
-var Vec3Pool = _dereq_('../utils/Vec3Pool');
-var ContactEquation = _dereq_('../equations/ContactEquation');
-var FrictionEquation = _dereq_('../equations/FrictionEquation');
-var Narrowphase = _dereq_('./Narrowphase');
-var EventTarget = _dereq_('../utils/EventTarget');
-var ArrayCollisionMatrix = _dereq_('../collision/ArrayCollisionMatrix');
-var Material = _dereq_('../material/Material');
-var ContactMaterial = _dereq_('../material/ContactMaterial');
-var Body = _dereq_('../objects/Body');
-var TupleDictionary = _dereq_('../utils/TupleDictionary');
-var RaycastResult = _dereq_('../collision/RaycastResult');
-var AABB = _dereq_('../collision/AABB');
-var Ray = _dereq_('../collision/Ray');
-var NaiveBroadphase = _dereq_('../collision/NaiveBroadphase');
-
-/**
- * The physics world
- * @class World
- * @constructor
- * @extends EventTarget
- */
-function World(){
-    EventTarget.apply(this);
-
-    /**
-     * Currently / last used timestep. Is set to -1 if not available. This value is updated before each internal step, which means that it is "fresh" inside event callbacks.
-     * @property {Number} dt
-     */
-    this.dt = -1;
-
-    /**
-     * Makes bodies go to sleep when they've been inactive
-     * @property allowSleep
-     * @type {Boolean}
-     */
-    this.allowSleep = false;
-
-    /**
-     * All the current contacts (instances of ContactEquation) in the world.
-     * @property contacts
-     * @type {Array}
-     */
-    this.contacts = [];
-    this.frictionEquations = [];
-
-    /**
-     * How often to normalize quaternions. Set to 0 for every step, 1 for every second etc.. A larger value increases performance. If bodies tend to explode, set to a smaller value (zero to be sure nothing can go wrong).
-     * @property quatNormalizeSkip
-     * @type {Number}
-     */
-    this.quatNormalizeSkip = 0;
-
-    /**
-     * Set to true to use fast quaternion normalization. It is often enough accurate to use. If bodies tend to explode, set to false.
-     * @property quatNormalizeFast
-     * @type {Boolean}
-     * @see Quaternion.normalizeFast
-     * @see Quaternion.normalize
-     */
-    this.quatNormalizeFast = false;
-
-    /**
-     * The wall-clock time since simulation start
-     * @property time
-     * @type {Number}
-     */
-    this.time = 0.0;
-
-    /**
-     * Number of timesteps taken since start
-     * @property stepnumber
-     * @type {Number}
-     */
-    this.stepnumber = 0;
-
-    /// Default and last timestep sizes
-    this.default_dt = 1/60;
-
-    this.nextId = 0;
-    /**
-     * @property gravity
-     * @type {Vec3}
-     */
-    this.gravity = new Vec3();
-
-    /**
-     * @property broadphase
-     * @type {Broadphase}
-     */
-    this.broadphase = new NaiveBroadphase();
-
-    /**
-     * @property bodies
-     * @type {Array}
-     */
-    this.bodies = [];
-
-    /**
-     * @property solver
-     * @type {Solver}
-     */
-    this.solver = new GSSolver();
-
-    /**
-     * @property constraints
-     * @type {Array}
-     */
-    this.constraints = [];
-
-    /**
-     * @property narrowphase
-     * @type {Narrowphase}
-     */
-    this.narrowphase = new Narrowphase(this);
-
-    /**
-     * @property {ArrayCollisionMatrix} collisionMatrix
-	 * @type {ArrayCollisionMatrix}
-	 */
-	this.collisionMatrix = new ArrayCollisionMatrix();
-
-    /**
-     * CollisionMatrix from the previous step.
-     * @property {ArrayCollisionMatrix} collisionMatrixPrevious
-	 * @type {ArrayCollisionMatrix}
-	 */
-	this.collisionMatrixPrevious = new ArrayCollisionMatrix();
-
-    /**
-     * All added materials
-     * @property materials
-     * @type {Array}
-     */
-    this.materials = [];
-
-    /**
-     * @property contactmaterials
-     * @type {Array}
-     */
-    this.contactmaterials = [];
-
-    /**
-     * Used to look up a ContactMaterial given two instances of Material.
-     * @property {TupleDictionary} contactMaterialTable
-     */
-    this.contactMaterialTable = new TupleDictionary();
-
-    this.defaultMaterial = new Material("default");
-
-    /**
-     * This contact material is used if no suitable contactmaterial is found for a contact.
-     * @property defaultContactMaterial
-     * @type {ContactMaterial}
-     */
-    this.defaultContactMaterial = new ContactMaterial(this.defaultMaterial, this.defaultMaterial, { friction: 0.3, restitution: 0.0 });
-
-    /**
-     * @property doProfiling
-     * @type {Boolean}
-     */
-    this.doProfiling = false;
-
-    /**
-     * @property profile
-     * @type {Object}
-     */
-    this.profile = {
-        solve:0,
-        makeContactConstraints:0,
-        broadphase:0,
-        integrate:0,
-        narrowphase:0,
-    };
-
-    /**
-     * @property subsystems
-     * @type {Array}
-     */
-    this.subsystems = [];
-
-    this.addBodyEvent = {
-        type:"addBody",
-        body : null,
-    };
-
-    this.removeBodyEvent = {
-        type:"removeBody",
-        body : null,
-    };
-}
-World.prototype = new EventTarget();
-
-// Temp stuff
-var tmpAABB1 = new AABB();
-var tmpArray1 = [];
-var tmpRay = new Ray();
-
-/**
- * Get the contact material between materials m1 and m2
- * @method getContactMaterial
- * @param {Material} m1
- * @param {Material} m2
- * @return {ContactMaterial} The contact material if it was found.
- */
-World.prototype.getContactMaterial = function(m1,m2){
-    return this.contactMaterialTable.get(m1.id,m2.id); //this.contactmaterials[this.mats2cmat[i+j*this.materials.length]];
-};
-
-/**
- * Get number of objects in the world.
- * @method numObjects
- * @return {Number}
- * @deprecated
- */
-World.prototype.numObjects = function(){
-    return this.bodies.length;
-};
-
-/**
- * Store old collision state info
- * @method collisionMatrixTick
- */
-World.prototype.collisionMatrixTick = function(){
-	var temp = this.collisionMatrixPrevious;
-	this.collisionMatrixPrevious = this.collisionMatrix;
-	this.collisionMatrix = temp;
-	this.collisionMatrix.reset();
-};
-
-/**
- * Add a rigid body to the simulation.
- * @method add
- * @param {Body} body
- * @todo If the simulation has not yet started, why recrete and copy arrays for each body? Accumulate in dynamic arrays in this case.
- * @todo Adding an array of bodies should be possible. This would save some loops too
- * @deprecated Use .addBody instead
- */
-World.prototype.add = World.prototype.addBody = function(body){
-    if(this.bodies.indexOf(body) !== -1){
-        return;
-    }
-    body.index = this.bodies.length;
-    this.bodies.push(body);
-    body.world = this;
-    body.initPosition.copy(body.position);
-    body.initVelocity.copy(body.velocity);
-    body.timeLastSleepy = this.time;
-    if(body instanceof Body){
-        body.initAngularVelocity.copy(body.angularVelocity);
-        body.initQuaternion.copy(body.quaternion);
-    }
-	this.collisionMatrix.setNumObjects(this.bodies.length);
-    this.addBodyEvent.body = body;
-    this.dispatchEvent(this.addBodyEvent);
-};
-
-/**
- * Add a constraint to the simulation.
- * @method addConstraint
- * @param {Constraint} c
- */
-World.prototype.addConstraint = function(c){
-    this.constraints.push(c);
-};
-
-/**
- * Removes a constraint
- * @method removeConstraint
- * @param {Constraint} c
- */
-World.prototype.removeConstraint = function(c){
-    var idx = this.constraints.indexOf(c);
-    if(idx!==-1){
-        this.constraints.splice(idx,1);
-    }
-};
-
-/**
- * Raycast test
- * @method rayTest
- * @param {Vec3} from
- * @param {Vec3} to
- * @param {Function|RaycastResult} result
- * @deprecated Use .raycastAll, .raycastClosest or .raycastAny instead.
- */
-World.prototype.rayTest = function(from, to, result){
-    if(result instanceof RaycastResult){
-        // Do raycastclosest
-        this.raycastClosest(from, to, {
-            skipBackfaces: true
-        }, result);
-    } else {
-        // Do raycastAll
-        this.raycastAll(from, to, {
-            skipBackfaces: true
-        }, result);
-    }
-};
-
-/**
- * Ray cast against all bodies. The provided callback will be executed for each hit with a RaycastResult as single argument.
- * @method raycastAll
- * @param  {Vec3} from
- * @param  {Vec3} to
- * @param  {Object} options
- * @param  {number} [options.collisionFilterMask=-1]
- * @param  {number} [options.collisionFilterGroup=-1]
- * @param  {boolean} [options.skipBackfaces=false]
- * @param  {boolean} [options.checkCollisionResponse=true]
- * @param  {Function} callback
- * @return {boolean} True if any body was hit.
- */
-World.prototype.raycastAll = function(from, to, options, callback){
-    options.mode = Ray.ALL;
-    options.from = from;
-    options.to = to;
-    options.callback = callback;
-    return tmpRay.intersectWorld(this, options);
-};
-
-/**
- * Ray cast, and stop at the first result. Note that the order is random - but the method is fast.
- * @method raycastAny
- * @param  {Vec3} from
- * @param  {Vec3} to
- * @param  {Object} options
- * @param  {number} [options.collisionFilterMask=-1]
- * @param  {number} [options.collisionFilterGroup=-1]
- * @param  {boolean} [options.skipBackfaces=false]
- * @param  {boolean} [options.checkCollisionResponse=true]
- * @param  {RaycastResult} result
- * @return {boolean} True if any body was hit.
- */
-World.prototype.raycastAny = function(from, to, options, result){
-    options.mode = Ray.ANY;
-    options.from = from;
-    options.to = to;
-    options.result = result;
-    return tmpRay.intersectWorld(this, options);
-};
-
-/**
- * Ray cast, and return information of the closest hit.
- * @method raycastClosest
- * @param  {Vec3} from
- * @param  {Vec3} to
- * @param  {Object} options
- * @param  {number} [options.collisionFilterMask=-1]
- * @param  {number} [options.collisionFilterGroup=-1]
- * @param  {boolean} [options.skipBackfaces=false]
- * @param  {boolean} [options.checkCollisionResponse=true]
- * @param  {RaycastResult} result
- * @return {boolean} True if any body was hit.
- */
-World.prototype.raycastClosest = function(from, to, options, result){
-    options.mode = Ray.CLOSEST;
-    options.from = from;
-    options.to = to;
-    options.result = result;
-    return tmpRay.intersectWorld(this, options);
-};
-
-/**
- * Remove a rigid body from the simulation.
- * @method remove
- * @param {Body} body
- * @deprecated Use .removeBody instead
- */
-World.prototype.remove = function(body){
-    body.world = null;
-    var n = this.bodies.length-1,
-        bodies = this.bodies,
-        idx = bodies.indexOf(body);
-    if(idx !== -1){
-        bodies.splice(idx, 1); // Todo: should use a garbage free method
-
-        // Recompute index
-        for(var i=0; i!==bodies.length; i++){
-            bodies[i].index = i;
-        }
-
-        this.collisionMatrix.setNumObjects(n);
-        this.removeBodyEvent.body = body;
-        this.dispatchEvent(this.removeBodyEvent);
-    }
-};
-
-/**
- * Remove a rigid body from the simulation.
- * @method removeBody
- * @param {Body} body
- */
-World.prototype.removeBody = World.prototype.remove;
-
-/**
- * Adds a material to the World.
- * @method addMaterial
- * @param {Material} m
- * @todo Necessary?
- */
-World.prototype.addMaterial = function(m){
-    this.materials.push(m);
-};
-
-/**
- * Adds a contact material to the World
- * @method addContactMaterial
- * @param {ContactMaterial} cmat
- */
-World.prototype.addContactMaterial = function(cmat) {
-
-    // Add contact material
-    this.contactmaterials.push(cmat);
-
-    // Add current contact material to the material table
-    this.contactMaterialTable.set(cmat.materials[0].id,cmat.materials[1].id,cmat);
-};
-
-// performance.now()
-if(typeof performance === 'undefined'){
-    performance = {};
-}
-if(!performance.now){
-    var nowOffset = Date.now();
-    if (performance.timing && performance.timing.navigationStart){
-        nowOffset = performance.timing.navigationStart;
-    }
-    performance.now = function(){
-        return Date.now() - nowOffset;
-    };
-}
-
-var step_tmp1 = new Vec3();
-
-/**
- * Step the physics world forward in time.
- *
- * There are two modes. The simple mode is fixed timestepping without interpolation. In this case you only use the first argument. The second case uses interpolation. In that you also provide the time since the function was last used, as well as the maximum fixed timesteps to take.
- *
- * @method step
- * @param {Number} dt                       The fixed time step size to use.
- * @param {Number} [timeSinceLastCalled]    The time elapsed since the function was last called.
- * @param {Number} [maxSubSteps=10]         Maximum number of fixed steps to take per function call.
- *
- * @example
- *     // fixed timestepping without interpolation
- *     world.step(1/60);
- *
- * @see http://bulletphysics.org/mediawiki-1.5.8/index.php/Stepping_The_World
- */
-World.prototype.step = function(dt, timeSinceLastCalled, maxSubSteps){
-    maxSubSteps = maxSubSteps || 10;
-    timeSinceLastCalled = timeSinceLastCalled || 0;
-
-    if(timeSinceLastCalled === 0){ // Fixed, simple stepping
-
-        this.internalStep(dt);
-
-        // Increment time
-        this.time += dt;
-
-    } else {
-
-        // Compute the number of fixed steps we should have taken since the last step
-        var internalSteps = Math.floor((this.time + timeSinceLastCalled) / dt) - Math.floor(this.time / dt);
-        internalSteps = Math.min(internalSteps,maxSubSteps);
-
-        // Do some fixed steps to catch up
-        var t0 = performance.now();
-        for(var i=0; i!==internalSteps; i++){
-            this.internalStep(dt);
-            if(performance.now() - t0 > dt * 1000){
-                // We are slower than real-time. Better bail out.
-                break;
-            }
-        }
-
-        // Increment internal clock
-        this.time += timeSinceLastCalled;
-
-        // Compute "Left over" time step
-        var h = this.time % dt;
-        var h_div_dt = h / dt;
-        var interpvelo = step_tmp1;
-        var bodies = this.bodies;
-
-        for(var j=0; j !== bodies.length; j++){
-            var b = bodies[j];
-            if(b.type !== Body.STATIC && b.sleepState !== Body.SLEEPING){
-
-                // Interpolate
-                b.position.vsub(b.previousPosition, interpvelo);
-                interpvelo.scale(h_div_dt, interpvelo);
-                b.position.vadd(interpvelo, b.interpolatedPosition);
-
-                // TODO: interpolate quaternion
-                // b.interpolatedAngle = b.angle + (b.angle - b.previousAngle) * h_div_dt;
-
-            } else {
-
-                // For static bodies, just copy. Who else will do it?
-                b.interpolatedPosition.copy(b.position);
-                b.interpolatedQuaternion.copy(b.quaternion);
-            }
-        }
-    }
-};
-
-/**
- * Step the simulation
- * @method step
- * @param {Number} dt
- */
-var World_step_postStepEvent = {type:"postStep"}, // Reusable event objects to save memory
-    World_step_preStepEvent = {type:"preStep"},
-    World_step_collideEvent = {type:"collide", body:null, contact:null },
-    World_step_oldContacts = [], // Pools for unused objects
-    World_step_frictionEquationPool = [],
-    World_step_p1 = [], // Reusable arrays for collision pairs
-    World_step_p2 = [],
-    World_step_gvec = new Vec3(), // Temporary vectors and quats
-    World_step_vi = new Vec3(),
-    World_step_vj = new Vec3(),
-    World_step_wi = new Vec3(),
-    World_step_wj = new Vec3(),
-    World_step_t1 = new Vec3(),
-    World_step_t2 = new Vec3(),
-    World_step_rixn = new Vec3(),
-    World_step_rjxn = new Vec3(),
-    World_step_step_q = new Quaternion(),
-    World_step_step_w = new Quaternion(),
-    World_step_step_wq = new Quaternion(),
-    invI_tau_dt = new Vec3();
-World.prototype.internalStep = function(dt){
-    this.dt = dt;
-
-    var world = this,
-        that = this,
-        contacts = this.contacts,
-        p1 = World_step_p1,
-        p2 = World_step_p2,
-        N = this.numObjects(),
-        bodies = this.bodies,
-        solver = this.solver,
-        gravity = this.gravity,
-        doProfiling = this.doProfiling,
-        profile = this.profile,
-        DYNAMIC = Body.DYNAMIC,
-        profilingStart,
-        constraints = this.constraints,
-        frictionEquationPool = World_step_frictionEquationPool,
-        gnorm = gravity.norm(),
-        gx = gravity.x,
-        gy = gravity.y,
-        gz = gravity.z,
-        i=0;
-
-    if(doProfiling){
-        profilingStart = performance.now();
-    }
-
-    // Add gravity to all objects
-    for(i=0; i!==N; i++){
-        var bi = bodies[i];
-        if(bi.type & DYNAMIC){ // Only for dynamic bodies
-            var f = bi.force, m = bi.mass;
-            f.x += m*gx;
-            f.y += m*gy;
-            f.z += m*gz;
-        }
-    }
-
-    // Update subsystems
-    for(var i=0, Nsubsystems=this.subsystems.length; i!==Nsubsystems; i++){
-        this.subsystems[i].update();
-    }
-
-    // Collision detection
-    if(doProfiling){ profilingStart = performance.now(); }
-    p1.length = 0; // Clean up pair arrays from last step
-    p2.length = 0;
-    this.broadphase.collisionPairs(this,p1,p2);
-    if(doProfiling){ profile.broadphase = performance.now() - profilingStart; }
-
-    // Remove constrained pairs with collideConnected == false
-    var Nconstraints = constraints.length;
-    for(i=0; i!==Nconstraints; i++){
-        var c = constraints[i];
-        if(!c.collideConnected){
-            for(var j = p1.length-1; j>=0; j-=1){
-                if( (c.bodyA === p1[j] && c.bodyB === p2[j]) ||
-                    (c.bodyB === p1[j] && c.bodyA === p2[j])){
-                    p1.splice(j, 1);
-                    p2.splice(j, 1);
-                }
-            }
-        }
-    }
-
-    this.collisionMatrixTick();
-
-    // Generate contacts
-    if(doProfiling){ profilingStart = performance.now(); }
-    var oldcontacts = World_step_oldContacts;
-    var NoldContacts = contacts.length;
-
-    for(i=0; i!==NoldContacts; i++){
-        oldcontacts.push(contacts[i]);
-    }
-    contacts.length = 0;
-
-    // Transfer FrictionEquation from current list to the pool for reuse
-    var NoldFrictionEquations = this.frictionEquations.length;
-    for(i=0; i!==NoldFrictionEquations; i++){
-        frictionEquationPool.push(this.frictionEquations[i]);
-    }
-    this.frictionEquations.length = 0;
-
-    this.narrowphase.getContacts(
-        p1,
-        p2,
-        this,
-        contacts,
-        oldcontacts, // To be reused
-        this.frictionEquations,
-        frictionEquationPool
-    );
-
-    if(doProfiling){
-        profile.narrowphase = performance.now() - profilingStart;
-    }
-
-    // Loop over all collisions
-    if(doProfiling){
-        profilingStart = performance.now();
-    }
-
-    // Add all friction eqs
-    for (var i = 0; i < this.frictionEquations.length; i++) {
-        solver.addEquation(this.frictionEquations[i]);
-    }
-
-    var ncontacts = contacts.length;
-    for(var k=0; k!==ncontacts; k++){
-
-        // Current contact
-        var c = contacts[k];
-
-        // Get current collision indeces
-        var bi = c.bi,
-            bj = c.bj,
-            si = c.si,
-            sj = c.sj;
-
-        // Get collision properties
-        var cm;
-        if(bi.material && bj.material){
-            cm = this.getContactMaterial(bi.material,bj.material) || this.defaultContactMaterial;
-        } else {
-            cm = this.defaultContactMaterial;
-        }
-
-        // c.enabled = bi.collisionResponse && bj.collisionResponse && si.collisionResponse && sj.collisionResponse;
-
-        var mu = cm.friction;
-        // c.restitution = cm.restitution;
-
-        // If friction or restitution were specified in the material, use them
-        if(bi.material && bj.material){
-            if(bi.material.friction >= 0 && bj.material.friction >= 0){
-                mu = bi.material.friction * bj.material.friction;
-            }
-
-            if(bi.material.restitution >= 0 && bj.material.restitution >= 0){
-                c.restitution = bi.material.restitution * bj.material.restitution;
-            }
-        }
-
-		// c.setSpookParams(
-  //           cm.contactEquationStiffness,
-  //           cm.contactEquationRelaxation,
-  //           dt
-  //       );
-
-		solver.addEquation(c);
-
-		// // Add friction constraint equation
-		// if(mu > 0){
-
-		// 	// Create 2 tangent equations
-		// 	var mug = mu * gnorm;
-		// 	var reducedMass = (bi.invMass + bj.invMass);
-		// 	if(reducedMass > 0){
-		// 		reducedMass = 1/reducedMass;
-		// 	}
-		// 	var pool = frictionEquationPool;
-		// 	var c1 = pool.length ? pool.pop() : new FrictionEquation(bi,bj,mug*reducedMass);
-		// 	var c2 = pool.length ? pool.pop() : new FrictionEquation(bi,bj,mug*reducedMass);
-		// 	this.frictionEquations.push(c1, c2);
-
-		// 	c1.bi = c2.bi = bi;
-		// 	c1.bj = c2.bj = bj;
-		// 	c1.minForce = c2.minForce = -mug*reducedMass;
-		// 	c1.maxForce = c2.maxForce = mug*reducedMass;
-
-		// 	// Copy over the relative vectors
-		// 	c1.ri.copy(c.ri);
-		// 	c1.rj.copy(c.rj);
-		// 	c2.ri.copy(c.ri);
-		// 	c2.rj.copy(c.rj);
-
-		// 	// Construct tangents
-		// 	c.ni.tangents(c1.t, c2.t);
-
-  //           // Set spook params
-  //           c1.setSpookParams(cm.frictionEquationStiffness, cm.frictionEquationRelaxation, dt);
-  //           c2.setSpookParams(cm.frictionEquationStiffness, cm.frictionEquationRelaxation, dt);
-
-  //           c1.enabled = c2.enabled = c.enabled;
-
-		// 	// Add equations to solver
-		// 	solver.addEquation(c1);
-		// 	solver.addEquation(c2);
-		// }
-
-        if( bi.allowSleep &&
-            bi.type === Body.DYNAMIC &&
-            bi.sleepState  === Body.SLEEPING &&
-            bj.sleepState  === Body.AWAKE &&
-            bj.type !== Body.STATIC
-        ){
-            var speedSquaredB = bj.velocity.norm2() + bj.angularVelocity.norm2();
-            var speedLimitSquaredB = Math.pow(bj.sleepSpeedLimit,2);
-            if(speedSquaredB >= speedLimitSquaredB*2){
-                bi._wakeUpAfterNarrowphase = true;
-            }
-        }
-
-        if( bj.allowSleep &&
-            bj.type === Body.DYNAMIC &&
-            bj.sleepState  === Body.SLEEPING &&
-            bi.sleepState  === Body.AWAKE &&
-            bi.type !== Body.STATIC
-        ){
-            var speedSquaredA = bi.velocity.norm2() + bi.angularVelocity.norm2();
-            var speedLimitSquaredA = Math.pow(bi.sleepSpeedLimit,2);
-            if(speedSquaredA >= speedLimitSquaredA*2){
-                bj._wakeUpAfterNarrowphase = true;
-            }
-        }
-
-        // Now we know that i and j are in contact. Set collision matrix state
-		this.collisionMatrix.set(bi, bj, true);
-
-        if (!this.collisionMatrixPrevious.get(bi, bj)) {
-            // First contact!
-            // We reuse the collideEvent object, otherwise we will end up creating new objects for each new contact, even if there's no event listener attached.
-            World_step_collideEvent.body = bj;
-            World_step_collideEvent.contact = c;
-            bi.dispatchEvent(World_step_collideEvent);
-
-            World_step_collideEvent.body = bi;
-            bj.dispatchEvent(World_step_collideEvent);
-        }
-    }
-    if(doProfiling){
-        profile.makeContactConstraints = performance.now() - profilingStart;
-        profilingStart = performance.now();
-    }
-
-    // Wake up bodies
-    for(i=0; i!==N; i++){
-        var bi = bodies[i];
-        if(bi._wakeUpAfterNarrowphase){
-            bi.wakeUp();
-            bi._wakeUpAfterNarrowphase = false;
-        }
-    }
-
-    // Add user-added constraints
-    var Nconstraints = constraints.length;
-    for(i=0; i!==Nconstraints; i++){
-        var c = constraints[i];
-        c.update();
-        for(var j=0, Neq=c.equations.length; j!==Neq; j++){
-            var eq = c.equations[j];
-            solver.addEquation(eq);
-        }
-    }
-
-    // Solve the constrained system
-    solver.solve(dt,this);
-
-    if(doProfiling){
-        profile.solve = performance.now() - profilingStart;
-    }
-
-    // Remove all contacts from solver
-    solver.removeAllEquations();
-
-    // Apply damping, see http://code.google.com/p/bullet/issues/detail?id=74 for details
-    var pow = Math.pow;
-    for(i=0; i!==N; i++){
-        var bi = bodies[i];
-        if(bi.type & DYNAMIC){ // Only for dynamic bodies
-            var ld = pow(1.0 - bi.linearDamping,dt);
-            var v = bi.velocity;
-            v.mult(ld,v);
-            var av = bi.angularVelocity;
-            if(av){
-                var ad = pow(1.0 - bi.angularDamping,dt);
-                av.mult(ad,av);
-            }
-        }
-    }
-
-    this.dispatchEvent(World_step_preStepEvent);
-
-    // Invoke pre-step callbacks
-    for(i=0; i!==N; i++){
-        var bi = bodies[i];
-        if(bi.preStep){
-            bi.preStep.call(bi);
-        }
-    }
-
-    // Leap frog
-    // vnew = v + h*f/m
-    // xnew = x + h*vnew
-    if(doProfiling){
-        profilingStart = performance.now();
-    }
-    var q = World_step_step_q;
-    var w = World_step_step_w;
-    var wq = World_step_step_wq;
-    var stepnumber = this.stepnumber;
-    var DYNAMIC_OR_KINEMATIC = Body.DYNAMIC | Body.KINEMATIC;
-    var quatNormalize = stepnumber % (this.quatNormalizeSkip+1) === 0;
-    var quatNormalizeFast = this.quatNormalizeFast;
-    var half_dt = dt * 0.5;
-    var PLANE = Shape.types.PLANE,
-        CONVEX = Shape.types.CONVEXPOLYHEDRON;
-
-    for(i=0; i!==N; i++){
-        var b = bodies[i],
-            force = b.force,
-            tau = b.torque;
-        if((b.type & DYNAMIC_OR_KINEMATIC) && b.sleepState !== Body.SLEEPING){ // Only for dynamic
-            var velo = b.velocity,
-                angularVelo = b.angularVelocity,
-                pos = b.position,
-                quat = b.quaternion,
-                invMass = b.invMass,
-                invInertia = b.invInertiaWorld;
-
-            velo.x += force.x * invMass * dt;
-            velo.y += force.y * invMass * dt;
-            velo.z += force.z * invMass * dt;
-
-            if(b.angularVelocity){
-                invInertia.vmult(tau,invI_tau_dt);
-                invI_tau_dt.mult(dt,invI_tau_dt);
-                invI_tau_dt.vadd(angularVelo,angularVelo);
-            }
-
-            // Use new velocity  - leap frog
-            pos.x += velo.x * dt;
-            pos.y += velo.y * dt;
-            pos.z += velo.z * dt;
-
-            if(b.angularVelocity){
-                w.set(angularVelo.x, angularVelo.y, angularVelo.z, 0);
-                w.mult(quat,wq);
-                quat.x += half_dt * wq.x;
-                quat.y += half_dt * wq.y;
-                quat.z += half_dt * wq.z;
-                quat.w += half_dt * wq.w;
-                if(quatNormalize){
-                    if(quatNormalizeFast){
-                        quat.normalizeFast();
-                    } else {
-                        quat.normalize();
-                    }
-                }
-            }
-
-            if(b.aabb){
-                b.aabbNeedsUpdate = true;
-            }
-
-            // Update world inertia
-            if(b.updateInertiaWorld){
-                b.updateInertiaWorld();
-            }
-        }
-    }
-    this.clearForces();
-
-    this.broadphase.dirty = true;
-
-    if(doProfiling){
-        profile.integrate = performance.now() - profilingStart;
-    }
-
-    // Update world time
-    this.time += dt;
-    this.stepnumber += 1;
-
-    this.dispatchEvent(World_step_postStepEvent);
-
-    // Invoke post-step callbacks
-    for(i=0; i!==N; i++){
-        var bi = bodies[i];
-        var postStep = bi.postStep;
-        if(postStep){
-            postStep.call(bi);
-        }
-    }
-
-    // Sleeping update
-    if(this.allowSleep){
-        for(i=0; i!==N; i++){
-            bodies[i].sleepTick(this.time);
-        }
-    }
-};
-
-/**
- * Sets all body forces in the world to zero.
- * @method clearForces
- */
-World.prototype.clearForces = function(){
-    var bodies = this.bodies;
-    var N = bodies.length;
-    for(var i=0; i !== N; i++){
-        var b = bodies[i],
-            force = b.force,
-            tau = b.torque;
-
-        b.force.set(0,0,0);
-        b.torque.set(0,0,0);
-    }
-};
-
-},{"../collision/AABB":3,"../collision/ArrayCollisionMatrix":4,"../collision/NaiveBroadphase":7,"../collision/Ray":9,"../collision/RaycastResult":10,"../equations/ContactEquation":19,"../equations/FrictionEquation":21,"../material/ContactMaterial":24,"../material/Material":25,"../math/Quaternion":28,"../math/Vec3":30,"../objects/Body":31,"../shapes/Shape":43,"../solver/GSSolver":46,"../utils/EventTarget":49,"../utils/TupleDictionary":52,"../utils/Vec3Pool":54,"./Narrowphase":55}]},{},[2])
-(2)
-});

+ 0 - 7
examples/js/lights/RectAreaLightUniformsLib.js

@@ -34,13 +34,6 @@ THREE.RectAreaLightUniformsLib = {
 		THREE.UniformsLib.LTC_1 = ltc_1;
 		THREE.UniformsLib.LTC_2 = ltc_2;
 
-		// add ltc data textures to material uniforms
-
-		var ltc = { ltc_1: { value: null }, ltc_2: { value: null } };
-
-		Object.assign( THREE.ShaderLib.standard.uniforms, ltc );
-		Object.assign( THREE.ShaderLib.physical.uniforms, ltc );
-
 	}
 
 };

+ 1 - 1
examples/js/loaders/3MFLoader.js

@@ -88,7 +88,7 @@ THREE.ThreeMFLoader.prototype = Object.assign( Object.create( THREE.Loader.proto
 
 			try {
 
-				zip = new JSZip( data );
+				zip = new JSZip( data ); // eslint-disable-line no-undef
 
 			} catch ( e ) {
 

+ 1 - 1
examples/js/loaders/AMFLoader.js

@@ -77,7 +77,7 @@ THREE.AMFLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
 
 				try {
 
-					zip = new JSZip( data );
+					zip = new JSZip( data ); // eslint-disable-line no-undef
 
 				} catch ( e ) {
 

+ 2 - 2
examples/js/loaders/AssimpLoader.js

@@ -1563,7 +1563,7 @@ THREE.AssimpLoader.prototype = Object.assign( Object.create( THREE.Loader.protot
 		function ReadBounds( stream, T /*p*/, n ) {
 
 			// not sure what to do here, the data isn't really useful.
-			return stream.Seek( sizeof( T ) * n, aiOrigin_CUR );
+			return stream.Seek( sizeof( T ) * n, aiOrigin_CUR ); // eslint-disable-line no-undef
 
 		}
 
@@ -2265,7 +2265,7 @@ THREE.AssimpLoader.prototype = Object.assign( Object.create( THREE.Loader.protot
 				var compressedData = [];
 				stream.Read( compressedData, 1, compressedSize );
 				var uncompressedData = [];
-				uncompress( uncompressedData, uncompressedSize, compressedData, compressedSize );
+				uncompress( uncompressedData, uncompressedSize, compressedData, compressedSize ); // eslint-disable-line no-undef
 				var buff = new ArrayBuffer( uncompressedData );
 				ReadBinaryScene( buff, pScene );
 

+ 1 - 1
examples/js/loaders/BasisTextureLoader.js

@@ -435,7 +435,7 @@ THREE.BasisTextureLoader.BasisWorker = function () {
 		transcoderPending = new Promise( ( resolve ) => {
 
 			BasisModule = { wasmBinary, onRuntimeInitialized: resolve };
-			BASIS( BasisModule );
+			BASIS( BasisModule ); // eslint-disable-line no-undef
 
 		} ).then( () => {
 

+ 1 - 1
examples/js/loaders/DRACOLoader.js

@@ -427,7 +427,7 @@ THREE.DRACOLoader.DRACOWorker = function () {
 
 					};
 
-					DracoDecoderModule( decoderConfig );
+					DracoDecoderModule( decoderConfig ); // eslint-disable-line no-undef
 
 				} );
 				break;

+ 107 - 10
examples/js/loaders/EXRLoader.js

@@ -938,7 +938,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 
 				for ( let comp = 0; comp < numComp; ++ comp ) {
 
-					let type = channelData[ cscSet.idx[ comp ] ].type;
+					const type = channelData[ cscSet.idx[ comp ] ].type;
 
 					for ( let y = 8 * blocky; y < 8 * blocky + maxY; ++ y ) {
 
@@ -946,7 +946,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 
 						for ( let blockx = 0; blockx < numFullBlocksX; ++ blockx ) {
 
-							let src = blockx * 64 + ( ( y & 0x7 ) * 8 );
+							const src = blockx * 64 + ( ( y & 0x7 ) * 8 );
 
 							dataView.setUint16( offset + 0 * INT16_SIZE * type, rowBlock[ comp ][ src + 0 ], true );
 							dataView.setUint16( offset + 1 * INT16_SIZE * type, rowBlock[ comp ][ src + 1 ], true );
@@ -969,8 +969,8 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 
 						for ( let y = 8 * blocky; y < 8 * blocky + maxY; ++ y ) {
 
-							let offset = rowOffsets[ comp ][ y ] + 8 * numFullBlocksX * INT16_SIZE * type;
-							let src = numFullBlocksX * 64 + ( ( y & 0x7 ) * 8 );
+							const offset = rowOffsets[ comp ][ y ] + 8 * numFullBlocksX * INT16_SIZE * type;
+							const src = numFullBlocksX * 64 + ( ( y & 0x7 ) * 8 );
 
 							for ( let x = 0; x < maxX; ++ x ) {
 
@@ -999,7 +999,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 
 				for ( var y = 0; y < height; ++ y ) {
 
-					let offset = rowOffsets[ comp ][ y ];
+					const offset = rowOffsets[ comp ][ y ];
 
 					for ( var x = 0; x < width; ++ x ) {
 
@@ -1398,6 +1398,83 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 
 		}
 
+		function uncompressPXR( info ) {
+
+			var compressed = info.array.slice( info.offset.value, info.offset.value + info.size );
+
+			if ( typeof Inflate === 'undefined' ) {
+
+				console.error( 'THREE.EXRLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js' );
+
+			}
+
+			const inflate = new Inflate( compressed, { resize: true, verify: true } ); // eslint-disable-line no-undef
+			const rawBuffer = new Uint8Array( inflate.decompress().buffer );
+
+			const sz = info.lines * info.channels * info.width;
+			const tmpBuffer = ( info.type == 1 ) ? new Uint16Array( sz ) : new Uint32Array( sz );
+
+			let tmpBufferEnd = 0;
+			let writePtr = 0;
+			const ptr = new Array( 4 );
+
+			for ( let y = 0; y < info.lines; y ++ ) {
+
+				for ( let c = 0; c < info.channels; c ++ ) {
+
+					let pixel = 0;
+
+					switch ( info.type ) {
+
+						case 1:
+
+							ptr[ 0 ] = tmpBufferEnd;
+							ptr[ 1 ] = ptr[ 0 ] + info.width;
+							tmpBufferEnd = ptr[ 1 ] + info.width;
+
+							for ( let j = 0; j < info.width; ++ j ) {
+
+								const diff = ( rawBuffer[ ptr[ 0 ] ++ ] << 8 ) | rawBuffer[ ptr[ 1 ] ++ ];
+
+								pixel += diff;
+
+								tmpBuffer[ writePtr ] = pixel;
+								writePtr ++;
+
+							}
+
+							break;
+
+						case 2:
+
+							ptr[ 0 ] = tmpBufferEnd;
+							ptr[ 1 ] = ptr[ 0 ] + info.width;
+							ptr[ 2 ] = ptr[ 1 ] + info.width;
+							tmpBufferEnd = ptr[ 2 ] + info.width;
+
+							for ( let j = 0; j < info.width; ++ j ) {
+
+								const diff = ( rawBuffer[ ptr[ 0 ] ++ ] << 24 ) | ( rawBuffer[ ptr[ 1 ] ++ ] << 16 ) | ( rawBuffer[ ptr[ 2 ] ++ ] << 8 );
+
+								pixel += diff;
+
+								tmpBuffer[ writePtr ] = pixel;
+								writePtr ++;
+
+							}
+
+							break;
+
+					}
+
+				}
+
+			}
+
+			return new DataView( tmpBuffer.buffer );
+
+		}
+
 		function uncompressDWA( info ) {
 
 			var inDataView = info.viewer;
@@ -1511,7 +1588,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 					case DEFLATE:
 
 						var compressed = info.array.slice( inOffset.value, inOffset.value + dwaHeader.totalAcUncompressedCount );
-						var inflate = new Inflate( compressed, { resize: true, verify: true } );
+						var inflate = new Inflate( compressed, { resize: true, verify: true } ); // eslint-disable-line no-undef
 						var acBuffer = new Uint16Array( inflate.decompress().buffer );
 						inOffset.value += dwaHeader.totalAcUncompressedCount;
 						break;
@@ -1538,7 +1615,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 			if ( dwaHeader.rleRawSize > 0 ) {
 
 				var compressed = info.array.slice( inOffset.value, inOffset.value + dwaHeader.rleCompressedSize );
-				var inflate = new Inflate( compressed, { resize: true, verify: true } );
+				var inflate = new Inflate( compressed, { resize: true, verify: true } ); // eslint-disable-line no-undef
 				var rleBuffer = decodeRunLength( inflate.decompress().buffer );
 
 				inOffset.value += dwaHeader.rleCompressedSize;
@@ -1985,9 +2062,15 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 
 				return parseTimecode( dataView, offset );
 
+			} else if ( type === 'preview' ) {
+
+				offset.value += size;
+				return 'skipped';
+
 			} else {
 
-				throw 'Cannot parse value for unsupported type: ' + type;
+				offset.value += size;
+				return undefined;
 
 			}
 
@@ -2022,7 +2105,15 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 				var attributeSize = parseUint32( bufferDataView, offset );
 				var attributeValue = parseValue( bufferDataView, buffer, offset, attributeType, attributeSize );
 
-				EXRHeader[ attributeName ] = attributeValue;
+				if ( attributeValue === undefined ) {
+
+					console.warn( `EXRLoader.parse: skipped unknown header attribute type \'${ attributeType }\'.` );
+
+				} else {
+
+					EXRHeader[ attributeName ] = attributeValue;
+
+				}
 
 			}
 
@@ -2066,6 +2157,12 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 				uncompress = uncompressPIZ;
 				break;
 
+			case 'PXR24_COMPRESSION':
+
+				scanlineBlockSize = 16;
+				uncompress = uncompressPXR;
+				break;
+
 			case 'DWAA_COMPRESSION':
 
 				scanlineBlockSize = 32;
@@ -2295,7 +2392,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 
 		}
 
-		let format = ( this.type === THREE.UnsignedByteType ) ? THREE.RGBEFormat : ( numChannels === 4 ) ? THREE.RGBAFormat : THREE.RGBFormat;
+		const format = ( this.type === THREE.UnsignedByteType ) ? THREE.RGBEFormat : ( numChannels === 4 ) ? THREE.RGBAFormat : THREE.RGBFormat;
 
 		return {
 			header: EXRHeader,

+ 12 - 2
examples/js/loaders/GLTFLoader.js

@@ -488,7 +488,12 @@ THREE.GLTFLoader = ( function () {
 
 	}
 
-	GLTFMaterialsClearcoatExtension.prototype.getMaterialType = function ( /* materialIndex */ ) {
+	GLTFMaterialsClearcoatExtension.prototype.getMaterialType = function ( materialIndex ) {
+
+		var parser = this.parser;
+		var materialDef = parser.json.materials[ materialIndex ];
+
+		if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null;
 
 		return THREE.MeshPhysicalMaterial;
 
@@ -564,7 +569,12 @@ THREE.GLTFLoader = ( function () {
 
 	}
 
-	GLTFMaterialsTransmissionExtension.prototype.getMaterialType = function ( /* materialIndex */ ) {
+	GLTFMaterialsTransmissionExtension.prototype.getMaterialType = function ( materialIndex ) {
+
+		var parser = this.parser;
+		var materialDef = parser.json.materials[ materialIndex ];
+
+		if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null;
 
 		return THREE.MeshPhysicalMaterial;
 

+ 1 - 1
examples/js/loaders/KMZLoader.js

@@ -80,7 +80,7 @@ THREE.KMZLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
 
 		//
 
-		var zip = new JSZip( data );
+		var zip = new JSZip( data ); // eslint-disable-line no-undef
 
 		if ( zip.files[ 'doc.kml' ] ) {
 

+ 1 - 1
examples/js/loaders/MMDLoader.js

@@ -300,7 +300,7 @@ THREE.MMDLoader = ( function () {
 
 				}
 
-				this.parser = new MMDParser.Parser();
+				this.parser = new MMDParser.Parser(); // eslint-disable-line no-undef
 
 			}
 

+ 1 - 1
examples/js/loaders/TTFLoader.js

@@ -209,7 +209,7 @@ THREE.TTFLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
 
 		}
 
-		return convert( opentype.parse( arraybuffer ), this.reversed );
+		return convert( opentype.parse( arraybuffer ), this.reversed ); // eslint-disable-line no-undef
 
 	}
 

+ 0 - 1
examples/js/misc/GPUComputationRenderer.js

@@ -319,7 +319,6 @@ THREE.GPUComputationRenderer = function ( sizeX, sizeY, renderer ) {
 			magFilter: magFilter,
 			format: THREE.RGBAFormat,
 			type: dataType,
-			stencilBuffer: false,
 			depthBuffer: false
 		} );
 

+ 0 - 3
examples/js/misc/Ocean.js

@@ -50,7 +50,6 @@ THREE.Ocean = function ( renderer, camera, scene, options ) {
 		wrapS: THREE.ClampToEdgeWrapping,
 		wrapT: THREE.ClampToEdgeWrapping,
 		format: THREE.RGBAFormat,
-		stencilBuffer: false,
 		depthBuffer: false,
 		premultiplyAlpha: false,
 		type: renderTargetType
@@ -61,7 +60,6 @@ THREE.Ocean = function ( renderer, camera, scene, options ) {
 		wrapS: THREE.ClampToEdgeWrapping,
 		wrapT: THREE.ClampToEdgeWrapping,
 		format: THREE.RGBAFormat,
-		stencilBuffer: false,
 		depthBuffer: false,
 		premultiplyAlpha: false,
 		type: renderTargetType
@@ -72,7 +70,6 @@ THREE.Ocean = function ( renderer, camera, scene, options ) {
 		wrapS: THREE.RepeatWrapping,
 		wrapT: THREE.RepeatWrapping,
 		format: THREE.RGBAFormat,
-		stencilBuffer: false,
 		depthBuffer: false,
 		premultiplyAlpha: false,
 		type: renderTargetType

+ 1 - 2
examples/js/objects/Fire.js

@@ -129,8 +129,7 @@ THREE.Fire = function ( geometry, options ) {
 	var parameters = {
 		minFilter: THREE.NearestFilter,
 		magFilter: THREE.NearestFilter,
-		depthBuffer: false,
-		stencilBuffer: false
+		depthBuffer: false
 	};
 
 

+ 1 - 2
examples/js/objects/Reflector.js

@@ -36,8 +36,7 @@ THREE.Reflector = function ( geometry, options ) {
 	var parameters = {
 		minFilter: THREE.LinearFilter,
 		magFilter: THREE.LinearFilter,
-		format: THREE.RGBFormat,
-		stencilBuffer: false
+		format: THREE.RGBFormat
 	};
 
 	var renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight, parameters );

+ 1 - 2
examples/js/objects/Refractor.js

@@ -32,8 +32,7 @@ THREE.Refractor = function ( geometry, options ) {
 	var parameters = {
 		minFilter: THREE.LinearFilter,
 		magFilter: THREE.LinearFilter,
-		format: THREE.RGBFormat,
-		stencilBuffer: false
+		format: THREE.RGBFormat
 	};
 
 	var renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight, parameters );

+ 1 - 2
examples/js/objects/Water.js

@@ -50,8 +50,7 @@ THREE.Water = function ( geometry, options ) {
 	var parameters = {
 		minFilter: THREE.LinearFilter,
 		magFilter: THREE.LinearFilter,
-		format: THREE.RGBFormat,
-		stencilBuffer: false
+		format: THREE.RGBFormat
 	};
 
 	var renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight, parameters );

+ 1 - 2
examples/js/postprocessing/BokehPass.js

@@ -22,8 +22,7 @@ THREE.BokehPass = function ( scene, camera, params ) {
 
 	this.renderTargetDepth = new THREE.WebGLRenderTarget( width, height, {
 		minFilter: THREE.NearestFilter,
-		magFilter: THREE.NearestFilter,
-		stencilBuffer: false
+		magFilter: THREE.NearestFilter
 	} );
 
 	this.renderTargetDepth.texture.name = "BokehPass.depth";

+ 1 - 2
examples/js/postprocessing/EffectComposer.js

@@ -9,8 +9,7 @@ THREE.EffectComposer = function ( renderer, renderTarget ) {
 		var parameters = {
 			minFilter: THREE.LinearFilter,
 			magFilter: THREE.LinearFilter,
-			format: THREE.RGBAFormat,
-			stencilBuffer: false
+			format: THREE.RGBAFormat
 		};
 
 		var size = renderer.getSize( new THREE.Vector2() );

+ 0 - 2
examples/js/postprocessing/SMAAPass.js

@@ -8,7 +8,6 @@ THREE.SMAAPass = function ( width, height ) {
 
 	this.edgesRT = new THREE.WebGLRenderTarget( width, height, {
 		depthBuffer: false,
-		stencilBuffer: false,
 		generateMipmaps: false,
 		minFilter: THREE.LinearFilter,
 		format: THREE.RGBFormat
@@ -17,7 +16,6 @@ THREE.SMAAPass = function ( width, height ) {
 
 	this.weightsRT = new THREE.WebGLRenderTarget( width, height, {
 		depthBuffer: false,
-		stencilBuffer: false,
 		generateMipmaps: false,
 		minFilter: THREE.LinearFilter,
 		format: THREE.RGBAFormat

+ 1 - 1
examples/js/postprocessing/SavePass.js

@@ -25,7 +25,7 @@ THREE.SavePass = function ( renderTarget ) {
 
 	if ( this.renderTarget === undefined ) {
 
-		this.renderTarget = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat, stencilBuffer: false } );
+		this.renderTarget = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat } );
 		this.renderTarget.texture.name = "SavePass.rt";
 
 	}

+ 3 - 3
examples/jsm/animation/TimelinerController.js

@@ -87,7 +87,7 @@ TimelinerController.prototype = {
 
 		var track = this._tracks[ channelName ],
 			times = track.times,
-			index = Timeliner.binarySearch( times, time ),
+			index = Timeliner.binarySearch( times, time ), // eslint-disable-line no-undef
 			values = track.values,
 			stride = track.getValueSize(),
 			offset = index * stride;
@@ -125,7 +125,7 @@ TimelinerController.prototype = {
 
 		var track = this._tracks[ channelName ],
 			times = track.times,
-			index = Timeliner.binarySearch( times, time );
+			index = Timeliner.binarySearch( times, time ); // eslint-disable-line no-undef
 
 		// we disallow to remove the keyframe when it is the last one we have,
 		// since the animation system is designed to always produce a defined
@@ -164,7 +164,7 @@ TimelinerController.prototype = {
 
 		var track = this._tracks[ channelName ],
 			times = track.times,
-			index = Timeliner.binarySearch( times, time );
+			index = Timeliner.binarySearch( times, time ); // eslint-disable-line no-undef
 
 		if ( index >= 0 ) {
 

+ 2 - 2
examples/jsm/exporters/ColladaExporter.js

@@ -109,8 +109,8 @@ ColladaExporter.prototype = {
 			canvas = canvas || document.createElement( 'canvas' );
 			ctx = ctx || canvas.getContext( '2d' );
 
-			canvas.width = image.naturalWidth;
-			canvas.height = image.naturalHeight;
+			canvas.width = image.width;
+			canvas.height = image.height;
 
 			ctx.drawImage( image, 0, 0 );
 

+ 1 - 1
examples/jsm/exporters/MMDExporter.js

@@ -18,7 +18,7 @@ var MMDExporter = function () {
 
 		if ( u2sTable === undefined ) {
 
-			var encoder = new MMDParser.CharsetEncoder();
+			var encoder = new MMDParser.CharsetEncoder(); // eslint-disable-line no-undef
 			var table = encoder.s2uTable;
 			u2sTable = {};
 

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 23
examples/jsm/libs/cannon.module.min.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 8 - 0
examples/jsm/libs/rhino3dm/rhino3dm.js


BIN
examples/jsm/libs/rhino3dm/rhino3dm.wasm


+ 0 - 8
examples/jsm/lights/RectAreaLightUniformsLib.js

@@ -5,7 +5,6 @@ import {
 	LinearFilter,
 	NearestFilter,
 	RGBAFormat,
-	ShaderLib,
 	UVMapping,
 	UniformsLib
 } from "../../../build/three.module.js";
@@ -44,13 +43,6 @@ var RectAreaLightUniformsLib = {
 		UniformsLib.LTC_1 = ltc_1;
 		UniformsLib.LTC_2 = ltc_2;
 
-		// add ltc data textures to material uniforms
-
-		var ltc = { ltc_1: { value: null }, ltc_2: { value: null } };
-
-		Object.assign( ShaderLib.standard.uniforms, ltc );
-		Object.assign( ShaderLib.physical.uniforms, ltc );
-
 	}
 
 };

+ 16 - 0
examples/jsm/loaders/3DMLoader.d.ts

@@ -0,0 +1,16 @@
+import {
+	Loader,
+	LoadingManager,
+	Object3D
+} from '../../../src/Three';
+
+export class Rhino3dmLoader extends Loader {
+
+	constructor( manager?: LoadingManager );
+
+	load( url: string, onLoad: ( object: Object3D ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ErrorEvent ) => void ): void;
+	setLibraryPath( path: string ): Rhino3dmLoader;
+	setWorkerLimit( workerLimit: number ): Rhino3dmLoader;
+	dispose(): Rhino3dmLoader;
+
+}

+ 1008 - 0
examples/jsm/loaders/3DMLoader.js

@@ -0,0 +1,1008 @@
+import {
+	BufferGeometryLoader,
+	FileLoader,
+	Loader,
+	Object3D,
+	MeshStandardMaterial,
+	Mesh,
+	Color,
+	Points,
+	PointsMaterial,
+	Line,
+	LineBasicMaterial,
+	Matrix4
+} from "../../../build/three.module.js";
+import { CSS2DObject } from '../renderers/CSS2DRenderer.js';
+
+var Rhino3dmLoader = function ( manager ) {
+
+	Loader.call( this, manager );
+
+	this.libraryPath = '';
+	this.libraryPending = null;
+	this.libraryBinary = null;
+	this.libraryConfig = {};
+
+	this.workerLimit = 4;
+	this.workerPool = [];
+	this.workerNextTaskID = 1;
+	this.workerSourceURL = '';
+	this.workerConfig = {};
+
+};
+
+Rhino3dmLoader.taskCache = new WeakMap();
+
+Rhino3dmLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
+
+	constructor: Rhino3dmLoader,
+
+	setLibraryPath: function ( path ) {
+
+		this.libraryPath = path;
+
+		return this;
+
+	},
+
+	setWorkerLimit: function ( workerLimit ) {
+
+		this.workerLimit = workerLimit;
+
+		return this;
+
+	},
+
+	load: function ( url, onLoad, onProgress, onError ) {
+
+		var loader = new FileLoader( this.manager );
+
+		loader.setPath( this.path );
+		loader.setResponseType( 'arraybuffer' );
+		loader.setRequestHeader( this.requestHeader );
+
+		loader.load( url, ( buffer ) => {
+
+			// Check for an existing task using this buffer. A transferred buffer cannot be transferred
+			// again from this thread.
+			if ( Rhino3dmLoader.taskCache.has( buffer ) ) {
+
+				var cachedTask = Rhino3dmLoader.taskCache.get( buffer );
+
+				return cachedTask.promise.then( onLoad ).catch( onError );
+
+			}
+
+			this.decodeObjects( buffer, url )
+				.then( onLoad )
+				.catch( onError );
+
+		}, onProgress, onError );
+
+
+	},
+
+	debug: function () {
+
+		console.log( 'Task load: ', this.workerPool.map( ( worker ) => worker._taskLoad ) );
+
+	},
+
+	decodeObjects: function ( buffer, url ) {
+
+		var worker;
+		var taskID;
+
+		var taskCost = buffer.byteLength;
+
+		var objectPending = this._getWorker( taskCost )
+			.then( ( _worker ) => {
+
+				worker = _worker;
+				taskID = this.workerNextTaskID ++; //hmmm
+
+				return new Promise( ( resolve, reject ) => {
+
+					worker._callbacks[ taskID ] = { resolve, reject };
+
+					worker.postMessage( { type: 'decode', id: taskID, buffer }, [ buffer ] );
+
+					//this.debug();
+
+				} );
+
+			} )
+			.then( ( message ) => this._createGeometry( message.data ) );
+
+		// Remove task from the task list.
+		// Note: replaced '.finally()' with '.catch().then()' block - iOS 11 support (#19416)
+		objectPending
+			.catch( () => true )
+			.then( () => {
+
+				if ( worker && taskID ) {
+
+					this._releaseTask( worker, taskID );
+
+					//this.debug();
+
+				}
+
+			} );
+
+		// Cache the task result.
+		Rhino3dmLoader.taskCache.set( buffer, {
+
+			url: url,
+			promise: objectPending
+
+		} );
+
+		return objectPending;
+
+	},
+
+	parse: function ( data, onLoad, onError ) {
+
+		this.decodeObjects( data, '' )
+			.then( onLoad )
+			.catch( onError );
+
+	},
+
+	_createMaterial: function ( material ) {
+
+		if ( material === undefined ) {
+
+			return new MeshStandardMaterial( {
+				color: new Color( 1, 1, 1 ),
+				metalness: 0.8,
+				name: 'default',
+				side: 2
+			} );
+
+		}
+
+		var _diffuseColor = material.diffuseColor;
+
+		var diffusecolor = new Color( _diffuseColor.r / 255.0, _diffuseColor.g / 255.0, _diffuseColor.b / 255.0 );
+
+		if ( _diffuseColor.r === 0 && _diffuseColor.g === 0 && _diffuseColor.b === 0 ) {
+
+			diffusecolor.r = 1;
+			diffusecolor.g = 1;
+			diffusecolor.b = 1;
+
+		}
+
+		return new MeshStandardMaterial( {
+			color: diffusecolor,
+			metalness: 0.8,
+			name: material.name,
+			side: 2
+		} );
+
+	},
+
+	_createGeometry: function ( data ) {
+
+		// console.log(data);
+
+		var object = new Object3D();
+		var instanceDefinitionObjects = [];
+		var instanceDefinitions = [];
+		var instanceReferences = [];
+
+		object.userData[ 'layers' ] = data.layers;
+		object.userData[ 'groups' ] = data.groups;
+
+		var objects = data.objects;
+		var materials = data.materials;
+
+		for ( var i = 0; i < objects.length; i ++ ) {
+
+			var obj = objects[ i ];
+			var attributes = obj.attributes;
+
+			switch ( obj.objectType ) {
+
+				case 'InstanceDefinition':
+
+					instanceDefinitions.push( obj );
+
+					break;
+
+				case 'InstanceReference':
+
+					instanceReferences.push( obj );
+
+					break;
+
+				default:
+
+					var material = this._createMaterial( materials[ attributes.materialIndex ] );
+					var _object = this._createObject( obj, material );
+					_object.visible = data.layers[ attributes.layerIndex ].visible;
+
+					if ( attributes.isInstanceDefinitionObject ) {
+
+						instanceDefinitionObjects.push( _object );
+
+					} else {
+
+						object.add( _object );
+
+					}
+
+					break;
+
+			}
+
+		}
+
+		for ( var i = 0; i < instanceDefinitions.length; i ++ ) {
+
+			var iDef = instanceDefinitions[ i ];
+
+			var objects = [];
+
+			for ( var j = 0; j < iDef.attributes.objectIds.length; j ++ ) {
+
+				var objId = iDef.attributes.objectIds[ j ];
+
+				for ( var p = 0; p < instanceDefinitionObjects.length; p ++ ) {
+
+					var idoId = instanceDefinitionObjects[ p ].userData.attributes.id;
+
+					if ( objId === idoId ) {
+
+						objects.push( instanceDefinitionObjects[ p ] );
+
+					}
+
+				}
+
+			}
+
+			// Currently clones geometry and does not take advantage of instancing
+
+			for ( var j = 0; j < instanceReferences.length; j ++ ) {
+
+				var iRef = instanceReferences[ j ];
+
+				if ( iRef.geometry.parentIdefId === iDef.attributes.id ) {
+
+					var iRefObject = new Object3D();
+					var xf = iRef.geometry.xform.array;
+
+					var matrix = new Matrix4();
+          			matrix.set( xf[ 0 ], xf[ 1 ], xf[ 2 ], xf[ 3 ], xf[ 4 ], xf[ 5 ], xf[ 6 ], xf[ 7 ], xf[ 8 ], xf[ 9 ], xf[ 10 ], xf[ 11 ], xf[ 12 ], xf[ 13 ], xf[ 14 ], xf[ 15 ] );
+
+					iRefObject.applyMatrix4( matrix );
+
+					for ( var p = 0; p < objects.length; p ++ ) {
+
+						iRefObject.add( objects[ p ].clone( true ) );
+
+					}
+
+					object.add( iRefObject );
+
+				}
+
+			}
+
+		}
+
+		return object;
+
+	},
+
+	_createObject: function ( obj, mat ) {
+
+		var loader = new BufferGeometryLoader();
+
+		var attributes = obj.attributes;
+
+		switch ( obj.objectType ) {
+
+			case 'Point':
+			case 'PointSet':
+
+				var geometry = loader.parse( obj.geometry );
+				var material = new PointsMaterial( { sizeAttenuation: true, vertexColors: true } );
+				var points = new Points( geometry, material );
+				points.userData[ 'attributes' ] = attributes;
+				points.userData[ 'objectType' ] = obj.objectType;
+				return points;
+
+			case 'Mesh':
+			case 'Extrusion':
+
+				var geometry = loader.parse( obj.geometry );
+
+				var mesh = new Mesh( geometry, mat );
+				mesh.castShadow = attributes.castsShadows;
+				mesh.receiveShadow = attributes.receivesShadows;
+				mesh.userData[ 'attributes' ] = attributes;
+				mesh.userData[ 'objectType' ] = obj.objectType;
+
+				return mesh;
+
+			case 'Brep':
+
+				var brepObject = new Object3D();
+
+				for ( var j = 0; j < obj.geometry.length; j ++ ) {
+
+					geometry = loader.parse( obj.geometry[ j ] );
+					var mesh = new Mesh( geometry, mat );
+					mesh.castShadow = attributes.castsShadows;
+					mesh.receiveShadow = attributes.receivesShadows;
+
+					brepObject.add( mesh );
+
+				}
+
+				brepObject.userData[ 'attributes' ] = attributes;
+				brepObject.userData[ 'objectType' ] = obj.objectType;
+
+				return brepObject;
+
+			case 'Curve':
+
+				geometry = loader.parse( obj.geometry );
+
+				var _color = attributes.drawColor;
+				var color = new Color( _color.r / 255.0, _color.g / 255.0, _color.b / 255.0 );
+
+				var lines = new Line( geometry, new LineBasicMaterial( { color: color } ) );
+				lines.userData[ 'attributes' ] = attributes;
+				lines.userData[ 'objectType' ] = obj.objectType;
+
+				return lines;
+
+			case 'TextDot':
+
+				geometry = obj.geometry;
+				var dotDiv = document.createElement( 'div' );
+				dotDiv.style.fontFamily = geometry.fontFace;
+				dotDiv.style.fontSize = `${geometry.fontHeight}px`;
+				dotDiv.style.marginTop = '-1em';
+				dotDiv.style.color = '#FFF';
+				dotDiv.style.padding = '2px';
+				dotDiv.style.paddingRight = '5px';
+				dotDiv.style.paddingLeft = '5px';
+				dotDiv.style.borderRadius = '5px';
+				var color = attributes.drawColor;
+				dotDiv.style.background = `rgba(${color.r},${color.g},${color.b},${color.a})`;
+				dotDiv.textContent = geometry.text;
+				var dot = new CSS2DObject( dotDiv );
+				var location = geometry.point;
+				dot.position.set( location[ 0 ], location[ 1 ], location[ 2 ] );
+
+				dot.userData[ 'attributes' ] = attributes;
+				dot.userData[ 'objectType' ] = obj.objectType;
+
+				return dot;
+
+		}
+
+	},
+
+	_initLibrary: function () {
+
+		if ( ! this.libraryPending ) {
+
+			// Load rhino3dm wrapper.
+			var jsLoader = new FileLoader( this.manager );
+			jsLoader.setPath( this.libraryPath );
+			var jsContent = new Promise( ( resolve, reject ) => {
+
+				jsLoader.load( 'rhino3dm.js', resolve, undefined, reject );
+
+			} );
+
+			// Load rhino3dm WASM binary.
+			var binaryLoader = new FileLoader( this.manager );
+			binaryLoader.setPath( this.libraryPath );
+			binaryLoader.setResponseType( 'arraybuffer' );
+			var binaryContent = new Promise( ( resolve, reject ) => {
+
+				binaryLoader.load( 'rhino3dm.wasm', resolve, undefined, reject );
+
+			} );
+
+			this.libraryPending = Promise.all( [ jsContent, binaryContent ] )
+				.then( ( [ jsContent, binaryContent ] ) => {
+
+					//this.libraryBinary = binaryContent;
+					this.libraryConfig.wasmBinary = binaryContent;
+
+					var fn = Rhino3dmLoader.Rhino3dmWorker.toString();
+
+					var body = [
+						'/* rhino3dm.js */',
+						jsContent,
+						'/* worker */',
+						fn.substring( fn.indexOf( '{' ) + 1, fn.lastIndexOf( '}' ) )
+					].join( '\n' );
+
+					this.workerSourceURL = URL.createObjectURL( new Blob( [ body ] ) );
+
+				} );
+
+		}
+
+		return this.libraryPending;
+
+	},
+
+	_getWorker: function ( taskCost ) {
+
+		return this._initLibrary().then( () => {
+
+			if ( this.workerPool.length < this.workerLimit ) {
+
+				var worker = new Worker( this.workerSourceURL );
+
+				worker._callbacks = {};
+				worker._taskCosts = {};
+				worker._taskLoad = 0;
+
+				worker.postMessage( {
+					type: 'init',
+					libraryConfig: this.libraryConfig
+				} );
+
+				worker.onmessage = function ( e ) {
+
+					var message = e.data;
+
+					switch ( message.type ) {
+
+						case 'decode':
+							worker._callbacks[ message.id ].resolve( message );
+							break;
+
+						case 'error':
+							worker._callbacks[ message.id ].reject( message );
+							break;
+
+						default:
+							console.error( 'THREE.Rhino3dmLoader: Unexpected message, "' + message.type + '"' );
+
+					}
+
+				};
+
+				this.workerPool.push( worker );
+
+			} else {
+
+				this.workerPool.sort( function ( a, b ) {
+
+					return a._taskLoad > b._taskLoad ? - 1 : 1;
+
+				} );
+
+			}
+
+			var worker = this.workerPool[ this.workerPool.length - 1 ];
+
+			worker._taskLoad += taskCost;
+
+			return worker;
+
+		} );
+
+	},
+
+	_releaseTask: function ( worker, taskID ) {
+
+		worker._taskLoad -= worker._taskCosts[ taskID ];
+		delete worker._callbacks[ taskID ];
+		delete worker._taskCosts[ taskID ];
+
+	},
+
+	dispose: function () {
+
+		for ( var i = 0; i < this.workerPool.length; ++ i ) {
+
+			this.workerPool[ i ].terminate();
+
+		}
+
+		this.workerPool.length = 0;
+
+		return this;
+
+	}
+
+} );
+
+/* WEB WORKER */
+
+Rhino3dmLoader.Rhino3dmWorker = function () {
+
+	var libraryPending;
+	var libraryConfig;
+	var rhino;
+
+	onmessage = function ( e ) {
+
+		var message = e.data;
+
+		switch ( message.type ) {
+
+			case 'init':
+
+				libraryConfig = message.libraryConfig;
+				var wasmBinary = libraryConfig.wasmBinary;
+				var RhinoModule;
+				libraryPending = new Promise( function ( resolve ) {
+
+					/* Like Basis Loader */
+					RhinoModule = { wasmBinary, onRuntimeInitialized: resolve };
+
+					rhino3dm( RhinoModule );
+
+				 } ).then( () => {
+
+					rhino = RhinoModule;
+
+				 } );
+
+				break;
+
+			case 'decode':
+
+				var buffer = message.buffer;
+				libraryPending.then( () => {
+
+					var data = decodeObjects( rhino, buffer );
+
+					self.postMessage( { type: 'decode', id: message.id, data } );
+
+				} );
+
+				break;
+
+		}
+
+	};
+
+	function decodeObjects( rhino, buffer ) {
+
+		var arr = new Uint8Array( buffer );
+		var doc = rhino.File3dm.fromByteArray( arr );
+
+		var objects = [];
+		var materials = [];
+		var layers = [];
+		var views = [];
+		var namedViews = [];
+		var groups = [];
+
+		//Handle objects
+
+		for ( var i = 0; i < doc.objects().count; i ++ ) {
+
+			var _object = doc.objects().get( i );
+
+			var object = extractObjectData( _object, doc );
+
+			if ( object !== undefined ) {
+
+				objects.push( object );
+
+			}
+
+			_object.delete();
+
+		}
+
+		// Handle instance definitions
+
+		for ( var i = 0; i < doc.instanceDefinitions().count(); i ++ ) {
+
+			var idef = doc.instanceDefinitions().get( i );
+			var idefAttributes = extractProperties( idef );
+			idefAttributes.objectIds = idef.getObjectIds();
+
+			objects.push( { geometry: null, attributes: idefAttributes, objectType: 'InstanceDefinition' } );
+
+		}
+
+		// Handle materials
+
+		for ( var i = 0; i < doc.materials().count(); i ++ ) {
+
+			var _material = doc.materials().get( i );
+			var materialProperties = extractProperties( _material );
+			var pbMaterialProperties = extractProperties( _material.physicallyBased() );
+
+			var material = Object.assign( materialProperties, pbMaterialProperties );
+
+			materials.push( material );
+
+			_material.delete();
+
+		}
+
+		// Handle layers
+
+		for ( var i = 0; i < doc.layers().count(); i ++ ) {
+
+			var _layer = doc.layers().get( i );
+			var layer = extractProperties( _layer );
+
+			layers.push( layer );
+
+			_layer.delete();
+
+		}
+
+		// Handle views
+
+		for ( var i = 0; i < doc.views().count(); i ++ ) {
+
+			var _view = doc.views().get( i );
+			var view = extractProperties( _view );
+
+			views.push( view );
+
+			_view.delete();
+
+		}
+
+		// Handle named views
+
+		for ( var i = 0; i < doc.namedViews().count(); i ++ ) {
+
+			var _namedView = doc.namedViews().get( i );
+			var namedView = extractProperties( _namedView );
+
+			namedViews.push( namedView );
+
+			_namedView.delete();
+
+		}
+
+		// Handle groups
+
+		for ( var i = 0; i < doc.groups().count(); i ++ ) {
+
+			var _group = doc.groups().get( i );
+			var group = extractProperties( _group );
+
+			groups.push( group );
+
+			_group.delete();
+
+		}
+
+		// Handle settings
+
+		var settings = extractProperties( doc.settings() );
+
+		//TODO: Handle other document stuff like dimstyles, instance definitions, bitmaps etc.
+
+		// Handle dimstyles
+		// console.log(`Dimstyle Count: ${doc.dimstyles().count()}`);
+
+		// Handle bitmaps
+		// console.log(`Bitmap Count: ${doc.bitmaps().count()}`);
+
+		// Handle instance definitions
+		// console.log(`Instance Definitions Count: ${doc.instanceDefinitions().count()}`);
+
+		// Handle strings -- this seems to be broken at the moment in rhino3dm
+		// console.log(`Strings Count: ${doc.strings().count()}`);
+		/*
+		for( var i = 0; i < doc.strings().count(); i++ ){
+
+			var _string= doc.strings().get( i );
+
+			console.log(_string);
+			var string = extractProperties( _group );
+
+			strings.push( string );
+
+			_string.delete();
+
+		}
+		*/
+
+		doc.delete();
+
+		return { objects, materials, layers, views, namedViews, groups, settings };
+
+	}
+
+	function extractObjectData( object, doc ) {
+
+		var _geometry = object.geometry();
+		var _attributes = object.attributes();
+		var objectType = _geometry.objectType;
+		var geometry = null;
+		var attributes = null;
+
+		// skip instance definition objects
+		//if( _attributes.isInstanceDefinitionObject ) { continue; }
+
+		// TODO: handle other geometry types
+		switch ( objectType ) {
+
+			case rhino.ObjectType.Curve:
+
+				var pts = curveToPoints( _geometry, 100 );
+
+				var position = {};
+				var color = {};
+				var attributes = {};
+				var data = {};
+
+				position.itemSize = 3;
+				position.type = 'Float32Array';
+				position.array = [];
+
+				for ( var j = 0; j < pts.length; j ++ ) {
+
+					position.array.push( pts[ j ][ 0 ] );
+					position.array.push( pts[ j ][ 1 ] );
+					position.array.push( pts[ j ][ 2 ] );
+
+				}
+
+				attributes.position = position;
+				data.attributes = attributes;
+
+				geometry = { data };
+
+				break;
+
+			case rhino.ObjectType.Point:
+
+				var pt = _geometry.location;
+
+				var position = {};
+				var color = {};
+				var attributes = {};
+				var data = {};
+
+				position.itemSize = 3;
+				position.type = 'Float32Array';
+				position.array = [ pt[ 0 ], pt[ 1 ], pt[ 2 ] ];
+
+				var _color = _attributes.drawColor( doc );
+
+				color.itemSize = 3;
+				color.type = 'Float32Array';
+				color.array = [ _color.r / 255.0, _color.g / 255.0, _color.b / 255.0 ];
+
+				attributes.position = position;
+				attributes.color = color;
+				data.attributes = attributes;
+
+				geometry = { data };
+
+				break;
+
+			case rhino.ObjectType.PointSet:
+			case rhino.ObjectType.Mesh:
+
+				geometry = _geometry.toThreejsJSON();
+
+				break;
+
+			case rhino.ObjectType.Brep:
+
+				var faces = _geometry.faces();
+				geometry = [];
+
+				for ( var faceIndex = 0; faceIndex < faces.count; faceIndex ++ ) {
+
+					var face = faces.get( faceIndex );
+					var mesh = face.getMesh( rhino.MeshType.Any );
+
+					if ( mesh ) {
+
+						geometry.push( mesh.toThreejsJSON() );
+						mesh.delete();
+
+					}
+
+					face.delete();
+
+				}
+
+				faces.delete();
+
+				break;
+
+			case rhino.ObjectType.Extrusion:
+
+				var mesh = _geometry.getMesh( rhino.MeshType.Any );
+
+				if ( mesh ) {
+
+					geometry = mesh.toThreejsJSON();
+					mesh.delete();
+
+				}
+
+				break;
+
+			case rhino.ObjectType.TextDot:
+
+				geometry = extractProperties( _geometry );
+
+				break;
+
+			case rhino.ObjectType.InstanceReference:
+
+				geometry = extractProperties( _geometry );
+				geometry.xform = extractProperties( _geometry.xform );
+				geometry.xform.array = _geometry.xform.toFloatArray( true );
+
+				break;
+
+				/*
+				case rhino.ObjectType.Light:
+				case rhino.ObjectType.Annotation:
+				case rhino.ObjectType.Hatch:
+				case rhino.ObjectType.SubD:
+				case rhino.ObjectType.ClipPlane:
+				*/
+
+			default:
+				console.warn( `THREE.3DMLoader: TODO: Implement ${objectType.constructor.name}` );
+				break;
+
+		}
+
+		if ( geometry ) {
+
+			var attributes = extractProperties( _attributes );
+
+			if ( _attributes.groupCount > 0 ) {
+
+				attributes.groupIds = _attributes.getGroupList();
+
+			}
+
+			attributes.drawColor = _attributes.drawColor( doc );
+
+			objectType = objectType.constructor.name;
+			objectType = objectType.substring( 11, objectType.length );
+
+			return { geometry, attributes, objectType };
+
+		}
+
+	}
+
+	function extractProperties( object ) {
+
+		var result = {};
+
+		for ( var property in object ) {
+
+			if ( typeof object[ property ] !== 'function' ) {
+
+				result[ property ] = object[ property ];
+
+			} else {
+
+				// console.log(`${property}: ${object[property]}`);
+
+			}
+
+		}
+
+		return result;
+
+	}
+
+	function curveToPoints( curve, pointLimit ) {
+
+		var pointCount = pointLimit;
+		var rc = [];
+		var ts = [];
+
+		if ( curve instanceof rhino.LineCurve ) {
+
+			return [ curve.pointAtStart, curve.pointAtEnd ];
+
+		}
+
+		if ( curve instanceof rhino.PolylineCurve ) {
+
+			pointCount = curve.pointCount;
+			for ( var i = 0; i < pointCount; i ++ ) {
+
+				rc.push( curve.point( i ) );
+
+			}
+
+			return rc;
+
+		}
+
+		if ( curve instanceof rhino.PolyCurve ) {
+
+			var segmentCount = curve.segmentCount;
+
+			for ( var i = 0; i < segmentCount; i ++ ) {
+
+				var segment = curve.segmentCurve( i );
+				var segmentArray = curveToPoints( segment );
+				rc = rc.concat( segmentArray );
+				segment.delete();
+
+			}
+
+			return rc;
+
+		}
+
+		if ( curve instanceof rhino.NurbsCurve && curve.degree === 1 ) {
+
+			// console.info( 'degree 1 curve' );
+
+		}
+
+		var domain = curve.domain;
+		var divisions = pointCount - 1.0;
+
+		for ( var j = 0; j < pointCount; j ++ ) {
+
+			var t = domain[ 0 ] + ( j / divisions ) * ( domain[ 1 ] - domain[ 0 ] );
+
+			if ( t === domain[ 0 ] || t === domain[ 1 ] ) {
+
+				ts.push( t );
+				continue;
+
+			}
+
+			var tan = curve.tangentAt( t );
+			var prevTan = curve.tangentAt( ts.slice( - 1 )[ 0 ] );
+
+			// Duplicaated from THREE.Vector3
+			// How to pass imports to worker?
+
+			var tS = tan[ 0 ] * tan[ 0 ] + tan[ 1 ] * tan[ 1 ] + tan[ 2 ] * tan[ 2 ];
+			var ptS = prevTan[ 0 ] * prevTan[ 0 ] + prevTan[ 1 ] * prevTan[ 1 ] + prevTan[ 2 ] * prevTan[ 2 ];
+
+			var denominator = Math.sqrt( tS * ptS );
+
+			var angle;
+
+			if ( denominator === 0 ) {
+
+				angle = Math.PI / 2;
+
+			} else {
+
+				var theta = ( tan.x * prevTan.x + tan.y * prevTan.y + tan.z * prevTan.z ) / denominator;
+				angle = Math.acos( Math.max( - 1, Math.min( 1, theta ) ) );
+
+			}
+
+			if ( angle < 0.1 ) continue;
+
+			ts.push( t );
+
+		}
+
+		rc = ts.map( t => curve.pointAt( t ) );
+		return rc;
+
+	}
+
+};
+
+export { Rhino3dmLoader };

+ 1 - 1
examples/jsm/loaders/3MFLoader.js

@@ -110,7 +110,7 @@ ThreeMFLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 			try {
 
-				zip = new JSZip( data );
+				zip = new JSZip( data ); // eslint-disable-line no-undef
 
 			} catch ( e ) {
 

+ 1 - 1
examples/jsm/loaders/AMFLoader.js

@@ -88,7 +88,7 @@ AMFLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 				try {
 
-					zip = new JSZip( data );
+					zip = new JSZip( data ); // eslint-disable-line no-undef
 
 				} catch ( e ) {
 

+ 2 - 2
examples/jsm/loaders/AssimpLoader.js

@@ -1581,7 +1581,7 @@ AssimpLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 		function ReadBounds( stream, T /*p*/, n ) {
 
 			// not sure what to do here, the data isn't really useful.
-			return stream.Seek( sizeof( T ) * n, aiOrigin_CUR );
+			return stream.Seek( sizeof( T ) * n, aiOrigin_CUR ); // eslint-disable-line no-undef
 
 		}
 
@@ -2283,7 +2283,7 @@ AssimpLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 				var compressedData = [];
 				stream.Read( compressedData, 1, compressedSize );
 				var uncompressedData = [];
-				uncompress( uncompressedData, uncompressedSize, compressedData, compressedSize );
+				uncompress( uncompressedData, uncompressedSize, compressedData, compressedSize ); // eslint-disable-line no-undef
 				var buff = new ArrayBuffer( uncompressedData );
 				ReadBinaryScene( buff, pScene );
 

+ 1 - 1
examples/jsm/loaders/BasisTextureLoader.js

@@ -447,7 +447,7 @@ BasisTextureLoader.BasisWorker = function () {
 		transcoderPending = new Promise( ( resolve ) => {
 
 			BasisModule = { wasmBinary, onRuntimeInitialized: resolve };
-			BASIS( BasisModule );
+			BASIS( BasisModule ); // eslint-disable-line no-undef
 
 		} ).then( () => {
 

+ 1 - 1
examples/jsm/loaders/DRACOLoader.js

@@ -432,7 +432,7 @@ DRACOLoader.DRACOWorker = function () {
 
 					};
 
-					DracoDecoderModule( decoderConfig );
+					DracoDecoderModule( decoderConfig ); // eslint-disable-line no-undef
 
 				} );
 				break;

+ 107 - 10
examples/jsm/loaders/EXRLoader.js

@@ -951,7 +951,7 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 
 				for ( let comp = 0; comp < numComp; ++ comp ) {
 
-					let type = channelData[ cscSet.idx[ comp ] ].type;
+					const type = channelData[ cscSet.idx[ comp ] ].type;
 
 					for ( let y = 8 * blocky; y < 8 * blocky + maxY; ++ y ) {
 
@@ -959,7 +959,7 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 
 						for ( let blockx = 0; blockx < numFullBlocksX; ++ blockx ) {
 
-							let src = blockx * 64 + ( ( y & 0x7 ) * 8 );
+							const src = blockx * 64 + ( ( y & 0x7 ) * 8 );
 
 							dataView.setUint16( offset + 0 * INT16_SIZE * type, rowBlock[ comp ][ src + 0 ], true );
 							dataView.setUint16( offset + 1 * INT16_SIZE * type, rowBlock[ comp ][ src + 1 ], true );
@@ -982,8 +982,8 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 
 						for ( let y = 8 * blocky; y < 8 * blocky + maxY; ++ y ) {
 
-							let offset = rowOffsets[ comp ][ y ] + 8 * numFullBlocksX * INT16_SIZE * type;
-							let src = numFullBlocksX * 64 + ( ( y & 0x7 ) * 8 );
+							const offset = rowOffsets[ comp ][ y ] + 8 * numFullBlocksX * INT16_SIZE * type;
+							const src = numFullBlocksX * 64 + ( ( y & 0x7 ) * 8 );
 
 							for ( let x = 0; x < maxX; ++ x ) {
 
@@ -1012,7 +1012,7 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 
 				for ( var y = 0; y < height; ++ y ) {
 
-					let offset = rowOffsets[ comp ][ y ];
+					const offset = rowOffsets[ comp ][ y ];
 
 					for ( var x = 0; x < width; ++ x ) {
 
@@ -1411,6 +1411,83 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 
 		}
 
+		function uncompressPXR( info ) {
+
+			var compressed = info.array.slice( info.offset.value, info.offset.value + info.size );
+
+			if ( typeof Inflate === 'undefined' ) {
+
+				console.error( 'THREE.EXRLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js' );
+
+			}
+
+			const inflate = new Inflate( compressed, { resize: true, verify: true } ); // eslint-disable-line no-undef
+			const rawBuffer = new Uint8Array( inflate.decompress().buffer );
+
+			const sz = info.lines * info.channels * info.width;
+			const tmpBuffer = ( info.type == 1 ) ? new Uint16Array( sz ) : new Uint32Array( sz );
+
+			let tmpBufferEnd = 0;
+			let writePtr = 0;
+			const ptr = new Array( 4 );
+
+			for ( let y = 0; y < info.lines; y ++ ) {
+
+				for ( let c = 0; c < info.channels; c ++ ) {
+
+					let pixel = 0;
+
+					switch ( info.type ) {
+
+						case 1:
+
+							ptr[ 0 ] = tmpBufferEnd;
+							ptr[ 1 ] = ptr[ 0 ] + info.width;
+							tmpBufferEnd = ptr[ 1 ] + info.width;
+
+							for ( let j = 0; j < info.width; ++ j ) {
+
+								const diff = ( rawBuffer[ ptr[ 0 ] ++ ] << 8 ) | rawBuffer[ ptr[ 1 ] ++ ];
+
+								pixel += diff;
+
+								tmpBuffer[ writePtr ] = pixel;
+								writePtr ++;
+
+							}
+
+							break;
+
+						case 2:
+
+							ptr[ 0 ] = tmpBufferEnd;
+							ptr[ 1 ] = ptr[ 0 ] + info.width;
+							ptr[ 2 ] = ptr[ 1 ] + info.width;
+							tmpBufferEnd = ptr[ 2 ] + info.width;
+
+							for ( let j = 0; j < info.width; ++ j ) {
+
+								const diff = ( rawBuffer[ ptr[ 0 ] ++ ] << 24 ) | ( rawBuffer[ ptr[ 1 ] ++ ] << 16 ) | ( rawBuffer[ ptr[ 2 ] ++ ] << 8 );
+
+								pixel += diff;
+
+								tmpBuffer[ writePtr ] = pixel;
+								writePtr ++;
+
+							}
+
+							break;
+
+					}
+
+				}
+
+			}
+
+			return new DataView( tmpBuffer.buffer );
+
+		}
+
 		function uncompressDWA( info ) {
 
 			var inDataView = info.viewer;
@@ -1524,7 +1601,7 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 					case DEFLATE:
 
 						var compressed = info.array.slice( inOffset.value, inOffset.value + dwaHeader.totalAcUncompressedCount );
-						var inflate = new Inflate( compressed, { resize: true, verify: true } );
+						var inflate = new Inflate( compressed, { resize: true, verify: true } ); // eslint-disable-line no-undef
 						var acBuffer = new Uint16Array( inflate.decompress().buffer );
 						inOffset.value += dwaHeader.totalAcUncompressedCount;
 						break;
@@ -1551,7 +1628,7 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 			if ( dwaHeader.rleRawSize > 0 ) {
 
 				var compressed = info.array.slice( inOffset.value, inOffset.value + dwaHeader.rleCompressedSize );
-				var inflate = new Inflate( compressed, { resize: true, verify: true } );
+				var inflate = new Inflate( compressed, { resize: true, verify: true } ); // eslint-disable-line no-undef
 				var rleBuffer = decodeRunLength( inflate.decompress().buffer );
 
 				inOffset.value += dwaHeader.rleCompressedSize;
@@ -1998,9 +2075,15 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 
 				return parseTimecode( dataView, offset );
 
+			} else if ( type === 'preview' ) {
+
+				offset.value += size;
+				return 'skipped';
+
 			} else {
 
-				throw 'Cannot parse value for unsupported type: ' + type;
+				offset.value += size;
+				return undefined;
 
 			}
 
@@ -2035,7 +2118,15 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 				var attributeSize = parseUint32( bufferDataView, offset );
 				var attributeValue = parseValue( bufferDataView, buffer, offset, attributeType, attributeSize );
 
-				EXRHeader[ attributeName ] = attributeValue;
+				if ( attributeValue === undefined ) {
+
+					console.warn( `EXRLoader.parse: skipped unknown header attribute type \'${ attributeType }\'.` );
+
+				} else {
+
+					EXRHeader[ attributeName ] = attributeValue;
+
+				}
 
 			}
 
@@ -2079,6 +2170,12 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 				uncompress = uncompressPIZ;
 				break;
 
+			case 'PXR24_COMPRESSION':
+
+				scanlineBlockSize = 16;
+				uncompress = uncompressPXR;
+				break;
+
 			case 'DWAA_COMPRESSION':
 
 				scanlineBlockSize = 32;
@@ -2308,7 +2405,7 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 
 		}
 
-		let format = ( this.type === UnsignedByteType ) ? RGBEFormat : ( numChannels === 4 ) ? RGBAFormat : RGBFormat;
+		const format = ( this.type === UnsignedByteType ) ? RGBEFormat : ( numChannels === 4 ) ? RGBAFormat : RGBFormat;
 
 		return {
 			header: EXRHeader,

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно