@babylonjs/core 5.35.0 → 5.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/Audio/sound.d.ts +5 -0
  2. package/Audio/sound.js +7 -0
  3. package/Audio/sound.js.map +1 -1
  4. package/Debug/physicsViewer.d.ts +4 -3
  5. package/Debug/physicsViewer.js +2 -2
  6. package/Debug/physicsViewer.js.map +1 -1
  7. package/Engines/Extensions/engine.renderTarget.js +15 -15
  8. package/Engines/Extensions/engine.renderTarget.js.map +1 -1
  9. package/Engines/Extensions/engine.renderTargetCube.d.ts +1 -1
  10. package/Engines/Extensions/engine.renderTargetCube.js.map +1 -1
  11. package/Engines/Extensions/engine.views.d.ts +4 -0
  12. package/Engines/Extensions/engine.views.js +61 -42
  13. package/Engines/Extensions/engine.views.js.map +1 -1
  14. package/Engines/Native/nativeHardwareTexture.d.ts +14 -0
  15. package/Engines/Native/nativeHardwareTexture.js +24 -0
  16. package/Engines/Native/nativeHardwareTexture.js.map +1 -0
  17. package/Engines/Native/nativeInterfaces.d.ts +22 -15
  18. package/Engines/Native/nativeInterfaces.js.map +1 -1
  19. package/Engines/Native/nativePipelineContext.d.ts +252 -0
  20. package/Engines/Native/nativePipelineContext.js +502 -0
  21. package/Engines/Native/nativePipelineContext.js.map +1 -0
  22. package/Engines/Native/nativeRenderTargetWrapper.d.ts +16 -0
  23. package/Engines/Native/nativeRenderTargetWrapper.js +33 -0
  24. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -0
  25. package/Engines/WebGPU/Extensions/engine.renderTarget.js +3 -3
  26. package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
  27. package/Engines/WebGPU/Extensions/engine.renderTargetCube.js.map +1 -1
  28. package/Engines/engine.d.ts +1 -0
  29. package/Engines/engine.js +24 -18
  30. package/Engines/engine.js.map +1 -1
  31. package/Engines/nativeEngine.d.ts +18 -17
  32. package/Engines/nativeEngine.js +100 -598
  33. package/Engines/nativeEngine.js.map +1 -1
  34. package/Engines/nullEngine.d.ts +1 -1
  35. package/Engines/nullEngine.js.map +1 -1
  36. package/Engines/thinEngine.d.ts +1 -1
  37. package/Engines/thinEngine.js +41 -38
  38. package/Engines/thinEngine.js.map +1 -1
  39. package/Engines/webgpuEngine.js.map +1 -1
  40. package/Gizmos/planeRotationGizmo.js +3 -1
  41. package/Gizmos/planeRotationGizmo.js.map +1 -1
  42. package/Inputs/scene.inputManager.js +4 -4
  43. package/Inputs/scene.inputManager.js.map +1 -1
  44. package/Loading/Plugins/babylonFileLoader.js +3 -3
  45. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  46. package/Materials/Node/Blocks/Dual/textureBlock.js +1 -1
  47. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  48. package/Materials/Node/nodeMaterial.d.ts +19 -1
  49. package/Materials/Node/nodeMaterial.js +30 -0
  50. package/Materials/Node/nodeMaterial.js.map +1 -1
  51. package/Materials/Node/nodeMaterialBuildStateSharedData.d.ts +2 -8
  52. package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
  53. package/Materials/Textures/baseTexture.d.ts +2 -1
  54. package/Materials/Textures/baseTexture.js +3 -2
  55. package/Materials/Textures/baseTexture.js.map +1 -1
  56. package/Materials/Textures/internalTexture.d.ts +2 -0
  57. package/Materials/Textures/internalTexture.js +4 -0
  58. package/Materials/Textures/internalTexture.js.map +1 -1
  59. package/Materials/Textures/mirrorTexture.js +0 -2
  60. package/Materials/Textures/mirrorTexture.js.map +1 -1
  61. package/Materials/Textures/renderTargetTexture.d.ts +53 -3
  62. package/Materials/Textures/renderTargetTexture.js +25 -25
  63. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  64. package/Materials/Textures/texture.d.ts +2 -0
  65. package/Materials/Textures/texture.js +35 -7
  66. package/Materials/Textures/texture.js.map +1 -1
  67. package/Materials/Textures/textureCreationOptions.d.ts +4 -1
  68. package/Materials/Textures/textureCreationOptions.js.map +1 -1
  69. package/Materials/material.js +1 -1
  70. package/Materials/material.js.map +1 -1
  71. package/Meshes/abstractMesh.d.ts +4 -4
  72. package/Meshes/abstractMesh.js +4 -4
  73. package/Meshes/abstractMesh.js.map +1 -1
  74. package/Meshes/mesh.d.ts +2 -2
  75. package/Meshes/mesh.js +1 -1
  76. package/Meshes/mesh.js.map +1 -1
  77. package/Misc/copyTextureToTexture.d.ts +9 -2
  78. package/Misc/copyTextureToTexture.js +23 -1
  79. package/Misc/copyTextureToTexture.js.map +1 -1
  80. package/Particles/IParticleSystem.d.ts +15 -1
  81. package/Particles/IParticleSystem.js.map +1 -1
  82. package/Particles/gpuParticleSystem.d.ts +24 -2
  83. package/Particles/gpuParticleSystem.js +98 -43
  84. package/Particles/gpuParticleSystem.js.map +1 -1
  85. package/Particles/particleSystem.d.ts +6 -1
  86. package/Particles/particleSystem.js +7 -2
  87. package/Particles/particleSystem.js.map +1 -1
  88. package/Physics/IPhysicsEngine.d.ts +8 -108
  89. package/Physics/IPhysicsEngine.js.map +1 -1
  90. package/Physics/Plugins/ammoJSPlugin.d.ts +1 -389
  91. package/Physics/Plugins/ammoJSPlugin.js +2 -1414
  92. package/Physics/Plugins/ammoJSPlugin.js.map +1 -1
  93. package/Physics/Plugins/cannonJSPlugin.d.ts +1 -75
  94. package/Physics/Plugins/cannonJSPlugin.js +2 -664
  95. package/Physics/Plugins/cannonJSPlugin.js.map +1 -1
  96. package/Physics/Plugins/oimoJSPlugin.d.ts +1 -59
  97. package/Physics/Plugins/oimoJSPlugin.js +2 -432
  98. package/Physics/Plugins/oimoJSPlugin.js.map +1 -1
  99. package/Physics/index.d.ts +3 -6
  100. package/Physics/index.js +3 -6
  101. package/Physics/index.js.map +1 -1
  102. package/Physics/physicsEngine.d.ts +1 -135
  103. package/Physics/physicsEngine.js +2 -221
  104. package/Physics/physicsEngine.js.map +1 -1
  105. package/Physics/physicsEngineComponent.d.ts +7 -42
  106. package/Physics/physicsEngineComponent.js +11 -71
  107. package/Physics/physicsEngineComponent.js.map +1 -1
  108. package/Physics/physicsHelper.d.ts +1 -411
  109. package/Physics/physicsHelper.js +2 -708
  110. package/Physics/physicsHelper.js.map +1 -1
  111. package/Physics/physicsImpostor.d.ts +1 -640
  112. package/Physics/physicsImpostor.js +2 -1004
  113. package/Physics/physicsImpostor.js.map +1 -1
  114. package/Physics/physicsJoint.d.ts +1 -275
  115. package/Physics/physicsJoint.js +2 -222
  116. package/Physics/physicsJoint.js.map +1 -1
  117. package/Physics/v1/IPhysicsEnginePlugin.d.ts +73 -0
  118. package/Physics/v1/IPhysicsEnginePlugin.js +2 -0
  119. package/Physics/v1/IPhysicsEnginePlugin.js.map +1 -0
  120. package/Physics/v1/Plugins/ammoJSPlugin.d.ts +401 -0
  121. package/Physics/v1/Plugins/ammoJSPlugin.js +1431 -0
  122. package/Physics/v1/Plugins/ammoJSPlugin.js.map +1 -0
  123. package/Physics/v1/Plugins/cannonJSPlugin.d.ts +87 -0
  124. package/Physics/v1/Plugins/cannonJSPlugin.js +683 -0
  125. package/Physics/v1/Plugins/cannonJSPlugin.js.map +1 -0
  126. package/Physics/{Plugins → v1/Plugins}/index.d.ts +0 -0
  127. package/Physics/{Plugins → v1/Plugins}/index.js +0 -0
  128. package/Physics/v1/Plugins/index.js.map +1 -0
  129. package/Physics/v1/Plugins/oimoJSPlugin.d.ts +71 -0
  130. package/Physics/v1/Plugins/oimoJSPlugin.js +450 -0
  131. package/Physics/v1/Plugins/oimoJSPlugin.js.map +1 -0
  132. package/Physics/v1/index.d.ts +7 -0
  133. package/Physics/v1/index.js +9 -0
  134. package/Physics/v1/index.js.map +1 -0
  135. package/Physics/v1/physicsEngine.d.ts +147 -0
  136. package/Physics/v1/physicsEngine.js +237 -0
  137. package/Physics/v1/physicsEngine.js.map +1 -0
  138. package/Physics/v1/physicsEngineComponent.d.ts +45 -0
  139. package/Physics/v1/physicsEngineComponent.js +70 -0
  140. package/Physics/v1/physicsEngineComponent.js.map +1 -0
  141. package/Physics/v1/physicsHelper.d.ts +411 -0
  142. package/Physics/v1/physicsHelper.js +709 -0
  143. package/Physics/v1/physicsHelper.js.map +1 -0
  144. package/Physics/v1/physicsImpostor.d.ts +636 -0
  145. package/Physics/v1/physicsImpostor.js +1001 -0
  146. package/Physics/v1/physicsImpostor.js.map +1 -0
  147. package/Physics/v1/physicsJoint.d.ts +275 -0
  148. package/Physics/v1/physicsJoint.js +223 -0
  149. package/Physics/v1/physicsJoint.js.map +1 -0
  150. package/Physics/v2/IPhysicsEnginePlugin.d.ts +170 -0
  151. package/Physics/v2/IPhysicsEnginePlugin.js +47 -0
  152. package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -0
  153. package/Physics/v2/Plugins/index.d.ts +0 -0
  154. package/Physics/v2/Plugins/index.js +2 -0
  155. package/Physics/v2/Plugins/index.js.map +1 -0
  156. package/Physics/v2/index.d.ts +6 -0
  157. package/Physics/v2/index.js +8 -0
  158. package/Physics/v2/index.js.map +1 -0
  159. package/Physics/v2/physicsAggregate.d.ts +114 -0
  160. package/Physics/v2/physicsAggregate.js +46 -0
  161. package/Physics/v2/physicsAggregate.js.map +1 -0
  162. package/Physics/v2/physicsBody.d.ts +109 -0
  163. package/Physics/v2/physicsBody.js +158 -0
  164. package/Physics/v2/physicsBody.js.map +1 -0
  165. package/Physics/v2/physicsConstraint.d.ts +184 -0
  166. package/Physics/v2/physicsConstraint.js +257 -0
  167. package/Physics/v2/physicsConstraint.js.map +1 -0
  168. package/Physics/v2/physicsEngine.d.ts +103 -0
  169. package/Physics/v2/physicsEngine.js +146 -0
  170. package/Physics/v2/physicsEngine.js.map +1 -0
  171. package/Physics/v2/physicsEngineComponent.d.ts +31 -0
  172. package/Physics/v2/physicsEngineComponent.js +50 -0
  173. package/Physics/v2/physicsEngineComponent.js.map +1 -0
  174. package/Physics/v2/physicsMaterial.d.ts +45 -0
  175. package/Physics/v2/physicsMaterial.js +67 -0
  176. package/Physics/v2/physicsMaterial.js.map +1 -0
  177. package/Physics/v2/physicsShape.d.ts +182 -0
  178. package/Physics/v2/physicsShape.js +229 -0
  179. package/Physics/v2/physicsShape.js.map +1 -0
  180. package/PostProcesses/postProcess.d.ts +3 -1
  181. package/PostProcesses/postProcess.js +4 -1
  182. package/PostProcesses/postProcess.js.map +1 -1
  183. package/Rendering/fluidRenderer/fluidRenderer.d.ts +153 -0
  184. package/Rendering/fluidRenderer/fluidRenderer.js +410 -0
  185. package/Rendering/fluidRenderer/fluidRenderer.js.map +1 -0
  186. package/Rendering/fluidRenderer/fluidRenderingDepthTextureCopy.d.ts +13 -0
  187. package/Rendering/fluidRenderer/fluidRenderingDepthTextureCopy.js +31 -0
  188. package/Rendering/fluidRenderer/fluidRenderingDepthTextureCopy.js.map +1 -0
  189. package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +81 -0
  190. package/Rendering/fluidRenderer/fluidRenderingObject.js +180 -0
  191. package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -0
  192. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.d.ts +63 -0
  193. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +130 -0
  194. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -0
  195. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +64 -0
  196. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +104 -0
  197. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -0
  198. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.d.ts +234 -0
  199. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +690 -0
  200. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -0
  201. package/Rendering/fluidRenderer/fluidRenderingTextures.d.ts +56 -0
  202. package/Rendering/fluidRenderer/fluidRenderingTextures.js +261 -0
  203. package/Rendering/fluidRenderer/fluidRenderingTextures.js.map +1 -0
  204. package/Rendering/fluidRenderer/index.d.ts +5 -0
  205. package/Rendering/fluidRenderer/index.js +6 -0
  206. package/Rendering/fluidRenderer/index.js.map +1 -0
  207. package/Rendering/index.d.ts +1 -0
  208. package/Rendering/index.js +2 -0
  209. package/Rendering/index.js.map +1 -1
  210. package/Shaders/copyTextureToTexture.fragment.js +4 -1
  211. package/Shaders/copyTextureToTexture.fragment.js.map +1 -1
  212. package/Shaders/fluidRenderingBilateralBlur.fragment.d.ts +5 -0
  213. package/Shaders/fluidRenderingBilateralBlur.fragment.js +9 -0
  214. package/Shaders/fluidRenderingBilateralBlur.fragment.js.map +1 -0
  215. package/Shaders/fluidRenderingParticleDepth.fragment.d.ts +5 -0
  216. package/Shaders/fluidRenderingParticleDepth.fragment.js +17 -0
  217. package/Shaders/fluidRenderingParticleDepth.fragment.js.map +1 -0
  218. package/Shaders/fluidRenderingParticleDepth.vertex.d.ts +5 -0
  219. package/Shaders/fluidRenderingParticleDepth.vertex.js +13 -0
  220. package/Shaders/fluidRenderingParticleDepth.vertex.js.map +1 -0
  221. package/Shaders/fluidRenderingParticleDiffuse.fragment.d.ts +5 -0
  222. package/Shaders/fluidRenderingParticleDiffuse.fragment.js +9 -0
  223. package/Shaders/fluidRenderingParticleDiffuse.fragment.js.map +1 -0
  224. package/Shaders/fluidRenderingParticleDiffuse.vertex.d.ts +5 -0
  225. package/Shaders/fluidRenderingParticleDiffuse.vertex.js +4 -0
  226. package/Shaders/fluidRenderingParticleDiffuse.vertex.js.map +1 -0
  227. package/Shaders/fluidRenderingParticleThickness.fragment.d.ts +5 -0
  228. package/Shaders/fluidRenderingParticleThickness.fragment.js +9 -0
  229. package/Shaders/fluidRenderingParticleThickness.fragment.js.map +1 -0
  230. package/Shaders/fluidRenderingParticleThickness.vertex.d.ts +5 -0
  231. package/Shaders/fluidRenderingParticleThickness.vertex.js +9 -0
  232. package/Shaders/fluidRenderingParticleThickness.vertex.js.map +1 -0
  233. package/Shaders/fluidRenderingRender.fragment.d.ts +5 -0
  234. package/Shaders/fluidRenderingRender.fragment.js +46 -0
  235. package/Shaders/fluidRenderingRender.fragment.js.map +1 -0
  236. package/Shaders/fluidRenderingStandardBlur.fragment.d.ts +5 -0
  237. package/Shaders/fluidRenderingStandardBlur.fragment.js +9 -0
  238. package/Shaders/fluidRenderingStandardBlur.fragment.js.map +1 -0
  239. package/XR/features/WebXRControllerPhysics.d.ts +1 -1
  240. package/XR/features/WebXRControllerPhysics.js +1 -1
  241. package/XR/features/WebXRControllerPhysics.js.map +1 -1
  242. package/XR/features/WebXRHandTracking.js +1 -1
  243. package/XR/features/WebXRHandTracking.js.map +1 -1
  244. package/package.json +1 -1
  245. package/scene.js +6 -1
  246. package/scene.js.map +1 -1
  247. package/sceneComponent.d.ts +3 -0
  248. package/sceneComponent.js +3 -0
  249. package/sceneComponent.js.map +1 -1
  250. package/Physics/Plugins/index.js.map +0 -1
