@pinkaphant/kolmo 0.2.3 → 0.4.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.
- package/LICENSE +1 -1
- package/README.md +36 -36
- package/bin/kolmo.mjs +12 -6
- package/dist/engine/causewayBridge.d.ts +14 -0
- package/dist/engine/causewayBridge.js +166 -0
- package/dist/engine/causewayBridge.js.map +1 -0
- package/dist/engine/index.d.ts +6 -4
- package/dist/engine/index.js +19 -12
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/islandSettlementMesh.d.ts +26 -0
- package/dist/engine/islandSettlementMesh.js +166 -0
- package/dist/engine/islandSettlementMesh.js.map +1 -0
- package/dist/engine/kolmoActions.d.ts +23 -0
- package/dist/engine/kolmoActions.js +164 -0
- package/dist/engine/kolmoActions.js.map +1 -0
- package/dist/engine/kolmoActor.js +242 -165
- package/dist/engine/kolmoActor.js.map +1 -0
- package/dist/engine/kolmoFloatingOrigin.d.ts +17 -0
- package/dist/engine/kolmoFloatingOrigin.js +98 -0
- package/dist/engine/kolmoFloatingOrigin.js.map +1 -0
- package/dist/engine/kolmoGame.d.ts +27 -0
- package/dist/engine/kolmoGame.js +80 -0
- package/dist/engine/kolmoGame.js.map +1 -0
- package/dist/engine/kolmoHud.d.ts +23 -0
- package/dist/engine/kolmoHud.js +195 -0
- package/dist/engine/kolmoHud.js.map +1 -0
- package/dist/engine/kolmoInput.d.ts +1 -1
- package/dist/engine/kolmoInput.js +57 -30
- package/dist/engine/kolmoInput.js.map +1 -0
- package/dist/engine/kolmoIsland.d.ts +5 -10
- package/dist/engine/kolmoIsland.js +182 -250
- package/dist/engine/kolmoIsland.js.map +1 -0
- package/dist/engine/kolmoLongDrive.d.ts +3 -4
- package/dist/engine/kolmoLongDrive.js +140 -205
- package/dist/engine/kolmoLongDrive.js.map +1 -0
- package/dist/engine/kolmoPilotMesh.d.ts +2 -0
- package/dist/engine/kolmoPilotMesh.js +64 -0
- package/dist/engine/kolmoPilotMesh.js.map +1 -0
- package/dist/engine/kolmoProcedural.d.ts +13 -0
- package/dist/engine/kolmoProcedural.js +101 -0
- package/dist/engine/kolmoProcedural.js.map +1 -0
- package/dist/engine/kolmoRigs.d.ts +1 -1
- package/dist/engine/kolmoRigs.js +88 -47
- package/dist/engine/kolmoRigs.js.map +1 -0
- package/dist/engine/kolmoStore.d.ts +3 -100
- package/dist/engine/kolmoSurface.d.ts +2 -2
- package/dist/engine/kolmoSurface.js +150 -134
- package/dist/engine/kolmoSurface.js.map +1 -0
- package/dist/engine/kolmoTraits.d.ts +128 -0
- package/dist/engine/kolmoTraits.js +140 -0
- package/dist/engine/kolmoTraits.js.map +1 -0
- package/dist/engine/kolmoVehicle.d.ts +3 -33
- package/dist/engine/kolmoVehicle.js +66 -240
- package/dist/engine/kolmoVehicle.js.map +1 -0
- package/dist/engine/kolmoVehicleConfig.d.ts +54 -0
- package/dist/engine/kolmoVehicleConfig.js +80 -0
- package/dist/engine/kolmoVehicleConfig.js.map +1 -0
- package/dist/engine/kolmoVehicleDriver.d.ts +4 -1
- package/dist/engine/kolmoVehicleDriver.js +116 -22
- package/dist/engine/kolmoVehicleDriver.js.map +1 -0
- package/dist/engine/kolmoVehicleInner.d.ts +7 -0
- package/dist/engine/kolmoVehicleInner.js +261 -0
- package/dist/engine/kolmoVehicleInner.js.map +1 -0
- package/dist/engine/kolmoWorld.d.ts +6 -4
- package/dist/engine/kolmoWorld.js +134 -116
- package/dist/engine/kolmoWorld.js.map +1 -0
- package/dist/engine/longDriveKit.d.ts +5 -12
- package/dist/engine/longDriveKit.js +121 -233
- package/dist/engine/longDriveKit.js.map +1 -0
- package/dist/engine/longDriveRoadside.d.ts +16 -0
- package/dist/engine/longDriveRoadside.js +171 -0
- package/dist/engine/longDriveRoadside.js.map +1 -0
- package/dist/engine/macroCellBuilder.d.ts +34 -0
- package/dist/engine/macroCellBuilder.js +145 -0
- package/dist/engine/macroCellBuilder.js.map +1 -0
- package/dist/engine/mainlandMacroCell.d.ts +2 -2
- package/dist/engine/mainlandMacroCell.js +77 -165
- package/dist/engine/mainlandMacroCell.js.map +1 -0
- package/dist/engine/shiftedFixedBody.d.ts +1 -1
- package/dist/engine/shiftedFixedBody.js +55 -28
- package/dist/engine/shiftedFixedBody.js.map +1 -0
- package/dist/importer/ChopShopPanel.d.ts +9 -1
- package/dist/importer/ChopShopPanel.js +303 -359
- package/dist/importer/ChopShopPanel.js.map +1 -0
- package/dist/importer/DomainWorkshopPanel.d.ts +2 -1
- package/dist/importer/DomainWorkshopPanel.js +172 -242
- package/dist/importer/DomainWorkshopPanel.js.map +1 -0
- package/dist/importer/GateHudBar.d.ts +8 -0
- package/dist/importer/GateHudBar.js +290 -279
- package/dist/importer/GateHudBar.js.map +1 -0
- package/dist/importer/GlbImportGate.d.ts +2 -1
- package/dist/importer/GlbImportGate.js +252 -225
- package/dist/importer/GlbImportGate.js.map +1 -0
- package/dist/importer/ImperativeVehicleRig.d.ts +2 -2
- package/dist/importer/ImperativeVehicleRig.js +223 -284
- package/dist/importer/ImperativeVehicleRig.js.map +1 -0
- package/dist/importer/LiveDrivePads.d.ts +20 -0
- package/dist/importer/LiveDrivePads.js +169 -0
- package/dist/importer/LiveDrivePads.js.map +1 -0
- package/dist/importer/PaperShellDebrisRig.d.ts +25 -0
- package/dist/importer/PaperShellDebrisRig.js +143 -0
- package/dist/importer/PaperShellDebrisRig.js.map +1 -0
- package/dist/importer/R2VaultDrawer.d.ts +12 -0
- package/dist/importer/R2VaultDrawer.js +90 -0
- package/dist/importer/R2VaultDrawer.js.map +1 -0
- package/dist/importer/Step1CalibrationPlinth.d.ts +23 -5
- package/dist/importer/Step1CalibrationPlinth.js +180 -251
- package/dist/importer/Step1CalibrationPlinth.js.map +1 -0
- package/dist/importer/Step1ExplodedIslands.d.ts +31 -0
- package/dist/importer/Step1ExplodedIslands.js +144 -0
- package/dist/importer/Step1ExplodedIslands.js.map +1 -0
- package/dist/importer/Step2UniversalPad.d.ts +7 -7
- package/dist/importer/Step2UniversalPad.js +49 -170
- package/dist/importer/Step2UniversalPad.js.map +1 -0
- package/dist/importer/VfxEmitterPool.js +59 -86
- package/dist/importer/VfxEmitterPool.js.map +1 -0
- package/dist/importer/WheelRingHandles3D.d.ts +11 -0
- package/dist/importer/WheelRingHandles3D.js +318 -0
- package/dist/importer/WheelRingHandles3D.js.map +1 -0
- package/dist/importer/archLinerGeom.d.ts +2 -0
- package/dist/importer/archLinerGeom.js +51 -0
- package/dist/importer/archLinerGeom.js.map +1 -0
- package/dist/importer/{vehiclePanelAnim.d.ts → chopHingeHelpers.d.ts} +0 -10
- package/dist/importer/chopHingeHelpers.js +193 -0
- package/dist/importer/chopHingeHelpers.js.map +1 -0
- package/dist/importer/chopShopActions.d.ts +20 -26
- package/dist/importer/chopShopActions.js +135 -210
- package/dist/importer/chopShopActions.js.map +1 -0
- package/dist/importer/chopShopHandlers.d.ts +26 -0
- package/dist/importer/chopShopHandlers.js +276 -0
- package/dist/importer/chopShopHandlers.js.map +1 -0
- package/dist/importer/chopShopIoActions.d.ts +15 -0
- package/dist/importer/chopShopIoActions.js +137 -0
- package/dist/importer/chopShopIoActions.js.map +1 -0
- package/dist/importer/chopShopMcpAction.d.ts +18 -0
- package/dist/importer/chopShopMcpAction.js +58 -0
- package/dist/importer/chopShopMcpAction.js.map +1 -0
- package/dist/importer/cylinderBooleanSlice.d.ts +14 -0
- package/dist/importer/cylinderBooleanSlice.js +110 -0
- package/dist/importer/cylinderBooleanSlice.js.map +1 -0
- package/dist/importer/cylinderSliceMath.d.ts +14 -0
- package/dist/importer/cylinderSliceMath.js +251 -0
- package/dist/importer/cylinderSliceMath.js.map +1 -0
- package/dist/importer/fusedWheelDetect.d.ts +4 -0
- package/dist/importer/fusedWheelDetect.js +175 -0
- package/dist/importer/fusedWheelDetect.js.map +1 -0
- package/dist/importer/fusedWheelFit.d.ts +13 -0
- package/dist/importer/fusedWheelFit.js +138 -0
- package/dist/importer/fusedWheelFit.js.map +1 -0
- package/dist/importer/gateStore.d.ts +1 -1
- package/dist/importer/gateStore.js +36 -27
- package/dist/importer/gateStore.js.map +1 -0
- package/dist/importer/glbNormalizer.js +118 -79
- package/dist/importer/glbNormalizer.js.map +1 -0
- package/dist/importer/importerWebMcp.d.ts +4 -3
- package/dist/importer/importerWebMcp.js +41 -336
- package/dist/importer/importerWebMcp.js.map +1 -0
- package/dist/importer/importerWebMcpTools.d.ts +2 -0
- package/dist/importer/importerWebMcpTools.js +340 -0
- package/dist/importer/importerWebMcpTools.js.map +1 -0
- package/dist/importer/index.d.ts +4 -0
- package/dist/importer/index.js +32 -22
- package/dist/importer/index.js.map +1 -0
- package/dist/importer/khrCarPlanHelpers.d.ts +28 -0
- package/dist/importer/khrCarPlanHelpers.js +221 -0
- package/dist/importer/khrCarPlanHelpers.js.map +1 -0
- package/dist/importer/khrCarPlanner.d.ts +7 -0
- package/dist/importer/khrCarPlanner.js +279 -0
- package/dist/importer/khrCarPlanner.js.map +1 -0
- package/dist/importer/khrCompiler.d.ts +4 -22
- package/dist/importer/khrCompiler.js +56 -424
- package/dist/importer/khrCompiler.js.map +1 -0
- package/dist/importer/khrCraftPropCompiler.d.ts +40 -0
- package/dist/importer/khrCraftPropCompiler.js +250 -0
- package/dist/importer/khrCraftPropCompiler.js.map +1 -0
- package/dist/importer/launcherBake.js +76 -35
- package/dist/importer/launcherBake.js.map +1 -0
- package/dist/importer/meshIslands.d.ts +4 -46
- package/dist/importer/meshIslands.js +84 -283
- package/dist/importer/meshIslands.js.map +1 -0
- package/dist/importer/meshSliceBuffers.d.ts +15 -0
- package/dist/importer/meshSliceBuffers.js +159 -0
- package/dist/importer/meshSliceBuffers.js.map +1 -0
- package/dist/importer/polygonEarClipYZ.d.ts +3 -0
- package/dist/importer/polygonEarClipYZ.js +67 -0
- package/dist/importer/polygonEarClipYZ.js.map +1 -0
- package/dist/importer/sceneSiNormalize.d.ts +19 -0
- package/dist/importer/sceneSiNormalize.js +138 -0
- package/dist/importer/sceneSiNormalize.js.map +1 -0
- package/dist/importer/starterScene.d.ts +3 -0
- package/dist/importer/starterScene.js +76 -0
- package/dist/importer/starterScene.js.map +1 -0
- package/dist/importer/surfaceCutter.d.ts +4 -15
- package/dist/importer/surfaceCutter.js +69 -240
- package/dist/importer/surfaceCutter.js.map +1 -0
- package/dist/importer/surfaceGeodesic.d.ts +7 -0
- package/dist/importer/surfaceGeodesic.js +130 -0
- package/dist/importer/surfaceGeodesic.js.map +1 -0
- package/dist/importer/surfaceLoopRefine.d.ts +6 -0
- package/dist/importer/surfaceLoopRefine.js +171 -0
- package/dist/importer/surfaceLoopRefine.js.map +1 -0
- package/dist/importer/surfacePeel.d.ts +11 -0
- package/dist/importer/surfacePeel.js +119 -0
- package/dist/importer/surfacePeel.js.map +1 -0
- package/dist/importer/surfaceTopology.d.ts +2 -6
- package/dist/importer/surfaceTopology.js +93 -133
- package/dist/importer/surfaceTopology.js.map +1 -0
- package/dist/importer/universalGateBake.d.ts +7 -3
- package/dist/importer/universalGateBake.js +104 -106
- package/dist/importer/universalGateBake.js.map +1 -0
- package/dist/importer/usdPhysicsSpecs.d.ts +3 -0
- package/dist/importer/usdPhysicsSpecs.js +245 -0
- package/dist/importer/usdPhysicsSpecs.js.map +1 -0
- package/dist/importer/usdTextParse.d.ts +12 -0
- package/dist/importer/usdTextParse.js +118 -0
- package/dist/importer/usdTextParse.js.map +1 -0
- package/dist/importer/usdToGlb.d.ts +3 -2
- package/dist/importer/usdToGlb.js +80 -280
- package/dist/importer/usdToGlb.js.map +1 -0
- package/dist/importer/useChopShopController.d.ts +50 -47
- package/dist/importer/useChopShopController.js +156 -338
- package/dist/importer/useChopShopController.js.map +1 -0
- package/dist/importer/useChopShopState.d.ts +103 -0
- package/dist/importer/useChopShopState.js +319 -0
- package/dist/importer/useChopShopState.js.map +1 -0
- package/dist/importer/useWasdKeyRef.d.ts +9 -0
- package/dist/importer/useWasdKeyRef.js +35 -0
- package/dist/importer/useWasdKeyRef.js.map +1 -0
- package/dist/importer/vehiclePartSplit.d.ts +33 -0
- package/dist/importer/vehiclePartSplit.js +178 -0
- package/dist/importer/vehiclePartSplit.js.map +1 -0
- package/dist/importer/wheelAxlePairing.js +106 -70
- package/dist/importer/wheelAxlePairing.js.map +1 -0
- package/dist/importer/wheelCutterHelpers.d.ts +42 -0
- package/dist/importer/wheelCutterHelpers.js +178 -0
- package/dist/importer/wheelCutterHelpers.js.map +1 -0
- package/dist/importer/wheelRingHandleMath.d.ts +20 -0
- package/dist/importer/wheelRingHandleMath.js +66 -0
- package/dist/importer/wheelRingHandleMath.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +90 -66
- package/dist/index.js.map +1 -0
- package/dist/junk/DestructibleTarget.d.ts +3 -3
- package/dist/junk/DestructibleTarget.js +177 -114
- package/dist/junk/DestructibleTarget.js.map +1 -0
- package/dist/junk/KolmoJunk.js +55 -44
- package/dist/junk/KolmoJunk.js.map +1 -0
- package/dist/junk/ShardPieces.d.ts +2 -1
- package/dist/junk/ShardPieces.js +80 -61
- package/dist/junk/ShardPieces.js.map +1 -0
- package/dist/junk/TargetDecals.d.ts +6 -15
- package/dist/junk/TargetDecals.js +66 -40
- package/dist/junk/TargetDecals.js.map +1 -0
- package/dist/junk/bvhShatter.d.ts +2 -6
- package/dist/junk/bvhShatter.js +89 -43
- package/dist/junk/bvhShatter.js.map +1 -0
- package/dist/junk/bvhTriCollector.d.ts +2 -6
- package/dist/junk/bvhTriCollector.js +111 -62
- package/dist/junk/bvhTriCollector.js.map +1 -0
- package/dist/junk/index.d.ts +2 -2
- package/dist/junk/index.js +11 -11
- package/dist/junk/index.js.map +1 -0
- package/dist/junk/junkGeometry.d.ts +5 -26
- package/dist/junk/junkGeometry.js +61 -43
- package/dist/junk/junkGeometry.js.map +1 -0
- package/dist/junk/junkImportSanitize.d.ts +4 -5
- package/dist/junk/junkImportSanitize.js +57 -37
- package/dist/junk/junkImportSanitize.js.map +1 -0
- package/dist/junk/junkImporter.d.ts +2 -13
- package/dist/junk/junkImporter.js +105 -76
- package/dist/junk/junkImporter.js.map +1 -0
- package/dist/junk/junkLabelCanvas.d.ts +1 -6
- package/dist/junk/junkLabelCanvas.js +147 -29
- package/dist/junk/junkLabelCanvas.js.map +1 -0
- package/dist/junk/junkLabels.d.ts +4 -26
- package/dist/junk/junkLabels.js +42 -28
- package/dist/junk/junkLabels.js.map +1 -0
- package/dist/junk/targetHelpers.d.ts +3 -4
- package/dist/junk/targetHelpers.js +121 -67
- package/dist/junk/targetHelpers.js.map +1 -0
- package/dist/junk/targetHitLogic.d.ts +8 -8
- package/dist/junk/targetHitLogic.js +131 -95
- package/dist/junk/targetHitLogic.js.map +1 -0
- package/dist/junk/useTargetAssets.d.ts +9 -14
- package/dist/junk/useTargetAssets.js +113 -85
- package/dist/junk/useTargetAssets.js.map +1 -0
- package/dist/physics/index.d.ts +1 -1
- package/dist/physics/index.js +79 -58
- package/dist/physics/index.js.map +1 -0
- package/dist/schema/kolmoSchema.d.ts +3 -64
- package/dist/schema/kolmoSchema.js +75 -149
- package/dist/schema/kolmoSchema.js.map +1 -0
- package/dist/schema/kolmoStamp.d.ts +6 -0
- package/dist/schema/kolmoStamp.js +71 -0
- package/dist/schema/kolmoStamp.js.map +1 -0
- package/dist/schema/kolmoTypes.d.ts +63 -0
- package/dist/schema/kolmoTypes.js +66 -0
- package/dist/schema/kolmoTypes.js.map +1 -0
- package/dist/shaders/celestialBackdrop.d.ts +2 -10
- package/dist/shaders/celestialBackdrop.js +128 -291
- package/dist/shaders/celestialBackdrop.js.map +1 -0
- package/dist/shaders/emitterShaders.d.ts +9 -0
- package/dist/shaders/emitterShaders.js +114 -0
- package/dist/shaders/emitterShaders.js.map +1 -0
- package/dist/shaders/index.d.ts +1 -1
- package/dist/shaders/index.js +12 -9
- package/dist/shaders/index.js.map +1 -0
- package/dist/shaders/plumeAndSparkle.d.ts +2 -4
- package/dist/shaders/plumeAndSparkle.js +152 -191
- package/dist/shaders/plumeAndSparkle.js.map +1 -0
- package/dist/shaders/ps2GlslShared.js +29 -2
- package/dist/shaders/ps2GlslShared.js.map +1 -0
- package/dist/shaders/ps2MaterialsTSL.js +132 -51
- package/dist/shaders/ps2MaterialsTSL.js.map +1 -0
- package/dist/shaders/ps2MaterialsWebGL.js +45 -28
- package/dist/shaders/ps2MaterialsWebGL.js.map +1 -0
- package/dist/shaders/ps2RoadWebGL.js +69 -32
- package/dist/shaders/ps2RoadWebGL.js.map +1 -0
- package/dist/shaders/ps2TerrainWebGL.js +107 -30
- package/dist/shaders/ps2TerrainWebGL.js.map +1 -0
- package/dist/shaders/ps2Textures.d.ts +1 -1
- package/dist/shaders/ps2Textures.js +116 -41
- package/dist/shaders/ps2Textures.js.map +1 -0
- package/dist/shaders/retroPalettes.d.ts +1 -1
- package/dist/shaders/retroPalettes.js +90 -57
- package/dist/shaders/retroPalettes.js.map +1 -0
- package/dist/shaders/retroShader.d.ts +2 -86
- package/dist/shaders/retroShader.js +65 -196
- package/dist/shaders/retroShader.js.map +1 -0
- package/dist/shaders/retroUniforms.d.ts +60 -0
- package/dist/shaders/retroUniforms.js +215 -0
- package/dist/shaders/retroUniforms.js.map +1 -0
- package/dist/shaders/skyboxShaders.d.ts +16 -0
- package/dist/shaders/skyboxShaders.js +266 -0
- package/dist/shaders/skyboxShaders.js.map +1 -0
- package/dist/shaders/tsl.d.ts +1 -1
- package/dist/shaders/tsl.js.map +1 -0
- package/dist/vite/index.js +39 -23
- package/dist/vite/index.js.map +1 -0
- package/dist/world/frontage.js +25 -21
- package/dist/world/frontage.js.map +1 -0
- package/dist/world/index.d.ts +4 -4
- package/dist/world/index.js +12 -11
- package/dist/world/index.js.map +1 -0
- package/dist/world/infiniteWorld2D.d.ts +0 -5
- package/dist/world/infiniteWorld2D.js +175 -200
- package/dist/world/infiniteWorld2D.js.map +1 -0
- package/dist/world/island.js +81 -166
- package/dist/world/island.js.map +1 -0
- package/dist/world/islandPathing.d.ts +6 -0
- package/dist/world/islandPathing.js +166 -0
- package/dist/world/islandPathing.js.map +1 -0
- package/dist/world/macroCellSchema.js +15 -8
- package/dist/world/macroCellSchema.js.map +1 -0
- package/dist/world/macroKnightAStar.js +140 -71
- package/dist/world/macroKnightAStar.js.map +1 -0
- package/dist/world/macroSettlementZones.d.ts +9 -0
- package/dist/world/macroSettlementZones.js +108 -0
- package/dist/world/macroSettlementZones.js.map +1 -0
- package/dist/world/random.js +50 -24
- package/dist/world/random.js.map +1 -0
- package/dist/world/road.js +152 -90
- package/dist/world/road.js.map +1 -0
- package/dist/world/roadRibbon.d.ts +4 -19
- package/dist/world/roadRibbon.js +129 -124
- package/dist/world/roadRibbon.js.map +1 -0
- package/dist/world/terrain.d.ts +1 -1
- package/dist/world/terrain.js +111 -65
- package/dist/world/terrain.js.map +1 -0
- package/dist/world/terrainGeometry.d.ts +14 -0
- package/dist/world/terrainGeometry.js +76 -0
- package/dist/world/terrainGeometry.js.map +1 -0
- package/dist/world/worldTypes.d.ts +3 -3
- package/dist/world/worldTypes.js +133 -67
- package/dist/world/worldTypes.js.map +1 -0
- package/docs/api-reference.md +187 -0
- package/package.json +58 -32
- package/dist/engine/kolmoStore.js +0 -211
- package/dist/importer/ImporterPlinthUikitTags.d.ts +0 -19
- package/dist/importer/ImporterPlinthUikitTags.js +0 -112
- package/dist/importer/vehiclePanelAnim.js +0 -214
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { type Entity, type World } from "koota";
|
|
2
|
+
import type { EcctrlHandle } from "@pinkaphant/ecctrl";
|
|
3
|
+
import type { EcctrlVehicleHandle } from "@pinkaphant/ecctrl/vehicle";
|
|
4
|
+
import type { RetroPresetId } from "../shaders/retroShader.js";
|
|
5
|
+
export type KolmoControlMode = "foot" | "car" | "flight";
|
|
6
|
+
export interface VehicleTraitData {
|
|
7
|
+
id: string;
|
|
8
|
+
handle: EcctrlVehicleHandle | null;
|
|
9
|
+
seatOffset: [number, number, number];
|
|
10
|
+
exitOffset: [number, number, number];
|
|
11
|
+
isFlight: boolean;
|
|
12
|
+
onOriginShift?: (dx: number, dz: number) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface ActorTraitData {
|
|
15
|
+
id: string;
|
|
16
|
+
handle: EcctrlHandle | null;
|
|
17
|
+
exitSpawnPos: [number, number, number] | null;
|
|
18
|
+
exitSpawnYaw: number;
|
|
19
|
+
exitLinVel: [number, number, number] | null;
|
|
20
|
+
onOriginShift?: (dx: number, dz: number) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const VehicleTrait: import("koota").Trait<() => VehicleTraitData>;
|
|
23
|
+
export declare const ActorTrait: import("koota").Trait<() => ActorTraitData>;
|
|
24
|
+
export declare const TransformTrait: import("koota").Trait<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
z: number;
|
|
28
|
+
qx: number;
|
|
29
|
+
qy: number;
|
|
30
|
+
qz: number;
|
|
31
|
+
qw: number;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const VelocityTrait: import("koota").Trait<{
|
|
34
|
+
vx: number;
|
|
35
|
+
vy: number;
|
|
36
|
+
vz: number;
|
|
37
|
+
speedKmh: number;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const VehicleTelemetryTrait: import("koota").Trait<{
|
|
40
|
+
rpm: number;
|
|
41
|
+
gear: number;
|
|
42
|
+
throttle: number;
|
|
43
|
+
boost: number;
|
|
44
|
+
slip: number;
|
|
45
|
+
}>;
|
|
46
|
+
export declare const InteractableTrait: import("koota").Trait<{
|
|
47
|
+
id: string;
|
|
48
|
+
radius: number;
|
|
49
|
+
kind: "vehicle" | "prop";
|
|
50
|
+
}>;
|
|
51
|
+
export declare const PilotedTag: import("koota").TagTrait;
|
|
52
|
+
export declare const PilotLink: import("koota").Relation<import("koota").Trait<Record<string, never>>>;
|
|
53
|
+
export type ShiftableBody = {
|
|
54
|
+
handle?: number;
|
|
55
|
+
translation(): {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
z: number;
|
|
59
|
+
};
|
|
60
|
+
rotation?(): {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
z: number;
|
|
64
|
+
w: number;
|
|
65
|
+
};
|
|
66
|
+
setTranslation(t: {
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
z: number;
|
|
70
|
+
}, wake: boolean): void;
|
|
71
|
+
};
|
|
72
|
+
export interface FloatingBodyTraitData {
|
|
73
|
+
id: string;
|
|
74
|
+
getBody: () => ShiftableBody | null;
|
|
75
|
+
}
|
|
76
|
+
export declare const FloatingBodyTrait: import("koota").Trait<() => FloatingBodyTraitData>;
|
|
77
|
+
export interface WorldSpawnData {
|
|
78
|
+
vehiclePos: [number, number, number];
|
|
79
|
+
vehicleRot: [number, number, number];
|
|
80
|
+
actorPos: [number, number, number];
|
|
81
|
+
}
|
|
82
|
+
export declare const WorldSpawnTrait: import("koota").Trait<() => WorldSpawnData>;
|
|
83
|
+
export declare const WorldSessionTrait: import("koota").Trait<{
|
|
84
|
+
activeRetroPreset: RetroPresetId;
|
|
85
|
+
nearVehicleId: string;
|
|
86
|
+
}>;
|
|
87
|
+
export declare const vehicleSimQuery: import("koota").Query<[import("koota").Trait<() => VehicleTraitData>, import("koota").Trait<{
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
z: number;
|
|
91
|
+
qx: number;
|
|
92
|
+
qy: number;
|
|
93
|
+
qz: number;
|
|
94
|
+
qw: number;
|
|
95
|
+
}>, import("koota").Trait<{
|
|
96
|
+
vx: number;
|
|
97
|
+
vy: number;
|
|
98
|
+
vz: number;
|
|
99
|
+
speedKmh: number;
|
|
100
|
+
}>, import("koota").Trait<{
|
|
101
|
+
rpm: number;
|
|
102
|
+
gear: number;
|
|
103
|
+
throttle: number;
|
|
104
|
+
boost: number;
|
|
105
|
+
slip: number;
|
|
106
|
+
}>]>;
|
|
107
|
+
export declare const pilotedVehicleQuery: import("koota").Query<[import("koota").Trait<() => VehicleTraitData>, import("koota").TagTrait]>;
|
|
108
|
+
export declare const kolmoWorld: World;
|
|
109
|
+
export declare function useActiveKolmoWorld(): World;
|
|
110
|
+
export declare function ensureWorldSession(w: World): void;
|
|
111
|
+
export declare function publishWorldSpawn(w: World, spawn: WorldSpawnData): void;
|
|
112
|
+
/** Zero-allocation in-place SoA array writer for TransformTrait + VelocityTrait inside `useFrame`. */
|
|
113
|
+
export declare function writeEntityKinematics(world: World, entity: Entity, pos: {
|
|
114
|
+
x: number;
|
|
115
|
+
y: number;
|
|
116
|
+
z: number;
|
|
117
|
+
}, quat: {
|
|
118
|
+
x: number;
|
|
119
|
+
y: number;
|
|
120
|
+
z: number;
|
|
121
|
+
w: number;
|
|
122
|
+
}, linVel: {
|
|
123
|
+
x: number;
|
|
124
|
+
y: number;
|
|
125
|
+
z: number;
|
|
126
|
+
}, speedKmh: number): void;
|
|
127
|
+
/** Zero-allocation in-place SoA array writer for VehicleTelemetryTrait inside `useFrame`. */
|
|
128
|
+
export declare function writeVehicleTelemetry(world: World, entity: Entity, rpm: number, gear: number, throttle: number, boost: number, slip: number): void;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { createQuery, createWorld, getStore, relation, trait } from "koota";
|
|
2
|
+
import { useWorld } from "koota/react";
|
|
3
|
+
// src/engine/kolmoTraits.ts
|
|
4
|
+
var VehicleTrait = trait(() => ({
|
|
5
|
+
id: "",
|
|
6
|
+
handle: null,
|
|
7
|
+
seatOffset: [
|
|
8
|
+
0,
|
|
9
|
+
.55,
|
|
10
|
+
0
|
|
11
|
+
],
|
|
12
|
+
exitOffset: [
|
|
13
|
+
-1.5,
|
|
14
|
+
.45,
|
|
15
|
+
0
|
|
16
|
+
],
|
|
17
|
+
isFlight: false
|
|
18
|
+
}));
|
|
19
|
+
var ActorTrait = trait(() => ({
|
|
20
|
+
id: "pilot",
|
|
21
|
+
handle: null,
|
|
22
|
+
exitSpawnPos: null,
|
|
23
|
+
exitSpawnYaw: 0,
|
|
24
|
+
exitLinVel: null
|
|
25
|
+
}));
|
|
26
|
+
var TransformTrait = trait({
|
|
27
|
+
x: 0,
|
|
28
|
+
y: 0,
|
|
29
|
+
z: 0,
|
|
30
|
+
qx: 0,
|
|
31
|
+
qy: 0,
|
|
32
|
+
qz: 0,
|
|
33
|
+
qw: 1
|
|
34
|
+
});
|
|
35
|
+
var VelocityTrait = trait({
|
|
36
|
+
vx: 0,
|
|
37
|
+
vy: 0,
|
|
38
|
+
vz: 0,
|
|
39
|
+
speedKmh: 0
|
|
40
|
+
});
|
|
41
|
+
var VehicleTelemetryTrait = trait({
|
|
42
|
+
rpm: 0,
|
|
43
|
+
gear: 1,
|
|
44
|
+
throttle: 0,
|
|
45
|
+
boost: 0,
|
|
46
|
+
slip: 0
|
|
47
|
+
});
|
|
48
|
+
var InteractableTrait = trait({
|
|
49
|
+
id: "",
|
|
50
|
+
radius: 4,
|
|
51
|
+
kind: "vehicle"
|
|
52
|
+
});
|
|
53
|
+
var PilotedTag = trait();
|
|
54
|
+
var PilotLink = relation({ exclusive: true });
|
|
55
|
+
var FloatingBodyTrait = trait(() => ({
|
|
56
|
+
id: "",
|
|
57
|
+
getBody: () => null
|
|
58
|
+
}));
|
|
59
|
+
var WorldSpawnTrait = trait(() => ({
|
|
60
|
+
vehiclePos: [
|
|
61
|
+
0,
|
|
62
|
+
.35,
|
|
63
|
+
0
|
|
64
|
+
],
|
|
65
|
+
vehicleRot: [
|
|
66
|
+
0,
|
|
67
|
+
0,
|
|
68
|
+
0
|
|
69
|
+
],
|
|
70
|
+
actorPos: [
|
|
71
|
+
0,
|
|
72
|
+
1.4,
|
|
73
|
+
0
|
|
74
|
+
]
|
|
75
|
+
}));
|
|
76
|
+
var WorldSessionTrait = trait({
|
|
77
|
+
activeRetroPreset: "dreamcast",
|
|
78
|
+
nearVehicleId: ""
|
|
79
|
+
});
|
|
80
|
+
var vehicleSimQuery = createQuery(VehicleTrait, TransformTrait, VelocityTrait, VehicleTelemetryTrait);
|
|
81
|
+
var pilotedVehicleQuery = createQuery(VehicleTrait, PilotedTag);
|
|
82
|
+
var kolmoWorld = createWorld(WorldSessionTrait);
|
|
83
|
+
function useActiveKolmoWorld() {
|
|
84
|
+
try {
|
|
85
|
+
return useWorld();
|
|
86
|
+
} catch {
|
|
87
|
+
return kolmoWorld;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function ensureWorldSession(w) {
|
|
91
|
+
if (!w.has(WorldSessionTrait)) w.add(WorldSessionTrait);
|
|
92
|
+
}
|
|
93
|
+
function publishWorldSpawn(w, spawn) {
|
|
94
|
+
if (!w.has(WorldSpawnTrait)) {
|
|
95
|
+
w.add(WorldSpawnTrait(spawn));
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const cur = w.get(WorldSpawnTrait);
|
|
99
|
+
if (!cur || cur.vehiclePos[0] !== spawn.vehiclePos[0] || cur.vehiclePos[1] !== spawn.vehiclePos[1] || cur.vehiclePos[2] !== spawn.vehiclePos[2] || cur.actorPos[0] !== spawn.actorPos[0] || cur.actorPos[2] !== spawn.actorPos[2]) w.set(WorldSpawnTrait, {
|
|
100
|
+
vehiclePos: [...spawn.vehiclePos],
|
|
101
|
+
vehicleRot: [...spawn.vehicleRot],
|
|
102
|
+
actorPos: [...spawn.actorPos]
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
var KOOTA_EID_MASK = (1 << 20) - 1;
|
|
106
|
+
/** Zero-allocation in-place SoA array writer for TransformTrait + VelocityTrait inside `useFrame`. */
|
|
107
|
+
function writeEntityKinematics(world, entity, pos, quat, linVel, speedKmh) {
|
|
108
|
+
const eid = entity & KOOTA_EID_MASK;
|
|
109
|
+
if (entity.has(TransformTrait)) {
|
|
110
|
+
const xf = getStore(world, TransformTrait);
|
|
111
|
+
xf.x[eid] = pos.x;
|
|
112
|
+
xf.y[eid] = pos.y;
|
|
113
|
+
xf.z[eid] = pos.z;
|
|
114
|
+
xf.qx[eid] = quat.x;
|
|
115
|
+
xf.qy[eid] = quat.y;
|
|
116
|
+
xf.qz[eid] = quat.z;
|
|
117
|
+
xf.qw[eid] = quat.w;
|
|
118
|
+
}
|
|
119
|
+
if (entity.has(VelocityTrait)) {
|
|
120
|
+
const vl = getStore(world, VelocityTrait);
|
|
121
|
+
vl.vx[eid] = linVel.x;
|
|
122
|
+
vl.vy[eid] = linVel.y;
|
|
123
|
+
vl.vz[eid] = linVel.z;
|
|
124
|
+
vl.speedKmh[eid] = speedKmh;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/** Zero-allocation in-place SoA array writer for VehicleTelemetryTrait inside `useFrame`. */
|
|
128
|
+
function writeVehicleTelemetry(world, entity, rpm, gear, throttle, boost, slip) {
|
|
129
|
+
if (!entity.has(VehicleTelemetryTrait)) return;
|
|
130
|
+
const eid = entity & KOOTA_EID_MASK;
|
|
131
|
+
const st = getStore(world, VehicleTelemetryTrait);
|
|
132
|
+
st.rpm[eid] = rpm;
|
|
133
|
+
st.gear[eid] = gear;
|
|
134
|
+
st.throttle[eid] = throttle;
|
|
135
|
+
st.boost[eid] = boost;
|
|
136
|
+
st.slip[eid] = slip;
|
|
137
|
+
}
|
|
138
|
+
export { ActorTrait, FloatingBodyTrait, InteractableTrait, PilotLink, PilotedTag, TransformTrait, VehicleTelemetryTrait, VehicleTrait, VelocityTrait, WorldSessionTrait, WorldSpawnTrait, ensureWorldSession, kolmoWorld, pilotedVehicleQuery, publishWorldSpawn, useActiveKolmoWorld, vehicleSimQuery, writeEntityKinematics, writeVehicleTelemetry };
|
|
139
|
+
|
|
140
|
+
//# sourceMappingURL=kolmoTraits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kolmoTraits.js","names":[],"sources":["../../src/engine/kolmoTraits.ts"],"sourcesContent":["import {\n createQuery,\n createWorld,\n getStore,\n relation,\n trait,\n type Entity,\n type World,\n} from \"koota\";\nimport { useWorld } from \"koota/react\";\nimport type { EcctrlHandle } from \"@pinkaphant/ecctrl\";\nimport type { EcctrlVehicleHandle } from \"@pinkaphant/ecctrl/vehicle\";\nimport type { RetroPresetId } from \"../shaders/retroShader.js\";\n\nexport type KolmoControlMode = \"foot\" | \"car\" | \"flight\";\n\nexport interface VehicleTraitData {\n id: string;\n handle: EcctrlVehicleHandle | null;\n seatOffset: [number, number, number];\n exitOffset: [number, number, number];\n isFlight: boolean;\n onOriginShift?: (dx: number, dz: number) => void;\n}\n\nexport interface ActorTraitData {\n id: string;\n handle: EcctrlHandle | null;\n exitSpawnPos: [number, number, number] | null;\n exitSpawnYaw: number;\n exitLinVel: [number, number, number] | null;\n onOriginShift?: (dx: number, dz: number) => void;\n}\n\nexport const VehicleTrait = trait((): VehicleTraitData => ({\n id: \"\", handle: null, seatOffset: [0, 0.55, 0], exitOffset: [-1.5, 0.45, 0], isFlight: false,\n}));\n\nexport const ActorTrait = trait((): ActorTraitData => ({\n id: \"pilot\", handle: null, exitSpawnPos: null, exitSpawnYaw: 0, exitLinVel: null,\n}));\n\nexport const TransformTrait = trait({ x: 0, y: 0, z: 0, qx: 0, qy: 0, qz: 0, qw: 1 });\nexport const VelocityTrait = trait({ vx: 0, vy: 0, vz: 0, speedKmh: 0 });\nexport const VehicleTelemetryTrait = trait({ rpm: 0, gear: 1, throttle: 0, boost: 0, slip: 0 });\nexport const InteractableTrait = trait({ id: \"\", radius: 4, kind: \"vehicle\" as \"vehicle\" | \"prop\" });\nexport const PilotedTag = trait();\nexport const PilotLink = relation({ exclusive: true });\n\nexport type ShiftableBody = {\n handle?: number;\n translation(): { x: number; y: number; z: number };\n rotation?(): { x: number; y: number; z: number; w: number };\n setTranslation(t: { x: number; y: number; z: number }, wake: boolean): void;\n};\n\nexport interface FloatingBodyTraitData {\n id: string;\n getBody: () => ShiftableBody | null;\n}\n\nexport const FloatingBodyTrait = trait((): FloatingBodyTraitData => ({ id: \"\", getBody: () => null }));\n\nexport interface WorldSpawnData {\n vehiclePos: [number, number, number];\n vehicleRot: [number, number, number];\n actorPos: [number, number, number];\n}\n\nexport const WorldSpawnTrait = trait((): WorldSpawnData => ({\n vehiclePos: [0, 0.35, 0], vehicleRot: [0, 0, 0], actorPos: [0, 1.4, 0],\n}));\n\nexport const WorldSessionTrait = trait({\n activeRetroPreset: \"dreamcast\" as RetroPresetId,\n nearVehicleId: \"\",\n});\n\nexport const vehicleSimQuery = createQuery(VehicleTrait, TransformTrait, VelocityTrait, VehicleTelemetryTrait);\nexport const pilotedVehicleQuery = createQuery(VehicleTrait, PilotedTag);\n\nexport const kolmoWorld: World = createWorld(WorldSessionTrait);\n\nexport function useActiveKolmoWorld(): World {\n try { return useWorld(); }\n catch { return kolmoWorld; }\n}\n\nexport function ensureWorldSession(w: World): void {\n if (!w.has(WorldSessionTrait)) w.add(WorldSessionTrait);\n}\n\nexport function publishWorldSpawn(w: World, spawn: WorldSpawnData): void {\n if (!w.has(WorldSpawnTrait)) { w.add(WorldSpawnTrait(spawn)); return; }\n const cur = w.get(WorldSpawnTrait);\n if (\n !cur ||\n cur.vehiclePos[0] !== spawn.vehiclePos[0] || cur.vehiclePos[1] !== spawn.vehiclePos[1] ||\n cur.vehiclePos[2] !== spawn.vehiclePos[2] || cur.actorPos[0] !== spawn.actorPos[0] || cur.actorPos[2] !== spawn.actorPos[2]\n ) {\n w.set(WorldSpawnTrait, { vehiclePos: [...spawn.vehiclePos], vehicleRot: [...spawn.vehicleRot], actorPos: [...spawn.actorPos] });\n }\n}\n\nconst KOOTA_EID_MASK = (1 << 20) - 1;\n\n/** Zero-allocation in-place SoA array writer for TransformTrait + VelocityTrait inside `useFrame`. */\nexport function writeEntityKinematics(\n world: World,\n entity: Entity,\n pos: { x: number; y: number; z: number },\n quat: { x: number; y: number; z: number; w: number },\n linVel: { x: number; y: number; z: number },\n speedKmh: number,\n): void {\n const eid = (entity as unknown as number) & KOOTA_EID_MASK;\n if (entity.has(TransformTrait)) {\n const xf = getStore(world, TransformTrait);\n xf.x[eid] = pos.x; xf.y[eid] = pos.y; xf.z[eid] = pos.z;\n xf.qx[eid] = quat.x; xf.qy[eid] = quat.y; xf.qz[eid] = quat.z; xf.qw[eid] = quat.w;\n }\n if (entity.has(VelocityTrait)) {\n const vl = getStore(world, VelocityTrait);\n vl.vx[eid] = linVel.x; vl.vy[eid] = linVel.y; vl.vz[eid] = linVel.z;\n vl.speedKmh[eid] = speedKmh;\n }\n}\n\n/** Zero-allocation in-place SoA array writer for VehicleTelemetryTrait inside `useFrame`. */\nexport function writeVehicleTelemetry(\n world: World,\n entity: Entity,\n rpm: number,\n gear: number,\n throttle: number,\n boost: number,\n slip: number,\n): void {\n if (!entity.has(VehicleTelemetryTrait)) return;\n const eid = (entity as unknown as number) & KOOTA_EID_MASK;\n const st = getStore(world, VehicleTelemetryTrait);\n st.rpm[eid] = rpm;\n st.gear[eid] = gear;\n st.throttle[eid] = throttle;\n st.boost[eid] = boost;\n st.slip[eid] = slip;\n}\n"],"mappings":"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"}
|
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { type KhrAssetBundle } from "@khr3/core";
|
|
5
|
-
import { type KhrVehicleProps } from "@khr3/core/vehicle";
|
|
6
|
-
import type { DroneConfigType, EcctrlVehicleHandle } from "@pinkaphant/ecctrl/vehicle";
|
|
7
|
-
import { type KolmoInputGetter } from "./kolmoInput.js";
|
|
8
|
-
export interface KolmoVehicleProps {
|
|
9
|
-
id: string;
|
|
10
|
-
src?: string;
|
|
11
|
-
bundle?: KhrAssetBundle;
|
|
12
|
-
rawGlbBytes?: Uint8Array;
|
|
13
|
-
position?: [number, number, number];
|
|
14
|
-
rotation?: [number, number, number];
|
|
15
|
-
piloted?: boolean;
|
|
16
|
-
flightMode?: boolean;
|
|
17
|
-
vehicleMode?: "drive" | "rocket";
|
|
18
|
-
enable?: boolean;
|
|
19
|
-
ccd?: boolean;
|
|
20
|
-
linearDamping?: number;
|
|
21
|
-
angularDamping?: number;
|
|
22
|
-
userData?: Record<string, unknown>;
|
|
23
|
-
onCollisionEnter?: (payload: CollisionEnterPayload) => void;
|
|
24
|
-
wheelConfig?: KhrVehicleProps["wheelConfig"];
|
|
25
|
-
propellerConfig?: KhrVehicleProps["propellerConfig"];
|
|
26
|
-
carConfig?: Record<string, unknown>;
|
|
27
|
-
droneConfig?: Partial<DroneConfigType>;
|
|
28
|
-
vehicleRef?: React.RefObject<EcctrlVehicleHandle | null>;
|
|
29
|
-
getInput?: KolmoInputGetter;
|
|
30
|
-
driver?: (veh: EcctrlVehicleHandle, dt: number, state: RootState) => void;
|
|
31
|
-
cameraController?: (veh: EcctrlVehicleHandle, dt: number, state: RootState) => void;
|
|
32
|
-
children?: ReactNode;
|
|
33
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { KolmoVehicleProps } from "./kolmoVehicleConfig.js";
|
|
3
|
+
export type { KolmoVehicleProps };
|
|
34
4
|
export declare function KolmoVehicle(props: KolmoVehicleProps): React.JSX.Element | null;
|
|
@@ -1,251 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useKolmoInput as ee } from "./kolmoInput.js";
|
|
7
|
-
import { InteractableTrait as te, VehicleTrait as s, WorldSessionTrait as c, ensureWorldSession as ne, kolmoActions as l, useActiveKolmoWorld as re, useWorldTrait as u } from "./kolmoStore.js";
|
|
8
|
-
import { stepKolmoVehicleFrame as ie } from "./kolmoVehicleDriver.js";
|
|
9
|
-
import { useCallback as d, useContext as ae, useEffect as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
10
|
-
import * as oe from "three";
|
|
11
|
-
import { useFrame as se } from "@react-three/fiber";
|
|
12
|
-
import { cloneKhrBundle as ce, loadKhrGlb as _, useKhrGlb as v } from "@khr3/core";
|
|
13
|
-
import { jsx as y, jsxs as le } from "react/jsx-runtime";
|
|
14
|
-
import { useRapier as ue } from "@react-three/rapier";
|
|
15
|
-
import { KhrVehicle as b } from "@khr3/core/vehicle";
|
|
1
|
+
import { buildProceduralCarGlb } from "./kolmoProcedural.js";
|
|
2
|
+
import { KolmoVehicleInner } from "./kolmoVehicleInner.js";
|
|
3
|
+
import { useEffect, useId, useState } from "react";
|
|
4
|
+
import { loadKhrGlb, useKhrGlb } from "@khr3/core";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
6
|
// src/engine/kolmoVehicle.tsx
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
function KolmoVehicleFromUrl({ id, src, ...rest }) {
|
|
8
|
+
const bundle = useKhrGlb(src);
|
|
9
|
+
return /* @__PURE__ */ jsx(KolmoVehicleInner, {
|
|
10
|
+
...rest,
|
|
11
|
+
id,
|
|
12
|
+
sourceBundle: bundle
|
|
21
13
|
});
|
|
22
14
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
function KolmoVehicle(props) {
|
|
16
|
+
const reactId = useId();
|
|
17
|
+
const id = props.id ?? `vehicle_${reactId.replace(/:/g, "")}`;
|
|
18
|
+
const [loaded, setLoaded] = useState(null);
|
|
19
|
+
const wantsProcedural = !("src" in props) && !("bundle" in props) && !("rawGlbBytes" in props) || props.preset !== void 0;
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (props.bundle || props.src) return;
|
|
22
|
+
if (props.rawGlbBytes) {
|
|
23
|
+
let alive = true;
|
|
24
|
+
const bytes = props.rawGlbBytes;
|
|
25
|
+
loadKhrGlb(bytes).then((bundle) => {
|
|
26
|
+
if (alive) setLoaded({
|
|
27
|
+
bundle,
|
|
28
|
+
bytes
|
|
29
|
+
});
|
|
31
30
|
});
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
31
|
+
return () => {
|
|
32
|
+
alive = false;
|
|
33
|
+
};
|
|
36
34
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
ne(L);
|
|
50
|
-
}, [L]);
|
|
51
|
-
let R = u(L, c), ge = ee(me), z = m(() => ce(o), [o]), B = m(() => i(z), [z]), V = m(() => (de(z.scene), r(z.scene, g)), [z, g]);
|
|
52
|
-
p(() => fe([
|
|
53
|
-
z.scene,
|
|
54
|
-
...z.wheels.map((e) => e.object),
|
|
55
|
-
...z.propellers.map((e) => e.object)
|
|
56
|
-
]), [z]);
|
|
57
|
-
let H = !!(C === "rocket" || S || C !== "drive" && z.propellers.length > 0), U = m(() => V.sockets.find((e) => e.role === "seat" || e.role === "optic")?.localPosition ?? [
|
|
58
|
-
0,
|
|
59
|
-
.65,
|
|
60
|
-
0
|
|
61
|
-
], [V]), W = m(() => V.sockets.find((e) => e.role === "exit")?.localPosition ?? [
|
|
62
|
-
-1.55,
|
|
63
|
-
.45,
|
|
64
|
-
0
|
|
65
|
-
], [V]), G = m(() => {
|
|
66
|
-
if (k || C !== void 0) return {
|
|
67
|
-
...C === void 0 ? {} : { enable: C === "drive" },
|
|
68
|
-
...k ?? {}
|
|
69
|
-
};
|
|
70
|
-
}, [k, C]), K = m(() => {
|
|
71
|
-
if (A || C !== void 0) return {
|
|
72
|
-
...C === void 0 ? {} : { enable: C === "rocket" },
|
|
73
|
-
...A ?? {}
|
|
74
|
-
};
|
|
75
|
-
}, [A, C]), q = m(() => H ? {
|
|
76
|
-
controlMode: "VELOCITY",
|
|
77
|
-
maxHorizSpeed: 46,
|
|
78
|
-
maxVertSpeed: 16,
|
|
79
|
-
maxYawRate: 2.3,
|
|
80
|
-
maxTiltAngle: .52,
|
|
81
|
-
HORIZ_VEL_P: 1.8,
|
|
82
|
-
VERT_VEL_P: 2.8,
|
|
83
|
-
...z.droneTune ?? {},
|
|
84
|
-
...M ?? {}
|
|
85
|
-
} : M, [
|
|
86
|
-
H,
|
|
87
|
-
z.droneTune,
|
|
88
|
-
M
|
|
89
|
-
]), J = h(null), _e = h([
|
|
90
|
-
_[0],
|
|
91
|
-
_[1],
|
|
92
|
-
_[2]
|
|
93
|
-
]), Y = h(v ? [
|
|
94
|
-
v[0],
|
|
95
|
-
v[1],
|
|
96
|
-
v[2]
|
|
97
|
-
] : void 0), X = h(n()), Z = h(new oe.Vector3()), ve = h({
|
|
98
|
-
camInit: !1,
|
|
99
|
-
cockpit: !1,
|
|
100
|
-
prevCam: !1,
|
|
101
|
-
prevL: !1,
|
|
102
|
-
prevR: !1,
|
|
103
|
-
turnL: !1,
|
|
104
|
-
turnR: !1
|
|
105
|
-
}), ye = h({
|
|
106
|
-
forward: !1,
|
|
107
|
-
backward: !1,
|
|
108
|
-
steerLeft: !1,
|
|
109
|
-
steerRight: !1,
|
|
110
|
-
brake: !1,
|
|
111
|
-
throttleUp: !1,
|
|
112
|
-
throttleDown: !1,
|
|
113
|
-
yawLeft: !1,
|
|
114
|
-
yawRight: !1,
|
|
115
|
-
pitchForward: !1,
|
|
116
|
-
pitchBackward: !1,
|
|
117
|
-
rollLeft: !1,
|
|
118
|
-
rollRight: !1
|
|
119
|
-
}), Q = d((e, t) => {
|
|
120
|
-
Z.current.x -= e, Z.current.z -= t;
|
|
121
|
-
let n = J.current;
|
|
122
|
-
if (n) {
|
|
123
|
-
n.currPos.x -= e, n.currPos.z -= t;
|
|
124
|
-
for (let r of n.wheelsInfo.values()) {
|
|
125
|
-
let n = r.current;
|
|
126
|
-
n.rayPos.x -= e, n.rayPos.z -= t, n.supPos.x -= e, n.supPos.z -= t, n.rayHitPos.x -= e, n.rayHitPos.z -= t;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}, []);
|
|
130
|
-
f(() => {
|
|
131
|
-
let e = L.spawn(s({
|
|
132
|
-
id: t,
|
|
133
|
-
handle: J.current,
|
|
134
|
-
centerOfMass: [...z.centerOfMass],
|
|
135
|
-
seatOffset: U,
|
|
136
|
-
exitOffset: W,
|
|
137
|
-
isFlight: H,
|
|
138
|
-
onOriginShift: Q
|
|
139
|
-
}), te({
|
|
140
|
-
id: t,
|
|
141
|
-
radius: 4.2,
|
|
142
|
-
kind: "vehicle"
|
|
143
|
-
}));
|
|
144
|
-
return x && !L.get(c)?.activeVehicleId && l(L).boardVehicle(t), () => {
|
|
145
|
-
L.get(c)?.activeVehicleId === t && l(L).exitVehicle(), e.destroy();
|
|
35
|
+
if (!wantsProcedural) return;
|
|
36
|
+
let alive = true;
|
|
37
|
+
const resolvedPreset = props.preset ?? "coupe_86";
|
|
38
|
+
buildProceduralCarGlb(resolvedPreset, props.shadingMode ?? "dc-smooth", props.horsepower === void 0 ? void 0 : { horsepower: props.horsepower }).then(async (bytes) => {
|
|
39
|
+
const bundle = await loadKhrGlb(bytes);
|
|
40
|
+
if (alive) setLoaded({
|
|
41
|
+
bundle,
|
|
42
|
+
bytes
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
alive = false;
|
|
146
47
|
};
|
|
147
48
|
}, [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
Q
|
|
49
|
+
props.bundle,
|
|
50
|
+
props.src,
|
|
51
|
+
props.rawGlbBytes,
|
|
52
|
+
wantsProcedural,
|
|
53
|
+
props.preset,
|
|
54
|
+
props.shadingMode,
|
|
55
|
+
props.horsepower
|
|
156
56
|
]);
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
r && r.id === t && n.set(s, {
|
|
162
|
-
...r,
|
|
163
|
-
handle: e,
|
|
164
|
-
onOriginShift: Q
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
}, [
|
|
168
|
-
L,
|
|
169
|
-
t,
|
|
170
|
-
N,
|
|
171
|
-
Q
|
|
172
|
-
]), { world: $ } = ue(), xe = R?.activeVehicleId === t || x && !R?.activeVehicleId;
|
|
173
|
-
return se((e, n) => {
|
|
174
|
-
let r = $.timestep > 0 ? $.timestep : Math.min(Math.max(n, 1e-4), 1 / 30);
|
|
175
|
-
B.step(r);
|
|
176
|
-
let i = J.current;
|
|
177
|
-
i && i.body && (P ? (P(i, r, e), F && F(i, r, e)) : ie({
|
|
178
|
-
id: t,
|
|
179
|
-
veh: i,
|
|
180
|
-
keys: ge(),
|
|
181
|
-
cmd: ye.current,
|
|
182
|
-
sig: X.current,
|
|
183
|
-
st: ve.current,
|
|
184
|
-
camTarget: Z.current,
|
|
185
|
-
centerOfMass: z.centerOfMass,
|
|
186
|
-
seatOffset: U,
|
|
187
|
-
isPiloted: xe,
|
|
188
|
-
isFlight: H,
|
|
189
|
-
dt: r,
|
|
190
|
-
state: e,
|
|
191
|
-
cameraController: F
|
|
192
|
-
}));
|
|
193
|
-
}), /* @__PURE__ */ y("group", {
|
|
194
|
-
onClick: (e) => {
|
|
195
|
-
e.delta <= 5 && B.toggleHitObject(e.object) && e.stopPropagation();
|
|
196
|
-
},
|
|
197
|
-
children: /* @__PURE__ */ le(b, {
|
|
198
|
-
ref: be,
|
|
199
|
-
bundle: z,
|
|
200
|
-
position: _e.current,
|
|
201
|
-
enable: pe,
|
|
202
|
-
enableCustomGravity: I,
|
|
203
|
-
...Y.current === void 0 ? {} : { rotation: Y.current },
|
|
204
|
-
...w === void 0 ? {} : { ccd: w },
|
|
205
|
-
...T === void 0 ? {} : { linearDamping: T },
|
|
206
|
-
...E === void 0 ? {} : { angularDamping: E },
|
|
207
|
-
...D === void 0 ? {} : { userData: D },
|
|
208
|
-
...O === void 0 ? {} : { onCollisionEnter: O },
|
|
209
|
-
...G === void 0 ? {} : { wheelConfig: G },
|
|
210
|
-
...K === void 0 ? {} : { propellerConfig: K },
|
|
211
|
-
...j === void 0 ? {} : { carConfig: j },
|
|
212
|
-
...q === void 0 ? {} : { droneConfig: q },
|
|
213
|
-
children: [/* @__PURE__ */ y(a, {
|
|
214
|
-
emitters: V.emitters,
|
|
215
|
-
signalsRef: X
|
|
216
|
-
}), he]
|
|
217
|
-
})
|
|
57
|
+
if (props.bundle) return /* @__PURE__ */ jsx(KolmoVehicleInner, {
|
|
58
|
+
...props,
|
|
59
|
+
id,
|
|
60
|
+
sourceBundle: props.bundle
|
|
218
61
|
});
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
sourceBundle: v(e.src)
|
|
62
|
+
if (props.src) return /* @__PURE__ */ jsx(KolmoVehicleFromUrl, {
|
|
63
|
+
...props,
|
|
64
|
+
id,
|
|
65
|
+
src: props.src
|
|
224
66
|
});
|
|
67
|
+
if (loaded) return /* @__PURE__ */ jsx(KolmoVehicleInner, {
|
|
68
|
+
...props,
|
|
69
|
+
id,
|
|
70
|
+
sourceBundle: loaded.bundle,
|
|
71
|
+
rawGlbBytes: props.rawGlbBytes ?? loaded.bytes
|
|
72
|
+
});
|
|
73
|
+
return null;
|
|
225
74
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
if (e.bundle || e.src || !e.rawGlbBytes) return;
|
|
230
|
-
let t = !0;
|
|
231
|
-
return _(e.rawGlbBytes).then((e) => {
|
|
232
|
-
t && n(e);
|
|
233
|
-
}), () => {
|
|
234
|
-
t = !1;
|
|
235
|
-
};
|
|
236
|
-
}, [
|
|
237
|
-
e.bundle,
|
|
238
|
-
e.src,
|
|
239
|
-
e.rawGlbBytes
|
|
240
|
-
]), e.bundle ? /* @__PURE__ */ y(x, {
|
|
241
|
-
...e,
|
|
242
|
-
sourceBundle: e.bundle
|
|
243
|
-
}) : e.src ? /* @__PURE__ */ y(S, {
|
|
244
|
-
...e,
|
|
245
|
-
src: e.src
|
|
246
|
-
}) : t ? /* @__PURE__ */ y(x, {
|
|
247
|
-
...e,
|
|
248
|
-
sourceBundle: t
|
|
249
|
-
}) : null;
|
|
250
|
-
}
|
|
251
|
-
export { C as KolmoVehicle };
|
|
75
|
+
export { KolmoVehicle };
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=kolmoVehicle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kolmoVehicle.js","names":[],"sources":["../../src/engine/kolmoVehicle.tsx"],"sourcesContent":["import React, { useEffect, useId, useState } from \"react\";\nimport { loadKhrGlb, useKhrGlb, type KhrAssetBundle } from \"@khr3/core\";\nimport { buildProceduralCarGlb } from \"./kolmoProcedural.js\";\nimport type { KolmoVehicleProps } from \"./kolmoVehicleConfig.js\";\nimport { KolmoVehicleInner } from \"./kolmoVehicleInner.js\";\n\nexport type { KolmoVehicleProps };\n\nfunction KolmoVehicleFromUrl({\n id,\n src,\n ...rest\n}: Omit<KolmoVehicleProps, \"src\" | \"bundle\"> & { id: string; src: string }): React.JSX.Element {\n const bundle = useKhrGlb(src);\n return <KolmoVehicleInner {...rest} id={id} sourceBundle={bundle} />;\n}\n\nexport function KolmoVehicle(props: KolmoVehicleProps): React.JSX.Element | null {\n const reactId = useId();\n const id = props.id ?? `vehicle_${reactId.replace(/:/g, \"\")}`;\n const [loaded, setLoaded] = useState<{ bundle: KhrAssetBundle; bytes: Uint8Array } | null>(null);\n const wantsProcedural =\n (!(\"src\" in props) && !(\"bundle\" in props) && !(\"rawGlbBytes\" in props)) || props.preset !== undefined;\n\n useEffect(() => {\n if (props.bundle || props.src) return;\n if (props.rawGlbBytes) {\n let alive = true;\n const bytes = props.rawGlbBytes;\n void loadKhrGlb(bytes).then((bundle) => {\n if (alive) setLoaded({ bundle, bytes });\n });\n return () => { alive = false; };\n }\n if (!wantsProcedural) return;\n let alive = true;\n const resolvedPreset = props.preset ?? \"coupe_86\";\n void buildProceduralCarGlb(\n resolvedPreset,\n props.shadingMode ?? \"dc-smooth\",\n props.horsepower === undefined ? undefined : { horsepower: props.horsepower },\n ).then(async (bytes) => {\n const bundle = await loadKhrGlb(bytes);\n if (alive) setLoaded({ bundle, bytes });\n });\n return () => { alive = false; };\n }, [props.bundle, props.src, props.rawGlbBytes, wantsProcedural, props.preset, props.shadingMode, props.horsepower]);\n\n if (props.bundle) return <KolmoVehicleInner {...props} id={id} sourceBundle={props.bundle} />;\n if (props.src) return <KolmoVehicleFromUrl {...props} id={id} src={props.src} />;\n if (loaded) {\n return (\n <KolmoVehicleInner\n {...props}\n id={id}\n sourceBundle={loaded.bundle}\n rawGlbBytes={props.rawGlbBytes ?? loaded.bytes}\n />\n );\n }\n return null;\n}\n"],"mappings":";;;;;;AAQA,SAAS,oBAAoB,EACzB,IACA,KACA,GAAG,QACwF;CAC3F,MAAM,SAAS,UAAU,GAAG;CAC5B,OAAO,oBAAC,mBAAD;EAAmB,GAAI;EAAU;EAAI,cAAc;CAAS,CAAA;AACvE;AAEA,SAAgB,aAAa,OAAoD;CAC7E,MAAM,UAAU,MAAM;CACtB,MAAM,KAAK,MAAM,MAAM,WAAW,QAAQ,QAAQ,MAAM,EAAE;CAC1D,MAAM,CAAC,QAAQ,aAAa,SAA+D,IAAI;CAC/F,MAAM,kBACD,EAAE,SAAS,UAAU,EAAE,YAAY,UAAU,EAAE,iBAAiB,UAAW,MAAM,WAAW,KAAA;CAEjG,gBAAgB;EACZ,IAAI,MAAM,UAAU,MAAM,KAAK;EAC/B,IAAI,MAAM,aAAa;GACnB,IAAI,QAAQ;GACZ,MAAM,QAAQ,MAAM;GACpB,WAAgB,KAAK,CAAC,CAAC,MAAM,WAAW;IACpC,IAAI,OAAO,UAAU;KAAE;KAAQ;IAAM,CAAC;GAC1C,CAAC;GACD,aAAa;IAAE,QAAQ;GAAO;EAClC;EACA,IAAI,CAAC,iBAAiB;EACtB,IAAI,QAAQ;EACZ,MAAM,iBAAiB,MAAM,UAAU;EACvC,sBACI,gBACA,MAAM,eAAe,aACrB,MAAM,eAAe,KAAA,IAAY,KAAA,IAAY,EAAE,YAAY,MAAM,WAAW,CAChF,CAAC,CAAC,KAAK,OAAO,UAAU;GACpB,MAAM,SAAS,MAAM,WAAW,KAAK;GACrC,IAAI,OAAO,UAAU;IAAE;IAAQ;GAAM,CAAC;EAC1C,CAAC;EACD,aAAa;GAAE,QAAQ;EAAO;CAClC,GAAG;EAAC,MAAM;EAAQ,MAAM;EAAK,MAAM;EAAa;EAAiB,MAAM;EAAQ,MAAM;EAAa,MAAM;CAAU,CAAC;CAEnH,IAAI,MAAM,QAAQ,OAAO,oBAAC,mBAAD;EAAmB,GAAI;EAAW;EAAI,cAAc,MAAM;CAAS,CAAA;CAC5F,IAAI,MAAM,KAAK,OAAO,oBAAC,qBAAD;EAAqB,GAAI;EAAW;EAAI,KAAK,MAAM;CAAM,CAAA;CAC/E,IAAI,QACA,OACI,oBAAC,mBAAD;EACI,GAAI;EACA;EACJ,cAAc,OAAO;EACrB,aAAa,MAAM,eAAe,OAAO;CAC5C,CAAA;CAGT,OAAO;AACX"}
|