@pinkaphant/kolmo 0.4.6 → 0.5.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 (477) hide show
  1. package/README.md +39 -100
  2. package/dist/engine/actor.d.ts +13 -0
  3. package/dist/engine/gltfLoader.d.ts +19 -0
  4. package/dist/engine/index.d.ts +8 -13
  5. package/dist/engine/index.js +1270 -22
  6. package/dist/engine/index.js.map +1 -1
  7. package/dist/engine/{kolmoInput.d.ts → input.d.ts} +7 -6
  8. package/dist/engine/surface.d.ts +19 -0
  9. package/dist/engine/{kolmoTraits.d.ts → traits.d.ts} +18 -47
  10. package/dist/engine/vehicle.d.ts +20 -0
  11. package/dist/engine/world.d.ts +76 -0
  12. package/dist/index.d.ts +12 -18
  13. package/dist/index.js +14 -104
  14. package/dist/physics/index.d.ts +4 -1
  15. package/dist/physics/index.js +1 -105
  16. package/dist/physics/nBodyGravity.d.ts +42 -0
  17. package/dist/physics-FhWvTBfH.js +424 -0
  18. package/dist/physics-FhWvTBfH.js.map +1 -0
  19. package/dist/vite/index.d.ts +2 -12
  20. package/dist/vite/index.js +8 -77
  21. package/dist/vite/index.js.map +1 -1
  22. package/package.json +33 -87
  23. package/AGENTS.md +0 -29
  24. package/CLAUDE.md +0 -8
  25. package/bin/kolmo.mjs +0 -560
  26. package/dist/engine/causewayBridge.d.ts +0 -14
  27. package/dist/engine/causewayBridge.js +0 -166
  28. package/dist/engine/causewayBridge.js.map +0 -1
  29. package/dist/engine/islandSettlementMesh.d.ts +0 -26
  30. package/dist/engine/islandSettlementMesh.js +0 -166
  31. package/dist/engine/islandSettlementMesh.js.map +0 -1
  32. package/dist/engine/kolmoActions.d.ts +0 -23
  33. package/dist/engine/kolmoActions.js +0 -179
  34. package/dist/engine/kolmoActions.js.map +0 -1
  35. package/dist/engine/kolmoActor.d.ts +0 -13
  36. package/dist/engine/kolmoActor.js +0 -263
  37. package/dist/engine/kolmoActor.js.map +0 -1
  38. package/dist/engine/kolmoActorHelpers.d.ts +0 -24
  39. package/dist/engine/kolmoActorHelpers.js +0 -64
  40. package/dist/engine/kolmoActorHelpers.js.map +0 -1
  41. package/dist/engine/kolmoFloatingOrigin.d.ts +0 -17
  42. package/dist/engine/kolmoFloatingOrigin.js +0 -98
  43. package/dist/engine/kolmoFloatingOrigin.js.map +0 -1
  44. package/dist/engine/kolmoGame.d.ts +0 -27
  45. package/dist/engine/kolmoGame.js +0 -83
  46. package/dist/engine/kolmoGame.js.map +0 -1
  47. package/dist/engine/kolmoHud.d.ts +0 -23
  48. package/dist/engine/kolmoHud.js +0 -214
  49. package/dist/engine/kolmoHud.js.map +0 -1
  50. package/dist/engine/kolmoInput.js +0 -163
  51. package/dist/engine/kolmoInput.js.map +0 -1
  52. package/dist/engine/kolmoIsland.d.ts +0 -14
  53. package/dist/engine/kolmoIsland.js +0 -243
  54. package/dist/engine/kolmoIsland.js.map +0 -1
  55. package/dist/engine/kolmoLongDrive.d.ts +0 -12
  56. package/dist/engine/kolmoLongDrive.js +0 -160
  57. package/dist/engine/kolmoLongDrive.js.map +0 -1
  58. package/dist/engine/kolmoPilotMesh.d.ts +0 -2
  59. package/dist/engine/kolmoPilotMesh.js +0 -205
  60. package/dist/engine/kolmoPilotMesh.js.map +0 -1
  61. package/dist/engine/kolmoProcedural.d.ts +0 -13
  62. package/dist/engine/kolmoProcedural.js +0 -101
  63. package/dist/engine/kolmoProcedural.js.map +0 -1
  64. package/dist/engine/kolmoRigs.d.ts +0 -13
  65. package/dist/engine/kolmoRigs.js +0 -100
  66. package/dist/engine/kolmoRigs.js.map +0 -1
  67. package/dist/engine/kolmoStore.d.ts +0 -3
  68. package/dist/engine/kolmoStore.js +0 -4
  69. package/dist/engine/kolmoStore.js.map +0 -1
  70. package/dist/engine/kolmoSurface.d.ts +0 -18
  71. package/dist/engine/kolmoSurface.js +0 -198
  72. package/dist/engine/kolmoSurface.js.map +0 -1
  73. package/dist/engine/kolmoTouchOverlay.d.ts +0 -21
  74. package/dist/engine/kolmoTouchOverlay.js +0 -326
  75. package/dist/engine/kolmoTouchOverlay.js.map +0 -1
  76. package/dist/engine/kolmoTouchState.d.ts +0 -50
  77. package/dist/engine/kolmoTouchState.js +0 -210
  78. package/dist/engine/kolmoTouchState.js.map +0 -1
  79. package/dist/engine/kolmoTraits.js +0 -140
  80. package/dist/engine/kolmoTraits.js.map +0 -1
  81. package/dist/engine/kolmoVehicle.d.ts +0 -4
  82. package/dist/engine/kolmoVehicle.js +0 -80
  83. package/dist/engine/kolmoVehicle.js.map +0 -1
  84. package/dist/engine/kolmoVehicleAutoCompile.d.ts +0 -10
  85. package/dist/engine/kolmoVehicleAutoCompile.js +0 -78
  86. package/dist/engine/kolmoVehicleAutoCompile.js.map +0 -1
  87. package/dist/engine/kolmoVehicleConfig.d.ts +0 -56
  88. package/dist/engine/kolmoVehicleConfig.js +0 -84
  89. package/dist/engine/kolmoVehicleConfig.js.map +0 -1
  90. package/dist/engine/kolmoVehicleDriver.d.ts +0 -38
  91. package/dist/engine/kolmoVehicleDriver.js +0 -139
  92. package/dist/engine/kolmoVehicleDriver.js.map +0 -1
  93. package/dist/engine/kolmoVehicleInner.d.ts +0 -7
  94. package/dist/engine/kolmoVehicleInner.js +0 -291
  95. package/dist/engine/kolmoVehicleInner.js.map +0 -1
  96. package/dist/engine/kolmoWorld.d.ts +0 -45
  97. package/dist/engine/kolmoWorld.js +0 -161
  98. package/dist/engine/kolmoWorld.js.map +0 -1
  99. package/dist/engine/longDriveKit.d.ts +0 -19
  100. package/dist/engine/longDriveKit.js +0 -145
  101. package/dist/engine/longDriveKit.js.map +0 -1
  102. package/dist/engine/longDriveRoadside.d.ts +0 -16
  103. package/dist/engine/longDriveRoadside.js +0 -171
  104. package/dist/engine/longDriveRoadside.js.map +0 -1
  105. package/dist/engine/macroCellBuilder.d.ts +0 -44
  106. package/dist/engine/macroCellBuilder.js +0 -228
  107. package/dist/engine/macroCellBuilder.js.map +0 -1
  108. package/dist/engine/mainlandMacroCell.d.ts +0 -15
  109. package/dist/engine/mainlandMacroCell.js +0 -168
  110. package/dist/engine/mainlandMacroCell.js.map +0 -1
  111. package/dist/engine/shiftedFixedBody.d.ts +0 -13
  112. package/dist/engine/shiftedFixedBody.js +0 -75
  113. package/dist/engine/shiftedFixedBody.js.map +0 -1
  114. package/dist/importer/ChopShopPanel.d.ts +0 -52
  115. package/dist/importer/ChopShopPanel.js +0 -409
  116. package/dist/importer/ChopShopPanel.js.map +0 -1
  117. package/dist/importer/DomainWorkshopPanel.d.ts +0 -23
  118. package/dist/importer/DomainWorkshopPanel.js +0 -418
  119. package/dist/importer/DomainWorkshopPanel.js.map +0 -1
  120. package/dist/importer/GateHudBar.d.ts +0 -39
  121. package/dist/importer/GateHudBar.js +0 -401
  122. package/dist/importer/GateHudBar.js.map +0 -1
  123. package/dist/importer/GlbImportGate.d.ts +0 -8
  124. package/dist/importer/GlbImportGate.js +0 -291
  125. package/dist/importer/GlbImportGate.js.map +0 -1
  126. package/dist/importer/ImperativeVehicleRig.d.ts +0 -9
  127. package/dist/importer/ImperativeVehicleRig.js +0 -273
  128. package/dist/importer/ImperativeVehicleRig.js.map +0 -1
  129. package/dist/importer/LiveDrivePads.d.ts +0 -20
  130. package/dist/importer/LiveDrivePads.js +0 -171
  131. package/dist/importer/LiveDrivePads.js.map +0 -1
  132. package/dist/importer/PaperShellDebrisRig.d.ts +0 -25
  133. package/dist/importer/PaperShellDebrisRig.js +0 -143
  134. package/dist/importer/PaperShellDebrisRig.js.map +0 -1
  135. package/dist/importer/R2VaultDrawer.d.ts +0 -12
  136. package/dist/importer/R2VaultDrawer.js +0 -90
  137. package/dist/importer/R2VaultDrawer.js.map +0 -1
  138. package/dist/importer/Step1CalibrationPlinth.d.ts +0 -56
  139. package/dist/importer/Step1CalibrationPlinth.js +0 -204
  140. package/dist/importer/Step1CalibrationPlinth.js.map +0 -1
  141. package/dist/importer/Step1ExplodedIslands.d.ts +0 -31
  142. package/dist/importer/Step1ExplodedIslands.js +0 -144
  143. package/dist/importer/Step1ExplodedIslands.js.map +0 -1
  144. package/dist/importer/Step2UniversalPad.d.ts +0 -18
  145. package/dist/importer/Step2UniversalPad.js +0 -123
  146. package/dist/importer/Step2UniversalPad.js.map +0 -1
  147. package/dist/importer/VfxEmitterPool.d.ts +0 -8
  148. package/dist/importer/VfxEmitterPool.js +0 -64
  149. package/dist/importer/VfxEmitterPool.js.map +0 -1
  150. package/dist/importer/WheelRingHandles3D.d.ts +0 -11
  151. package/dist/importer/WheelRingHandles3D.js +0 -319
  152. package/dist/importer/WheelRingHandles3D.js.map +0 -1
  153. package/dist/importer/archLinerGeom.d.ts +0 -2
  154. package/dist/importer/archLinerGeom.js +0 -51
  155. package/dist/importer/archLinerGeom.js.map +0 -1
  156. package/dist/importer/chopHingeHelpers.d.ts +0 -15
  157. package/dist/importer/chopHingeHelpers.js +0 -193
  158. package/dist/importer/chopHingeHelpers.js.map +0 -1
  159. package/dist/importer/chopShopActions.d.ts +0 -58
  160. package/dist/importer/chopShopActions.js +0 -165
  161. package/dist/importer/chopShopActions.js.map +0 -1
  162. package/dist/importer/chopShopHandlers.d.ts +0 -26
  163. package/dist/importer/chopShopHandlers.js +0 -283
  164. package/dist/importer/chopShopHandlers.js.map +0 -1
  165. package/dist/importer/chopShopIoActions.d.ts +0 -20
  166. package/dist/importer/chopShopIoActions.js +0 -192
  167. package/dist/importer/chopShopIoActions.js.map +0 -1
  168. package/dist/importer/chopShopMcpAction.d.ts +0 -18
  169. package/dist/importer/chopShopMcpAction.js +0 -58
  170. package/dist/importer/chopShopMcpAction.js.map +0 -1
  171. package/dist/importer/cylinderBooleanSlice.d.ts +0 -14
  172. package/dist/importer/cylinderBooleanSlice.js +0 -110
  173. package/dist/importer/cylinderBooleanSlice.js.map +0 -1
  174. package/dist/importer/cylinderSliceMath.d.ts +0 -14
  175. package/dist/importer/cylinderSliceMath.js +0 -251
  176. package/dist/importer/cylinderSliceMath.js.map +0 -1
  177. package/dist/importer/fusedWheelDetect.d.ts +0 -4
  178. package/dist/importer/fusedWheelDetect.js +0 -297
  179. package/dist/importer/fusedWheelDetect.js.map +0 -1
  180. package/dist/importer/fusedWheelFit.d.ts +0 -19
  181. package/dist/importer/fusedWheelFit.js +0 -219
  182. package/dist/importer/fusedWheelFit.js.map +0 -1
  183. package/dist/importer/gateStore.d.ts +0 -73
  184. package/dist/importer/gateStore.js +0 -102
  185. package/dist/importer/gateStore.js.map +0 -1
  186. package/dist/importer/glbNormalizer.d.ts +0 -22
  187. package/dist/importer/glbNormalizer.js +0 -177
  188. package/dist/importer/glbNormalizer.js.map +0 -1
  189. package/dist/importer/importerWebMcp.d.ts +0 -49
  190. package/dist/importer/importerWebMcp.js +0 -48
  191. package/dist/importer/importerWebMcp.js.map +0 -1
  192. package/dist/importer/importerWebMcpTools.d.ts +0 -2
  193. package/dist/importer/importerWebMcpTools.js +0 -341
  194. package/dist/importer/importerWebMcpTools.js.map +0 -1
  195. package/dist/importer/index.d.ts +0 -23
  196. package/dist/importer/index.js +0 -36
  197. package/dist/importer/index.js.map +0 -1
  198. package/dist/importer/khrCarGeometryMass.d.ts +0 -20
  199. package/dist/importer/khrCarGeometryMass.js +0 -125
  200. package/dist/importer/khrCarGeometryMass.js.map +0 -1
  201. package/dist/importer/khrCarPlanHelpers.d.ts +0 -39
  202. package/dist/importer/khrCarPlanHelpers.js +0 -300
  203. package/dist/importer/khrCarPlanHelpers.js.map +0 -1
  204. package/dist/importer/khrCarPlanner.d.ts +0 -8
  205. package/dist/importer/khrCarPlanner.js +0 -283
  206. package/dist/importer/khrCarPlanner.js.map +0 -1
  207. package/dist/importer/khrCompiler.d.ts +0 -5
  208. package/dist/importer/khrCompiler.js +0 -87
  209. package/dist/importer/khrCompiler.js.map +0 -1
  210. package/dist/importer/khrCraftPropCompiler.d.ts +0 -45
  211. package/dist/importer/khrCraftPropCompiler.js +0 -263
  212. package/dist/importer/khrCraftPropCompiler.js.map +0 -1
  213. package/dist/importer/khrNodeNameGuard.d.ts +0 -20
  214. package/dist/importer/khrNodeNameGuard.js +0 -139
  215. package/dist/importer/khrNodeNameGuard.js.map +0 -1
  216. package/dist/importer/launcherBake.d.ts +0 -15
  217. package/dist/importer/launcherBake.js +0 -117
  218. package/dist/importer/launcherBake.js.map +0 -1
  219. package/dist/importer/launcherCadGeometry.d.ts +0 -22
  220. package/dist/importer/launcherCadGeometry.js +0 -185
  221. package/dist/importer/launcherCadGeometry.js.map +0 -1
  222. package/dist/importer/meshIslands.d.ts +0 -17
  223. package/dist/importer/meshIslands.js +0 -102
  224. package/dist/importer/meshIslands.js.map +0 -1
  225. package/dist/importer/meshSliceBuffers.d.ts +0 -15
  226. package/dist/importer/meshSliceBuffers.js +0 -159
  227. package/dist/importer/meshSliceBuffers.js.map +0 -1
  228. package/dist/importer/polygonEarClipYZ.d.ts +0 -3
  229. package/dist/importer/polygonEarClipYZ.js +0 -67
  230. package/dist/importer/polygonEarClipYZ.js.map +0 -1
  231. package/dist/importer/proceduralC12AndCraft.d.ts +0 -18
  232. package/dist/importer/proceduralC12AndCraft.js +0 -302
  233. package/dist/importer/proceduralC12AndCraft.js.map +0 -1
  234. package/dist/importer/proceduralDomainBuilders.d.ts +0 -10
  235. package/dist/importer/proceduralDomainBuilders.js +0 -346
  236. package/dist/importer/proceduralDomainBuilders.js.map +0 -1
  237. package/dist/importer/proceduralPersonAndProp.d.ts +0 -8
  238. package/dist/importer/proceduralPersonAndProp.js +0 -303
  239. package/dist/importer/proceduralPersonAndProp.js.map +0 -1
  240. package/dist/importer/sceneSiNormalize.d.ts +0 -19
  241. package/dist/importer/sceneSiNormalize.js +0 -145
  242. package/dist/importer/sceneSiNormalize.js.map +0 -1
  243. package/dist/importer/starterScene.d.ts +0 -5
  244. package/dist/importer/starterScene.js +0 -139
  245. package/dist/importer/starterScene.js.map +0 -1
  246. package/dist/importer/surfaceCutter.d.ts +0 -16
  247. package/dist/importer/surfaceCutter.js +0 -83
  248. package/dist/importer/surfaceCutter.js.map +0 -1
  249. package/dist/importer/surfaceGeodesic.d.ts +0 -7
  250. package/dist/importer/surfaceGeodesic.js +0 -130
  251. package/dist/importer/surfaceGeodesic.js.map +0 -1
  252. package/dist/importer/surfaceLoopRefine.d.ts +0 -6
  253. package/dist/importer/surfaceLoopRefine.js +0 -171
  254. package/dist/importer/surfaceLoopRefine.js.map +0 -1
  255. package/dist/importer/surfacePeel.d.ts +0 -11
  256. package/dist/importer/surfacePeel.js +0 -119
  257. package/dist/importer/surfacePeel.js.map +0 -1
  258. package/dist/importer/surfaceTopology.d.ts +0 -36
  259. package/dist/importer/surfaceTopology.js +0 -143
  260. package/dist/importer/surfaceTopology.js.map +0 -1
  261. package/dist/importer/universalGateBake.d.ts +0 -45
  262. package/dist/importer/universalGateBake.js +0 -203
  263. package/dist/importer/universalGateBake.js.map +0 -1
  264. package/dist/importer/usdPhysicsSpecs.d.ts +0 -3
  265. package/dist/importer/usdPhysicsSpecs.js +0 -245
  266. package/dist/importer/usdPhysicsSpecs.js.map +0 -1
  267. package/dist/importer/usdTextParse.d.ts +0 -12
  268. package/dist/importer/usdTextParse.js +0 -118
  269. package/dist/importer/usdTextParse.js.map +0 -1
  270. package/dist/importer/usdToGlb.d.ts +0 -12
  271. package/dist/importer/usdToGlb.js +0 -94
  272. package/dist/importer/usdToGlb.js.map +0 -1
  273. package/dist/importer/useChopShopController.d.ts +0 -108
  274. package/dist/importer/useChopShopController.js +0 -201
  275. package/dist/importer/useChopShopController.js.map +0 -1
  276. package/dist/importer/useChopShopState.d.ts +0 -103
  277. package/dist/importer/useChopShopState.js +0 -350
  278. package/dist/importer/useChopShopState.js.map +0 -1
  279. package/dist/importer/useWasdKeyRef.d.ts +0 -9
  280. package/dist/importer/useWasdKeyRef.js +0 -35
  281. package/dist/importer/useWasdKeyRef.js.map +0 -1
  282. package/dist/importer/vehiclePartSplit.d.ts +0 -33
  283. package/dist/importer/vehiclePartSplit.js +0 -183
  284. package/dist/importer/vehiclePartSplit.js.map +0 -1
  285. package/dist/importer/wheelAxlePairing.d.ts +0 -21
  286. package/dist/importer/wheelAxlePairing.js +0 -157
  287. package/dist/importer/wheelAxlePairing.js.map +0 -1
  288. package/dist/importer/wheelCutterHelpers.d.ts +0 -45
  289. package/dist/importer/wheelCutterHelpers.js +0 -208
  290. package/dist/importer/wheelCutterHelpers.js.map +0 -1
  291. package/dist/importer/wheelRingHandleMath.d.ts +0 -20
  292. package/dist/importer/wheelRingHandleMath.js +0 -66
  293. package/dist/importer/wheelRingHandleMath.js.map +0 -1
  294. package/dist/index.js.map +0 -1
  295. package/dist/junk/DestructibleTarget.d.ts +0 -18
  296. package/dist/junk/DestructibleTarget.js +0 -223
  297. package/dist/junk/DestructibleTarget.js.map +0 -1
  298. package/dist/junk/KolmoJunk.d.ts +0 -14
  299. package/dist/junk/KolmoJunk.js +0 -76
  300. package/dist/junk/KolmoJunk.js.map +0 -1
  301. package/dist/junk/ShardPieces.d.ts +0 -13
  302. package/dist/junk/ShardPieces.js +0 -101
  303. package/dist/junk/ShardPieces.js.map +0 -1
  304. package/dist/junk/TargetDecals.d.ts +0 -9
  305. package/dist/junk/TargetDecals.js +0 -77
  306. package/dist/junk/TargetDecals.js.map +0 -1
  307. package/dist/junk/bvhShatter.d.ts +0 -3
  308. package/dist/junk/bvhShatter.js +0 -101
  309. package/dist/junk/bvhShatter.js.map +0 -1
  310. package/dist/junk/bvhTriCollector.d.ts +0 -16
  311. package/dist/junk/bvhTriCollector.js +0 -127
  312. package/dist/junk/bvhTriCollector.js.map +0 -1
  313. package/dist/junk/index.d.ts +0 -13
  314. package/dist/junk/index.js +0 -12
  315. package/dist/junk/index.js.map +0 -1
  316. package/dist/junk/junkGeometry.d.ts +0 -13
  317. package/dist/junk/junkGeometry.js +0 -87
  318. package/dist/junk/junkGeometry.js.map +0 -1
  319. package/dist/junk/junkImportSanitize.d.ts +0 -5
  320. package/dist/junk/junkImportSanitize.js +0 -74
  321. package/dist/junk/junkImportSanitize.js.map +0 -1
  322. package/dist/junk/junkImporter.d.ts +0 -14
  323. package/dist/junk/junkImporter.js +0 -124
  324. package/dist/junk/junkImporter.js.map +0 -1
  325. package/dist/junk/junkLabelCanvas.d.ts +0 -2
  326. package/dist/junk/junkLabelCanvas.js +0 -185
  327. package/dist/junk/junkLabelCanvas.js.map +0 -1
  328. package/dist/junk/junkLabels.d.ts +0 -9
  329. package/dist/junk/junkLabels.js +0 -49
  330. package/dist/junk/junkLabels.js.map +0 -1
  331. package/dist/junk/junkProceduralScenes.d.ts +0 -12
  332. package/dist/junk/junkProceduralScenes.js +0 -220
  333. package/dist/junk/junkProceduralScenes.js.map +0 -1
  334. package/dist/junk/junkTypes.d.ts +0 -48
  335. package/dist/junk/junkTypes.js +0 -0
  336. package/dist/junk/junkTypes.js.map +0 -1
  337. package/dist/junk/targetHelpers.d.ts +0 -55
  338. package/dist/junk/targetHelpers.js +0 -157
  339. package/dist/junk/targetHelpers.js.map +0 -1
  340. package/dist/junk/targetHitLogic.d.ts +0 -30
  341. package/dist/junk/targetHitLogic.js +0 -163
  342. package/dist/junk/targetHitLogic.js.map +0 -1
  343. package/dist/junk/useTargetAssets.d.ts +0 -19
  344. package/dist/junk/useTargetAssets.js +0 -130
  345. package/dist/junk/useTargetAssets.js.map +0 -1
  346. package/dist/physics/index.js.map +0 -1
  347. package/dist/sand3d/KolmoSand3D.d.ts +0 -19
  348. package/dist/sand3d/KolmoSand3D.js +0 -92
  349. package/dist/sand3d/KolmoSand3D.js.map +0 -1
  350. package/dist/sand3d/Sand3dWorkshopSection.d.ts +0 -8
  351. package/dist/sand3d/Sand3dWorkshopSection.js +0 -117
  352. package/dist/sand3d/Sand3dWorkshopSection.js.map +0 -1
  353. package/dist/sand3d/gateBakeHelpers.d.ts +0 -21
  354. package/dist/sand3d/gateBakeHelpers.js +0 -225
  355. package/dist/sand3d/gateBakeHelpers.js.map +0 -1
  356. package/dist/sand3d/gateDoorwayBake.d.ts +0 -12
  357. package/dist/sand3d/gateDoorwayBake.js +0 -203
  358. package/dist/sand3d/gateDoorwayBake.js.map +0 -1
  359. package/dist/sand3d/index.d.ts +0 -3
  360. package/dist/sand3d/index.js +0 -4
  361. package/dist/sand3d/index.js.map +0 -1
  362. package/dist/sand3d/sand3dAssetLoader.d.ts +0 -28
  363. package/dist/sand3d/sand3dAssetLoader.js +0 -177
  364. package/dist/sand3d/sand3dAssetLoader.js.map +0 -1
  365. package/dist/schema/kolmoSchema.d.ts +0 -9
  366. package/dist/schema/kolmoSchema.js +0 -110
  367. package/dist/schema/kolmoSchema.js.map +0 -1
  368. package/dist/schema/kolmoStamp.d.ts +0 -11
  369. package/dist/schema/kolmoStamp.js +0 -119
  370. package/dist/schema/kolmoStamp.js.map +0 -1
  371. package/dist/schema/kolmoTypes.d.ts +0 -63
  372. package/dist/schema/kolmoTypes.js +0 -66
  373. package/dist/schema/kolmoTypes.js.map +0 -1
  374. package/dist/shaders/celestialBackdrop.d.ts +0 -14
  375. package/dist/shaders/celestialBackdrop.js +0 -181
  376. package/dist/shaders/celestialBackdrop.js.map +0 -1
  377. package/dist/shaders/emitterShaders.d.ts +0 -9
  378. package/dist/shaders/emitterShaders.js +0 -114
  379. package/dist/shaders/emitterShaders.js.map +0 -1
  380. package/dist/shaders/index.d.ts +0 -5
  381. package/dist/shaders/index.js +0 -12
  382. package/dist/shaders/index.js.map +0 -1
  383. package/dist/shaders/plumeAndSparkle.d.ts +0 -12
  384. package/dist/shaders/plumeAndSparkle.js +0 -233
  385. package/dist/shaders/plumeAndSparkle.js.map +0 -1
  386. package/dist/shaders/ps2GlslShared.d.ts +0 -20
  387. package/dist/shaders/ps2GlslShared.js +0 -30
  388. package/dist/shaders/ps2GlslShared.js.map +0 -1
  389. package/dist/shaders/ps2MaterialsTSL.d.ts +0 -23
  390. package/dist/shaders/ps2MaterialsTSL.js +0 -146
  391. package/dist/shaders/ps2MaterialsTSL.js.map +0 -1
  392. package/dist/shaders/ps2MaterialsWebGL.d.ts +0 -15
  393. package/dist/shaders/ps2MaterialsWebGL.js +0 -57
  394. package/dist/shaders/ps2MaterialsWebGL.js.map +0 -1
  395. package/dist/shaders/ps2RoadWebGL.d.ts +0 -7
  396. package/dist/shaders/ps2RoadWebGL.js +0 -138
  397. package/dist/shaders/ps2RoadWebGL.js.map +0 -1
  398. package/dist/shaders/ps2TerrainWebGL.d.ts +0 -8
  399. package/dist/shaders/ps2TerrainWebGL.js +0 -131
  400. package/dist/shaders/ps2TerrainWebGL.js.map +0 -1
  401. package/dist/shaders/ps2Textures.d.ts +0 -22
  402. package/dist/shaders/ps2Textures.js +0 -299
  403. package/dist/shaders/ps2Textures.js.map +0 -1
  404. package/dist/shaders/retroPalettes.d.ts +0 -24
  405. package/dist/shaders/retroPalettes.js +0 -221
  406. package/dist/shaders/retroPalettes.js.map +0 -1
  407. package/dist/shaders/retroShader.d.ts +0 -13
  408. package/dist/shaders/retroShader.js +0 -110
  409. package/dist/shaders/retroShader.js.map +0 -1
  410. package/dist/shaders/retroUniforms.d.ts +0 -60
  411. package/dist/shaders/retroUniforms.js +0 -215
  412. package/dist/shaders/retroUniforms.js.map +0 -1
  413. package/dist/shaders/skyboxShaders.d.ts +0 -16
  414. package/dist/shaders/skyboxShaders.js +0 -266
  415. package/dist/shaders/skyboxShaders.js.map +0 -1
  416. package/dist/shaders/tsl.d.ts +0 -1
  417. package/dist/shaders/tsl.js +0 -1
  418. package/dist/shaders/tsl.js.map +0 -1
  419. package/dist/suika/KolmoSuikaOrb.d.ts +0 -33
  420. package/dist/suika/KolmoSuikaOrb.js +0 -375
  421. package/dist/suika/KolmoSuikaOrb.js.map +0 -1
  422. package/dist/suika/index.d.ts +0 -4
  423. package/dist/suika/index.js +0 -5
  424. package/dist/suika/index.js.map +0 -1
  425. package/dist/suika/suikaArbiter.d.ts +0 -60
  426. package/dist/suika/suikaArbiter.js +0 -265
  427. package/dist/suika/suikaArbiter.js.map +0 -1
  428. package/dist/suika/suikaGeometry.d.ts +0 -10
  429. package/dist/suika/suikaGeometry.js +0 -251
  430. package/dist/suika/suikaGeometry.js.map +0 -1
  431. package/dist/suika/suikaTypes.d.ts +0 -74
  432. package/dist/suika/suikaTypes.js +0 -196
  433. package/dist/suika/suikaTypes.js.map +0 -1
  434. package/dist/world/frontage.d.ts +0 -26
  435. package/dist/world/frontage.js +0 -36
  436. package/dist/world/frontage.js.map +0 -1
  437. package/dist/world/index.d.ts +0 -9
  438. package/dist/world/index.js +0 -12
  439. package/dist/world/index.js.map +0 -1
  440. package/dist/world/infiniteWorld2D.d.ts +0 -19
  441. package/dist/world/infiniteWorld2D.js +0 -219
  442. package/dist/world/infiniteWorld2D.js.map +0 -1
  443. package/dist/world/island.d.ts +0 -29
  444. package/dist/world/island.js +0 -116
  445. package/dist/world/island.js.map +0 -1
  446. package/dist/world/islandPathing.d.ts +0 -6
  447. package/dist/world/islandPathing.js +0 -166
  448. package/dist/world/islandPathing.js.map +0 -1
  449. package/dist/world/macroCellSchema.d.ts +0 -72
  450. package/dist/world/macroCellSchema.js +0 -34
  451. package/dist/world/macroCellSchema.js.map +0 -1
  452. package/dist/world/macroKnightAStar.d.ts +0 -11
  453. package/dist/world/macroKnightAStar.js +0 -240
  454. package/dist/world/macroKnightAStar.js.map +0 -1
  455. package/dist/world/macroSettlementZones.d.ts +0 -9
  456. package/dist/world/macroSettlementZones.js +0 -108
  457. package/dist/world/macroSettlementZones.js.map +0 -1
  458. package/dist/world/random.d.ts +0 -23
  459. package/dist/world/random.js +0 -59
  460. package/dist/world/random.js.map +0 -1
  461. package/dist/world/road.d.ts +0 -37
  462. package/dist/world/road.js +0 -198
  463. package/dist/world/road.js.map +0 -1
  464. package/dist/world/roadRibbon.d.ts +0 -29
  465. package/dist/world/roadRibbon.js +0 -166
  466. package/dist/world/roadRibbon.js.map +0 -1
  467. package/dist/world/terrain.d.ts +0 -62
  468. package/dist/world/terrain.js +0 -133
  469. package/dist/world/terrain.js.map +0 -1
  470. package/dist/world/terrainGeometry.d.ts +0 -14
  471. package/dist/world/terrainGeometry.js +0 -76
  472. package/dist/world/terrainGeometry.js.map +0 -1
  473. package/dist/world/worldTypes.d.ts +0 -43
  474. package/dist/world/worldTypes.js +0 -197
  475. package/dist/world/worldTypes.js.map +0 -1
  476. package/docs/api-reference.md +0 -148
  477. package/skills/kolmo-engine/SKILL.md +0 -111
