@pinkaphant/kolmo 0.4.7 → 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 (506) hide show
  1. package/README.md +39 -93
  2. package/dist/engine/actor.d.ts +13 -0
  3. package/dist/engine/{kolmoGltfLoader.d.ts → gltfLoader.d.ts} +6 -3
  4. package/dist/engine/index.d.ts +8 -17
  5. package/dist/engine/index.js +1270 -27
  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 -116
  14. package/dist/physics/index.js +1 -131
  15. package/dist/physics-FhWvTBfH.js +424 -0
  16. package/dist/physics-FhWvTBfH.js.map +1 -0
  17. package/package.json +31 -85
  18. package/AGENTS.md +0 -29
  19. package/CLAUDE.md +0 -8
  20. package/bin/kolmo.mjs +0 -561
  21. package/dist/engine/causewayBridge.d.ts +0 -14
  22. package/dist/engine/causewayBridge.js +0 -166
  23. package/dist/engine/causewayBridge.js.map +0 -1
  24. package/dist/engine/islandSettlementMesh.d.ts +0 -26
  25. package/dist/engine/islandSettlementMesh.js +0 -166
  26. package/dist/engine/islandSettlementMesh.js.map +0 -1
  27. package/dist/engine/kolmoActions.d.ts +0 -23
  28. package/dist/engine/kolmoActions.js +0 -179
  29. package/dist/engine/kolmoActions.js.map +0 -1
  30. package/dist/engine/kolmoActor.d.ts +0 -21
  31. package/dist/engine/kolmoActor.js +0 -273
  32. package/dist/engine/kolmoActor.js.map +0 -1
  33. package/dist/engine/kolmoActorHelpers.d.ts +0 -24
  34. package/dist/engine/kolmoActorHelpers.js +0 -64
  35. package/dist/engine/kolmoActorHelpers.js.map +0 -1
  36. package/dist/engine/kolmoBotControl.d.ts +0 -44
  37. package/dist/engine/kolmoBotControl.js +0 -194
  38. package/dist/engine/kolmoBotControl.js.map +0 -1
  39. package/dist/engine/kolmoBotJournal.d.ts +0 -23
  40. package/dist/engine/kolmoBotJournal.js +0 -138
  41. package/dist/engine/kolmoBotJournal.js.map +0 -1
  42. package/dist/engine/kolmoFloatingOrigin.d.ts +0 -17
  43. package/dist/engine/kolmoFloatingOrigin.js +0 -91
  44. package/dist/engine/kolmoFloatingOrigin.js.map +0 -1
  45. package/dist/engine/kolmoGame.d.ts +0 -27
  46. package/dist/engine/kolmoGame.js +0 -83
  47. package/dist/engine/kolmoGame.js.map +0 -1
  48. package/dist/engine/kolmoGltfLoader.js +0 -46
  49. package/dist/engine/kolmoGltfLoader.js.map +0 -1
  50. package/dist/engine/kolmoHud.d.ts +0 -23
  51. package/dist/engine/kolmoHud.js +0 -219
  52. package/dist/engine/kolmoHud.js.map +0 -1
  53. package/dist/engine/kolmoInput.js +0 -165
  54. package/dist/engine/kolmoInput.js.map +0 -1
  55. package/dist/engine/kolmoIsland.d.ts +0 -14
  56. package/dist/engine/kolmoIsland.js +0 -243
  57. package/dist/engine/kolmoIsland.js.map +0 -1
  58. package/dist/engine/kolmoLongDrive.d.ts +0 -12
  59. package/dist/engine/kolmoLongDrive.js +0 -178
  60. package/dist/engine/kolmoLongDrive.js.map +0 -1
  61. package/dist/engine/kolmoPilotMesh.d.ts +0 -6
  62. package/dist/engine/kolmoPilotMesh.js +0 -377
  63. package/dist/engine/kolmoPilotMesh.js.map +0 -1
  64. package/dist/engine/kolmoProcedural.d.ts +0 -13
  65. package/dist/engine/kolmoProcedural.js +0 -101
  66. package/dist/engine/kolmoProcedural.js.map +0 -1
  67. package/dist/engine/kolmoRigs.d.ts +0 -13
  68. package/dist/engine/kolmoRigs.js +0 -100
  69. package/dist/engine/kolmoRigs.js.map +0 -1
  70. package/dist/engine/kolmoStore.d.ts +0 -3
  71. package/dist/engine/kolmoStore.js +0 -4
  72. package/dist/engine/kolmoStore.js.map +0 -1
  73. package/dist/engine/kolmoSurface.d.ts +0 -18
  74. package/dist/engine/kolmoSurface.js +0 -198
  75. package/dist/engine/kolmoSurface.js.map +0 -1
  76. package/dist/engine/kolmoTouchOverlay.d.ts +0 -21
  77. package/dist/engine/kolmoTouchOverlay.js +0 -326
  78. package/dist/engine/kolmoTouchOverlay.js.map +0 -1
  79. package/dist/engine/kolmoTouchState.d.ts +0 -50
  80. package/dist/engine/kolmoTouchState.js +0 -210
  81. package/dist/engine/kolmoTouchState.js.map +0 -1
  82. package/dist/engine/kolmoTraits.js +0 -140
  83. package/dist/engine/kolmoTraits.js.map +0 -1
  84. package/dist/engine/kolmoVehicle.d.ts +0 -4
  85. package/dist/engine/kolmoVehicle.js +0 -80
  86. package/dist/engine/kolmoVehicle.js.map +0 -1
  87. package/dist/engine/kolmoVehicleAutoCompile.d.ts +0 -11
  88. package/dist/engine/kolmoVehicleAutoCompile.js +0 -94
  89. package/dist/engine/kolmoVehicleAutoCompile.js.map +0 -1
  90. package/dist/engine/kolmoVehicleConfig.d.ts +0 -56
  91. package/dist/engine/kolmoVehicleConfig.js +0 -84
  92. package/dist/engine/kolmoVehicleConfig.js.map +0 -1
  93. package/dist/engine/kolmoVehicleDriver.d.ts +0 -39
  94. package/dist/engine/kolmoVehicleDriver.js +0 -147
  95. package/dist/engine/kolmoVehicleDriver.js.map +0 -1
  96. package/dist/engine/kolmoVehicleInner.d.ts +0 -7
  97. package/dist/engine/kolmoVehicleInner.js +0 -307
  98. package/dist/engine/kolmoVehicleInner.js.map +0 -1
  99. package/dist/engine/kolmoWardrobeRig.d.ts +0 -22
  100. package/dist/engine/kolmoWardrobeRig.js +0 -146
  101. package/dist/engine/kolmoWardrobeRig.js.map +0 -1
  102. package/dist/engine/kolmoWorld.d.ts +0 -45
  103. package/dist/engine/kolmoWorld.js +0 -164
  104. package/dist/engine/kolmoWorld.js.map +0 -1
  105. package/dist/engine/longDriveKit.d.ts +0 -19
  106. package/dist/engine/longDriveKit.js +0 -145
  107. package/dist/engine/longDriveKit.js.map +0 -1
  108. package/dist/engine/longDriveRoadside.d.ts +0 -16
  109. package/dist/engine/longDriveRoadside.js +0 -171
  110. package/dist/engine/longDriveRoadside.js.map +0 -1
  111. package/dist/engine/macroCellBuilder.d.ts +0 -44
  112. package/dist/engine/macroCellBuilder.js +0 -228
  113. package/dist/engine/macroCellBuilder.js.map +0 -1
  114. package/dist/engine/mainlandMacroCell.d.ts +0 -15
  115. package/dist/engine/mainlandMacroCell.js +0 -168
  116. package/dist/engine/mainlandMacroCell.js.map +0 -1
  117. package/dist/engine/shiftedFixedBody.d.ts +0 -13
  118. package/dist/engine/shiftedFixedBody.js +0 -75
  119. package/dist/engine/shiftedFixedBody.js.map +0 -1
  120. package/dist/importer/ChopShopPanel.d.ts +0 -52
  121. package/dist/importer/ChopShopPanel.js +0 -409
  122. package/dist/importer/ChopShopPanel.js.map +0 -1
  123. package/dist/importer/DomainWorkshopPanel.d.ts +0 -25
  124. package/dist/importer/DomainWorkshopPanel.js +0 -385
  125. package/dist/importer/DomainWorkshopPanel.js.map +0 -1
  126. package/dist/importer/GateHudBar.d.ts +0 -39
  127. package/dist/importer/GateHudBar.js +0 -401
  128. package/dist/importer/GateHudBar.js.map +0 -1
  129. package/dist/importer/GlbImportGate.d.ts +0 -8
  130. package/dist/importer/GlbImportGate.js +0 -300
  131. package/dist/importer/GlbImportGate.js.map +0 -1
  132. package/dist/importer/ImperativeVehicleRig.d.ts +0 -9
  133. package/dist/importer/ImperativeVehicleRig.js +0 -274
  134. package/dist/importer/ImperativeVehicleRig.js.map +0 -1
  135. package/dist/importer/LiveDrivePads.d.ts +0 -20
  136. package/dist/importer/LiveDrivePads.js +0 -195
  137. package/dist/importer/LiveDrivePads.js.map +0 -1
  138. package/dist/importer/PaperShellDebrisRig.d.ts +0 -25
  139. package/dist/importer/PaperShellDebrisRig.js +0 -143
  140. package/dist/importer/PaperShellDebrisRig.js.map +0 -1
  141. package/dist/importer/R2VaultDrawer.d.ts +0 -12
  142. package/dist/importer/R2VaultDrawer.js +0 -90
  143. package/dist/importer/R2VaultDrawer.js.map +0 -1
  144. package/dist/importer/Step1CalibrationPlinth.d.ts +0 -56
  145. package/dist/importer/Step1CalibrationPlinth.js +0 -204
  146. package/dist/importer/Step1CalibrationPlinth.js.map +0 -1
  147. package/dist/importer/Step1ExplodedIslands.d.ts +0 -31
  148. package/dist/importer/Step1ExplodedIslands.js +0 -144
  149. package/dist/importer/Step1ExplodedIslands.js.map +0 -1
  150. package/dist/importer/Step2UniversalPad.d.ts +0 -18
  151. package/dist/importer/Step2UniversalPad.js +0 -123
  152. package/dist/importer/Step2UniversalPad.js.map +0 -1
  153. package/dist/importer/VfxEmitterPool.d.ts +0 -8
  154. package/dist/importer/VfxEmitterPool.js +0 -64
  155. package/dist/importer/VfxEmitterPool.js.map +0 -1
  156. package/dist/importer/WardrobeWorkshopPanel.d.ts +0 -15
  157. package/dist/importer/WardrobeWorkshopPanel.js +0 -529
  158. package/dist/importer/WardrobeWorkshopPanel.js.map +0 -1
  159. package/dist/importer/WheelRingHandles3D.d.ts +0 -11
  160. package/dist/importer/WheelRingHandles3D.js +0 -319
  161. package/dist/importer/WheelRingHandles3D.js.map +0 -1
  162. package/dist/importer/archLinerGeom.d.ts +0 -2
  163. package/dist/importer/archLinerGeom.js +0 -51
  164. package/dist/importer/archLinerGeom.js.map +0 -1
  165. package/dist/importer/chopHingeHelpers.d.ts +0 -15
  166. package/dist/importer/chopHingeHelpers.js +0 -193
  167. package/dist/importer/chopHingeHelpers.js.map +0 -1
  168. package/dist/importer/chopShopActions.d.ts +0 -58
  169. package/dist/importer/chopShopActions.js +0 -165
  170. package/dist/importer/chopShopActions.js.map +0 -1
  171. package/dist/importer/chopShopHandlers.d.ts +0 -26
  172. package/dist/importer/chopShopHandlers.js +0 -283
  173. package/dist/importer/chopShopHandlers.js.map +0 -1
  174. package/dist/importer/chopShopIoActions.d.ts +0 -20
  175. package/dist/importer/chopShopIoActions.js +0 -192
  176. package/dist/importer/chopShopIoActions.js.map +0 -1
  177. package/dist/importer/chopShopMcpAction.d.ts +0 -18
  178. package/dist/importer/chopShopMcpAction.js +0 -58
  179. package/dist/importer/chopShopMcpAction.js.map +0 -1
  180. package/dist/importer/cylinderBooleanSlice.d.ts +0 -14
  181. package/dist/importer/cylinderBooleanSlice.js +0 -110
  182. package/dist/importer/cylinderBooleanSlice.js.map +0 -1
  183. package/dist/importer/cylinderSliceMath.d.ts +0 -14
  184. package/dist/importer/cylinderSliceMath.js +0 -251
  185. package/dist/importer/cylinderSliceMath.js.map +0 -1
  186. package/dist/importer/fusedWheelDetect.d.ts +0 -4
  187. package/dist/importer/fusedWheelDetect.js +0 -297
  188. package/dist/importer/fusedWheelDetect.js.map +0 -1
  189. package/dist/importer/fusedWheelFit.d.ts +0 -19
  190. package/dist/importer/fusedWheelFit.js +0 -219
  191. package/dist/importer/fusedWheelFit.js.map +0 -1
  192. package/dist/importer/gateStore.d.ts +0 -73
  193. package/dist/importer/gateStore.js +0 -102
  194. package/dist/importer/gateStore.js.map +0 -1
  195. package/dist/importer/glbNormalizer.d.ts +0 -22
  196. package/dist/importer/glbNormalizer.js +0 -177
  197. package/dist/importer/glbNormalizer.js.map +0 -1
  198. package/dist/importer/importerWebMcp.d.ts +0 -51
  199. package/dist/importer/importerWebMcp.js +0 -50
  200. package/dist/importer/importerWebMcp.js.map +0 -1
  201. package/dist/importer/importerWebMcpTools.d.ts +0 -2
  202. package/dist/importer/importerWebMcpTools.js +0 -368
  203. package/dist/importer/importerWebMcpTools.js.map +0 -1
  204. package/dist/importer/index.d.ts +0 -29
  205. package/dist/importer/index.js +0 -42
  206. package/dist/importer/index.js.map +0 -1
  207. package/dist/importer/khrCarGeometryMass.d.ts +0 -20
  208. package/dist/importer/khrCarGeometryMass.js +0 -131
  209. package/dist/importer/khrCarGeometryMass.js.map +0 -1
  210. package/dist/importer/khrCarPlanHelpers.d.ts +0 -39
  211. package/dist/importer/khrCarPlanHelpers.js +0 -300
  212. package/dist/importer/khrCarPlanHelpers.js.map +0 -1
  213. package/dist/importer/khrCarPlanner.d.ts +0 -8
  214. package/dist/importer/khrCarPlanner.js +0 -289
  215. package/dist/importer/khrCarPlanner.js.map +0 -1
  216. package/dist/importer/khrCompiler.d.ts +0 -5
  217. package/dist/importer/khrCompiler.js +0 -87
  218. package/dist/importer/khrCompiler.js.map +0 -1
  219. package/dist/importer/khrCraftPropCompiler.d.ts +0 -45
  220. package/dist/importer/khrCraftPropCompiler.js +0 -263
  221. package/dist/importer/khrCraftPropCompiler.js.map +0 -1
  222. package/dist/importer/khrNodeNameGuard.d.ts +0 -20
  223. package/dist/importer/khrNodeNameGuard.js +0 -139
  224. package/dist/importer/khrNodeNameGuard.js.map +0 -1
  225. package/dist/importer/launcherBake.d.ts +0 -15
  226. package/dist/importer/launcherBake.js +0 -117
  227. package/dist/importer/launcherBake.js.map +0 -1
  228. package/dist/importer/launcherCadGeometry.d.ts +0 -22
  229. package/dist/importer/launcherCadGeometry.js +0 -185
  230. package/dist/importer/launcherCadGeometry.js.map +0 -1
  231. package/dist/importer/meshIslands.d.ts +0 -17
  232. package/dist/importer/meshIslands.js +0 -102
  233. package/dist/importer/meshIslands.js.map +0 -1
  234. package/dist/importer/meshSliceBuffers.d.ts +0 -15
  235. package/dist/importer/meshSliceBuffers.js +0 -159
  236. package/dist/importer/meshSliceBuffers.js.map +0 -1
  237. package/dist/importer/polygonEarClipYZ.d.ts +0 -3
  238. package/dist/importer/polygonEarClipYZ.js +0 -67
  239. package/dist/importer/polygonEarClipYZ.js.map +0 -1
  240. package/dist/importer/proceduralC12AndCraft.d.ts +0 -18
  241. package/dist/importer/proceduralC12AndCraft.js +0 -302
  242. package/dist/importer/proceduralC12AndCraft.js.map +0 -1
  243. package/dist/importer/proceduralDomainBuilders.d.ts +0 -10
  244. package/dist/importer/proceduralDomainBuilders.js +0 -346
  245. package/dist/importer/proceduralDomainBuilders.js.map +0 -1
  246. package/dist/importer/proceduralPersonAndProp.d.ts +0 -8
  247. package/dist/importer/proceduralPersonAndProp.js +0 -303
  248. package/dist/importer/proceduralPersonAndProp.js.map +0 -1
  249. package/dist/importer/sceneSiNormalize.d.ts +0 -19
  250. package/dist/importer/sceneSiNormalize.js +0 -145
  251. package/dist/importer/sceneSiNormalize.js.map +0 -1
  252. package/dist/importer/starterScene.d.ts +0 -5
  253. package/dist/importer/starterScene.js +0 -139
  254. package/dist/importer/starterScene.js.map +0 -1
  255. package/dist/importer/surfaceCutter.d.ts +0 -16
  256. package/dist/importer/surfaceCutter.js +0 -83
  257. package/dist/importer/surfaceCutter.js.map +0 -1
  258. package/dist/importer/surfaceGeodesic.d.ts +0 -7
  259. package/dist/importer/surfaceGeodesic.js +0 -130
  260. package/dist/importer/surfaceGeodesic.js.map +0 -1
  261. package/dist/importer/surfaceLoopRefine.d.ts +0 -6
  262. package/dist/importer/surfaceLoopRefine.js +0 -171
  263. package/dist/importer/surfaceLoopRefine.js.map +0 -1
  264. package/dist/importer/surfacePeel.d.ts +0 -11
  265. package/dist/importer/surfacePeel.js +0 -119
  266. package/dist/importer/surfacePeel.js.map +0 -1
  267. package/dist/importer/surfaceTopology.d.ts +0 -36
  268. package/dist/importer/surfaceTopology.js +0 -143
  269. package/dist/importer/surfaceTopology.js.map +0 -1
  270. package/dist/importer/universalGateBake.d.ts +0 -45
  271. package/dist/importer/universalGateBake.js +0 -203
  272. package/dist/importer/universalGateBake.js.map +0 -1
  273. package/dist/importer/usdPhysicsSpecs.d.ts +0 -3
  274. package/dist/importer/usdPhysicsSpecs.js +0 -245
  275. package/dist/importer/usdPhysicsSpecs.js.map +0 -1
  276. package/dist/importer/usdTextParse.d.ts +0 -12
  277. package/dist/importer/usdTextParse.js +0 -118
  278. package/dist/importer/usdTextParse.js.map +0 -1
  279. package/dist/importer/usdToGlb.d.ts +0 -12
  280. package/dist/importer/usdToGlb.js +0 -94
  281. package/dist/importer/usdToGlb.js.map +0 -1
  282. package/dist/importer/useChopShopController.d.ts +0 -110
  283. package/dist/importer/useChopShopController.js +0 -219
  284. package/dist/importer/useChopShopController.js.map +0 -1
  285. package/dist/importer/useChopShopState.d.ts +0 -103
  286. package/dist/importer/useChopShopState.js +0 -350
  287. package/dist/importer/useChopShopState.js.map +0 -1
  288. package/dist/importer/useWasdKeyRef.d.ts +0 -9
  289. package/dist/importer/useWasdKeyRef.js +0 -35
  290. package/dist/importer/useWasdKeyRef.js.map +0 -1
  291. package/dist/importer/vehiclePartSplit.d.ts +0 -33
  292. package/dist/importer/vehiclePartSplit.js +0 -183
  293. package/dist/importer/vehiclePartSplit.js.map +0 -1
  294. package/dist/importer/wardrobeAutoFit.d.ts +0 -16
  295. package/dist/importer/wardrobeAutoFit.js +0 -410
  296. package/dist/importer/wardrobeAutoFit.js.map +0 -1
  297. package/dist/importer/wardrobeCatalog.d.ts +0 -16
  298. package/dist/importer/wardrobeCatalog.js +0 -409
  299. package/dist/importer/wardrobeCatalog.js.map +0 -1
  300. package/dist/importer/wardrobeController.d.ts +0 -49
  301. package/dist/importer/wardrobeController.js +0 -181
  302. package/dist/importer/wardrobeController.js.map +0 -1
  303. package/dist/importer/wardrobeFitter.d.ts +0 -27
  304. package/dist/importer/wardrobeFitter.js +0 -269
  305. package/dist/importer/wardrobeFitter.js.map +0 -1
  306. package/dist/importer/wardrobeWebMcpTools.d.ts +0 -2
  307. package/dist/importer/wardrobeWebMcpTools.js +0 -198
  308. package/dist/importer/wardrobeWebMcpTools.js.map +0 -1
  309. package/dist/importer/wheelAxlePairing.d.ts +0 -21
  310. package/dist/importer/wheelAxlePairing.js +0 -157
  311. package/dist/importer/wheelAxlePairing.js.map +0 -1
  312. package/dist/importer/wheelCutterHelpers.d.ts +0 -45
  313. package/dist/importer/wheelCutterHelpers.js +0 -208
  314. package/dist/importer/wheelCutterHelpers.js.map +0 -1
  315. package/dist/importer/wheelRingHandleMath.d.ts +0 -20
  316. package/dist/importer/wheelRingHandleMath.js +0 -66
  317. package/dist/importer/wheelRingHandleMath.js.map +0 -1
  318. package/dist/index.js.map +0 -1
  319. package/dist/junk/DestructibleTarget.d.ts +0 -18
  320. package/dist/junk/DestructibleTarget.js +0 -223
  321. package/dist/junk/DestructibleTarget.js.map +0 -1
  322. package/dist/junk/KolmoJunk.d.ts +0 -14
  323. package/dist/junk/KolmoJunk.js +0 -76
  324. package/dist/junk/KolmoJunk.js.map +0 -1
  325. package/dist/junk/ShardPieces.d.ts +0 -13
  326. package/dist/junk/ShardPieces.js +0 -101
  327. package/dist/junk/ShardPieces.js.map +0 -1
  328. package/dist/junk/TargetDecals.d.ts +0 -9
  329. package/dist/junk/TargetDecals.js +0 -77
  330. package/dist/junk/TargetDecals.js.map +0 -1
  331. package/dist/junk/bvhShatter.d.ts +0 -3
  332. package/dist/junk/bvhShatter.js +0 -101
  333. package/dist/junk/bvhShatter.js.map +0 -1
  334. package/dist/junk/bvhTriCollector.d.ts +0 -16
  335. package/dist/junk/bvhTriCollector.js +0 -127
  336. package/dist/junk/bvhTriCollector.js.map +0 -1
  337. package/dist/junk/index.d.ts +0 -14
  338. package/dist/junk/index.js +0 -13
  339. package/dist/junk/index.js.map +0 -1
  340. package/dist/junk/junkGeometry.d.ts +0 -13
  341. package/dist/junk/junkGeometry.js +0 -87
  342. package/dist/junk/junkGeometry.js.map +0 -1
  343. package/dist/junk/junkImportSanitize.d.ts +0 -5
  344. package/dist/junk/junkImportSanitize.js +0 -74
  345. package/dist/junk/junkImportSanitize.js.map +0 -1
  346. package/dist/junk/junkImporter.d.ts +0 -14
  347. package/dist/junk/junkImporter.js +0 -124
  348. package/dist/junk/junkImporter.js.map +0 -1
  349. package/dist/junk/junkLabelCanvas.d.ts +0 -2
  350. package/dist/junk/junkLabelCanvas.js +0 -185
  351. package/dist/junk/junkLabelCanvas.js.map +0 -1
  352. package/dist/junk/junkLabels.d.ts +0 -9
  353. package/dist/junk/junkLabels.js +0 -49
  354. package/dist/junk/junkLabels.js.map +0 -1
  355. package/dist/junk/junkProceduralScenes.d.ts +0 -12
  356. package/dist/junk/junkProceduralScenes.js +0 -220
  357. package/dist/junk/junkProceduralScenes.js.map +0 -1
  358. package/dist/junk/junkSheetSplitter.d.ts +0 -38
  359. package/dist/junk/junkSheetSplitter.js +0 -104
  360. package/dist/junk/junkSheetSplitter.js.map +0 -1
  361. package/dist/junk/junkTypes.d.ts +0 -48
  362. package/dist/junk/junkTypes.js +0 -0
  363. package/dist/junk/junkTypes.js.map +0 -1
  364. package/dist/junk/targetHelpers.d.ts +0 -55
  365. package/dist/junk/targetHelpers.js +0 -157
  366. package/dist/junk/targetHelpers.js.map +0 -1
  367. package/dist/junk/targetHitLogic.d.ts +0 -30
  368. package/dist/junk/targetHitLogic.js +0 -163
  369. package/dist/junk/targetHitLogic.js.map +0 -1
  370. package/dist/junk/useTargetAssets.d.ts +0 -19
  371. package/dist/junk/useTargetAssets.js +0 -130
  372. package/dist/junk/useTargetAssets.js.map +0 -1
  373. package/dist/physics/index.js.map +0 -1
  374. package/dist/physics/nBodyGravity.js +0 -70
  375. package/dist/physics/nBodyGravity.js.map +0 -1
  376. package/dist/sand3d/KolmoSand3D.d.ts +0 -19
  377. package/dist/sand3d/KolmoSand3D.js +0 -92
  378. package/dist/sand3d/KolmoSand3D.js.map +0 -1
  379. package/dist/sand3d/Sand3dWorkshopSection.d.ts +0 -8
  380. package/dist/sand3d/Sand3dWorkshopSection.js +0 -117
  381. package/dist/sand3d/Sand3dWorkshopSection.js.map +0 -1
  382. package/dist/sand3d/gateBakeHelpers.d.ts +0 -21
  383. package/dist/sand3d/gateBakeHelpers.js +0 -225
  384. package/dist/sand3d/gateBakeHelpers.js.map +0 -1
  385. package/dist/sand3d/gateDoorwayBake.d.ts +0 -12
  386. package/dist/sand3d/gateDoorwayBake.js +0 -203
  387. package/dist/sand3d/gateDoorwayBake.js.map +0 -1
  388. package/dist/sand3d/index.d.ts +0 -3
  389. package/dist/sand3d/index.js +0 -4
  390. package/dist/sand3d/index.js.map +0 -1
  391. package/dist/sand3d/sand3dAssetLoader.d.ts +0 -28
  392. package/dist/sand3d/sand3dAssetLoader.js +0 -177
  393. package/dist/sand3d/sand3dAssetLoader.js.map +0 -1
  394. package/dist/schema/kolmoSchema.d.ts +0 -9
  395. package/dist/schema/kolmoSchema.js +0 -110
  396. package/dist/schema/kolmoSchema.js.map +0 -1
  397. package/dist/schema/kolmoStamp.d.ts +0 -11
  398. package/dist/schema/kolmoStamp.js +0 -119
  399. package/dist/schema/kolmoStamp.js.map +0 -1
  400. package/dist/schema/kolmoTypes.d.ts +0 -63
  401. package/dist/schema/kolmoTypes.js +0 -66
  402. package/dist/schema/kolmoTypes.js.map +0 -1
  403. package/dist/shaders/celestialBackdrop.d.ts +0 -14
  404. package/dist/shaders/celestialBackdrop.js +0 -181
  405. package/dist/shaders/celestialBackdrop.js.map +0 -1
  406. package/dist/shaders/emitterShaders.d.ts +0 -9
  407. package/dist/shaders/emitterShaders.js +0 -114
  408. package/dist/shaders/emitterShaders.js.map +0 -1
  409. package/dist/shaders/index.d.ts +0 -5
  410. package/dist/shaders/index.js +0 -12
  411. package/dist/shaders/index.js.map +0 -1
  412. package/dist/shaders/plumeAndSparkle.d.ts +0 -12
  413. package/dist/shaders/plumeAndSparkle.js +0 -233
  414. package/dist/shaders/plumeAndSparkle.js.map +0 -1
  415. package/dist/shaders/ps2GlslShared.d.ts +0 -20
  416. package/dist/shaders/ps2GlslShared.js +0 -30
  417. package/dist/shaders/ps2GlslShared.js.map +0 -1
  418. package/dist/shaders/ps2MaterialsTSL.d.ts +0 -23
  419. package/dist/shaders/ps2MaterialsTSL.js +0 -146
  420. package/dist/shaders/ps2MaterialsTSL.js.map +0 -1
  421. package/dist/shaders/ps2MaterialsWebGL.d.ts +0 -15
  422. package/dist/shaders/ps2MaterialsWebGL.js +0 -57
  423. package/dist/shaders/ps2MaterialsWebGL.js.map +0 -1
  424. package/dist/shaders/ps2RoadWebGL.d.ts +0 -7
  425. package/dist/shaders/ps2RoadWebGL.js +0 -138
  426. package/dist/shaders/ps2RoadWebGL.js.map +0 -1
  427. package/dist/shaders/ps2TerrainWebGL.d.ts +0 -8
  428. package/dist/shaders/ps2TerrainWebGL.js +0 -131
  429. package/dist/shaders/ps2TerrainWebGL.js.map +0 -1
  430. package/dist/shaders/ps2Textures.d.ts +0 -22
  431. package/dist/shaders/ps2Textures.js +0 -299
  432. package/dist/shaders/ps2Textures.js.map +0 -1
  433. package/dist/shaders/retroPalettes.d.ts +0 -24
  434. package/dist/shaders/retroPalettes.js +0 -221
  435. package/dist/shaders/retroPalettes.js.map +0 -1
  436. package/dist/shaders/retroShader.d.ts +0 -13
  437. package/dist/shaders/retroShader.js +0 -110
  438. package/dist/shaders/retroShader.js.map +0 -1
  439. package/dist/shaders/retroUniforms.d.ts +0 -60
  440. package/dist/shaders/retroUniforms.js +0 -215
  441. package/dist/shaders/retroUniforms.js.map +0 -1
  442. package/dist/shaders/skyboxShaders.d.ts +0 -16
  443. package/dist/shaders/skyboxShaders.js +0 -266
  444. package/dist/shaders/skyboxShaders.js.map +0 -1
  445. package/dist/shaders/tsl.d.ts +0 -1
  446. package/dist/shaders/tsl.js +0 -1
  447. package/dist/shaders/tsl.js.map +0 -1
  448. package/dist/suika/KolmoSuikaOrb.d.ts +0 -33
  449. package/dist/suika/KolmoSuikaOrb.js +0 -375
  450. package/dist/suika/KolmoSuikaOrb.js.map +0 -1
  451. package/dist/suika/index.d.ts +0 -4
  452. package/dist/suika/index.js +0 -5
  453. package/dist/suika/index.js.map +0 -1
  454. package/dist/suika/suikaArbiter.d.ts +0 -60
  455. package/dist/suika/suikaArbiter.js +0 -265
  456. package/dist/suika/suikaArbiter.js.map +0 -1
  457. package/dist/suika/suikaGeometry.d.ts +0 -10
  458. package/dist/suika/suikaGeometry.js +0 -251
  459. package/dist/suika/suikaGeometry.js.map +0 -1
  460. package/dist/suika/suikaTypes.d.ts +0 -74
  461. package/dist/suika/suikaTypes.js +0 -196
  462. package/dist/suika/suikaTypes.js.map +0 -1
  463. package/dist/world/frontage.d.ts +0 -26
  464. package/dist/world/frontage.js +0 -36
  465. package/dist/world/frontage.js.map +0 -1
  466. package/dist/world/index.d.ts +0 -9
  467. package/dist/world/index.js +0 -12
  468. package/dist/world/index.js.map +0 -1
  469. package/dist/world/infiniteWorld2D.d.ts +0 -19
  470. package/dist/world/infiniteWorld2D.js +0 -219
  471. package/dist/world/infiniteWorld2D.js.map +0 -1
  472. package/dist/world/island.d.ts +0 -29
  473. package/dist/world/island.js +0 -116
  474. package/dist/world/island.js.map +0 -1
  475. package/dist/world/islandPathing.d.ts +0 -6
  476. package/dist/world/islandPathing.js +0 -166
  477. package/dist/world/islandPathing.js.map +0 -1
  478. package/dist/world/macroCellSchema.d.ts +0 -72
  479. package/dist/world/macroCellSchema.js +0 -34
  480. package/dist/world/macroCellSchema.js.map +0 -1
  481. package/dist/world/macroKnightAStar.d.ts +0 -11
  482. package/dist/world/macroKnightAStar.js +0 -240
  483. package/dist/world/macroKnightAStar.js.map +0 -1
  484. package/dist/world/macroSettlementZones.d.ts +0 -9
  485. package/dist/world/macroSettlementZones.js +0 -108
  486. package/dist/world/macroSettlementZones.js.map +0 -1
  487. package/dist/world/random.d.ts +0 -23
  488. package/dist/world/random.js +0 -59
  489. package/dist/world/random.js.map +0 -1
  490. package/dist/world/road.d.ts +0 -37
  491. package/dist/world/road.js +0 -198
  492. package/dist/world/road.js.map +0 -1
  493. package/dist/world/roadRibbon.d.ts +0 -29
  494. package/dist/world/roadRibbon.js +0 -166
  495. package/dist/world/roadRibbon.js.map +0 -1
  496. package/dist/world/terrain.d.ts +0 -62
  497. package/dist/world/terrain.js +0 -133
  498. package/dist/world/terrain.js.map +0 -1
  499. package/dist/world/terrainGeometry.d.ts +0 -14
  500. package/dist/world/terrainGeometry.js +0 -76
  501. package/dist/world/terrainGeometry.js.map +0 -1
  502. package/dist/world/worldTypes.d.ts +0 -43
  503. package/dist/world/worldTypes.js +0 -197
  504. package/dist/world/worldTypes.js.map +0 -1
  505. package/docs/api-reference.md +0 -728
  506. package/skills/kolmo-engine/SKILL.md +0 -109
