@pinkaphant/kolmo 0.3.0 → 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 +11 -5
- 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 +241 -206
- 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 +139 -249
- 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 -101
- 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 -253
- 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 +8 -13
- package/dist/engine/kolmoVehicleDriver.js +116 -42
- 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 -136
- 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 +10 -32
- package/dist/importer/ChopShopPanel.js +320 -470
- 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 -3
- package/dist/importer/GateHudBar.js +289 -284
- package/dist/importer/GateHudBar.js.map +1 -0
- package/dist/importer/GlbImportGate.d.ts +2 -1
- package/dist/importer/GlbImportGate.js +252 -261
- 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 -15
- package/dist/importer/Step1CalibrationPlinth.js +180 -313
- 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 -14
- package/dist/importer/Step2UniversalPad.js +54 -197
- 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 -32
- package/dist/importer/chopShopActions.js +138 -238
- 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 +3 -6
- package/dist/importer/gateStore.js +36 -30
- package/dist/importer/gateStore.js.map +1 -0
- package/dist/importer/glbNormalizer.d.ts +1 -10
- package/dist/importer/glbNormalizer.js +120 -146
- package/dist/importer/glbNormalizer.js.map +1 -0
- package/dist/importer/importerWebMcp.d.ts +4 -3
- package/dist/importer/importerWebMcp.js +41 -339
- 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 +6 -4
- package/dist/importer/index.js +32 -25
- 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 -41
- package/dist/importer/khrCompiler.js +56 -673
- 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 -39
- package/dist/importer/launcherBake.js.map +1 -0
- package/dist/importer/meshIslands.d.ts +4 -50
- package/dist/importer/meshIslands.js +84 -288
- 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 +5 -25
- package/dist/importer/surfaceCutter.js +70 -334
- 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 +4 -19
- package/dist/importer/surfaceTopology.js +92 -160
- package/dist/importer/surfaceTopology.js.map +1 -0
- package/dist/importer/universalGateBake.d.ts +7 -9
- package/dist/importer/universalGateBake.js +104 -109
- 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 -292
- package/dist/importer/usdToGlb.js.map +1 -0
- package/dist/importer/useChopShopController.d.ts +51 -74
- package/dist/importer/useChopShopController.js +157 -453
- 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.d.ts +1 -3
- package/dist/importer/wheelAxlePairing.js +106 -119
- 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 -69
- 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 -8
- package/dist/physics/index.js +80 -85
- 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 -247
- package/dist/importer/CabinPreviewRig.d.ts +0 -13
- package/dist/importer/CabinPreviewRig.js +0 -138
- package/dist/importer/CabinStepSection.d.ts +0 -17
- package/dist/importer/CabinStepSection.js +0 -222
- package/dist/importer/ImporterPlinthUikitTags.d.ts +0 -20
- package/dist/importer/ImporterPlinthUikitTags.js +0 -119
- package/dist/importer/cabinMeshBuilders.d.ts +0 -13
- package/dist/importer/cabinMeshBuilders.js +0 -104
- package/dist/importer/cabinMixamoRig.d.ts +0 -53
- package/dist/importer/cabinMixamoRig.js +0 -150
- package/dist/importer/chopShopUiComponents.d.ts +0 -22
- package/dist/importer/chopShopUiComponents.js +0 -91
- package/dist/importer/vehiclePanelAnim.js +0 -214
package/package.json
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinkaphant/kolmo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Low-overhead retro 3D game runtime: declarative React Three Fiber world & vehicle engine, C12 road/island/long-drive generator, PS1/Dreamcast/PS2 retro shader stack, and GLB import calibration gate.",
|
|
4
5
|
"license": "MIT",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"sideEffects": false,
|
|
7
|
-
"description": "Kolmo 3D Game Engine (ecctrl 2 + khr3) & Universal KHR3 GLB/USD Gate",
|
|
8
|
-
"main": "./dist/index.js",
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
8
|
"bin": {
|
|
11
9
|
"kolmo": "./bin/kolmo.mjs"
|
|
12
10
|
},
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"import": "./dist/index.js"
|
|
17
17
|
},
|
|
18
|
+
"./all": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
},
|
|
18
22
|
"./physics": {
|
|
19
23
|
"types": "./dist/physics/index.d.ts",
|
|
20
24
|
"import": "./dist/physics/index.js"
|
|
@@ -47,14 +51,15 @@
|
|
|
47
51
|
"types": "./dist/junk/index.d.ts",
|
|
48
52
|
"import": "./dist/junk/index.js"
|
|
49
53
|
},
|
|
50
|
-
"./
|
|
51
|
-
"types": "./dist/
|
|
52
|
-
"import": "./dist/
|
|
54
|
+
"./schema": {
|
|
55
|
+
"types": "./dist/schema/kolmoSchema.d.ts",
|
|
56
|
+
"import": "./dist/schema/kolmoSchema.js"
|
|
53
57
|
},
|
|
54
58
|
"./package.json": "./package.json"
|
|
55
59
|
},
|
|
56
60
|
"files": [
|
|
57
61
|
"dist",
|
|
62
|
+
"docs",
|
|
58
63
|
"bin",
|
|
59
64
|
"LICENSE",
|
|
60
65
|
"README.md"
|
|
@@ -64,57 +69,78 @@
|
|
|
64
69
|
},
|
|
65
70
|
"scripts": {
|
|
66
71
|
"dev": "vite",
|
|
72
|
+
"example": "tsx example/headless.ts",
|
|
67
73
|
"typecheck": "tsc --noEmit",
|
|
68
|
-
"
|
|
74
|
+
"test": "node --import tsx --test \"src/**/*.test.ts*\"",
|
|
69
75
|
"build:lib": "rm -rf dist && vite build -c vite.lib.config.ts && tsc -p tsconfig.lib.json",
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
"prepack": "npm run build:lib >&2",
|
|
77
|
+
"pack:dry": "npm pack --dry-run"
|
|
78
|
+
},
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"@khr3/assets": "^0.2.4",
|
|
81
|
+
"@khr3/c12": "^0.3.4",
|
|
82
|
+
"@khr3/core": "^0.2.0",
|
|
83
|
+
"@khr3/launchers": "^0.2.5",
|
|
84
|
+
"@khr3/vehicles": "^0.2.0"
|
|
85
|
+
},
|
|
86
|
+
"overrides": {
|
|
87
|
+
"@dimforge/rapier3d-compat": "0.19.2",
|
|
88
|
+
"@pinkaphant/ecctrl": "2.0.4-beta.2"
|
|
74
89
|
},
|
|
75
90
|
"peerDependencies": {
|
|
76
91
|
"@dimforge/rapier3d-compat": "0.19.2",
|
|
77
92
|
"@pinkaphant/ecctrl": "2.0.4-beta.2",
|
|
78
|
-
"@react-three/drei": ">=10.7.0",
|
|
79
|
-
"@react-three/fiber": ">=9.6.0",
|
|
80
|
-
"@react-three/rapier": "^2.2.0",
|
|
81
|
-
"koota": ">=0.6.5",
|
|
82
|
-
"react": ">=19.0.0",
|
|
83
|
-
"react-dom": ">=19.0.0",
|
|
84
|
-
"three": ">=0.184.0"
|
|
85
|
-
},
|
|
86
|
-
"dependencies": {
|
|
87
|
-
"@khr3/assets": "^0.2.2",
|
|
88
|
-
"@khr3/c12": "^0.3.1",
|
|
89
|
-
"@khr3/core": "^0.1.4",
|
|
90
|
-
"@khr3/launchers": "^0.2.2",
|
|
91
|
-
"@khr3/vehicles": "^0.1.4",
|
|
92
93
|
"@pmndrs/uikit": "^1.0.78",
|
|
93
94
|
"@preact/signals-core": "^1.14.5",
|
|
95
|
+
"@react-three/drei": "^10.7.7",
|
|
96
|
+
"@react-three/fiber": "^9.0.0",
|
|
97
|
+
"@react-three/rapier": "^2.2.0",
|
|
94
98
|
"@react-three/uikit": "^1.0.78",
|
|
95
|
-
"
|
|
96
|
-
"
|
|
99
|
+
"koota": "^0.6.5",
|
|
100
|
+
"react": "^19.0.0",
|
|
101
|
+
"react-dom": "^19.0.0",
|
|
102
|
+
"three": ">=0.180.0",
|
|
103
|
+
"zustand": "^5.0.0"
|
|
97
104
|
},
|
|
98
105
|
"devDependencies": {
|
|
99
106
|
"@dimforge/rapier3d-compat": "0.19.2",
|
|
100
107
|
"@pinkaphant/ecctrl": "2.0.4-beta.2",
|
|
108
|
+
"@pmndrs/uikit": "^1.0.78",
|
|
109
|
+
"@preact/signals-core": "^1.14.5",
|
|
101
110
|
"@react-three/drei": "^10.7.7",
|
|
102
111
|
"@react-three/fiber": "^9.6.1",
|
|
103
112
|
"@react-three/rapier": "^2.2.0",
|
|
104
|
-
"@react-three/
|
|
113
|
+
"@react-three/uikit": "^1.0.78",
|
|
105
114
|
"@types/node": "^22.20.5",
|
|
106
115
|
"@types/react": "^19.2.16",
|
|
107
116
|
"@types/react-dom": "^19.2.3",
|
|
108
117
|
"@types/three": "^0.184.0",
|
|
109
118
|
"@vitejs/plugin-react": "^6.1.1",
|
|
110
119
|
"koota": "^0.6.5",
|
|
111
|
-
"partyserver": "^0.5.10",
|
|
112
|
-
"partysocket": "^1.3.0",
|
|
113
120
|
"react": "^19.2.7",
|
|
114
121
|
"react-dom": "^19.2.7",
|
|
115
122
|
"three": "^0.184.0",
|
|
116
123
|
"tsx": "^4.23.15",
|
|
117
124
|
"typescript": "^6.0.3",
|
|
118
|
-
"vite": "^8.3.8"
|
|
125
|
+
"vite": "^8.3.8",
|
|
126
|
+
"wrangler": "^4.164.0",
|
|
127
|
+
"zustand": "^5.0.14"
|
|
128
|
+
},
|
|
129
|
+
"keywords": [
|
|
130
|
+
"threejs",
|
|
131
|
+
"react-three-fiber",
|
|
132
|
+
"rapier",
|
|
133
|
+
"ecctrl",
|
|
134
|
+
"khr3",
|
|
135
|
+
"retro",
|
|
136
|
+
"game-engine"
|
|
137
|
+
],
|
|
138
|
+
"repository": {
|
|
139
|
+
"type": "git",
|
|
140
|
+
"url": "git+https://github.com/pinkAphant/kolmo.git"
|
|
141
|
+
},
|
|
142
|
+
"homepage": "https://github.com/pinkAphant/kolmo#readme",
|
|
143
|
+
"bugs": {
|
|
144
|
+
"url": "https://github.com/pinkAphant/kolmo/issues"
|
|
119
145
|
}
|
|
120
146
|
}
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import { syncRetroUniforms as e } from "../shaders/retroShader.js";
|
|
2
|
-
import { useEffect as t, useReducer as n, useRef as r } from "react";
|
|
3
|
-
import * as i from "three";
|
|
4
|
-
import { useWorld as a } from "koota/react";
|
|
5
|
-
import { createActions as o, createWorld as s, relation as c, trait as l } from "koota";
|
|
6
|
-
// src/engine/kolmoStore.ts
|
|
7
|
-
var u = /* @__PURE__ */ new WeakMap(), d = (e, t) => {
|
|
8
|
-
u.set(e, t);
|
|
9
|
-
}, f = (e) => u.get(e) ?? null, p = Object.freeze({
|
|
10
|
-
forward: !1,
|
|
11
|
-
backward: !1,
|
|
12
|
-
steerLeft: !1,
|
|
13
|
-
steerRight: !1,
|
|
14
|
-
brake: !1,
|
|
15
|
-
throttleUp: !1,
|
|
16
|
-
throttleDown: !1,
|
|
17
|
-
yawLeft: !1,
|
|
18
|
-
yawRight: !1,
|
|
19
|
-
pitchForward: !1,
|
|
20
|
-
pitchBackward: !1,
|
|
21
|
-
rollLeft: !1,
|
|
22
|
-
rollRight: !1,
|
|
23
|
-
joystickL: Object.freeze({
|
|
24
|
-
x: 0,
|
|
25
|
-
y: 0
|
|
26
|
-
}),
|
|
27
|
-
joystickR: Object.freeze({
|
|
28
|
-
x: 0,
|
|
29
|
-
y: 0
|
|
30
|
-
})
|
|
31
|
-
}), m = Object.freeze({
|
|
32
|
-
...p,
|
|
33
|
-
brake: !0
|
|
34
|
-
}), h = l(() => ({
|
|
35
|
-
id: "",
|
|
36
|
-
handle: null,
|
|
37
|
-
centerOfMass: [
|
|
38
|
-
0,
|
|
39
|
-
0,
|
|
40
|
-
0
|
|
41
|
-
],
|
|
42
|
-
seatOffset: [
|
|
43
|
-
0,
|
|
44
|
-
.55,
|
|
45
|
-
0
|
|
46
|
-
],
|
|
47
|
-
exitOffset: [
|
|
48
|
-
-1.5,
|
|
49
|
-
.45,
|
|
50
|
-
0
|
|
51
|
-
],
|
|
52
|
-
isFlight: !1
|
|
53
|
-
})), g = l(() => ({
|
|
54
|
-
id: "pilot",
|
|
55
|
-
handle: null,
|
|
56
|
-
exitSpawnPos: null,
|
|
57
|
-
exitSpawnYaw: 0,
|
|
58
|
-
exitSpawnRot: null,
|
|
59
|
-
exitLinVel: null
|
|
60
|
-
})), _ = l({
|
|
61
|
-
id: "",
|
|
62
|
-
radius: 4,
|
|
63
|
-
kind: "vehicle"
|
|
64
|
-
}), v = l(() => ({
|
|
65
|
-
id: "",
|
|
66
|
-
getBody: () => null
|
|
67
|
-
})), y = c({ exclusive: !0 }), b = l({
|
|
68
|
-
activeVehicleId: "",
|
|
69
|
-
activeRetroPreset: "dreamcast"
|
|
70
|
-
}), x = s(b);
|
|
71
|
-
function S() {
|
|
72
|
-
try {
|
|
73
|
-
return a();
|
|
74
|
-
} catch {
|
|
75
|
-
return x;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
function C(e) {
|
|
79
|
-
e.has(b) || e.add(b);
|
|
80
|
-
}
|
|
81
|
-
function w(e, i) {
|
|
82
|
-
let [, a] = n((e) => e + 1, 0), o = r(e && e.has(i) ? e.get(i) : void 0);
|
|
83
|
-
return o.current = e && e.has(i) ? e.get(i) : void 0, t(() => {
|
|
84
|
-
if (!e) return;
|
|
85
|
-
let t = () => {
|
|
86
|
-
o.current = e.has(i) ? e.get(i) : void 0, a();
|
|
87
|
-
}, n = e.onAdd(i, t), r = e.onChange(i, t), s = e.onRemove(i, t);
|
|
88
|
-
return (e.has(i) ? e.get(i) : void 0) !== o.current && t(), () => {
|
|
89
|
-
n(), r(), s();
|
|
90
|
-
};
|
|
91
|
-
}, [e, i]), o.current;
|
|
92
|
-
}
|
|
93
|
-
function T(e, t, n) {
|
|
94
|
-
let r = (e, t) => n ? (n[0] = e, n[1] = t, n) : [e, t], i = e.has(b) ? e.get(b)?.activeVehicleId : "";
|
|
95
|
-
if (i) for (let t of e.query(h)) {
|
|
96
|
-
let e = t.get(h);
|
|
97
|
-
if (e?.id === i && e.handle?.body) {
|
|
98
|
-
let t = e.handle.body.translation();
|
|
99
|
-
return r(t.x, t.z);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
for (let t of e.query(g)) {
|
|
103
|
-
let e = t.get(g)?.handle?.body;
|
|
104
|
-
if (e) {
|
|
105
|
-
let t = e.translation();
|
|
106
|
-
return r(t.x, t.z);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
for (let t of e.query(h)) {
|
|
110
|
-
let e = t.get(h)?.handle?.body;
|
|
111
|
-
if (e) {
|
|
112
|
-
let t = e.translation();
|
|
113
|
-
return r(t.x, t.z);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return r(t?.position.x ?? 0, t?.position.z ?? 0);
|
|
117
|
-
}
|
|
118
|
-
var E = new i.Vector3(), D = new i.Quaternion(), O = new i.Matrix4(), k = new i.Vector3(), A = new i.Quaternion(), j = new i.Vector3();
|
|
119
|
-
function M(e, t, n, r) {
|
|
120
|
-
let i = e.translation(), a = i.x - t, o = i.z - n;
|
|
121
|
-
if (e.setTranslation({
|
|
122
|
-
x: a,
|
|
123
|
-
y: i.y,
|
|
124
|
-
z: o
|
|
125
|
-
}, !0), !r?.rigidBodyStates || typeof e.handle != "number") return;
|
|
126
|
-
let s = r.rigidBodyStates.get(e.handle);
|
|
127
|
-
if (!s || s.meshType === "instancedMesh") return;
|
|
128
|
-
let c = typeof e.rotation == "function" ? e.rotation() : null;
|
|
129
|
-
E.set(a, i.y, o), c ? D.set(c.x, c.y, c.z, c.w) : D.identity(), O.compose(E, D, s.scale).premultiply(s.invertedWorldMatrix).decompose(k, A, j), s.object.position.copy(k), c && s.object.quaternion.copy(A), s.object.updateMatrixWorld(!0);
|
|
130
|
-
}
|
|
131
|
-
function N(e, t, n, r, i) {
|
|
132
|
-
t && (t.position.x -= n, t.position.z -= r);
|
|
133
|
-
for (let t of e.query(h)) {
|
|
134
|
-
let e = t.get(h), a = e?.handle?.body;
|
|
135
|
-
a && M(a, n, r, i), e?.onOriginShift?.(n, r);
|
|
136
|
-
}
|
|
137
|
-
for (let t of e.query(g)) {
|
|
138
|
-
let e = t.get(g), a = e?.handle?.body;
|
|
139
|
-
a && M(a, n, r, i), e?.exitSpawnPos && t.set(g, {
|
|
140
|
-
...e,
|
|
141
|
-
exitSpawnPos: [
|
|
142
|
-
e.exitSpawnPos[0] - n,
|
|
143
|
-
e.exitSpawnPos[1],
|
|
144
|
-
e.exitSpawnPos[2] - r
|
|
145
|
-
]
|
|
146
|
-
}), e?.onOriginShift?.(n, r);
|
|
147
|
-
}
|
|
148
|
-
for (let t of e.query(v)) {
|
|
149
|
-
let e = t.get(v)?.getBody();
|
|
150
|
-
e && M(e, n, r, i);
|
|
151
|
-
}
|
|
152
|
-
if (i?.world) {
|
|
153
|
-
let e = i.world;
|
|
154
|
-
e.propagateModifiedBodyPositionsToColliders();
|
|
155
|
-
let t = e.timestep;
|
|
156
|
-
e.timestep = 0, e.step(), e.timestep = t;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
var P = {
|
|
160
|
-
speedKmh: 0,
|
|
161
|
-
rpm: 0,
|
|
162
|
-
gear: 1,
|
|
163
|
-
throttle: 0,
|
|
164
|
-
boost: 0,
|
|
165
|
-
mode: "foot",
|
|
166
|
-
activeVehicleId: null,
|
|
167
|
-
activeRetroPreset: "dreamcast",
|
|
168
|
-
nearVehicleId: null
|
|
169
|
-
}, F = new i.Vector3(), I = new i.Vector3(), L = new i.Vector3(), R = new i.Vector3(), z = new i.Matrix4(), B = new i.Euler();
|
|
170
|
-
function V(e) {
|
|
171
|
-
e.handle && e.handle.setMovement(e.handle.wheelsInfo.size > 0 && !e.isFlight ? m : p);
|
|
172
|
-
}
|
|
173
|
-
var H = o((t) => ({
|
|
174
|
-
boardVehicle: (e) => {
|
|
175
|
-
C(t);
|
|
176
|
-
let n = t.get(b), r = n?.activeVehicleId || "", i = t.queryFirst(g);
|
|
177
|
-
for (let n of t.query(h)) {
|
|
178
|
-
let t = n.get(h);
|
|
179
|
-
t && (r && r !== e && t.id === r && V(t), t.id === e && i && i.add(y(n)));
|
|
180
|
-
}
|
|
181
|
-
t.set(b, {
|
|
182
|
-
activeVehicleId: e,
|
|
183
|
-
activeRetroPreset: n?.activeRetroPreset ?? "dreamcast"
|
|
184
|
-
}), P.activeVehicleId = e, P.nearVehicleId = null;
|
|
185
|
-
},
|
|
186
|
-
exitVehicle: () => {
|
|
187
|
-
C(t);
|
|
188
|
-
let e = t.get(b), n = e?.activeVehicleId || "", r = t.queryFirst(g);
|
|
189
|
-
for (let e of t.query(h)) {
|
|
190
|
-
let t = e.get(h);
|
|
191
|
-
if (t && n && t.id === n) {
|
|
192
|
-
if (r && (r.has(y(e)) && r.remove(y(e)), t.handle)) {
|
|
193
|
-
F.set(t.exitOffset[0] - t.centerOfMass[0], t.exitOffset[1] - t.centerOfMass[1], t.exitOffset[2] - t.centerOfMass[2]).applyQuaternion(t.handle.currQuat).add(t.handle.currPos), I.copy(t.handle.upAxis), I.lengthSq() < 1e-6 ? I.set(0, 1, 0) : I.normalize(), L.copy(t.handle.bodyZAxis).projectOnPlane(I);
|
|
194
|
-
let e = 0, n = [
|
|
195
|
-
0,
|
|
196
|
-
0,
|
|
197
|
-
0
|
|
198
|
-
];
|
|
199
|
-
L.lengthSq() > 1e-6 && (L.normalize(), e = Math.atan2(L.x, L.z), R.crossVectors(I, L).normalize(), z.makeBasis(R, I, L), B.setFromRotationMatrix(z, "YXZ"), n = [
|
|
200
|
-
B.x,
|
|
201
|
-
B.y,
|
|
202
|
-
B.z
|
|
203
|
-
]);
|
|
204
|
-
let i = t.handle.currLinVel, a = r.get(g);
|
|
205
|
-
r.set(g, {
|
|
206
|
-
id: a?.id ?? "pilot",
|
|
207
|
-
handle: null,
|
|
208
|
-
exitSpawnPos: [
|
|
209
|
-
F.x,
|
|
210
|
-
F.y,
|
|
211
|
-
F.z
|
|
212
|
-
],
|
|
213
|
-
exitSpawnYaw: e,
|
|
214
|
-
exitSpawnRot: n,
|
|
215
|
-
exitLinVel: [
|
|
216
|
-
i.x,
|
|
217
|
-
i.y,
|
|
218
|
-
i.z
|
|
219
|
-
],
|
|
220
|
-
onOriginShift: a?.onOriginShift
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
V(t);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
t.set(b, {
|
|
227
|
-
activeVehicleId: "",
|
|
228
|
-
activeRetroPreset: e?.activeRetroPreset ?? "dreamcast"
|
|
229
|
-
}), Object.assign(P, {
|
|
230
|
-
activeVehicleId: null,
|
|
231
|
-
mode: "foot",
|
|
232
|
-
speedKmh: 0,
|
|
233
|
-
rpm: 0,
|
|
234
|
-
throttle: 0,
|
|
235
|
-
boost: 0
|
|
236
|
-
});
|
|
237
|
-
},
|
|
238
|
-
setRetroPreset: (n) => {
|
|
239
|
-
C(t), e(n);
|
|
240
|
-
let r = t.get(b);
|
|
241
|
-
t.set(b, {
|
|
242
|
-
activeVehicleId: r?.activeVehicleId ?? "",
|
|
243
|
-
activeRetroPreset: n
|
|
244
|
-
}), P.activeRetroPreset = n;
|
|
245
|
-
}
|
|
246
|
-
}));
|
|
247
|
-
export { g as ActorTrait, v as FloatingBodyTrait, _ as InteractableTrait, y as PilotLink, h as VehicleTrait, b as WorldSessionTrait, C as ensureWorldSession, f as getWorldCameraControls, H as kolmoActions, P as kolmoTelemetry, x as kolmoWorld, T as readFloatingOriginAnchorXZ, d as setWorldCameraControls, N as shiftFloatingOriginEntities, S as useActiveKolmoWorld, w as useWorldTrait };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type CarCabinConfig } from "./cabinMixamoRig.js";
|
|
3
|
-
export interface CabinPreviewRigProps {
|
|
4
|
-
readonly cabin: CarCabinConfig;
|
|
5
|
-
readonly carBounds: {
|
|
6
|
-
readonly min: readonly [number, number, number];
|
|
7
|
-
readonly max: readonly [number, number, number];
|
|
8
|
-
};
|
|
9
|
-
readonly showTub?: boolean;
|
|
10
|
-
readonly showDummy?: boolean;
|
|
11
|
-
readonly showSockets?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare function CabinPreviewRig({ cabin, carBounds, showTub, showDummy, showSockets, }: CabinPreviewRigProps): React.JSX.Element | null;
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { buildCabinTubGroup as e, buildMixamoSeatedDummyGroup as t, disposeObjectTree as n } from "./cabinMeshBuilders.js";
|
|
2
|
-
import { computeMixamoCabinPoints as r, evaluateCabinFit as i } from "./cabinMixamoRig.js";
|
|
3
|
-
import { useEffect as a, useMemo as o } from "react";
|
|
4
|
-
import * as s from "three";
|
|
5
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
-
// src/importer/CabinPreviewRig.tsx
|
|
7
|
-
function u(e) {
|
|
8
|
-
e.traverse((e) => {
|
|
9
|
-
e instanceof s.Mesh && (e.raycast = () => null);
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
function d({ cabin: d, carBounds: f, showTub: p = !0, showDummy: m = !0, showSockets: h = !1 }) {
|
|
13
|
-
let g = o(() => {
|
|
14
|
-
if (!p || !d.enabled || !d.includeInteriorTub) return null;
|
|
15
|
-
let t = e(d, f.min, f.max);
|
|
16
|
-
return u(t), t;
|
|
17
|
-
}, [
|
|
18
|
-
p,
|
|
19
|
-
d,
|
|
20
|
-
f
|
|
21
|
-
]), _ = o(() => {
|
|
22
|
-
if (!m || !d.enabled) return null;
|
|
23
|
-
let e = t(d, f.min, f.max);
|
|
24
|
-
return u(e), e;
|
|
25
|
-
}, [
|
|
26
|
-
m,
|
|
27
|
-
d,
|
|
28
|
-
f
|
|
29
|
-
]);
|
|
30
|
-
a(() => () => {
|
|
31
|
-
g && n(g);
|
|
32
|
-
}, [g]), a(() => () => {
|
|
33
|
-
_ && n(_);
|
|
34
|
-
}, [_]);
|
|
35
|
-
let v = o(() => {
|
|
36
|
-
if (!h || !d.enabled) return null;
|
|
37
|
-
let e = r(d, f.min, f.max);
|
|
38
|
-
return {
|
|
39
|
-
fit: i(d, f.min, f.max),
|
|
40
|
-
crown: e.crown,
|
|
41
|
-
dots: [
|
|
42
|
-
{
|
|
43
|
-
key: "seat",
|
|
44
|
-
pos: e.hips,
|
|
45
|
-
color: "#10B981",
|
|
46
|
-
r: .045
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
key: "optic",
|
|
50
|
-
pos: e.eye,
|
|
51
|
-
color: "#00E5FF",
|
|
52
|
-
r: .036
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
key: "exit",
|
|
56
|
-
pos: e.exit,
|
|
57
|
-
color: "#FFB000",
|
|
58
|
-
r: .055
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
key: "handL",
|
|
62
|
-
pos: e.handL,
|
|
63
|
-
color: "#FACC15",
|
|
64
|
-
r: .032
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
key: "handR",
|
|
68
|
-
pos: e.handR,
|
|
69
|
-
color: "#FACC15",
|
|
70
|
-
r: .032
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
key: "footL",
|
|
74
|
-
pos: e.footL,
|
|
75
|
-
color: "#A855F7",
|
|
76
|
-
r: .032
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
key: "footR",
|
|
80
|
-
pos: e.footR,
|
|
81
|
-
color: "#A855F7",
|
|
82
|
-
r: .032
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
};
|
|
86
|
-
}, [
|
|
87
|
-
h,
|
|
88
|
-
d,
|
|
89
|
-
f
|
|
90
|
-
]);
|
|
91
|
-
return !g && !_ && !v ? null : /* @__PURE__ */ l("group", {
|
|
92
|
-
name: "CabinPreviewRig",
|
|
93
|
-
children: [
|
|
94
|
-
g && /* @__PURE__ */ c("primitive", { object: g }),
|
|
95
|
-
_ && /* @__PURE__ */ c("primitive", { object: _ }),
|
|
96
|
-
v && /* @__PURE__ */ l("group", { children: [v.dots.map((e) => /* @__PURE__ */ l("mesh", {
|
|
97
|
-
position: [
|
|
98
|
-
e.pos[0],
|
|
99
|
-
e.pos[1],
|
|
100
|
-
e.pos[2]
|
|
101
|
-
],
|
|
102
|
-
raycast: () => null,
|
|
103
|
-
children: [/* @__PURE__ */ c("sphereGeometry", { args: [
|
|
104
|
-
e.r,
|
|
105
|
-
10,
|
|
106
|
-
8
|
|
107
|
-
] }), /* @__PURE__ */ c("meshBasicMaterial", {
|
|
108
|
-
color: e.color,
|
|
109
|
-
depthTest: !1,
|
|
110
|
-
transparent: !0,
|
|
111
|
-
opacity: .92
|
|
112
|
-
})]
|
|
113
|
-
}, e.key)), /* @__PURE__ */ l("mesh", {
|
|
114
|
-
position: [
|
|
115
|
-
v.crown[0],
|
|
116
|
-
v.crown[1] + .02,
|
|
117
|
-
v.crown[2]
|
|
118
|
-
],
|
|
119
|
-
rotation: [
|
|
120
|
-
Math.PI * .5,
|
|
121
|
-
0,
|
|
122
|
-
0
|
|
123
|
-
],
|
|
124
|
-
raycast: () => null,
|
|
125
|
-
children: [/* @__PURE__ */ c("ringGeometry", { args: [
|
|
126
|
-
.11,
|
|
127
|
-
.14,
|
|
128
|
-
16
|
|
129
|
-
] }), /* @__PURE__ */ c("meshBasicMaterial", {
|
|
130
|
-
color: v.fit.headroomOk ? "#10B981" : "#F43F5E",
|
|
131
|
-
side: s.DoubleSide,
|
|
132
|
-
depthTest: !1
|
|
133
|
-
})]
|
|
134
|
-
})] })
|
|
135
|
-
]
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
export { d as CabinPreviewRig };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { CabinFitReport, CarCabinConfig, DriverSeatLayout, ShellViewMode } from "./cabinMixamoRig.js";
|
|
3
|
-
export interface CabinStepSectionProps {
|
|
4
|
-
readonly shellViewMode: ShellViewMode;
|
|
5
|
-
readonly onChangeShellViewMode: (m: ShellViewMode) => void;
|
|
6
|
-
readonly cabin: CarCabinConfig;
|
|
7
|
-
readonly cabinFit: CabinFitReport;
|
|
8
|
-
readonly carBounds: {
|
|
9
|
-
readonly min: readonly [number, number, number];
|
|
10
|
-
readonly max: readonly [number, number, number];
|
|
11
|
-
};
|
|
12
|
-
readonly onUpdateCabin: (patch: Partial<CarCabinConfig>) => void;
|
|
13
|
-
readonly onSetCabinLayout: (layout: DriverSeatLayout) => void;
|
|
14
|
-
readonly onAutoFitCabin: () => void;
|
|
15
|
-
readonly onNextDrive: () => void;
|
|
16
|
-
}
|
|
17
|
-
export declare function CabinStepSection(p: CabinStepSectionProps): React.JSX.Element;
|