package/dist/index.js CHANGED
@@ -1,104 +1,14 @@
1
- import { ActorTrait, FloatingBodyTrait, InteractableTrait, PilotLink, PilotedTag, TransformTrait, VehicleTelemetryTrait, VehicleTrait, VelocityTrait, WorldSessionTrait, WorldSpawnTrait, ensureWorldSession, kolmoWorld, pilotedVehicleQuery, publishWorldSpawn, useActiveKolmoWorld, vehicleSimQuery, writeEntityKinematics, writeVehicleTelemetry } from "./engine/kolmoTraits.js";
2
- import { KolmoCanvas, KolmoInCanvasContext, KolmoWorld } from "./engine/kolmoWorld.js";
3
- import { PALETTE_CRUNCHY_16, PALETTE_CRUNCHY_64, RETRO_COLOR_MODES, applyRetroFilteringToMaterial, applyRetroTextureFiltering, buildPaletteLutData, computeRetroDpr, getColorQuantVector, getPaletteLutTexture } from "./shaders/retroPalettes.js";
4
- import { PS1_SNAP_RESOLUTION, RETRO_CLEAN_HD, RETRO_DREAMCAST, RETRO_PRESETS, RETRO_PS2_SHINOBI, RETRO_PSX_PLUS, RETRO_UNIFORMS, getRetroPreset, getRetroShaderUniforms, syncRetroUniforms, syncRetroViewport } from "./shaders/retroUniforms.js";
5
- import { GLSL_BAYER_RGB555, GLSL_RETRO_QUANTIZE, applyPs1Material, applyRetroMaterial, applySceneRetroMaterials } from "./shaders/retroShader.js";
6
- import { KolmoGravityContext, KolmoPhysics, useIsKolmoCustomGravity, useOptionalKootaWorld } from "./physics/index.js";
7
- import { KolmoGame } from "./engine/kolmoGame.js";
8
- import { KOLMO_STICK_DEADZONE, applyKolmoTouchLook, computeVirtualStick, defaultTouchActionsForMode, detectTouchDevice, kolmoTouchInput, resetKolmoTouchInput, resetKolmoTouchStick, snapshotKolmoTouchInput, writeKolmoTouchAction } from "./engine/kolmoTouchState.js";
9
- import { EMPTY_KOLMO_INPUT, KOLMO_KEY_MAP, useKolmoInput } from "./engine/kolmoInput.js";
10
- import { RetroViewportSync, RoomEnvRig, ShadowSnapRig } from "./engine/kolmoRigs.js";
11
- import { flipVehicleBodyUpright, kolmoActions, kolmoTelemetry } from "./engine/kolmoActions.js";
12
- import { readFloatingOriginAnchorXZ, shiftFloatingOriginEntities } from "./engine/kolmoFloatingOrigin.js";
13
- import { KolmoHud, KolmoOverlayContext, useKolmoGame } from "./engine/kolmoHud.js";
14
- import { KOLMO_EXTENSION_NAME, createDefaultSignals, inferKolmoSocketRole } from "./schema/kolmoTypes.js";
15
- import { disambiguateExplicitPatches, disambiguatePatchName, stampKolmoNodesIntoGlb } from "./schema/kolmoStamp.js";
16
- import { KolmoVehicle } from "./engine/kolmoVehicle.js";
17
- import { buildProceduralCarGlb } from "./engine/kolmoProcedural.js";
18
- import { buildPatchPreviewEmitters, computeChopPartHinge, normalToMinusZQuaternion } from "./importer/chopHingeHelpers.js";
19
- import { normalizeSceneToSi, sliceMeshTriangles } from "./importer/sceneSiNormalize.js";
20
- import { enforceMirrorCutterSymmetry, inferMirrorOriginX, mirrorCutterId, snapCuttersAxles, updateWheelCutter } from "./importer/wheelCutterHelpers.js";
21
- import { detectFusedCarWheels } from "./importer/fusedWheelDetect.js";
22
- import { sliceCarWheelCylinders } from "./importer/cylinderBooleanSlice.js";
23
- import { separateVehicleMeshes } from "./importer/vehiclePartSplit.js";
24
- import { measureSelection, suggestCarAxles, toggleIslandSelection } from "./importer/wheelAxlePairing.js";
25
- import { extractMeshIslands } from "./importer/meshIslands.js";
26
- import { mirrorTriangles } from "./importer/surfaceGeodesic.js";
27
- import { CHOP_ROLES, buildSurfaceTopology, floodFillByCrease, getIslandTopology } from "./importer/surfaceTopology.js";
28
- import { refineMeshAlongLoop } from "./importer/surfaceLoopRefine.js";
29
- import { buildSelectionOverlayGeometry, createFleet12GonWheelGroup, findMirrorIslandId, peelIslandSelection, remapIslandIds } from "./importer/surfacePeel.js";
30
- import { previewLoopPolyline, selectFacesByClick, selectFacesByLoop } from "./importer/surfaceCutter.js";
31
- import { compileKhrAssetGlb } from "./importer/khrCompiler.js";
32
- import { loadOrAutoCompileVehicleGlb } from "./engine/kolmoVehicleAutoCompile.js";
33
- import { PARTICLE_FRAG, PARTICLE_VERT, PLUME_FRAG, PLUME_VERT } from "./shaders/emitterShaders.js";
34
- import { KolmoActor } from "./engine/kolmoActor.js";
35
- import { KolmoProp, KolmoSurface, togglePropJoint } from "./engine/kolmoSurface.js";
36
- import { KolmoIsland } from "./engine/kolmoIsland.js";
37
- import { C12TileKind, C12_TILE_M, FLOATING_ORIGIN_STEP_M, MACRO_SIZE_M, TILES_PER_MACRO, quantizeFloatingOrigin192 } from "./world/macroCellSchema.js";
38
- import { ShiftedFixedBody } from "./engine/shiftedFixedBody.js";
39
- import { KolmoLongDrive } from "./engine/kolmoLongDrive.js";
40
- import { childSeed, fbm2, mulberry32, seedFrom, valueNoise2 } from "./world/random.js";
41
- import { SHOULDER_K, makeTerrain, sampleHeightfield } from "./world/terrain.js";
42
- import { SEED8_ALPHABET, SeededSimplex2D, SplitMix32, bakeWorldSplatMaps, generateSeed8, hashSeed, isValidSeed8, normalizeSeed8 } from "./world/worldTypes.js";
43
- import { SPLAT_LAYER, createPS2WorldTextures, generatePS2DetailSlices } from "./shaders/ps2Textures.js";
44
- import { createPS2RoadMaterialWebGL } from "./shaders/ps2RoadWebGL.js";
45
- import { createPS2TerrainMaterialWebGL } from "./shaders/ps2TerrainWebGL.js";
46
- import { closedRoadFromPoints, growRoad, maxGrade, roadFromPoints } from "./world/road.js";
47
- import { buildCarvedTerrainGeometry, buildHighwayAsphaltTexture } from "./world/terrainGeometry.js";
48
- import { buildRoadRibbonGeometry, planDirtSpurs } from "./world/roadRibbon.js";
49
- import { makeIslandHeightfn, planIslandWorld } from "./world/island.js";
50
- import { computeIslandSpawnPose, getCachedIslandPlan } from "./engine/islandSettlementMesh.js";
51
- import { ATMO_FRAG, ATMO_VERT, KEY_SUN_DIRECTION, KolmoSkybox, RING_MOONLET_COUNT, populateMoonletMatrices } from "./shaders/skyboxShaders.js";
52
- import { buildDodecagonalCivicHub, routeMacroKnightAStar } from "./world/macroKnightAStar.js";
53
- import { InfiniteLongDrivePlanner } from "./world/infiniteWorld2D.js";
54
- import { BOTTLE_HEIGHT, CAN_LOD_THRESHOLD_M, TIN_CAN_HEIGHT, TIN_CAN_RADIUS, buildGlassBottleGeometry, buildTinCanGeometry, countGeometryTriangles, createGlassBottleMaterial, createTinCanMaterials, selectCanLod } from "./junk/junkGeometry.js";
55
- import { disposeImportedRoot, ensureMeshAttributes } from "./junk/junkImportSanitize.js";
56
- import { collectValidTris } from "./junk/bvhTriCollector.js";
57
- import { splitObjectIntoShards } from "./junk/bvhShatter.js";
58
- import { ShardPieces } from "./junk/ShardPieces.js";
59
- import { TargetDecals, getBulletHoleTexture } from "./junk/TargetDecals.js";
60
- import { applySegmentsToImportedRoot, loadImportedGlbUrl, parseImportedGlbBuffer } from "./junk/junkImporter.js";
61
- import { getProceduralLabelTexture, loadCustomLabelTexture } from "./junk/junkLabels.js";
62
- import { DestructibleTarget } from "./junk/DestructibleTarget.js";
63
- import { KolmoExoplanet } from "./shaders/celestialBackdrop.js";
64
- import { computeLongDriveBridgeheadSpawn, computeLongDriveMainlandSpawn } from "./engine/causewayBridge.js";
65
- import { KolmoEmitterRig } from "./shaders/plumeAndSparkle.js";
66
- import { decodeKolmoRig } from "./schema/kolmoSchema.js";
67
- import { KolmoJunk } from "./junk/KolmoJunk.js";
68
- import { MobileTouchOverlay } from "./engine/kolmoTouchOverlay.js";
69
- import { mountPS2WorldMeshes } from "./shaders/ps2MaterialsWebGL.js";
70
- import { frontage } from "./world/frontage.js";
71
- import { ChopShopPanel } from "./importer/ChopShopPanel.js";
72
- import { convertUsdToGlb, isUsdFileName } from "./importer/usdToGlb.js";
73
- import { SAND3D_RECIPES, SAND3D_RECIPE_MAP, buildSand3dRecipe, compileSand3dAssembly, compileSand3dRecipeGlb, detectSand3dBytes, exportCompiledSand3dWithKolmo, exportSand3dGlb, findSand3dRecipe, ingestSand3dOrGlb, isSand3dFileName, isSupportedCadImportFileName, loadSand3dBundle, measureNaturalSceneSpanM, parseSand3dSource, resolveSand3dAssembly, s3d } from "./sand3d/sand3dAssetLoader.js";
74
- import { Sand3dWorkshopSection } from "./sand3d/Sand3dWorkshopSection.js";
75
- import { GOLDEN_RATIO, ORB_TIERS, getSuikaTier, matchSuikaTierByRadius } from "./suika/suikaTypes.js";
76
- import { buildSuikaOrbGeometry, buildSuikaTierScene, extractSceneHullVertices, getConvexHullVertices, loadImportedSuikaGlbUrl, parseImportedSuikaGlbBuffer } from "./suika/suikaGeometry.js";
77
- import { SuikaMergeArbiter, computeSuikaMergeMidpoint, defaultSuikaArbiter, spawnSuikaOrb, useSuikaStore } from "./suika/suikaArbiter.js";
78
- import { KolmoSuikaOrb, KolmoSuikaSystem, OrbShapeGeometry, SuikaBurstMesh } from "./suika/KolmoSuikaOrb.js";
79
- import { DAMP_ZETA, FREQ_HZ, gateTelemetry, isGateStep1Unlocked, useGateStore } from "./importer/gateStore.js";
80
- import { bakeArticulatedLauncherGlb, buildLauncherSceneFromPlan } from "./importer/launcherBake.js";
81
- import { JUNK_PROCEDURAL_RECIPES, buildProceduralJunkScene } from "./junk/junkProceduralScenes.js";
82
- import { C12_PROCEDURAL_RECIPES, buildProceduralC12Scene } from "./importer/proceduralC12AndCraft.js";
83
- import { PERSON_PROCEDURAL_RECIPES, PROP_PROCEDURAL_RECIPES, buildProceduralPersonScene, buildProceduralPropScene } from "./importer/proceduralPersonAndProp.js";
84
- import { CRAFT_PROCEDURAL_RECIPES, buildProceduralCraftScene, buildProceduralDomainScene } from "./importer/proceduralDomainBuilders.js";
85
- import { DomainWorkshopPanel, enforceRetroPersonMaterials } from "./importer/DomainWorkshopPanel.js";
86
- import { GateHudBar, resolveVaultCarSelection } from "./importer/GateHudBar.js";
87
- import { WheelRingHandles3D } from "./importer/WheelRingHandles3D.js";
88
- import { makeStarterDomainScene, registerSand3dStarterFactory } from "./importer/starterScene.js";
89
- import { Step1CalibrationPlinth } from "./importer/Step1CalibrationPlinth.js";
90
- import { C12_TICK_M, UNIFIED_ANCHOR_NAMES, computeC12Metrics, defaultTargetMeters, detectSceneAnchors, khrBoxToRapierHalfExtents, measureAssemblyCalibration, measureNormalizedSceneCalibration, snapMetersToC12, wrapSingleMeshWithPaperShellProxy } from "./importer/glbNormalizer.js";
91
- import { ImperativeVehicleRig } from "./importer/ImperativeVehicleRig.js";
92
- import { Step2UniversalPad } from "./importer/Step2UniversalPad.js";
93
- import { VfxEmitterPool } from "./importer/VfxEmitterPool.js";
94
- import { buildImporterWebMcpTools, getNavigatorModelContext, useImporterWebMcp } from "./importer/importerWebMcp.js";
95
- import { bakeUniversalGateGlb } from "./importer/universalGateBake.js";
96
- import { useChopShopController } from "./importer/useChopShopController.js";
97
- import { GlbImportGate } from "./importer/GlbImportGate.js";
98
- import { KolmoSand3D } from "./sand3d/KolmoSand3D.js";
99
- import { PAPER_SHELL_PRESETS } from "@khr3/vehicles/paper-shell";
100
- import { DOOR_HINGE_SPEC, Ex, ROOT3, buildFootprint, canPlace, instanceBatches, latticePose, planSettlement, poseEq, poseFromJSON, poseToFloat, poseToJSON, snapPose, socketFor, triangleCorners, vToFloat, worldSockets } from "@khr3/c12";
101
- import { DEFAULT_VAULT_URL, KOLMO_ASSETS_URL, VAULT_CARS, VAULT_CATALOG, VAULT_CITY, VAULT_WEAPONS, createAssetVault, inspectGlbBuffer, normalizeGlbBuffer, vaultAssetUrl } from "@khr3/assets";
102
- import { CARBINE_556, LAUNCHER_RECIPES, PISTOL_9MM, SHOTGUN_12G, attachModule, createLauncherState, detachModule, findLauncherRecipe, planLauncher, stepLauncher } from "@khr3/launchers";
103
- import { CARS_R2_PREFIX, COUPE_2DOOR, FLEET, SEDAN_4DOOR, carUrl, findCar, planCar } from "@khr3/vehicles";
104
- export { ATMO_FRAG, ATMO_VERT, KolmoActor as Actor, ActorTrait, BOTTLE_HEIGHT, C12TileKind, C12_PROCEDURAL_RECIPES, C12_TICK_M, C12_TILE_M, CAN_LOD_THRESHOLD_M, CARBINE_556, CARS_R2_PREFIX, CHOP_ROLES, COUPE_2DOOR, CRAFT_PROCEDURAL_RECIPES, KolmoCanvas as Canvas, ChopShopPanel, DAMP_ZETA, DEFAULT_VAULT_URL, DOOR_HINGE_SPEC, DestructibleTarget, DomainWorkshopPanel, EMPTY_KOLMO_INPUT, KolmoEmitterRig as EmitterRig, Ex, KolmoExoplanet as Exoplanet, FLEET, FLOATING_ORIGIN_STEP_M, FREQ_HZ, FloatingBodyTrait, GLSL_BAYER_RGB555, GLSL_RETRO_QUANTIZE, GOLDEN_RATIO, KolmoGame as Game, GateHudBar, GlbImportGate, KolmoHud as Hud, ImperativeVehicleRig, GlbImportGate as ImporterWorkbench, InfiniteLongDrivePlanner, InteractableTrait, KolmoIsland as Island, JUNK_PROCEDURAL_RECIPES, KolmoJunk as Junk, KEY_SUN_DIRECTION, KOLMO_ASSETS_URL, KOLMO_EXTENSION_NAME, KOLMO_KEY_MAP, KOLMO_STICK_DEADZONE, KolmoActor, KolmoCanvas, KolmoEmitterRig, KolmoExoplanet, KolmoGame, KolmoGravityContext, KolmoHud, KolmoInCanvasContext, KolmoIsland, KolmoJunk, KolmoLongDrive, KolmoOverlayContext, KolmoPhysics, KolmoProp, KolmoSand3D, KolmoSkybox, KolmoSuikaOrb, KolmoSuikaSystem, KolmoSurface, KolmoVehicle, KolmoWorld, LAUNCHER_RECIPES, KolmoLongDrive as LongDrive, MACRO_SIZE_M, MobileTouchOverlay, ORB_TIERS, OrbShapeGeometry, PALETTE_CRUNCHY_16, PALETTE_CRUNCHY_64, PAPER_SHELL_PRESETS, PARTICLE_FRAG, PARTICLE_VERT, PERSON_PROCEDURAL_RECIPES, PISTOL_9MM, PLUME_FRAG, PLUME_VERT, PROP_PROCEDURAL_RECIPES, PS1_SNAP_RESOLUTION, KolmoPhysics as Physics, PilotLink, PilotedTag, KolmoProp as Prop, RETRO_CLEAN_HD, RETRO_COLOR_MODES, RETRO_DREAMCAST, RETRO_PRESETS, RETRO_PS2_SHINOBI, RETRO_PSX_PLUS, RETRO_UNIFORMS, RING_MOONLET_COUNT, ROOT3, RetroViewportSync, RoomEnvRig, SAND3D_RECIPES, SAND3D_RECIPE_MAP, SEDAN_4DOOR, SEED8_ALPHABET, SHOTGUN_12G, SHOULDER_K, SPLAT_LAYER, KolmoSand3D as Sand3D, Sand3dWorkshopSection, SeededSimplex2D, ShadowSnapRig, ShardPieces, ShiftedFixedBody, KolmoSkybox as Skybox, SplitMix32, Step1CalibrationPlinth, Step2UniversalPad, SuikaBurstMesh, SuikaMergeArbiter, KolmoSuikaOrb as SuikaOrb, KolmoSuikaSystem as SuikaSystem, KolmoSurface as Surface, TILES_PER_MACRO, TIN_CAN_HEIGHT, TIN_CAN_RADIUS, TargetDecals, TransformTrait, UNIFIED_ANCHOR_NAMES, VAULT_CARS, VAULT_CATALOG, VAULT_CITY, VAULT_WEAPONS, KolmoVehicle as Vehicle, VehicleTelemetryTrait, VehicleTrait, VelocityTrait, VfxEmitterPool, WheelRingHandles3D, KolmoWorld as World, WorldSessionTrait, WorldSpawnTrait, applyKolmoTouchLook, applyPs1Material, applyRetroFilteringToMaterial, applyRetroMaterial, applyRetroTextureFiltering, applySceneRetroMaterials, applySegmentsToImportedRoot, attachModule, bakeArticulatedLauncherGlb, bakeUniversalGateGlb, bakeWorldSplatMaps, buildCarvedTerrainGeometry, buildDodecagonalCivicHub, buildFootprint, buildGlassBottleGeometry, buildHighwayAsphaltTexture, buildImporterWebMcpTools, buildLauncherSceneFromPlan, buildPaletteLutData, buildPatchPreviewEmitters, buildProceduralC12Scene, buildProceduralCarGlb, buildProceduralCraftScene, buildProceduralDomainScene, buildProceduralJunkScene, buildProceduralPersonScene, buildProceduralPropScene, buildRoadRibbonGeometry, buildSand3dRecipe, buildSelectionOverlayGeometry, buildSuikaOrbGeometry, buildSuikaTierScene, buildSurfaceTopology, buildTinCanGeometry, canPlace, carUrl, childSeed, closedRoadFromPoints, collectValidTris, compileKhrAssetGlb, compileSand3dAssembly, compileSand3dRecipeGlb, computeC12Metrics, computeChopPartHinge, computeIslandSpawnPose, computeLongDriveBridgeheadSpawn, computeLongDriveMainlandSpawn, computeRetroDpr, computeSuikaMergeMidpoint, computeVirtualStick, convertUsdToGlb, countGeometryTriangles, createAssetVault, createDefaultSignals, createFleet12GonWheelGroup, createGlassBottleMaterial, createLauncherState, createPS2RoadMaterialWebGL, createPS2TerrainMaterialWebGL, createPS2WorldTextures, createTinCanMaterials, decodeKolmoRig, defaultSuikaArbiter, defaultTargetMeters, defaultTouchActionsForMode, detachModule, detectFusedCarWheels, detectSand3dBytes, detectSceneAnchors, detectTouchDevice, disambiguateExplicitPatches, disambiguatePatchName, disposeImportedRoot, enforceMirrorCutterSymmetry, enforceRetroPersonMaterials, ensureMeshAttributes, ensureWorldSession, exportCompiledSand3dWithKolmo, exportSand3dGlb, extractMeshIslands, extractSceneHullVertices, fbm2, findCar, findLauncherRecipe, findMirrorIslandId, findSand3dRecipe, flipVehicleBodyUpright, floodFillByCrease, frontage, gateTelemetry, generatePS2DetailSlices, generateSeed8, getBulletHoleTexture, getCachedIslandPlan, getColorQuantVector, getConvexHullVertices, getIslandTopology, getNavigatorModelContext, getPaletteLutTexture, getProceduralLabelTexture, getRetroPreset, getRetroShaderUniforms, getSuikaTier, growRoad, hashSeed, inferKolmoSocketRole, inferMirrorOriginX, ingestSand3dOrGlb, inspectGlbBuffer, instanceBatches, isGateStep1Unlocked, isSand3dFileName, isSupportedCadImportFileName, isUsdFileName, isValidSeed8, khrBoxToRapierHalfExtents, kolmoActions, kolmoTelemetry, kolmoTouchInput, kolmoWorld, latticePose, loadCustomLabelTexture, loadImportedGlbUrl, loadImportedSuikaGlbUrl, loadOrAutoCompileVehicleGlb, loadSand3dBundle, makeIslandHeightfn, makeStarterDomainScene, makeTerrain, matchSuikaTierByRadius, maxGrade, measureAssemblyCalibration, measureNaturalSceneSpanM, measureNormalizedSceneCalibration, measureSelection, mirrorCutterId, mirrorTriangles, mountPS2WorldMeshes, mulberry32, normalToMinusZQuaternion, normalizeGlbBuffer, normalizeSceneToSi, normalizeSeed8, parseImportedGlbBuffer, parseImportedSuikaGlbBuffer, parseSand3dSource, peelIslandSelection, pilotedVehicleQuery, planCar, planDirtSpurs, planIslandWorld, planLauncher, planSettlement, populateMoonletMatrices, poseEq, poseFromJSON, poseToFloat, poseToJSON, previewLoopPolyline, publishWorldSpawn, quantizeFloatingOrigin192, readFloatingOriginAnchorXZ, refineMeshAlongLoop, registerSand3dStarterFactory, remapIslandIds, resetKolmoTouchInput, resetKolmoTouchStick, resolveSand3dAssembly, resolveVaultCarSelection, roadFromPoints, routeMacroKnightAStar, s3d, sampleHeightfield, seedFrom, selectCanLod, selectFacesByClick, selectFacesByLoop, separateVehicleMeshes, shiftFloatingOriginEntities, sliceCarWheelCylinders, sliceMeshTriangles, snapCuttersAxles, snapMetersToC12, snapPose, snapshotKolmoTouchInput, socketFor, spawnSuikaOrb, splitObjectIntoShards, stampKolmoNodesIntoGlb, stepLauncher, suggestCarAxles, syncRetroUniforms, syncRetroViewport, toggleIslandSelection, togglePropJoint, triangleCorners, updateWheelCutter, useActiveKolmoWorld, useChopShopController, useGateStore, useImporterWebMcp, useIsKolmoCustomGravity, useKolmoGame, useKolmoInput, useOptionalKootaWorld, useSuikaStore, vToFloat, valueNoise2, vaultAssetUrl, vehicleSimQuery, worldSockets, wrapSingleMeshWithPaperShellProxy, writeEntityKinematics, writeKolmoTouchAction, writeVehicleTelemetry };
1
+ import { EMPTY_KOLMO_INPUT, KOLMO_KEY_MAP, KOLMO_STICK_DEADZONE, KolmoActor, KolmoCanvas, KolmoGame, KolmoHud, KolmoInCanvasContext, KolmoKeyboardBridge, KolmoKeyboardContext, KolmoOverlayContext, KolmoProp, KolmoSurface, KolmoVehicle, KolmoWorld, RoomEnvRig, createKolmoGltfLoader, loadKolmoGlbUrl, parseKolmoGlbBuffer, togglePropJoint, useKolmoGame, useKolmoInput } from "./engine/index.js";
2
+ import { C as pilotedVehicleQuery, D as writeVehicleTelemetry, E as writeEntityKinematics, S as kolmoWorld, T as vehicleSimQuery, _ as VelocityTrait, a as G_SI, b as flipVehicleBodyUpright, c as evaluateNBodyGravity, d as InteractableTrait, f as PilotLink, g as VehicleTrait, h as VehicleTelemetryTrait, i as useOptionalKootaWorld, l as resolveAttractorMu, m as TransformTrait, n as KolmoPhysics, o as computeCircularOrbitSpeed, p as PilotedTag, r as useIsKolmoCustomGravity, s as createNBodyGravityField, t as KolmoGravityContext, u as ActorTrait, v as WorldSessionTrait, w as useActiveKolmoWorld, x as kolmoActions, y as ensureWorldSession } from "./physics-FhWvTBfH.js";
3
+ import { Ecctrl } from "@pinkaphant/ecctrl";
4
+ import { EcctrlVehicle, ShapeCastWheel, ThrustPropeller } from "@pinkaphant/ecctrl/vehicle";
5
+ import { Joystick, VirtualButton, useButtonStore, useJoystickStore } from "@pinkaphant/ecctrl/input";
6
+ import { EcctrlCameraControls } from "@pinkaphant/ecctrl/camera";
7
+ import { EcctrlAnimationStateController, useEcctrlAnimationStore } from "@pinkaphant/ecctrl/animation";
8
+ import { useCustomGravity } from "@pinkaphant/ecctrl/gravity";
9
+ import { KhrAssembly, PhysicsWorld, cloneKhrBundle, createKhrGltfPlugin, disposeKhrBundle, exportKhrGlb, loadKhrGlb, useKhrGlb } from "@khr3/core";
10
+ import { KhrVehicle } from "@khr3/core/vehicle";
11
+ import { DOOR_HINGE_SPEC, Ex, ROOT3, SIDE_METRES, STOREY_METRES, buildFootprint, canPlace, instanceBatches, latticePose, planSettlement, poseEq, poseFromJSON, poseToFloat, poseToJSON, snapPose, socketFor, triangleCorners, vToFloat, worldSockets } from "@khr3/c12";
12
+ import { createActions, createQuery, createWorld, getStore, relation, trait, unpackEntity } from "koota";
13
+ import { WorldProvider, useHas, useQuery, useQueryFirst, useTrait, useWorld } from "koota/react";
14
+ export { KolmoActor as Actor, KolmoActor, ActorTrait, KolmoCanvas as Canvas, KolmoCanvas, DOOR_HINGE_SPEC, EMPTY_KOLMO_INPUT, Ecctrl, EcctrlAnimationStateController, EcctrlCameraControls, EcctrlVehicle, Ex, G_SI, KolmoGame as Game, KolmoGame, KolmoHud as Hud, KolmoHud, InteractableTrait, Joystick, KOLMO_KEY_MAP, KOLMO_STICK_DEADZONE, KhrAssembly, KhrVehicle, KolmoGravityContext, KolmoInCanvasContext, KolmoKeyboardBridge, KolmoKeyboardContext, KolmoOverlayContext, KolmoPhysics, KolmoPhysics as Physics, KolmoProp, KolmoProp as Prop, KolmoSurface, KolmoSurface as Surface, KolmoVehicle, KolmoVehicle as Vehicle, KolmoWorld, KolmoWorld as World, PhysicsWorld, PilotLink, PilotedTag, ROOT3, RoomEnvRig, SIDE_METRES, STOREY_METRES, ShapeCastWheel, ThrustPropeller, TransformTrait, VehicleTelemetryTrait, VehicleTrait, VelocityTrait, VirtualButton, WorldProvider, WorldSessionTrait, buildFootprint, canPlace, cloneKhrBundle, computeCircularOrbitSpeed, createActions, createKhrGltfPlugin, createKolmoGltfLoader, createNBodyGravityField, createQuery, createWorld, disposeKhrBundle, ensureWorldSession, evaluateNBodyGravity, exportKhrGlb, flipVehicleBodyUpright, getStore, instanceBatches, kolmoActions, kolmoWorld, latticePose, loadKhrGlb, loadKolmoGlbUrl, parseKolmoGlbBuffer, pilotedVehicleQuery, planSettlement, poseEq, poseFromJSON, poseToFloat, poseToJSON, relation, resolveAttractorMu, snapPose, socketFor, togglePropJoint, trait, triangleCorners, unpackEntity, useActiveKolmoWorld, useButtonStore, useCustomGravity, useEcctrlAnimationStore, useHas, useIsKolmoCustomGravity, useJoystickStore, useKhrGlb, useKolmoGame, useKolmoInput, useOptionalKootaWorld, useQuery, useQueryFirst, useTrait, useWorld, vToFloat, vehicleSimQuery, worldSockets, writeEntityKinematics, writeVehicleTelemetry };
@@ -2,15 +2,18 @@ import React, { type ReactNode, type RefObject } from "react";
2
2
  import * as THREE from "three";