package/AGENTS.md DELETED
@@ -1,29 +0,0 @@
1
- # `@pinkaphant/kolmo` — Agent & Contributor Guide
2
-
3
- `Kolmo` is a 3D game runtime built on React Three Fiber, `@react-three/rapier` (`0.19.2`), `@pinkaphant/ecctrl@2.0.4-beta.5`, `@khr3/*`, and Koota ECS — combining `npx @pinkaphant/kolmo create` templates, declarative `<Game>` entities (`<Vehicle>`, `<Actor>`, `<Island>`, `<LongDrive>`, `<Sand3D>`, `<Junk>`, `<SuikaSystem>`), and in-browser `navigator.modelContext` WebMCP tools (`useImporterWebMcp`, `useKolmoDriveWebMcp`).
4
-
5
- ---
6
-
7
- ## 1. Shared Human + AI Agency Workflow
8
-
9
- 1. **Scaffold in One Command**: Run `npx @pinkaphant/kolmo create <dir> --template game|longline|dust|garage` ([bin/kolmo.mjs](./bin/kolmo.mjs)) to generate a runnable Vite 8 + TypeScript + Cloudflare Worker (`wrangler.jsonc`) app with pinned physics overrides.
10
- 2. **Compose Self-Contained Entities**: Drop `<Vehicle>`, `<Actor>`, `<Island>`, `<LongDrive>`, `<Sand3D>`, `<Junk>`, `<SuikaSystem>`, `<Hud>`, and `<MobileTouchOverlay />` inside `<Game>` ([src/engine/kolmoGame.tsx](./src/engine/kolmoGame.tsx)). Each entity registers its own Koota ECS traits, Rapier colliders/joints, `KOLMO_emitter` VFX plumes, and `0.08`-deadzone touch bindings automatically.
11
- 3. **Co-Author & Co-Drive via WebMCP & Import Gate**: Mount `<GlbImportGate />` ([src/importer/GlbImportGate.tsx](./src/importer/GlbImportGate.tsx)) to calibrate `.glb`, `.gltf`, OpenUSD (`.usd*`), or `.sand3d` Code-CAD scripts across 8 domains (`vehicle | c12 | launcher | person | prop | junk | suika | sand3d`). Browser-connected AI agents inspect, forge, and live-drive through all 14 WebMCP tools ([src/importer/importerWebMcpTools.ts](./src/importer/importerWebMcpTools.ts), [src/engine/kolmoBotControl.ts](./src/engine/kolmoBotControl.ts)): `importer_state`, `importer_capture_view`, `importer_list_models`, `importer_set_stage`, `importer_load`, `importer_orient`, `importer_scale`, `importer_set_kind`, `importer_pop_wheels`, `importer_cut_part`, `importer_set_points`, `importer_export`, plus `kolmo_drive` and `kolmo_telemetry` (pipeline order: load → orient → scale → set_kind → pop_wheels → cut_part / set_points → set_stage(2) or export → kolmo_drive / kolmo_telemetry), while `<KolmoBotJournalFeed />` renders live bot activity for the human co-watcher.
12
-
13
- ---
14
-
15
- ## 2. Core Technical Architecture
16
-
17
- - **Pinned Stack**: `"@pinkaphant/ecctrl": "2.0.4-beta.5"`, `"@dimforge/rapier3d-compat": "0.19.2"`, `"three": "0.184.0"`, `"@react-three/fiber": "^9.6.1"`, `"@react-three/rapier": "^2.2.0"`, `"koota": "^0.6.5"`.
18
- - **Imperative R3F Loop (`useRef` + `useFrame`)**: Step Rapier inside `<KolmoPhysics>` (`<Physics paused timeStep="vary">` + `<TimeControl maxDelta={1 / 30}>`), reading `rapierWorld.timestep` and transient store state (`useGateStore.getState()`) with module-scoped scratch vectors. Drive `<KolmoHud>` and `<MobileTouchOverlay>` at 60 Hz through DOM `ref.current` mutations.
19
- - **Koota SoA ECS**: Mutate `TransformTrait`, `VelocityTrait`, and `VehicleTelemetryTrait` in place via `.updateEach(..., { changeDetection: "never" })` or `writeEntityKinematics` / `writeVehicleTelemetry` ([src/engine/kolmoTraits.ts](./src/engine/kolmoTraits.ts)), and link actors to vehicles with `PilotLink = relation({ exclusive: true })`.
20
- - **Real Vehicle & C12 Physics**: Compile Fritsch–Carlson monotone Pacejka tire LUTs (`@khr3/core/curves`), SI corner-load suspension (`solveWheelLoads` on `@pinkaphant/ecctrl@2.0.4-beta.5`), volume-weighted chassis inertia (`deriveChassisGeometryPlan`), cylindrical boolean wheel coring (`sliceCarWheelCylinders`), and exact `Z[1/2, sqrt(3)]` 3.0 m `C12` modular batches (`@khr3/c12`).
21
- - **Co-op Room Multiplayer**: Pair Koota entity traits (`TransformTrait`, `VelocityTrait`, `PilotLink`) with Cloudflare Durable Objects WebSocket Hibernation (`partyserver` `static options = { hibernate: true }` + `partysocket` + `serializeAttachment`) for 1–8 player room-code co-op sessions.
22
-
23
- ---
24
-
25
- ## 3. Commands & Module Hygiene
26
-
27
- - Keep every `.ts` / `.tsx` source module focused (`<= 250` lines) with calm Title/Sentence UI copy, `100dvh`, `env(safe-area-inset-*)`, and `>= 44x44 px` touch targets.
28
- - Run `npm run typecheck`, `npm test`, and `npm run build` (plus `npx vite build` for the interactive `dist-example/` home page) with exit code `0`.
29
- - Full subpath signatures live in [README.md](./README.md), [docs/api-reference.md](./docs/api-reference.md), and the portable agent skill [skills/kolmo-engine/SKILL.md](./skills/kolmo-engine/SKILL.md).
package/CLAUDE.md DELETED
@@ -1,8 +0,0 @@
1
- @AGENTS.md
2
-
3
- # `@pinkaphant/kolmo` — Claude Code Guide
4
-
5
- Follow [AGENTS.md](./AGENTS.md), [README.md](./README.md), [docs/api-reference.md](./docs/api-reference.md), and [skills/kolmo-engine/SKILL.md](./skills/kolmo-engine/SKILL.md):
6
- - Pin `"@pinkaphant/ecctrl": "2.0.4-beta.5"`, `"@dimforge/rapier3d-compat": "0.19.2"`, and `"three": "0.184.0"`.
7
- - Compose `<Game>`, `<Vehicle>`, `<Actor>`, `<Island>`, `<LongDrive>`, `<Sand3D>`, `<Junk>`, `<SuikaSystem>`, `<Hud>`, `<MobileTouchOverlay />`, and `<GlbImportGate enableWebMcp />` with Koota SoA traits (`{ changeDetection: "never" }`) and `<= 250`-line modules.
8
- - Verify with `npm run typecheck && npm test && npm run build`.
package/bin/kolmo.mjs DELETED
@@ -1,561 +0,0 @@
1
- #!/usr/bin/env node
2
- import fs from "node:fs";
3
- import path from "node:path";
4
-
5
- const kolmoPkg = JSON.parse(fs.readFileSync(new URL("../package.json", import.meta.url), "utf8"));
6
-
7
- const args = process.argv.slice(2);
8
- const cmd = args[0];
9
- if (cmd !== "create" && cmd !== "init") {
10
- console.log("Usage: npx @pinkaphant/kolmo create <project-dir> [--template game|longline|dust|garage]");
11
- process.exit(cmd === "--help" || cmd === "-h" ? 0 : 1);
12
- }
13
-
14
- const dirArg = args[1] && !args[1].startsWith("-") ? args[1] : "my-kolmo-game";
15
- const tplIdx = args.indexOf("--template");
16
- const rawTpl = tplIdx !== -1 ? args[tplIdx + 1] : "game";
17
- const template = rawTpl === "dust" || rawTpl === "garage" || rawTpl === "longline" ? rawTpl : "game";
18
- const targetDir = path.resolve(process.cwd(), dirArg);
19
-
20
- const ALLOWED_BOOTSTRAP_FILES = new Set([".git", ".gitattributes", ".gitignore", "license", "license.md", "readme.md", ".ds_store"]);
21
- const existingBlocking = fs.existsSync(targetDir)
22
- ? fs.readdirSync(targetDir).filter((name) => !ALLOWED_BOOTSTRAP_FILES.has(name.toLowerCase()))
23
- : [];
24
- if (existingBlocking.length > 0) {
25
- console.error(`Error: Target directory "${targetDir}" already contains files. Choose a fresh directory path.`);
26
- process.exit(1);
27
- }
28
-
29
- fs.mkdirSync(path.join(targetDir, "src"), { recursive: true });
30
- const pkgName = path.basename(targetDir).toLowerCase().replace(/[^a-z0-9-_]/g, "-");
31
-
32
- fs.writeFileSync(path.join(targetDir, "package.json"), JSON.stringify({
33
- name: pkgName,
34
- version: "0.1.0",
35
- private: true,
36
- type: "module",
37
- scripts: {
38
- dev: "vite",
39
- typecheck: "tsc --noEmit",
40
- test: "node --import tsx --test \"src/**/*.test.ts*\"",
41
- build: "vite build",
42
- deploy: "npm run build && wrangler deploy",
43
- },
44
- dependencies: {
45
- "@dimforge/rapier3d-compat": "0.19.2",
46
- "@pinkaphant/ecctrl": kolmoPkg.peerDependencies["@pinkaphant/ecctrl"],
47
- "@pinkaphant/kolmo": `^${kolmoPkg.version}`,
48
- "@react-three/drei": "^10.7.7",
49
- "@react-three/fiber": "^9.6.1",
50
- "@react-three/rapier": "^2.2.0",
51
- "koota": "^0.6.5",
52
- "react": "^19.2.7",
53
- "react-dom": "^19.2.7",
54
- "three": "^0.184.0",
55
- "zustand": "^5.0.14",
56
- },
57
- overrides: {
58
- "@dimforge/rapier3d-compat": "0.19.2",
59
- "@pinkaphant/ecctrl": kolmoPkg.peerDependencies["@pinkaphant/ecctrl"],
60
- },
61
- devDependencies: {
62
- "@types/node": "^22.20.5",
63
- "@types/react": "^19.2.16",
64
- "@types/react-dom": "^19.2.3",
65
- "@types/three": "^0.184.0",
66
- "@vitejs/plugin-react": "^6.1.1",
67
- "tsx": "^4.23.15",
68
- "typescript": "^6.0.3",
69
- "vite": "^8.3.8",
70
- "wrangler": "^4.164.0",
71
- },
72
- }, null, 2));
73
-
74
- fs.writeFileSync(path.join(targetDir, "vite.config.ts"), `import react from "@vitejs/plugin-react";
75
- import { defineConfig } from "vite";
76
-
77
- export default defineConfig({
78
- plugins: [react()],
79
- });\n`);
80
-
81
- fs.writeFileSync(path.join(targetDir, "tsconfig.json"), JSON.stringify({
82
- compilerOptions: {
83
- target: "ES2022",
84
- module: "ESNext",
85
- moduleResolution: "Bundler",
86
- allowImportingTsExtensions: true,
87
- types: ["node"],
88
- jsx: "react-jsx",
89
- strict: true,
90
- skipLibCheck: true,
91
- noEmit: true,
92
- },
93
- include: ["src"],
94
- }, null, 2));
95
-
96
- fs.writeFileSync(path.join(targetDir, "wrangler.jsonc"), JSON.stringify({
97
- name: pkgName,
98
- compatibility_date: "2026-11-01",
99
- assets: { directory: "./dist", not_found_handling: "single-page-application" },
100
- }, null, 2));
101
-
102
- fs.writeFileSync(path.join(targetDir, "index.html"), `<!doctype html><html><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"/><title>${pkgName}</title><style>html,body,#root{margin:0;width:100%;height:100dvh;overflow:hidden;background:#05070e;touch-action:none;user-select:none;-webkit-user-select:none}canvas{touch-action:none;display:block}</style></head><body><div id="root"></div><script type="module" src="/src/main.tsx"></script></body></html>\n`);
103
-
104
- const DUST_WORLD_SRC = `import { useEffect, useMemo, useRef, useState } from "react";
105
- import * as THREE from "three";
106
- import { useFrame, useThree } from "@react-three/fiber";
107
- import { CuboidCollider, RigidBody } from "@react-three/rapier";
108
- import { Junk, computeIslandSpawnPose, getCachedIslandPlan } from "@pinkaphant/kolmo";
109
-
110
- export interface BuiltWall { id: number; pos: [number, number, number]; yaw: number; tier: "wood" | "stone"; }
111
-
112
- const _fwd = new THREE.Vector3();
113
-
114
- export function DustGameplay({
115
- tool, yawStep, tier, onHarvest, walls, onPlaceWall,
116
- }: {
117
- tool: "harvest" | "build";
118
- yawStep: number;
119
- tier: "wood" | "stone";
120
- onHarvest: (kind: "wood" | "stone", amount: number) => void;
121
- walls: readonly BuiltWall[];
122
- onPlaceWall: (pos: [number, number, number], yaw: number) => void;
123
- }) {
124
- const camera = useThree((s) => s.camera);
125
- const plan = useMemo(() => getCachedIslandPlan(77, 960), []);
126
- const spawn = useMemo(() => computeIslandSpawnPose(77, 960), []);
127
- const ghostRef = useRef<THREE.Mesh | null>(null);
128
- const ghostPose = useRef<[number, number, number]>([spawn.actorPos[0], spawn.actorPos[1] + 1.5, spawn.actorPos[2] + 6]);
129
- const [depleted, setDepleted] = useState<Record<number, number>>({});
130
-
131
- const nodes = useMemo(() => {
132
- const list: { id: number; kind: "wood" | "stone"; pos: [number, number, number] }[] = [];
133
- for (let i = 0; i < 24; i++) {
134
- const ang = (i / 24) * Math.PI * 2, r = 10 + (i % 4) * 6;
135
- const x = spawn.actorPos[0] + Math.cos(ang) * r, z = spawn.actorPos[2] + Math.sin(ang) * r;
136
- const y = plan.terrain.height(x, z);
137
- list.push({ id: i + 1, kind: i % 3 === 0 ? "stone" : "wood", pos: [x, y, z] });
138
- }
139
- return list;
140
- }, [plan, spawn]);
141
-
142
- const yawRad = (yawStep * Math.PI) / 6;
143
-
144
- useFrame(() => {
145
- _fwd.set(0, 0, -1).applyQuaternion(camera.quaternion);
146
- const gx = Math.round((camera.position.x + _fwd.x * 5.5) / 3) * 3;
147
- const gz = Math.round((camera.position.z + _fwd.z * 5.5) / 3) * 3;
148
- const gy = plan.terrain.height(gx, gz) + 1.5;
149
- ghostPose.current[0] = gx;
150
- ghostPose.current[1] = gy;
151
- ghostPose.current[2] = gz;
152
- if (ghostRef.current) {
153
- ghostRef.current.position.set(gx, gy, gz);
154
- ghostRef.current.rotation.set(0, yawRad, 0);
155
- }
156
- });
157
-
158
- useEffect(() => {
159
- const act = () => {
160
- if (tool === "build") {
161
- onPlaceWall([...ghostPose.current], yawRad);
162
- return;
163
- }
164
- const now = Date.now();
165
- let best: (typeof nodes)[number] | null = null, bestD = 9.5;
166
- for (const n of nodes) {
167
- if ((depleted[n.id] ?? 0) > now) continue;
168
- const d = Math.hypot(n.pos[0] - camera.position.x, n.pos[1] + 1 - camera.position.y, n.pos[2] - camera.position.z);
169
- if (d < bestD) { bestD = d; best = n; }
170
- }
171
- if (best) {
172
- onHarvest(best.kind, best.kind === "wood" ? 25 : 20);
173
- setDepleted((prev) => ({ ...prev, [best!.id]: now + 8000 }));
174
- }
175
- };
176
- const onClick = (e: MouseEvent) => { if ((e.target as HTMLElement)?.tagName === "CANVAS") act(); };
177
- const onKey = (e: KeyboardEvent) => { if (e.code === "KeyE") act(); };
178
- window.addEventListener("pointerdown", onClick);
179
- window.addEventListener("keydown", onKey);
180
- return () => { window.removeEventListener("pointerdown", onClick); window.removeEventListener("keydown", onKey); };
181
- }, [tool, yawRad, nodes, depleted, camera, onHarvest, onPlaceWall]);
182
-
183
- const now = Date.now();
184
- return (
185
- <group>
186
- {nodes.map((n) => (depleted[n.id] ?? 0) > now ? null : (
187
- <RigidBody key={n.id} type="fixed" position={n.pos}>
188
- <CuboidCollider args={n.kind === "wood" ? [0.45, 1.8, 0.45] : [0.85, 0.65, 0.85]} position={[0, n.kind === "wood" ? 1.8 : 0.65, 0]} />
189
- {n.kind === "wood" ? (
190
- <group>
191
- <mesh position={[0, 1.1, 0]}><cylinderGeometry args={[0.22, 0.3, 2.2, 7]} /><meshStandardMaterial color="#5c3a21" flatShading /></mesh>
192
- <mesh position={[0, 2.9, 0]}><coneGeometry args={[1.35, 2.8, 7]} /><meshStandardMaterial color="#2d5a27" flatShading /></mesh>
193
- </group>
194
- ) : (
195
- <mesh position={[0, 0.65, 0]}><dodecahedronGeometry args={[0.95, 0]} /><meshStandardMaterial color="#64748b" flatShading /></mesh>
196
- )}
197
- </RigidBody>
198
- ))}
199
- <Junk id="dust_salvage_1" position={[spawn.actorPos[0] + 3, spawn.actorPos[1] + 1.2, spawn.actorPos[2] - 4]} />
200
- {tool === "build" && (
201
- <mesh ref={ghostRef}>
202
- <boxGeometry args={[3.0, 3.0, 0.28]} />
203
- <meshStandardMaterial color={tier === "wood" ? "#f59e0b" : "#38bdf8"} transparent opacity={0.42} depthWrite={false} />
204
- </mesh>
205
- )}
206
- {walls.map((w) => (
207
- <RigidBody key={w.id} type="fixed" position={w.pos} rotation={[0, w.yaw, 0]}>
208
- <CuboidCollider args={[1.5, 1.5, 0.14]} />
209
- <mesh castShadow receiveShadow>
210
- <boxGeometry args={[3.0, 3.0, 0.28]} />
211
- <meshStandardMaterial color={w.tier === "wood" ? "#8b5a2b" : "#475569"} flatShading />
212
- </mesh>
213
- </RigidBody>
214
- ))}
215
- </group>
216
- );
217
- }
218
- `;
219
-
220
- const DUST_APP_SRC = `import { useCallback, useEffect, useState } from "react";
221
- import { Actor, Game, Hud, Island, MobileTouchOverlay, RETRO_PS2_SHINOBI, Vehicle } from "@pinkaphant/kolmo";
222
- import { DustGameplay, type BuiltWall } from "./DustGameplay.tsx";
223
-
224
- export function App() {
225
- const [wood, setWood] = useState(45);
226
- const [stone, setStone] = useState(30);
227
- const [tool, setTool] = useState<"harvest" | "build">("harvest");
228
- const [tier, setTier] = useState<"wood" | "stone">("wood");
229
- const [yawStep, setYawStep] = useState(0);
230
- const [walls, setWalls] = useState<BuiltWall[]>([]);
231
-
232
- useEffect(() => {
233
- const onKey = (e: KeyboardEvent) => {
234
- if (e.code === "Digit1") setTool("harvest");
235
- else if (e.code === "Digit2") setTool("build");
236
- else if (e.code === "KeyQ") setYawStep((s) => (s + 11) % 12);
237
- else if (e.code === "KeyT") setTier((t) => (t === "wood" ? "stone" : "wood"));
238
- };
239
- window.addEventListener("keydown", onKey);
240
- return () => window.removeEventListener("keydown", onKey);
241
- }, []);
242
-
243
- const handleHarvest = useCallback((kind: "wood" | "stone", amt: number) => {
244
- if (kind === "wood") setWood((w) => w + amt);
245
- else setStone((s) => s + amt);
246
- }, []);
247
-
248
- const handlePlaceWall = useCallback((pos: [number, number, number], yaw: number) => {
249
- if (tier === "wood" && wood < 15) return;
250
- if (tier === "stone" && stone < 15) return;
251
- if (tier === "wood") setWood((w) => w - 15);
252
- else setStone((s) => s - 15);
253
- setWalls((prev) => [...prev, { id: prev.length + 1, pos, yaw, tier }]);
254
- }, [tier, wood, stone]);
255
-
256
- const tierLabel = tier === "wood" ? "Wood" : "Stone";
257
- return (
258
- <div style={{ position: "relative", width: "100vw", height: "100dvh", overflow: "hidden", touchAction: "none", userSelect: "none", WebkitUserSelect: "none" }}>
259
- <Game retro={RETRO_PS2_SHINOBI}>
260
- <Island seed={77} size={960} settlementTier="town" />
261
- <Vehicle />
262
- <Actor />
263
- <DustGameplay tool={tool} yawStep={yawStep} tier={tier} onHarvest={handleHarvest} walls={walls} onPlaceWall={handlePlaceWall} />
264
- <Hud />
265
- <MobileTouchOverlay />
266
- </Game>
267
- <div style={{ position: "fixed", top: "max(12px, env(safe-area-inset-top))", right: "max(12px, env(safe-area-inset-right))", zIndex: 40, padding: "8px 12px", background: "rgba(9,13,22,0.86)", border: "1px solid #f59e0b", borderRadius: 6, color: "#f8fafc", fontFamily: "ui-monospace, monospace", fontSize: 12 }}>
268
- <div style={{ fontWeight: 700, color: "#fbbf24", marginBottom: 4 }}>Kolmo Dust · C12 Survival</div>
269
- <div>Wood <b>{wood}</b> · Stone <b>{stone}</b> · Walls <b>{walls.length}</b></div>
270
- <div style={{ color: "#94a3b8", marginTop: 4 }}>[1] Harvest ({tool === "harvest" ? "active" : "idle"}) · [2] Build C12 ({tool === "build" ? tierLabel : "idle"}) · [Q] Rotate 30° · [T] Tier · [Click/E] Use</div>
271
- </div>
272
- </div>
273
- );
274
- }
275
- `;
276
-
277
- const LONGLINE_WORLD_SRC = `import { useEffect, useMemo, useRef, useState } from "react";
278
- import * as THREE from "three";
279
- import { useFrame, useThree } from "@react-three/fiber";
280
- import { CuboidCollider, RigidBody } from "@react-three/rapier";
281
- import {
282
- Junk,
283
- SuikaSystem,
284
- computeLongDriveMainlandSpawn,
285
- hashSeed,
286
- kolmoTelemetry,
287
- readFloatingOriginAnchorXZ,
288
- spawnSuikaOrb,
289
- useActiveKolmoWorld,
290
- } from "@pinkaphant/kolmo";
291
-
292
- export interface HighwayHudState { km: number; fuelL: number; targetKm: number; cash: number; stage: number; scrap: number; }
293
- export type BuildTier = "wood" | "stone" | "metal";
294
- export interface BuiltC12Wall { id: number; wx: number; y: number; wz: number; yaw: number; tier: BuildTier; }
295
- interface FuelCanItem { id: number; wx: number; wz: number; y: number; }
296
-
297
- const _mat4 = new THREE.Matrix4();
298
- const _quat = new THREE.Quaternion();
299
- const _pos = new THREE.Vector3();
300
- const _scale = new THREE.Vector3(1, 1, 1);
301
- const _up = new THREE.Vector3(0, 1, 0);
302
- const _fwd = new THREE.Vector3();
303
-
304
- function InstancedC12Walls({ walls, origin, tier, color }: {
305
- walls: readonly BuiltC12Wall[];
306
- origin: readonly [number, number];
307
- tier: BuildTier;
308
- color: string;
309
- }) {
310
- const ref = useRef<THREE.InstancedMesh>(null);
311
- const filtered = useMemo(() => walls.filter((w) => w.tier === tier), [walls, tier]);
312
- useEffect(() => {
313
- const mesh = ref.current;
314
- if (!mesh) return;
315
- filtered.forEach((w, i) => {
316
- _pos.set(w.wx - origin[0], w.y, w.wz - origin[1]);
317
- _quat.setFromAxisAngle(_up, w.yaw);
318
- _mat4.compose(_pos, _quat, _scale);
319
- mesh.setMatrixAt(i, _mat4);
320
- });
321
- mesh.count = filtered.length;
322
- mesh.instanceMatrix.needsUpdate = true;
323
- }, [filtered, origin]);
324
- if (filtered.length === 0) return null;
325
- return (
326
- <>
327
- <instancedMesh ref={ref} args={[undefined, undefined, Math.max(1, filtered.length)]} castShadow receiveShadow>
328
- <boxGeometry args={[3, 3, 0.28]} />
329
- <meshStandardMaterial color={color} flatShading />
330
- </instancedMesh>
331
- {filtered.map((w) => (
332
- <RigidBody key={w.id} type="fixed" position={[w.wx - origin[0], w.y, w.wz - origin[1]]} rotation={[0, w.yaw, 0]}>
333
- <CuboidCollider args={[1.5, 1.5, 0.14]} />
334
- </RigidBody>
335
- ))}
336
- </>
337
- );
338
- }
339
-
340
- export function LonglineGameplay({
341
- seed, origin, tool, yawStep, tier, walls, onPlaceWall, onSyncHud,
342
- }: {
343
- seed: string;
344
- origin: readonly [number, number];
345
- tool: "drive" | "build";
346
- yawStep: number;
347
- tier: BuildTier;
348
- walls: readonly BuiltC12Wall[];
349
- onPlaceWall: (wx: number, y: number, wz: number, yaw: number) => void;
350
- onSyncHud: (s: HighwayHudState) => void;
351
- }) {
352
- const world = useActiveKolmoWorld();
353
- const camera = useThree((s) => s.camera);
354
- const spawn = useMemo(() => computeLongDriveMainlandSpawn(hashSeed(seed), 1, 0), [seed]);
355
- const anchorBuf = useRef<[number, number]>([0, 0]);
356
- const prevWorld = useRef<[number, number] | null>(null);
357
- const ghostRef = useRef<THREE.Mesh>(null);
358
- const stats = useRef<HighwayHudState>({ km: 0, fuelL: 45, targetKm: 0.5, cash: 100, stage: 1, scrap: 60 });
359
- const lastUiPush = useRef(0);
360
-
361
- const initialCans = useMemo<FuelCanItem[]>(() =>
362
- [1, 2, 3, 4].map((i) => ({
363
- id: i,
364
- wx: spawn.vehiclePos[0] + Math.sin(spawn.vehicleRot[1]) * i * 85 + 2.4,
365
- wz: spawn.vehiclePos[2] + Math.cos(spawn.vehicleRot[1]) * i * 85,
366
- y: spawn.vehiclePos[1] + 0.35,
367
- })), [spawn]);
368
-
369
- const cansRef = useRef<FuelCanItem[]>(initialCans);
370
- const [cans, setCans] = useState<FuelCanItem[]>(initialCans);
371
- const nextCanId = useRef(5);
372
-
373
- useEffect(() => {
374
- const onDown = (e: MouseEvent) => {
375
- if (e.button !== 0 || (e.target as HTMLElement)?.tagName !== "CANVAS") return;
376
- const a = readFloatingOriginAnchorXZ(world, camera, anchorBuf.current);
377
- _fwd.set(0, 0, -1).applyQuaternion(camera.quaternion);
378
- if (tool === "build") {
379
- const wx = Math.round((origin[0] + a[0] + _fwd.x * 6) / 3) * 3;
380
- const wz = Math.round((origin[1] + a[1] + _fwd.z * 6) / 3) * 3;
381
- onPlaceWall(wx, camera.position.y + 0.4, wz, (yawStep * Math.PI) / 6);
382
- } else {
383
- spawnSuikaOrb({
384
- tier: 0,
385
- position: [a[0] + _fwd.x * 2.2, camera.position.y + 0.5, a[1] + _fwd.z * 2.2],
386
- velocity: [_fwd.x * 24, _fwd.y * 24 + 3, _fwd.z * 24],
387
- });
388
- }
389
- };
390
- window.addEventListener("mousedown", onDown);
391
- return () => window.removeEventListener("mousedown", onDown);
392
- }, [tool, yawStep, origin, world, camera, onPlaceWall]);
393
-
394
- useFrame((_, delta) => {
395
- const a = readFloatingOriginAnchorXZ(world, camera, anchorBuf.current);
396
- const wx = origin[0] + a[0], wz = origin[1] + a[1];
397
- if (ghostRef.current && tool === "build") {
398
- _fwd.set(0, 0, -1).applyQuaternion(camera.quaternion);
399
- const gx = Math.round((wx + _fwd.x * 6) / 3) * 3 - origin[0];
400
- const gz = Math.round((wz + _fwd.z * 6) / 3) * 3 - origin[1];
401
- ghostRef.current.position.set(gx, camera.position.y + 0.4, gz);
402
- ghostRef.current.rotation.set(0, (yawStep * Math.PI) / 6, 0);
403
- }
404
- const prevX = prevWorld.current?.[0] ?? wx;
405
- const prevZ = prevWorld.current?.[1] ?? wz - 1;
406
- if (prevWorld.current) {
407
- const stepM = Math.hypot(wx - prevX, wz - prevZ);
408
- if (stepM > 0.01 && stepM < 60) {
409
- stats.current.km += stepM / 1000;
410
- stats.current.fuelL = Math.max(0, stats.current.fuelL - stepM * (kolmoTelemetry.boost > 0 ? 0.018 : 0.009));
411
- }
412
- }
413
- prevWorld.current = [wx, wz];
414
-
415
- if (stats.current.km >= stats.current.targetKm) {
416
- stats.current.cash += 250 * stats.current.stage;
417
- stats.current.scrap += 40;
418
- stats.current.stage += 1;
419
- stats.current.targetKm = +(stats.current.targetKm + 0.75).toFixed(2);
420
- stats.current.fuelL = Math.min(60, stats.current.fuelL + 12);
421
- }
422
-
423
- let picked = false;
424
- for (let i = 0; i < cansRef.current.length; i++) {
425
- if (Math.hypot(cansRef.current[i].wx - wx, cansRef.current[i].wz - wz) < 5.2) {
426
- picked = true;
427
- break;
428
- }
429
- }
430
- if (picked) {
431
- const fwdX = wx - prevX, fwdZ = wz - prevZ;
432
- const len = Math.hypot(fwdX, fwdZ) || 1;
433
- const next = cansRef.current.filter((c) => {
434
- if (Math.hypot(c.wx - wx, c.wz - wz) < 5.2) {
435
- stats.current.fuelL = Math.min(60, stats.current.fuelL + 18);
436
- stats.current.cash += 50;
437
- stats.current.scrap += 15;
438
- return false;
439
- }
440
- return true;
441
- });
442
- next.push({ id: nextCanId.current++, wx: wx + (fwdX / len) * 220, wz: wz + (fwdZ / len) * 220, y: camera.position.y - 1.1 });
443
- cansRef.current = next;
444
- setCans(next);
445
- }
446
-
447
- lastUiPush.current += delta;
448
- if (lastUiPush.current >= 0.12) {
449
- lastUiPush.current = 0;
450
- onSyncHud({ ...stats.current });
451
- }
452
- });
453
-
454
- return (
455
- <group>
456
- <SuikaSystem />
457
- <Junk id="salvage_1" kind="tin-can" position={[spawn.vehiclePos[0] - origin[0] + 4, spawn.vehiclePos[1] + 0.5, spawn.vehiclePos[2] - origin[1] + 18]} />
458
- <Junk id="salvage_2" kind="glass-bottle" position={[spawn.vehiclePos[0] - origin[0] - 4, spawn.vehiclePos[1] + 0.5, spawn.vehiclePos[2] - origin[1] + 24]} />
459
- {tool === "build" && (
460
- <mesh ref={ghostRef}>
461
- <boxGeometry args={[3, 3, 0.28]} />
462
- <meshStandardMaterial color={tier === "wood" ? "#f59e0b" : tier === "stone" ? "#94a3b8" : "#38bdf8"} transparent opacity={0.42} depthWrite={false} />
463
- </mesh>
464
- )}
465
- <InstancedC12Walls walls={walls} origin={origin} tier="wood" color="#9a6324" />
466
- <InstancedC12Walls walls={walls} origin={origin} tier="stone" color="#64748b" />
467
- <InstancedC12Walls walls={walls} origin={origin} tier="metal" color="#334155" />
468
- {cans.map((c) => (
469
- <group key={c.id} position={[c.wx - origin[0], c.y, c.wz - origin[1]]}>
470
- <mesh castShadow>
471
- <boxGeometry args={[0.55, 0.75, 0.36]} />
472
- <meshStandardMaterial color="#ef4444" emissive="#7f1d1d" flatShading />
473
- </mesh>
474
- <mesh position={[0, 1.6, 0]}>
475
- <octahedronGeometry args={[0.35, 0]} />
476
- <meshStandardMaterial color="#fbbf24" emissive="#f59e0b" flatShading />
477
- </mesh>
478
- </group>
479
- ))}
480
- </group>
481
- );
482
- }
483
- `;
484
-
485
- const LONGLINE_APP_SRC = `import { useCallback, useEffect, useState } from "react";
486
- import { Actor, Game, Hud, LongDrive, MobileTouchOverlay, PAPER_SHELL_PRESETS, RETRO_DREAMCAST, Vehicle, generateSeed8, normalizeSeed8 } from "@pinkaphant/kolmo";
487
- import { LonglineGameplay, type BuildTier, type BuiltC12Wall, type HighwayHudState } from "./LonglineGameplay.tsx";
488
-
489
- export function App() {
490
- const [seed, setSeed] = useState<string>(() => generateSeed8());
491
- const [seedInput, setSeedInput] = useState<string>(seed);
492
- const [origin, setOrigin] = useState<[number, number]>([0, 0]);
493
- const [tool, setTool] = useState<"drive" | "build">("drive");
494
- const [tier, setTier] = useState<BuildTier>("wood");
495
- const [yawStep, setYawStep] = useState(0);
496
- const [walls, setWalls] = useState<BuiltC12Wall[]>([]);
497
- const [hud, setHud] = useState<HighwayHudState>({ km: 0, fuelL: 45, targetKm: 0.5, cash: 100, stage: 1, scrap: 60 });
498
-
499
- useEffect(() => {
500
- const onKey = (e: KeyboardEvent) => {
501
- if ((e.target as HTMLElement)?.tagName === "INPUT") return;
502
- if (e.code === "Digit1") setTool("drive");
503
- else if (e.code === "Digit2") setTool("build");
504
- else if (e.code === "KeyQ") setYawStep((s) => (s + 11) % 12);
505
- else if (e.code === "KeyT") setTier((t) => (t === "wood" ? "stone" : t === "stone" ? "metal" : "wood"));
506
- };
507
- window.addEventListener("keydown", onKey);
508
- return () => window.removeEventListener("keydown", onKey);
509
- }, []);
510
-
511
- const handlePlaceWall = useCallback((wx: number, y: number, wz: number, yaw: number) => {
512
- setWalls((prev) => [...prev, { id: prev.length + 1, wx, y, wz, yaw, tier }]);
513
- }, [tier]);
514
-
515
- const tierLabel = tier === "wood" ? "Wood" : tier === "stone" ? "Stone" : "Metal";
516
- return (
517
- <div style={{ position: "relative", width: "100vw", height: "100dvh", overflow: "hidden", touchAction: "none", userSelect: "none", WebkitUserSelect: "none" }}>
518
- <Game key={seed} retro={RETRO_DREAMCAST}>
519
- <LongDrive seed={seed} pureMainland onOriginRebase={(ox, oz) => setOrigin([ox, oz])} />
520
- <Vehicle preset={PAPER_SHELL_PRESETS.sedan_92} piloted />
521
- <Actor />
522
- <LonglineGameplay seed={seed} origin={origin} tool={tool} yawStep={yawStep} tier={tier} walls={walls} onPlaceWall={handlePlaceWall} onSyncHud={setHud} />
523
- <Hud />
524
- <MobileTouchOverlay />
525
- </Game>
526
- <div style={{ position: "fixed", top: "max(12px, env(safe-area-inset-top))", right: "max(12px, env(safe-area-inset-right))", zIndex: 40, padding: "8px 12px", background: "rgba(9,13,22,0.88)", border: "1px solid #38bdf8", borderRadius: 6, color: "#f8fafc", fontFamily: "ui-monospace, monospace", fontSize: 12 }}>
527
- <div style={{ display: "flex", alignItems: "center", gap: 6, marginBottom: 4 }}>
528
- <b style={{ color: "#38bdf8" }}>Kolmo Longline · Stage {hud.stage} · Blind</b>
529
- <input
530
- value={seedInput}
531
- maxLength={8}
532
- onChange={(e) => setSeedInput(e.target.value.toUpperCase().replace(/0/g, "O").replace(/[^1-9A-Z]/g, ""))}
533
- style={{ width: 82, background: "#0f172a", color: "#38bdf8", border: "1px solid #334155", borderRadius: 4, padding: "2px 6px", fontFamily: "inherit", fontWeight: 700 }}
534
- />
535
- <button type="button" onClick={() => { const s = normalizeSeed8(seedInput); setSeedInput(s); setSeed(s); setWalls([]); }} style={{ cursor: "pointer", background: "#1e293b", color: "#e2e8f0", border: "1px solid #475569", borderRadius: 4, padding: "2px 6px" }}>Load</button>
536
- <button type="button" onClick={() => { const s = generateSeed8(); setSeedInput(s); setSeed(s); setWalls([]); }} style={{ cursor: "pointer", background: "#0369a1", color: "#fff", border: "1px solid #0284c7", borderRadius: 4, padding: "2px 6px" }}>New seed</button>
537
- </div>
538
- <div>Odometer <b>{hud.km.toFixed(2)}/{hud.targetKm.toFixed(2)} km</b> · Fuel <b style={{ color: hud.fuelL < 10 ? "#f87171" : "#34d399" }}>{hud.fuelL.toFixed(1)} L</b> · Scrap <b>{hud.scrap}</b> · C12 walls <b>{walls.length}</b></div>
539
- <div style={{ color: "#94a3b8", marginTop: 4 }}>[1] Drive/Orb ({tool === "drive" ? "active" : "idle"}) · [2] C12 build ({tool === "build" ? tierLabel : "idle"}) · [Q] 30° snap · [T] Tier · Click to place/launch</div>
540
- </div>
541
- </div>
542
- );
543
- }
544
- `;
545
-
546
- if (template === "dust") {
547
- fs.writeFileSync(path.join(targetDir, "src/DustGameplay.tsx"), DUST_WORLD_SRC);
548
- fs.writeFileSync(path.join(targetDir, "src/App.tsx"), DUST_APP_SRC);
549
- } else if (template === "longline") {
550
- fs.writeFileSync(path.join(targetDir, "src/LonglineGameplay.tsx"), LONGLINE_WORLD_SRC);
551
- fs.writeFileSync(path.join(targetDir, "src/App.tsx"), LONGLINE_APP_SRC);
552
- } else if (template === "garage") {
553
- fs.writeFileSync(path.join(targetDir, "src/App.tsx"), `import { GlbImportGate } from "@pinkaphant/kolmo/importer";\nexport function App() {\n return <GlbImportGate />;\n}\n`);
554
- } else {
555
- fs.writeFileSync(path.join(targetDir, "src/App.tsx"), `import { Actor, Game, Hud, Island, MobileTouchOverlay, Vehicle } from "@pinkaphant/kolmo";\nexport function App() {\n return (\n <Game>\n <Island />\n <Vehicle piloted />\n <Actor />\n <Hud />\n <MobileTouchOverlay />\n </Game>\n );\n}\n`);
556
- }
557
-
558
- fs.writeFileSync(path.join(targetDir, "src/main.tsx"), `import { createRoot } from "react-dom/client";\nimport { App } from "./App.tsx";\ncreateRoot(document.getElementById("root")!).render(<App />);\n`);
559
- fs.writeFileSync(path.join(targetDir, "src/App.test.ts"), `import assert from "node:assert/strict";\nimport { describe, it } from "node:test";\nimport { App } from "./App.tsx";\n\ndescribe("${pkgName} smoke test", () => {\n it("exports App component", () => {\n assert.equal(typeof App, "function");\n });\n});\n`);
560
-
561
- console.log(`Scaffolded ${template} project in ${targetDir}\nNext: cd ${dirArg} && npm install && npm run dev`);
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import * as THREE from "three";
3
- import { InfiniteLongDrivePlanner } from "../world/infiniteWorld2D.js";
4
- import { type IslandSpawnPose } from "./kolmoIsland.js";
5
- export declare function computeLongDriveBridgeheadSpawn(seed?: number, islandSize?: number): IslandSpawnPose;
6
- export declare function computeLongDriveMainlandSpawn(seed?: number, mx?: number, mz?: number): IslandSpawnPose;
7
- export declare function CausewayBridge({ seed, islandSize, planner, roadMat, offX, offZ, }: {
8
- seed: number;
9
- islandSize: number;
10
- planner: InfiniteLongDrivePlanner;
11
- roadMat: THREE.Material;
12
- offX: number;
13
- offZ: number;
14
- }): React.JSX.Element;