@@ -0,0 +1,450 @@
1
+ import { PhysicsImpostor } from "../physicsImpostor.js";
2
+ import { PhysicsJoint } from "../physicsJoint.js";
3
+ import { Vector3, Quaternion } from "../../../Maths/math.vector.js";
4
+ import { Logger } from "../../../Misc/logger.js";
5
+ import { PhysicsRaycastResult } from "../../physicsRaycastResult.js";
6
+ import { Epsilon } from "../../../Maths/math.constants.js";
7
+ /** @internal */
8
+ export class OimoJSPlugin {
9
+ constructor(_useDeltaForWorldStep = true, iterations, oimoInjection = OIMO) {
10
+ this._useDeltaForWorldStep = _useDeltaForWorldStep;
11
+ this.name = "OimoJSPlugin";
12
+ this._fixedTimeStep = 1 / 60;
13
+ this._tmpImpostorsArray = [];
14
+ this._tmpPositionVector = Vector3.Zero();
15
+ this.BJSOIMO = oimoInjection;
16
+ this.world = new this.BJSOIMO.World({
17
+ iterations: iterations,
18
+ });
19
+ this.world.clear();
20
+ this._raycastResult = new PhysicsRaycastResult();
21
+ }
22
+ /**
23
+ *
24
+ * @returns plugin version
25
+ */
26
+ getPluginVersion() {
27
+ return 1;
28
+ }
29
+ setGravity(gravity) {
30
+ this.world.gravity.set(gravity.x, gravity.y, gravity.z);
31
+ }
32
+ setTimeStep(timeStep) {
33
+ this.world.timeStep = timeStep;
34
+ }
35
+ getTimeStep() {
36
+ return this.world.timeStep;
37
+ }
38
+ executeStep(delta, impostors) {
39
+ impostors.forEach(function (impostor) {
40
+ impostor.beforeStep();
41
+ });
42
+ this.world.timeStep = this._useDeltaForWorldStep ? delta : this._fixedTimeStep;
43
+ this.world.step();
44
+ impostors.forEach((impostor) => {
45
+ impostor.afterStep();
46
+ //update the ordered impostors array
47
+ this._tmpImpostorsArray[impostor.uniqueId] = impostor;
48
+ });
49
+ //check for collisions
50
+ let contact = this.world.contacts;
51
+ while (contact !== null) {
52
+ if (contact.touching && !contact.body1.sleeping && !contact.body2.sleeping) {
53
+ contact = contact.next;
54
+ continue;
55
+ }
56
+ //is this body colliding with any other? get the impostor
57
+ const mainImpostor = this._tmpImpostorsArray[+contact.body1.name];
58
+ const collidingImpostor = this._tmpImpostorsArray[+contact.body2.name];
59
+ if (!mainImpostor || !collidingImpostor) {
60
+ contact = contact.next;
61
+ continue;
62
+ }
63
+ mainImpostor.onCollide({ body: collidingImpostor.physicsBody, point: null, distance: 0, impulse: 0, normal: null });
64
+ collidingImpostor.onCollide({ body: mainImpostor.physicsBody, point: null, distance: 0, impulse: 0, normal: null });
65
+ contact = contact.next;
66
+ }
67
+ }
68
+ applyImpulse(impostor, force, contactPoint) {
69
+ const mass = impostor.physicsBody.mass;
70
+ impostor.physicsBody.applyImpulse(contactPoint.scale(this.world.invScale), force.scale(this.world.invScale * mass));
71
+ }
72
+ applyForce(impostor, force, contactPoint) {
73
+ Logger.Warn("Oimo doesn't support applying force. Using impulse instead.");
74
+ this.applyImpulse(impostor, force, contactPoint);
75
+ }
76
+ generatePhysicsBody(impostor) {
77
+ //parent-child relationship. Does this impostor has a parent impostor?
78
+ if (impostor.parent) {
79
+ if (impostor.physicsBody) {
80
+ this.removePhysicsBody(impostor);
81
+ //TODO is that needed?
82
+ impostor.forceUpdate();
83
+ }
84
+ return;
85
+ }
86
+ if (impostor.isBodyInitRequired()) {
87
+ const bodyConfig = {
88
+ name: impostor.uniqueId,
89
+ //Oimo must have mass, also for static objects.
90
+ config: [impostor.getParam("mass") || 0.001, impostor.getParam("friction"), impostor.getParam("restitution")],
91
+ size: [],
92
+ type: [],
93
+ pos: [],
94
+ posShape: [],
95
+ rot: [],
96
+ rotShape: [],
97
+ move: impostor.getParam("mass") !== 0,
98
+ density: impostor.getParam("mass"),
99
+ friction: impostor.getParam("friction"),
100
+ restitution: impostor.getParam("restitution"),
101
+ //Supporting older versions of Oimo
102
+ world: this.world,
103
+ };
104
+ const impostors = [impostor];
105
+ const addToArray = (parent) => {
106
+ if (!parent.getChildMeshes) {
107
+ return;
108
+ }
109
+ parent.getChildMeshes().forEach(function (m) {
110
+ if (m.physicsImpostor) {
111
+ impostors.push(m.physicsImpostor);
112
+ //m.physicsImpostor._init();
113
+ }
114
+ });
115
+ };
116
+ addToArray(impostor.object);
117
+ const checkWithEpsilon = (value) => {
118
+ return Math.max(value, Epsilon);
119
+ };
120
+ const globalQuaternion = new Quaternion();
121
+ impostors.forEach((i) => {
122
+ if (!i.object.rotationQuaternion) {
123
+ return;
124
+ }
125
+ //get the correct bounding box
126
+ const oldQuaternion = i.object.rotationQuaternion;
127
+ globalQuaternion.copyFrom(oldQuaternion);
128
+ i.object.rotationQuaternion.set(0, 0, 0, 1);
129
+ i.object.computeWorldMatrix(true);
130
+ const rot = globalQuaternion.toEulerAngles();
131
+ const impostorExtents = i.getObjectExtents();
132
+ // eslint-disable-next-line no-loss-of-precision
133
+ const radToDeg = 57.295779513082320876;
134
+ if (i === impostor) {
135
+ const center = impostor.getObjectCenter();
136
+ impostor.object.getAbsolutePivotPoint().subtractToRef(center, this._tmpPositionVector);
137
+ this._tmpPositionVector.divideInPlace(impostor.object.scaling);
138
+ //Can also use Array.prototype.push.apply
139
+ bodyConfig.pos.push(center.x);
140
+ bodyConfig.pos.push(center.y);
141
+ bodyConfig.pos.push(center.z);
142
+ bodyConfig.posShape.push(0, 0, 0);
143
+ bodyConfig.rotShape.push(0, 0, 0);
144
+ }
145
+ else {
146
+ const localPosition = i.object.position.clone();
147
+ bodyConfig.posShape.push(localPosition.x);
148
+ bodyConfig.posShape.push(localPosition.y);
149
+ bodyConfig.posShape.push(localPosition.z);
150
+ // bodyConfig.pos.push(0, 0, 0);
151
+ bodyConfig.rotShape.push(rot.x * radToDeg, rot.y * radToDeg, rot.z * radToDeg);
152
+ }
153
+ i.object.rotationQuaternion.copyFrom(globalQuaternion);
154
+ // register mesh
155
+ switch (i.type) {
156
+ case PhysicsImpostor.ParticleImpostor:
157
+ Logger.Warn("No Particle support in OIMO.js. using SphereImpostor instead");
158
+ // eslint-disable-next-line no-fallthrough
159
+ case PhysicsImpostor.SphereImpostor: {
160
+ const radiusX = impostorExtents.x;
161
+ const radiusY = impostorExtents.y;
162
+ const radiusZ = impostorExtents.z;
163
+ const size = Math.max(checkWithEpsilon(radiusX), checkWithEpsilon(radiusY), checkWithEpsilon(radiusZ)) / 2;
164
+ bodyConfig.type.push("sphere");
165
+ //due to the way oimo works with compounds, add 3 times
166
+ bodyConfig.size.push(size);
167
+ bodyConfig.size.push(size);
168
+ bodyConfig.size.push(size);
169
+ break;
170
+ }
171
+ case PhysicsImpostor.CylinderImpostor: {
172
+ const sizeX = checkWithEpsilon(impostorExtents.x) / 2;
173
+ const sizeY = checkWithEpsilon(impostorExtents.y);
174
+ bodyConfig.type.push("cylinder");
175
+ bodyConfig.size.push(sizeX);
176
+ bodyConfig.size.push(sizeY);
177
+ //due to the way oimo works with compounds, add one more value.
178
+ bodyConfig.size.push(sizeY);
179
+ break;
180
+ }
181
+ case PhysicsImpostor.PlaneImpostor:
182
+ case PhysicsImpostor.BoxImpostor:
183
+ default: {
184
+ const sizeX = checkWithEpsilon(impostorExtents.x);
185
+ const sizeY = checkWithEpsilon(impostorExtents.y);
186
+ const sizeZ = checkWithEpsilon(impostorExtents.z);
187
+ bodyConfig.type.push("box");
188
+ //if (i === impostor) {
189
+ bodyConfig.size.push(sizeX);
190
+ bodyConfig.size.push(sizeY);
191
+ bodyConfig.size.push(sizeZ);
192
+ //} else {
193
+ // bodyConfig.size.push(0,0,0);
194
+ //}
195
+ break;
196
+ }
197
+ }
198
+ //actually not needed, but hey...
199
+ i.object.rotationQuaternion = oldQuaternion;
200
+ });
201
+ impostor.physicsBody = this.world.add(bodyConfig);
202
+ // set the quaternion, ignoring the previously defined (euler) rotation
203
+ impostor.physicsBody.resetQuaternion(globalQuaternion);
204
+ // update with delta 0, so the body will receive the new rotation.
205
+ impostor.physicsBody.updatePosition(0);
206
+ }
207
+ else {
208
+ this._tmpPositionVector.copyFromFloats(0, 0, 0);
209
+ }
210
+ impostor.setDeltaPosition(this._tmpPositionVector);
211
+ //this._tmpPositionVector.addInPlace(impostor.mesh.getBoundingInfo().boundingBox.center);
212
+ //this.setPhysicsBodyTransformation(impostor, this._tmpPositionVector, impostor.mesh.rotationQuaternion);
213
+ }
214
+ removePhysicsBody(impostor) {
215
+ //impostor.physicsBody.dispose();
216
+ this.world.removeRigidBody(impostor.physicsBody);
217
+ }
218
+ generateJoint(impostorJoint) {
219
+ const mainBody = impostorJoint.mainImpostor.physicsBody;
220
+ const connectedBody = impostorJoint.connectedImpostor.physicsBody;
221
+ if (!mainBody || !connectedBody) {
222
+ return;
223
+ }
224
+ const jointData = impostorJoint.joint.jointData;
225
+ const options = jointData.nativeParams || {};
226
+ let type;
227
+ const nativeJointData = {
228
+ body1: mainBody,
229
+ body2: connectedBody,
230
+ axe1: options.axe1 || (jointData.mainAxis ? jointData.mainAxis.asArray() : null),
231
+ axe2: options.axe2 || (jointData.connectedAxis ? jointData.connectedAxis.asArray() : null),
232
+ pos1: options.pos1 || (jointData.mainPivot ? jointData.mainPivot.asArray() : null),
233
+ pos2: options.pos2 || (jointData.connectedPivot ? jointData.connectedPivot.asArray() : null),
234
+ min: options.min,
235
+ max: options.max,
236
+ collision: options.collision || jointData.collision,
237
+ spring: options.spring,
238
+ //supporting older version of Oimo
239
+ world: this.world,
240
+ };
241
+ switch (impostorJoint.joint.type) {
242
+ case PhysicsJoint.BallAndSocketJoint:
243
+ type = "jointBall";
244
+ break;
245
+ case PhysicsJoint.SpringJoint: {
246
+ Logger.Warn("OIMO.js doesn't support Spring Constraint. Simulating using DistanceJoint instead");
247
+ const springData = jointData;
248
+ nativeJointData.min = springData.length || nativeJointData.min;
249
+ //Max should also be set, just make sure it is at least min
250
+ nativeJointData.max = Math.max(nativeJointData.min, nativeJointData.max);
251
+ }
252
+ // eslint-disable-next-line no-fallthrough
253
+ case PhysicsJoint.DistanceJoint:
254
+ type = "jointDistance";
255
+ nativeJointData.max = jointData.maxDistance;
256
+ break;
257
+ case PhysicsJoint.PrismaticJoint:
258
+ type = "jointPrisme";
259
+ break;
260
+ case PhysicsJoint.SliderJoint:
261
+ type = "jointSlide";
262
+ break;
263
+ case PhysicsJoint.WheelJoint:
264
+ type = "jointWheel";
265
+ break;
266
+ case PhysicsJoint.HingeJoint:
267
+ default:
268
+ type = "jointHinge";
269
+ break;
270
+ }
271
+ nativeJointData.type = type;
272
+ impostorJoint.joint.physicsJoint = this.world.add(nativeJointData);
273
+ }
274
+ removeJoint(impostorJoint) {
275
+ //Bug in Oimo prevents us from disposing a joint in the playground
276
+ //joint.joint.physicsJoint.dispose();
277
+ //So we will bruteforce it!
278
+ try {
279
+ this.world.removeJoint(impostorJoint.joint.physicsJoint);
280
+ }
281
+ catch (e) {
282
+ Logger.Warn(e);
283
+ }
284
+ }
285
+ isSupported() {
286
+ return this.BJSOIMO !== undefined;
287
+ }
288
+ setTransformationFromPhysicsBody(impostor) {
289
+ if (!impostor.physicsBody.sleeping) {
290
+ if (impostor.physicsBody.shapes.next) {
291
+ let parent = impostor.physicsBody.shapes;
292
+ while (parent.next) {
293
+ parent = parent.next;
294
+ }
295
+ impostor.object.position.set(parent.position.x, parent.position.y, parent.position.z);
296
+ }
297
+ else {
298
+ const pos = impostor.physicsBody.getPosition();
299
+ impostor.object.position.set(pos.x, pos.y, pos.z);
300
+ }
301
+ if (impostor.object.rotationQuaternion) {
302
+ const quat = impostor.physicsBody.getQuaternion();
303
+ impostor.object.rotationQuaternion.set(quat.x, quat.y, quat.z, quat.w);
304
+ }
305
+ }
306
+ }
307
+ setPhysicsBodyTransformation(impostor, newPosition, newRotation) {
308
+ const body = impostor.physicsBody;
309
+ // disable bidirectional for compound meshes
310
+ if (impostor.physicsBody.shapes.next) {
311
+ return;
312
+ }
313
+ body.position.set(newPosition.x, newPosition.y, newPosition.z);
314
+ body.orientation.set(newRotation.x, newRotation.y, newRotation.z, newRotation.w);
315
+ body.syncShapes();
316
+ body.awake();
317
+ }
318
+ /*private _getLastShape(body: any): any {
319
+ var lastShape = body.shapes;
320
+ while (lastShape.next) {
321
+ lastShape = lastShape.next;
322
+ }
323
+ return lastShape;
324
+ }*/
325
+ setLinearVelocity(impostor, velocity) {
326
+ impostor.physicsBody.linearVelocity.set(velocity.x, velocity.y, velocity.z);
327
+ }
328
+ setAngularVelocity(impostor, velocity) {
329
+ impostor.physicsBody.angularVelocity.set(velocity.x, velocity.y, velocity.z);
330
+ }
331
+ getLinearVelocity(impostor) {
332
+ const v = impostor.physicsBody.linearVelocity;
333
+ if (!v) {
334
+ return null;
335
+ }
336
+ return new Vector3(v.x, v.y, v.z);
337
+ }
338
+ getAngularVelocity(impostor) {
339
+ const v = impostor.physicsBody.angularVelocity;
340
+ if (!v) {
341
+ return null;
342
+ }
343
+ return new Vector3(v.x, v.y, v.z);
344
+ }
345
+ setBodyMass(impostor, mass) {
346
+ const staticBody = mass === 0;
347
+ //this will actually set the body's density and not its mass.
348
+ //But this is how oimo treats the mass variable.
349
+ impostor.physicsBody.shapes.density = staticBody ? 1 : mass;
350
+ impostor.physicsBody.setupMass(staticBody ? 0x2 : 0x1);
351
+ }
352
+ getBodyMass(impostor) {
353
+ return impostor.physicsBody.shapes.density;
354
+ }
355
+ getBodyFriction(impostor) {
356
+ return impostor.physicsBody.shapes.friction;
357
+ }
358
+ setBodyFriction(impostor, friction) {
359
+ impostor.physicsBody.shapes.friction = friction;
360
+ }
361
+ getBodyRestitution(impostor) {
362
+ return impostor.physicsBody.shapes.restitution;
363
+ }
364
+ setBodyRestitution(impostor, restitution) {
365
+ impostor.physicsBody.shapes.restitution = restitution;
366
+ }
367
+ sleepBody(impostor) {
368
+ impostor.physicsBody.sleep();
369
+ }
370
+ wakeUpBody(impostor) {
371
+ impostor.physicsBody.awake();
372
+ }
373
+ updateDistanceJoint(joint, maxDistance, minDistance) {
374
+ joint.physicsJoint.limitMotor.upperLimit = maxDistance;
375
+ if (minDistance !== void 0) {
376
+ joint.physicsJoint.limitMotor.lowerLimit = minDistance;
377
+ }
378
+ }
379
+ setMotor(joint, speed, force, motorIndex) {
380
+ if (force !== undefined) {
381
+ Logger.Warn("OimoJS plugin currently has unexpected behavior when using setMotor with force parameter");
382
+ }
383
+ else {
384
+ force = 1e6;
385
+ }
386
+ speed *= -1;
387
+ //TODO separate rotational and transational motors.
388
+ const motor = motorIndex
389
+ ? joint.physicsJoint.rotationalLimitMotor2
390
+ : joint.physicsJoint.rotationalLimitMotor1 || joint.physicsJoint.rotationalLimitMotor || joint.physicsJoint.limitMotor;
391
+ if (motor) {
392
+ motor.setMotor(speed, force);
393
+ }
394
+ }
395
+ setLimit(joint, upperLimit, lowerLimit, motorIndex) {
396
+ //TODO separate rotational and transational motors.
397
+ const motor = motorIndex
398
+ ? joint.physicsJoint.rotationalLimitMotor2
399
+ : joint.physicsJoint.rotationalLimitMotor1 || joint.physicsJoint.rotationalLimitMotor || joint.physicsJoint.limitMotor;
400
+ if (motor) {
401
+ motor.setLimit(upperLimit, lowerLimit === void 0 ? -upperLimit : lowerLimit);
402
+ }
403
+ }
404
+ syncMeshWithImpostor(mesh, impostor) {
405
+ const body = impostor.physicsBody;
406
+ mesh.position.x = body.position.x;
407
+ mesh.position.y = body.position.y;
408
+ mesh.position.z = body.position.z;
409
+ if (mesh.rotationQuaternion) {
410
+ mesh.rotationQuaternion.x = body.orientation.x;
411
+ mesh.rotationQuaternion.y = body.orientation.y;
412
+ mesh.rotationQuaternion.z = body.orientation.z;
413
+ mesh.rotationQuaternion.w = body.orientation.w;
414
+ }
415
+ }
416
+ getRadius(impostor) {
417
+ return impostor.physicsBody.shapes.radius;
418
+ }
419
+ getBoxSizeToRef(impostor, result) {
420
+ const shape = impostor.physicsBody.shapes;
421
+ result.x = shape.halfWidth * 2;
422
+ result.y = shape.halfHeight * 2;
423
+ result.z = shape.halfDepth * 2;
424
+ }
425
+ dispose() {
426
+ this.world.clear();
427
+ }
428
+ /**
429
+ * Does a raycast in the physics world
430
+ * @param from when should the ray start?
431
+ * @param to when should the ray end?
432
+ * @returns PhysicsRaycastResult
433
+ */
434
+ raycast(from, to) {
435
+ Logger.Warn("raycast is not currently supported by the Oimo physics plugin");
436
+ this._raycastResult.reset(from, to);
437
+ return this._raycastResult;
438
+ }
439
+ /**
440
+ * Does a raycast in the physics world
441
+ * @param from when should the ray start?
442
+ * @param to when should the ray end?
443
+ * @param result resulting PhysicsRaycastResult
444
+ */
445
+ raycastToRef(from, to, result) {
446
+ Logger.Warn("raycast is not currently supported by the Oimo physics plugin");
447
+ result.reset(from, to);
448
+ }
449
+ }
450
+ //# sourceMappingURL=oimoJSPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oimoJSPlugin.js","sourceRoot":"","sources":["../../../../../../lts/core/generated/Physics/v1/Plugins/oimoJSPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,OAAO,EAA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ledJoint, DistanceJointData, SpringJointData } from \"../physicsJoint\";\r\nimport { PhysicsJoint } from \"../physicsJoint\";\r\nimport type { AbstractMesh } from \"../../../Meshes/abstractMesh\";\r\nimport { Vector3, Quaternion } from \"../../../Maths/math.vector\";\r\nimport type { Nullable } from \"../../../types\";\r\nimport { Logger } from \"../../../Misc/logger\";\r\nimport { PhysicsRaycastResult } from \"../../physicsRaycastResult\";\r\nimport type { IPhysicsEnginePlugin, PhysicsImpostorJoint } from \"../IPhysicsEnginePlugin\";\r\nimport { Epsilon } from \"../../../Maths/math.constants\";\r\n\r\ndeclare let OIMO: any;\r\n\r\n/** @internal */\r\nexport class OimoJSPlugin implements IPhysicsEnginePlugin {\r\n public world: any;\r\n public name: string = \"OimoJSPlugin\";\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public BJSOIMO: any;\r\n private _raycastResult: PhysicsRaycastResult;\r\n private _fixedTimeStep: number = 1 / 60;\r\n\r\n constructor(private _useDeltaForWorldStep: boolean = true, iterations?: number, oimoInjection = OIMO) {\r\n this.BJSOIMO = oimoInjection;\r\n this.world = new this.BJSOIMO.World({\r\n iterations: iterations,\r\n });\r\n this.world.clear();\r\n this._raycastResult = new PhysicsRaycastResult();\r\n }\r\n\r\n /**\r\n *\r\n * @returns plugin version\r\n */\r\n public getPluginVersion(): number {\r\n return 1;\r\n }\r\n\r\n public setGravity(gravity: Vector3) {\r\n this.world.gravity.set(gravity.x, gravity.y, gravity.z);\r\n }\r\n\r\n public setTimeStep(timeStep: number) {\r\n this.world.timeStep = timeStep;\r\n }\r\n\r\n public getTimeStep(): number {\r\n return this.world.timeStep;\r\n }\r\n\r\n private _tmpImpostorsArray: Array<PhysicsImpostor> = [];\r\n\r\n public executeStep(delta: number, impostors: Array<PhysicsImpostor>) {\r\n impostors.forEach(function (impostor) {\r\n impostor.beforeStep();\r\n });\r\n\r\n this.world.timeStep = this._useDeltaForWorldStep ? delta : this._fixedTimeStep;\r\n this.world.step();\r\n\r\n impostors.forEach((impostor) => {\r\n impostor.afterStep();\r\n //update the ordered impostors array\r\n this._tmpImpostorsArray[impostor.uniqueId] = impostor;\r\n });\r\n\r\n //check for collisions\r\n let contact = this.world.contacts;\r\n\r\n while (contact !== null) {\r\n if (contact.touching && !contact.body1.sleeping && !contact.body2.sleeping) {\r\n contact = contact.next;\r\n continue;\r\n }\r\n //is this body colliding with any other? get the impostor\r\n const mainImpostor = this._tmpImpostorsArray[+contact.body1.name];\r\n const collidingImpostor = this._tmpImpostorsArray[+contact.body2.name];\r\n\r\n if (!mainImpostor || !collidingImpostor) {\r\n contact = contact.next;\r\n continue;\r\n }\r\n\r\n mainImpostor.onCollide({ body: collidingImpostor.physicsBody, point: null, distance: 0, impulse: 0, normal: null });\r\n collidingImpostor.onCollide({ body: mainImpostor.physicsBody, point: null, distance: 0, impulse: 0, normal: null });\r\n contact = contact.next;\r\n }\r\n }\r\n\r\n public applyImpulse(impostor: PhysicsImpostor, force: Vector3, contactPoint: Vector3) {\r\n const mass = impostor.physicsBody.mass;\r\n impostor.physicsBody.applyImpulse(contactPoint.scale(this.world.invScale), force.scale(this.world.invScale * mass));\r\n }\r\n public applyForce(impostor: PhysicsImpostor, force: Vector3, contactPoint: Vector3) {\r\n Logger.Warn(\"Oimo doesn't support applying force. Using impulse instead.\");\r\n this.applyImpulse(impostor, force, contactPoint);\r\n }\r\n public generatePhysicsBody(impostor: PhysicsImpostor) {\r\n //parent-child relationship. Does this impostor has a parent impostor?\r\n if (impostor.parent) {\r\n if (impostor.physicsBody) {\r\n this.removePhysicsBody(impostor);\r\n //TODO is that needed?\r\n impostor.forceUpdate();\r\n }\r\n return;\r\n }\r\n\r\n if (impostor.isBodyInitRequired()) {\r\n const bodyConfig: any = {\r\n name: impostor.uniqueId,\r\n //Oimo must have mass, also for static objects.\r\n config: [impostor.getParam(\"mass\") || 0.001, impostor.getParam(\"friction\"), impostor.getParam(\"restitution\")],\r\n size: [],\r\n type: [],\r\n pos: [],\r\n posShape: [],\r\n rot: [],\r\n rotShape: [],\r\n move: impostor.getParam(\"mass\") !== 0,\r\n density: impostor.getParam(\"mass\"),\r\n friction: impostor.getParam(\"friction\"),\r\n restitution: impostor.getParam(\"restitution\"),\r\n //Supporting older versions of Oimo\r\n world: this.world,\r\n };\r\n\r\n const impostors = [impostor];\r\n const addToArray = (parent: IPhysicsEnabledObject) => {\r\n if (!parent.getChildMeshes) {\r\n return;\r\n }\r\n parent.getChildMeshes().forEach(function (m) {\r\n if (m.physicsImpostor) {\r\n impostors.push(m.physicsImpostor);\r\n //m.physicsImpostor._init();\r\n }\r\n });\r\n };\r\n addToArray(impostor.object);\r\n\r\n const checkWithEpsilon = (value: number): number => {\r\n return Math.max(value, Epsilon);\r\n };\r\n\r\n const globalQuaternion: Quaternion = new Quaternion();\r\n\r\n impostors.forEach((i) => {\r\n if (!i.object.rotationQuaternion) {\r\n return;\r\n }\r\n //get the correct bounding box\r\n const oldQuaternion = i.object.rotationQuaternion;\r\n globalQuaternion.copyFrom(oldQuaternion);\r\n\r\n i.object.rotationQuaternion.set(0, 0, 0, 1);\r\n i.object.computeWorldMatrix(true);\r\n\r\n const rot = globalQuaternion.toEulerAngles();\r\n const impostorExtents = i.getObjectExtents();\r\n\r\n // eslint-disable-next-line no-loss-of-precision\r\n const radToDeg = 57.295779513082320876;\r\n\r\n if (i === impostor) {\r\n const center = impostor.getObjectCenter();\r\n\r\n impostor.object.getAbsolutePivotPoint().subtractToRef(center, this._tmpPositionVector);\r\n this._tmpPositionVector.divideInPlace(impostor.object.scaling);\r\n\r\n //Can also use Array.prototype.push.apply\r\n bodyConfig.pos.push(center.x);\r\n bodyConfig.pos.push(center.y);\r\n bodyConfig.pos.push(center.z);\r\n bodyConfig.posShape.push(0, 0, 0);\r\n\r\n bodyConfig.rotShape.push(0, 0, 0);\r\n } else {\r\n const localPosition = i.object.position.clone();\r\n bodyConfig.posShape.push(localPosition.x);\r\n bodyConfig.posShape.push(localPosition.y);\r\n bodyConfig.posShape.push(localPosition.z);\r\n\r\n // bodyConfig.pos.push(0, 0, 0);\r\n\r\n bodyConfig.rotShape.push(rot.x * radToDeg, rot.y * radToDeg, rot.z * radToDeg);\r\n }\r\n\r\n i.object.rotationQuaternion.copyFrom(globalQuaternion);\r\n\r\n // register mesh\r\n switch (i.type) {\r\n case PhysicsImpostor.ParticleImpostor:\r\n Logger.Warn(\"No Particle support in OIMO.js. using SphereImpostor instead\");\r\n // eslint-disable-next-line no-fallthrough\r\n case PhysicsImpostor.SphereImpostor: {\r\n const radiusX = impostorExtents.x;\r\n const radiusY = impostorExtents.y;\r\n const radiusZ = impostorExtents.z;\r\n\r\n const size = Math.max(checkWithEpsilon(radiusX), checkWithEpsilon(radiusY), checkWithEpsilon(radiusZ)) / 2;\r\n\r\n bodyConfig.type.push(\"sphere\");\r\n //due to the way oimo works with compounds, add 3 times\r\n bodyConfig.size.push(size);\r\n bodyConfig.size.push(size);\r\n bodyConfig.size.push(size);\r\n break;\r\n }\r\n case PhysicsImpostor.CylinderImpostor: {\r\n const sizeX = checkWithEpsilon(impostorExtents.x) / 2;\r\n const sizeY = checkWithEpsilon(impostorExtents.y);\r\n bodyConfig.type.push(\"cylinder\");\r\n bodyConfig.size.push(sizeX);\r\n bodyConfig.size.push(sizeY);\r\n //due to the way oimo works with compounds, add one more value.\r\n bodyConfig.size.push(sizeY);\r\n break;\r\n }\r\n case PhysicsImpostor.PlaneImpostor:\r\n case PhysicsImpostor.BoxImpostor:\r\n default: {\r\n const sizeX = checkWithEpsilon(impostorExtents.x);\r\n const sizeY = checkWithEpsilon(impostorExtents.y);\r\n const sizeZ = checkWithEpsilon(impostorExtents.z);\r\n\r\n bodyConfig.type.push(\"box\");\r\n //if (i === impostor) {\r\n bodyConfig.size.push(sizeX);\r\n bodyConfig.size.push(sizeY);\r\n bodyConfig.size.push(sizeZ);\r\n //} else {\r\n // bodyConfig.size.push(0,0,0);\r\n //}\r\n break;\r\n }\r\n }\r\n\r\n //actually not needed, but hey...\r\n i.object.rotationQuaternion = oldQuaternion;\r\n });\r\n impostor.physicsBody = this.world.add(bodyConfig);\r\n // set the quaternion, ignoring the previously defined (euler) rotation\r\n impostor.physicsBody.resetQuaternion(globalQuaternion);\r\n // update with delta 0, so the body will receive the new rotation.\r\n impostor.physicsBody.updatePosition(0);\r\n } else {\r\n this._tmpPositionVector.copyFromFloats(0, 0, 0);\r\n }\r\n\r\n impostor.setDeltaPosition(this._tmpPositionVector);\r\n\r\n //this._tmpPositionVector.addInPlace(impostor.mesh.getBoundingInfo().boundingBox.center);\r\n //this.setPhysicsBodyTransformation(impostor, this._tmpPositionVector, impostor.mesh.rotationQuaternion);\r\n }\r\n\r\n private _tmpPositionVector: Vector3 = Vector3.Zero();\r\n\r\n public removePhysicsBody(impostor: PhysicsImpostor) {\r\n //impostor.physicsBody.dispose();\r\n this.world.removeRigidBody(impostor.physicsBody);\r\n }\r\n\r\n public generateJoint(impostorJoint: PhysicsImpostorJoint) {\r\n const mainBody = impostorJoint.mainImpostor.physicsBody;\r\n const connectedBody = impostorJoint.connectedImpostor.physicsBody;\r\n\r\n if (!mainBody || !connectedBody) {\r\n return;\r\n }\r\n const jointData = impostorJoint.joint.jointData;\r\n const options = jointData.nativeParams || {};\r\n let type;\r\n const nativeJointData: any = {\r\n body1: mainBody,\r\n body2: connectedBody,\r\n\r\n axe1: options.axe1 || (jointData.mainAxis ? jointData.mainAxis.asArray() : null),\r\n axe2: options.axe2 || (jointData.connectedAxis ? jointData.connectedAxis.asArray() : null),\r\n pos1: options.pos1 || (jointData.mainPivot ? jointData.mainPivot.asArray() : null),\r\n pos2: options.pos2 || (jointData.connectedPivot ? jointData.connectedPivot.asArray() : null),\r\n\r\n min: options.min,\r\n max: options.max,\r\n collision: options.collision || jointData.collision,\r\n spring: options.spring,\r\n\r\n //supporting older version of Oimo\r\n world: this.world,\r\n };\r\n switch (impostorJoint.joint.type) {\r\n case PhysicsJoint.BallAndSocketJoint:\r\n type = \"jointBall\";\r\n break;\r\n case PhysicsJoint.SpringJoint: {\r\n Logger.Warn(\"OIMO.js doesn't support Spring Constraint. Simulating using DistanceJoint instead\");\r\n const springData = <SpringJointData>jointData;\r\n nativeJointData.min = springData.length || nativeJointData.min;\r\n //Max should also be set, just make sure it is at least min\r\n nativeJointData.max = Math.max(nativeJointData.min, nativeJointData.max);\r\n }\r\n // eslint-disable-next-line no-fallthrough\r\n case PhysicsJoint.DistanceJoint:\r\n type = \"jointDistance\";\r\n nativeJointData.max = (<DistanceJointData>jointData).maxDistance;\r\n break;\r\n case PhysicsJoint.PrismaticJoint:\r\n type = \"jointPrisme\";\r\n break;\r\n case PhysicsJoint.SliderJoint:\r\n type = \"jointSlide\";\r\n break;\r\n case PhysicsJoint.WheelJoint:\r\n type = \"jointWheel\";\r\n break;\r\n case PhysicsJoint.HingeJoint:\r\n default:\r\n type = \"jointHinge\";\r\n break;\r\n }\r\n nativeJointData.type = type;\r\n impostorJoint.joint.physicsJoint = this.world.add(nativeJointData);\r\n }\r\n\r\n public removeJoint(impostorJoint: PhysicsImpostorJoint) {\r\n //Bug in Oimo prevents us from disposing a joint in the playground\r\n //joint.joint.physicsJoint.dispose();\r\n //So we will bruteforce it!\r\n try {\r\n this.world.removeJoint(impostorJoint.joint.physicsJoint);\r\n } catch (e) {\r\n Logger.Warn(e);\r\n }\r\n }\r\n\r\n public isSupported(): boolean {\r\n return this.BJSOIMO !== undefined;\r\n }\r\n\r\n public setTransformationFromPhysicsBody(impostor: PhysicsImpostor) {\r\n if (!impostor.physicsBody.sleeping) {\r\n if (impostor.physicsBody.shapes.next) {\r\n let parent = impostor.physicsBody.shapes;\r\n while (parent.next) {\r\n parent = parent.next;\r\n }\r\n impostor.object.position.set(parent.position.x, parent.position.y, parent.position.z);\r\n } else {\r\n const pos = impostor.physicsBody.getPosition();\r\n impostor.object.position.set(pos.x, pos.y, pos.z);\r\n }\r\n\r\n if (impostor.object.rotationQuaternion) {\r\n const quat = impostor.physicsBody.getQuaternion();\r\n impostor.object.rotationQuaternion.set(quat.x, quat.y, quat.z, quat.w);\r\n }\r\n }\r\n }\r\n\r\n public setPhysicsBodyTransformation(impostor: PhysicsImpostor, newPosition: Vector3, newRotation: Quaternion) {\r\n const body = impostor.physicsBody;\r\n // disable bidirectional for compound meshes\r\n if (impostor.physicsBody.shapes.next) {\r\n return;\r\n }\r\n body.position.set(newPosition.x, newPosition.y, newPosition.z);\r\n body.orientation.set(newRotation.x, newRotation.y, newRotation.z, newRotation.w);\r\n body.syncShapes();\r\n body.awake();\r\n }\r\n\r\n /*private _getLastShape(body: any): any {\r\n var lastShape = body.shapes;\r\n while (lastShape.next) {\r\n lastShape = lastShape.next;\r\n }\r\n return lastShape;\r\n }*/\r\n\r\n public setLinearVelocity(impostor: PhysicsImpostor, velocity: Vector3) {\r\n impostor.physicsBody.linearVelocity.set(velocity.x, velocity.y, velocity.z);\r\n }\r\n\r\n public setAngularVelocity(impostor: PhysicsImpostor, velocity: Vector3) {\r\n impostor.physicsBody.angularVelocity.set(velocity.x, velocity.y, velocity.z);\r\n }\r\n\r\n public getLinearVelocity(impostor: PhysicsImpostor): Nullable<Vector3> {\r\n const v = impostor.physicsBody.linearVelocity;\r\n if (!v) {\r\n return null;\r\n }\r\n return new Vector3(v.x, v.y, v.z);\r\n }\r\n public getAngularVelocity(impostor: PhysicsImpostor): Nullable<Vector3> {\r\n const v = impostor.physicsBody.angularVelocity;\r\n if (!v) {\r\n return null;\r\n }\r\n return new Vector3(v.x, v.y, v.z);\r\n }\r\n\r\n public setBodyMass(impostor: PhysicsImpostor, mass: number) {\r\n const staticBody: boolean = mass === 0;\r\n //this will actually set the body's density and not its mass.\r\n //But this is how oimo treats the mass variable.\r\n impostor.physicsBody.shapes.density = staticBody ? 1 : mass;\r\n impostor.physicsBody.setupMass(staticBody ? 0x2 : 0x1);\r\n }\r\n\r\n public getBodyMass(impostor: PhysicsImpostor): number {\r\n return impostor.physicsBody.shapes.density;\r\n }\r\n\r\n public getBodyFriction(impostor: PhysicsImpostor): number {\r\n return impostor.physicsBody.shapes.friction;\r\n }\r\n\r\n public setBodyFriction(impostor: PhysicsImpostor, friction: number) {\r\n impostor.physicsBody.shapes.friction = friction;\r\n }\r\n\r\n public getBodyRestitution(impostor: PhysicsImpostor): number {\r\n return impostor.physicsBody.shapes.restitution;\r\n }\r\n\r\n public setBodyRestitution(impostor: PhysicsImpostor, restitution: number) {\r\n impostor.physicsBody.shapes.restitution = restitution;\r\n }\r\n\r\n public sleepBody(impostor: PhysicsImpostor) {\r\n impostor.physicsBody.sleep();\r\n }\r\n\r\n public wakeUpBody(impostor: PhysicsImpostor) {\r\n impostor.physicsBody.awake();\r\n }\r\n\r\n public updateDistanceJoint(joint: PhysicsJoint, maxDistance: number, minDistance?: number) {\r\n joint.physicsJoint.limitMotor.upperLimit = maxDistance;\r\n if (minDistance !== void 0) {\r\n joint.physicsJoint.limitMotor.lowerLimit = minDistance;\r\n }\r\n }\r\n\r\n public setMotor(joint: IMotorEnabledJoint, speed: number, force?: number, motorIndex?: number) {\r\n if (force !== undefined) {\r\n Logger.Warn(\"OimoJS plugin currently has unexpected behavior when using setMotor with force parameter\");\r\n } else {\r\n force = 1e6;\r\n }\r\n speed *= -1;\r\n\r\n //TODO separate rotational and transational motors.\r\n const motor = motorIndex\r\n ? joint.physicsJoint.rotationalLimitMotor2\r\n : joint.physicsJoint.rotationalLimitMotor1 || joint.physicsJoint.rotationalLimitMotor || joint.physicsJoint.limitMotor;\r\n if (motor) {\r\n motor.setMotor(speed, force);\r\n }\r\n }\r\n\r\n public setLimit(joint: IMotorEnabledJoint, upperLimit: number, lowerLimit?: number, motorIndex?: number) {\r\n //TODO separate rotational and transational motors.\r\n const motor = motorIndex\r\n ? joint.physicsJoint.rotationalLimitMotor2\r\n : joint.physicsJoint.rotationalLimitMotor1 || joint.physicsJoint.rotationalLimitMotor || joint.physicsJoint.limitMotor;\r\n if (motor) {\r\n motor.setLimit(upperLimit, lowerLimit === void 0 ? -upperLimit : lowerLimit);\r\n }\r\n }\r\n\r\n public syncMeshWithImpostor(mesh: AbstractMesh, impostor: PhysicsImpostor) {\r\n const body = impostor.physicsBody;\r\n\r\n mesh.position.x = body.position.x;\r\n mesh.position.y = body.position.y;\r\n mesh.position.z = body.position.z;\r\n\r\n if (mesh.rotationQuaternion) {\r\n mesh.rotationQuaternion.x = body.orientation.x;\r\n mesh.rotationQuaternion.y = body.orientation.y;\r\n mesh.rotationQuaternion.z = body.orientation.z;\r\n mesh.rotationQuaternion.w = body.orientation.w;\r\n }\r\n }\r\n\r\n public getRadius(impostor: PhysicsImpostor): number {\r\n return impostor.physicsBody.shapes.radius;\r\n }\r\n\r\n public getBoxSizeToRef(impostor: PhysicsImpostor, result: Vector3): void {\r\n const shape = impostor.physicsBody.shapes;\r\n result.x = shape.halfWidth * 2;\r\n result.y = shape.halfHeight * 2;\r\n result.z = shape.halfDepth * 2;\r\n }\r\n\r\n public dispose() {\r\n this.world.clear();\r\n }\r\n\r\n /**\r\n * Does a raycast in the physics world\r\n * @param from when should the ray start?\r\n * @param to when should the ray end?\r\n * @returns PhysicsRaycastResult\r\n */\r\n public raycast(from: Vector3, to: Vector3): PhysicsRaycastResult {\r\n Logger.Warn(\"raycast is not currently supported by the Oimo physics plugin\");\r\n\r\n this._raycastResult.reset(from, to);\r\n\r\n return this._raycastResult;\r\n }\r\n\r\n /**\r\n * Does a raycast in the physics world\r\n * @param from when should the ray start?\r\n * @param to when should the ray end?\r\n * @param result resulting PhysicsRaycastResult\r\n */\r\n public raycastToRef(from: Vector3, to: Vector3, result: PhysicsRaycastResult): void {\r\n Logger.Warn(\"raycast is not currently supported by the Oimo physics plugin\");\r\n\r\n result.reset(from, to);\r\n }\r\n}\r\n"]}
@@ -0,0 +1,7 @@
1
+ export * from "./IPhysicsEnginePlugin";
2
+ export * from "./physicsEngine";
3
+ export * from "./physicsEngineComponent";
4
+ export * from "./physicsImpostor";
5
+ export * from "./physicsJoint";
6
+ export * from "./Plugins/index";
7
+ export * from "./physicsHelper";
@@ -0,0 +1,9 @@
1
+ /* eslint-disable import/no-internal-modules */
2
+ export * from "./IPhysicsEnginePlugin.js";
3
+ export * from "./physicsEngine.js";
4
+ export * from "./physicsEngineComponent.js";
5
+ export * from "./physicsImpostor.js";
6
+ export * from "./physicsJoint.js";
7
+ export * from "./Plugins/index.js";
8
+ export * from "./physicsHelper.js";
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Physics/v1/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./IPhysicsEnginePlugin\";\r\nexport * from \"./physicsEngine\";\r\nexport * from \"./physicsEngineComponent\";\r\nexport * from \"./physicsImpostor\";\r\nexport * from \"./physicsJoint\";\r\nexport * from \"./Plugins/index\";\r\nexport * from \"./physicsHelper\";\r\n"]}