3
3
  import { type PhysicsWorldProps } from "@khr3/core";
4
4
  import { type World } from "koota";
5
+ import { G_SI, computeCircularOrbitSpeed, createNBodyGravityField, evaluateNBodyGravity, resolveAttractorMu, type KolmoGravityAttractor, type KolmoNBodyGravity } from "./nBodyGravity.js";
6
+ export { G_SI, computeCircularOrbitSpeed, createNBodyGravityField, evaluateNBodyGravity, resolveAttractorMu, type KolmoGravityAttractor, type KolmoNBodyGravity, };
5
7
  export type KolmoTimeControlValue = number | RefObject<number>;
6
8
  export type KolmoPointGravity = {
7
9
  readonly kind: "point";
8
10
  readonly center: readonly [number, number, number];
9
11
  readonly surfaceG: number;
10
12
  readonly radius: number;
13
+ readonly inverseSquare?: boolean;
11
14
  };
12
15
  export type KolmoGravityCallback = (pos: THREE.Vector3, out: THREE.Vector3) => THREE.Vector3;
13
- export type KolmoGravitySpec = "planar" | "zero" | "custom" | readonly [number, number, number] | KolmoPointGravity | KolmoGravityCallback;
16
+ export type KolmoGravitySpec = "planar" | "zero" | "custom" | readonly [number, number, number] | KolmoPointGravity | KolmoNBodyGravity | KolmoGravityCallback;
14
17
  export declare const KolmoGravityContext: React.Context<boolean>;
15
18
  export declare function useOptionalKootaWorld(): World | null;
16
19
  export interface KolmoPhysicsProps extends Omit<PhysicsWorldProps, "gravity" | "debug" | "timeScale" | "maxDelta" | "children"> {
@@ -1,105 +1 @@
1
- import { kolmoWorld } from "../engine/kolmoTraits.js";
2
- import { Suspense, createContext, useContext, useLayoutEffect, useMemo } from "react";
3
- import * as THREE from "three";
4
- import "koota";
5
- import { WorldProvider, useWorld } from "koota/react";
6
- import { PhysicsWorld } from "@khr3/core";
7
- import { useCustomGravity } from "@pinkaphant/ecctrl/gravity";
8
- import { jsx } from "react/jsx-runtime";
9
- // src/physics/index.tsx
10
- var KolmoGravityContext = createContext(false);
11
- function useOptionalKootaWorld() {
12
- try {
13
- return useWorld();
14
- } catch {
15
- return null;
16
- }
17
- }
18
- function isGravityTuple(g) {
19
- return Array.isArray(g);
20
- }
21
- function isPointGravity(g) {
22
- return typeof g === "object" && !Array.isArray(g) && "kind" in g && g.kind === "point";
23
- }
24
- var _gravTmp = new THREE.Vector3();
25
- function KolmoPhysics({ gravity = "planar", paused = false, timeScale = 1, maxDelta, physicsDebug = false, world = null, children, ...physicsProps }) {
26
- const outerWorld = useOptionalKootaWorld();
27
- const resolvedWorld = world ?? outerWorld ?? kolmoWorld;
28
- const isCallback = typeof gravity === "function";
29
- const isTuple = isGravityTuple(gravity);
30
- const isCustomLiteral = gravity === "custom";
31
- const isPoint = isPointGravity(gravity);
32
- const isCustomGravity = isCallback || isPoint || isCustomLiteral;
33
- const gx = isTuple ? gravity[0] : 0;
34
- const gy = isTuple ? gravity[1] : -9.81;
35
- const gz = isTuple ? gravity[2] : 0;
36
- const cx = isPoint ? gravity.center[0] : 0;
37
- const cy = isPoint ? gravity.center[1] : 0;
38
- const cz = isPoint ? gravity.center[2] : 0;
39
- const surfaceG = isPoint ? gravity.surfaceG : gravity === "zero" ? 0 : 9.81;
40
- const gravityFn = isCallback ? gravity : null;
41
- const rapierGravity = useMemo(() => isTuple ? [
42
- gx,
43
- gy,
44
- gz
45
- ] : isCustomGravity || gravity === "zero" ? [
46
- 0,
47
- 0,
48
- 0
49
- ] : [
50
- 0,
51
- -9.81,
52
- 0
53
- ], [
54
- isTuple,
55
- gx,
56
- gy,
57
- gz,
58
- isCustomGravity,
59
- gravity === "zero"
60
- ]);
61
- useLayoutEffect(() => {
62
- if (isCustomLiteral || !isCallback && !isPoint) return;
63
- const setField = useCustomGravity.getState().setGravityField;
64
- if (gravityFn) setField((pos) => gravityFn(pos, _gravTmp));
65
- else if (isPoint) setField((pos) => {
66
- _gravTmp.set(pos.x - cx, pos.y - cy, pos.z - cz);
67
- const lenSq = _gravTmp.lengthSq();
68
- return lenSq < 1e-8 ? _gravTmp.set(0, -surfaceG, 0) : _gravTmp.multiplyScalar(-surfaceG / Math.sqrt(lenSq));
69
- });
70
- }, [
71
- isCustomLiteral,
72
- isCallback,
73
- isPoint,
74
- gravityFn,
75
- cx,
76
- cy,
77
- cz,
78
- surfaceG
79
- ]);
80
- const content = /* @__PURE__ */ jsx(KolmoGravityContext.Provider, {
81
- value: isCustomGravity,
82
- children: /* @__PURE__ */ jsx(PhysicsWorld, {
83
- ...physicsProps,
84
- paused,
85
- timeScale,
86
- ...maxDelta === void 0 ? {} : { maxDelta },
87
- gravity: rapierGravity,
88
- debug: physicsDebug,
89
- children: /* @__PURE__ */ jsx(Suspense, {
90
- fallback: null,
91
- children
92
- })
93
- })
94
- });
95
- return resolvedWorld !== outerWorld ? /* @__PURE__ */ jsx(WorldProvider, {
96
- world: resolvedWorld,
97
- children: content
98
- }) : content;
99
- }
100
- function useIsKolmoCustomGravity() {
101
- return useContext(KolmoGravityContext);
102
- }
103
- export { KolmoGravityContext, KolmoPhysics, useIsKolmoCustomGravity, useOptionalKootaWorld };
104
-
105
- //# sourceMappingURL=index.js.map
1
+ export { a as G_SI, t as KolmoGravityContext, n as KolmoPhysics, o as computeCircularOrbitSpeed, s as createNBodyGravityField, c as evaluateNBodyGravity, l as resolveAttractorMu, r as useIsKolmoCustomGravity, i as useOptionalKootaWorld } from "../physics-FhWvTBfH.js";
@@ -0,0 +1,42 @@
1
+ import * as THREE from "three";
2
+ /** CODATA Newtonian gravitational constant in SI units (m^3 kg^-1 s^-2). */
3
+ export declare const G_SI = 6.6743e-11;
4
+ export interface KolmoGravityAttractor {
5
+ readonly id?: string;
6
+ readonly position: readonly [number, number, number];
7
+ /** Direct standard gravitational parameter mu = G * M (m^3 / s^2). */
8
+ readonly mu?: number;
9
+ /** Mass in kilograms (used with `gravitationalConstant`, defaults to `G_SI`). */
10
+ readonly massKg?: number;
11
+ /** Surface gravity (m/s^2) paired with `radius` (m) -> mu = surfaceG * (radius^2 + softeningM^2)^(3/2) / radius. */
12
+ readonly surfaceG?: number;
13
+ readonly radius?: number;
14
+ /** Plummer softening length epsilon (m) preventing r -> 0 singularities. */
15
+ readonly softeningM?: number;
16
+ }
17
+ export interface KolmoNBodyGravity {
18
+ readonly kind: "nbody";
19
+ readonly attractors: readonly KolmoGravityAttractor[];
20
+ readonly gravitationalConstant?: number;
21
+ }
22
+ export declare function resolveAttractorMu(attractor: KolmoGravityAttractor, gravitationalConstant?: number): {
23
+ mu: number;
24
+ epsSq: number;
25
+ };
26
+ /**
27
+ * Evaluates softened Newtonian multi-attractor gravitational acceleration (m/s^2):
28
+ * g(x) = sum_i mu_i * (p_i - x) / (|p_i - x|^2 + eps_i^2)^(3/2)
29
+ * Zero artificial floor clamps and zero boundary fences.
30
+ */
31
+ export declare function evaluateNBodyGravity(pos: {
32
+ readonly x: number;
33
+ readonly y: number;
34
+ readonly z: number;
35
+ }, attractors: readonly KolmoGravityAttractor[], out: THREE.Vector3, gravitationalConstant?: number): THREE.Vector3;
36
+ export declare function createNBodyGravityField(attractors: readonly KolmoGravityAttractor[], gravitationalConstant?: number): (pos: THREE.Vector3, out: THREE.Vector3) => THREE.Vector3;
37
+ /**
38
+ * Exact tangential speed v_circ (m/s) for a circular orbit of radius `orbitRadiusM`
39
+ * around a softened point/spherical attractor:
40
+ * v^2 / r = mu * r / (r^2 + eps^2)^(3/2) => v = r * sqrt(mu / (r^2 + eps^2)^(3/2))
41
+ */
42
+ export declare function computeCircularOrbitSpeed(attractor: KolmoGravityAttractor, orbitRadiusM: number, gravitationalConstant?: number): number;