@pinkaphant/kolmo 0.3.0 → 0.4.1
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 -8
- 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 +125 -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 +254 -262
- 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 +142 -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 +18 -0
- package/dist/importer/chopShopIoActions.js +161 -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 +176 -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 +39 -0
- package/dist/importer/khrCarPlanHelpers.js +310 -0
- package/dist/importer/khrCarPlanHelpers.js.map +1 -0
- package/dist/importer/khrCarPlanner.d.ts +8 -0
- package/dist/importer/khrCarPlanner.js +315 -0
- package/dist/importer/khrCarPlanner.js.map +1 -0
- package/dist/importer/khrCompiler.d.ts +4 -41
- package/dist/importer/khrCompiler.js +79 -673
- package/dist/importer/khrCompiler.js.map +1 -0
- package/dist/importer/khrCraftPropCompiler.d.ts +45 -0
- package/dist/importer/khrCraftPropCompiler.js +263 -0
- package/dist/importer/khrCraftPropCompiler.js.map +1 -0
- package/dist/importer/khrNodeNameGuard.d.ts +20 -0
- package/dist/importer/khrNodeNameGuard.js +139 -0
- package/dist/importer/khrNodeNameGuard.js.map +1 -0
- package/dist/importer/launcherBake.js +99 -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 +145 -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 +117 -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 +161 -453
- package/dist/importer/useChopShopController.js.map +1 -0
- package/dist/importer/useChopShopState.d.ts +103 -0
- package/dist/importer/useChopShopState.js +324 -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 +183 -0
- package/dist/importer/vehiclePartSplit.js.map +1 -0
- package/dist/importer/wheelAxlePairing.d.ts +4 -3
- package/dist/importer/wheelAxlePairing.js +128 -122
- 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 +11 -0
- package/dist/schema/kolmoStamp.js +119 -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.d.ts +1 -1
- package/dist/vite/index.js +38 -32
- 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 +190 -0
- package/package.json +54 -34
- 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
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { PillBtn as e, S_SEC as t, SliderRow as n } from "./chopShopUiComponents.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
-
// src/importer/CabinStepSection.tsx
|
|
5
|
-
function o(o) {
|
|
6
|
-
let s = (e) => `${e >= 0 ? "+" : ""}${Math.round(e * 100)}cm`, [c, l, u] = o.carBounds.min, [d, f, p] = o.carBounds.max, m = (e, t) => {
|
|
7
|
-
let n = [
|
|
8
|
-
o.cabin.seatPos[0],
|
|
9
|
-
o.cabin.seatPos[1],
|
|
10
|
-
o.cabin.seatPos[2]
|
|
11
|
-
];
|
|
12
|
-
n[e] = Number(t.toFixed(3)), o.onUpdateCabin({ seatPos: n });
|
|
13
|
-
};
|
|
14
|
-
return /* @__PURE__ */ a(r, { children: [
|
|
15
|
-
/* @__PURE__ */ a("div", {
|
|
16
|
-
style: t,
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */ a("div", {
|
|
19
|
-
style: {
|
|
20
|
-
display: "flex",
|
|
21
|
-
justifyContent: "space-between",
|
|
22
|
-
alignItems: "center"
|
|
23
|
-
},
|
|
24
|
-
children: [/* @__PURE__ */ i("span", {
|
|
25
|
-
style: {
|
|
26
|
-
fontSize: 10,
|
|
27
|
-
color: "#94A3B8"
|
|
28
|
-
},
|
|
29
|
-
children: "SEE INSIDE SHELL"
|
|
30
|
-
}), /* @__PURE__ */ i(e, {
|
|
31
|
-
label: "Auto-Fit",
|
|
32
|
-
color: "#10B981",
|
|
33
|
-
onClick: o.onAutoFitCabin
|
|
34
|
-
})]
|
|
35
|
-
}),
|
|
36
|
-
/* @__PURE__ */ i("div", {
|
|
37
|
-
style: {
|
|
38
|
-
display: "grid",
|
|
39
|
-
gridTemplateColumns: "repeat(3, 1fr)",
|
|
40
|
-
gap: 4
|
|
41
|
-
},
|
|
42
|
-
children: [
|
|
43
|
-
["solid", "Solid"],
|
|
44
|
-
["xray", "X-Ray"],
|
|
45
|
-
["cutaway", "Cutaway"]
|
|
46
|
-
].map(([t, n]) => /* @__PURE__ */ i(e, {
|
|
47
|
-
label: n,
|
|
48
|
-
active: o.shellViewMode === t,
|
|
49
|
-
color: "#00E5FF",
|
|
50
|
-
center: !0,
|
|
51
|
-
onClick: () => o.onChangeShellViewMode(t)
|
|
52
|
-
}, t))
|
|
53
|
-
}),
|
|
54
|
-
/* @__PURE__ */ a("label", {
|
|
55
|
-
style: {
|
|
56
|
-
display: "flex",
|
|
57
|
-
alignItems: "center",
|
|
58
|
-
gap: 6,
|
|
59
|
-
fontSize: 10.5,
|
|
60
|
-
cursor: "pointer"
|
|
61
|
-
},
|
|
62
|
-
children: [/* @__PURE__ */ i("input", {
|
|
63
|
-
type: "checkbox",
|
|
64
|
-
checked: o.cabin.enabled,
|
|
65
|
-
onChange: (e) => o.onUpdateCabin({ enabled: e.target.checked }),
|
|
66
|
-
style: { accentColor: "#10B981" }
|
|
67
|
-
}), /* @__PURE__ */ i("span", { children: "Enable Mixamo Driver Seat & IK Sockets" })]
|
|
68
|
-
})
|
|
69
|
-
]
|
|
70
|
-
}),
|
|
71
|
-
o.cabin.enabled && /* @__PURE__ */ a("div", {
|
|
72
|
-
style: t,
|
|
73
|
-
children: [
|
|
74
|
-
/* @__PURE__ */ i("div", {
|
|
75
|
-
style: {
|
|
76
|
-
display: "grid",
|
|
77
|
-
gridTemplateColumns: "repeat(3, 1fr)",
|
|
78
|
-
gap: 4
|
|
79
|
-
},
|
|
80
|
-
children: [
|
|
81
|
-
["lhd", "LHD (Left)"],
|
|
82
|
-
["center", "Center"],
|
|
83
|
-
["rhd", "RHD (Right)"]
|
|
84
|
-
].map(([t, n]) => /* @__PURE__ */ i(e, {
|
|
85
|
-
label: n,
|
|
86
|
-
active: o.cabin.layout === t,
|
|
87
|
-
color: "#FFB000",
|
|
88
|
-
center: !0,
|
|
89
|
-
onClick: () => o.onSetCabinLayout(t)
|
|
90
|
-
}, t))
|
|
91
|
-
}),
|
|
92
|
-
/* @__PURE__ */ a("div", {
|
|
93
|
-
style: {
|
|
94
|
-
display: "flex",
|
|
95
|
-
gap: 6,
|
|
96
|
-
fontSize: 10,
|
|
97
|
-
padding: "4px 6px",
|
|
98
|
-
borderRadius: 3,
|
|
99
|
-
background: "#0F151E",
|
|
100
|
-
border: `1px solid ${o.cabinFit.headroomOk && o.cabinFit.shoulderOk ? "#10B981" : "#F43F5E"}`
|
|
101
|
-
},
|
|
102
|
-
children: [
|
|
103
|
-
/* @__PURE__ */ i("span", {
|
|
104
|
-
style: { color: o.cabinFit.headroomOk ? "#34D399" : "#FB7185" },
|
|
105
|
-
children: `Headroom ${s(o.cabinFit.headroomM)} ${o.cabinFit.headroomOk ? "✓" : "CLIP"}`
|
|
106
|
-
}),
|
|
107
|
-
/* @__PURE__ */ i("span", {
|
|
108
|
-
style: { color: "#475569" },
|
|
109
|
-
children: "|"
|
|
110
|
-
}),
|
|
111
|
-
/* @__PURE__ */ i("span", {
|
|
112
|
-
style: { color: o.cabinFit.shoulderOk ? "#34D399" : "#FB7185" },
|
|
113
|
-
children: `Door ${s(o.cabinFit.shoulderClearanceM)} ${o.cabinFit.shoulderOk ? "✓" : "CLIP"}`
|
|
114
|
-
})
|
|
115
|
-
]
|
|
116
|
-
}),
|
|
117
|
-
/* @__PURE__ */ i(n, {
|
|
118
|
-
label: "Seat X",
|
|
119
|
-
value: o.cabin.seatPos[0],
|
|
120
|
-
min: Number((c + .15).toFixed(2)),
|
|
121
|
-
max: Number((d - .15).toFixed(2)),
|
|
122
|
-
step: .01,
|
|
123
|
-
display: `${o.cabin.seatPos[0].toFixed(2)}m`,
|
|
124
|
-
onChange: (e) => m(0, e)
|
|
125
|
-
}),
|
|
126
|
-
/* @__PURE__ */ i(n, {
|
|
127
|
-
label: "Seat Y",
|
|
128
|
-
value: o.cabin.seatPos[1],
|
|
129
|
-
min: Number((l + .15).toFixed(2)),
|
|
130
|
-
max: Number(Math.max(l + .5, f - .55).toFixed(2)),
|
|
131
|
-
step: .01,
|
|
132
|
-
display: `${o.cabin.seatPos[1].toFixed(2)}m`,
|
|
133
|
-
accent: "#10B981",
|
|
134
|
-
onChange: (e) => m(1, e)
|
|
135
|
-
}),
|
|
136
|
-
/* @__PURE__ */ i(n, {
|
|
137
|
-
label: "Seat Z",
|
|
138
|
-
value: o.cabin.seatPos[2],
|
|
139
|
-
min: Number((u + .3).toFixed(2)),
|
|
140
|
-
max: Number((p - .5).toFixed(2)),
|
|
141
|
-
step: .01,
|
|
142
|
-
display: `${o.cabin.seatPos[2].toFixed(2)}m`,
|
|
143
|
-
accent: "#FFB000",
|
|
144
|
-
onChange: (e) => m(2, e)
|
|
145
|
-
}),
|
|
146
|
-
/* @__PURE__ */ i(n, {
|
|
147
|
-
label: "Wheel Z",
|
|
148
|
-
value: o.cabin.steerOffsetZ,
|
|
149
|
-
min: .28,
|
|
150
|
-
max: .68,
|
|
151
|
-
step: .01,
|
|
152
|
-
display: `${o.cabin.steerOffsetZ.toFixed(2)}m`,
|
|
153
|
-
onChange: (e) => o.onUpdateCabin({ steerOffsetZ: e })
|
|
154
|
-
}),
|
|
155
|
-
/* @__PURE__ */ i(n, {
|
|
156
|
-
label: "Wheel Y",
|
|
157
|
-
value: o.cabin.steerOffsetY,
|
|
158
|
-
min: .22,
|
|
159
|
-
max: .62,
|
|
160
|
-
step: .01,
|
|
161
|
-
display: `${o.cabin.steerOffsetY.toFixed(2)}m`,
|
|
162
|
-
onChange: (e) => o.onUpdateCabin({ steerOffsetY: e })
|
|
163
|
-
}),
|
|
164
|
-
/* @__PURE__ */ i(n, {
|
|
165
|
-
label: "Recline",
|
|
166
|
-
value: o.cabin.reclineDeg,
|
|
167
|
-
min: 0,
|
|
168
|
-
max: 32,
|
|
169
|
-
step: 1,
|
|
170
|
-
display: `${o.cabin.reclineDeg}°`,
|
|
171
|
-
accent: "#A855F7",
|
|
172
|
-
onChange: (e) => o.onUpdateCabin({ reclineDeg: e })
|
|
173
|
-
}),
|
|
174
|
-
/* @__PURE__ */ a("label", {
|
|
175
|
-
style: {
|
|
176
|
-
display: "flex",
|
|
177
|
-
alignItems: "center",
|
|
178
|
-
gap: 6,
|
|
179
|
-
fontSize: 10.5,
|
|
180
|
-
cursor: "pointer"
|
|
181
|
-
},
|
|
182
|
-
children: [/* @__PURE__ */ i("input", {
|
|
183
|
-
type: "checkbox",
|
|
184
|
-
checked: o.cabin.includeInteriorTub,
|
|
185
|
-
onChange: (e) => o.onUpdateCabin({ includeInteriorTub: e.target.checked }),
|
|
186
|
-
style: { accentColor: "#00E5FF" }
|
|
187
|
-
}), /* @__PURE__ */ i("span", { children: "Bake simple interior (floor + seats + dash + wheel)" })]
|
|
188
|
-
}),
|
|
189
|
-
o.cabin.includeInteriorTub && o.cabin.layout !== "center" && /* @__PURE__ */ a("label", {
|
|
190
|
-
style: {
|
|
191
|
-
display: "flex",
|
|
192
|
-
alignItems: "center",
|
|
193
|
-
gap: 6,
|
|
194
|
-
fontSize: 10.5,
|
|
195
|
-
cursor: "pointer"
|
|
196
|
-
},
|
|
197
|
-
children: [/* @__PURE__ */ i("input", {
|
|
198
|
-
type: "checkbox",
|
|
199
|
-
checked: o.cabin.passengerSeat,
|
|
200
|
-
onChange: (e) => o.onUpdateCabin({ passengerSeat: e.target.checked }),
|
|
201
|
-
style: { accentColor: "#00E5FF" }
|
|
202
|
-
}), /* @__PURE__ */ i("span", { children: "Include mirrored passenger seat" })]
|
|
203
|
-
}),
|
|
204
|
-
/* @__PURE__ */ i("div", {
|
|
205
|
-
style: {
|
|
206
|
-
fontSize: 9.5,
|
|
207
|
-
color: "#94A3B8"
|
|
208
|
-
},
|
|
209
|
-
children: "Auto-bakes 7 Mixamo sockets: Seat, Eye, Exit, Steer L/R, Pedal L/R."
|
|
210
|
-
})
|
|
211
|
-
]
|
|
212
|
-
}),
|
|
213
|
-
/* @__PURE__ */ i(e, {
|
|
214
|
-
label: "Next: 4 · Test Drive & Export ->",
|
|
215
|
-
active: !0,
|
|
216
|
-
color: "#10B981",
|
|
217
|
-
center: !0,
|
|
218
|
-
onClick: o.onNextDrive
|
|
219
|
-
})
|
|
220
|
-
] });
|
|
221
|
-
}
|
|
222
|
-
export { o as CabinStepSection };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import * as THREE from "three";
|
|
3
|
-
import type { CalibrationMetrics, GateDomain } from "./gateStore.js";
|
|
4
|
-
import type { ChopPartRole } from "./surfaceCutter.js";
|
|
5
|
-
import type { MeshIsland } from "./meshIslands.js";
|
|
6
|
-
export declare function makeStarterDomainScene(domain: GateDomain): THREE.Group;
|
|
7
|
-
/**
|
|
8
|
-
* Spatial 3D `@react-three/uikit` tags floating directly inside the Step-1 Calibration Plinth:
|
|
9
|
-
* - SI Bounding-Box Dimension Tag (`W × H × L m · Y-floor`)
|
|
10
|
-
* - Interactive 3D Pills over tagged `Wheel` & `Door`/`Hood`/`Trunk` islands as you orbit around the model.
|
|
11
|
-
*/
|
|
12
|
-
export declare function ImporterPlinthUikitTags({ cal, islands, wheelColors, propellerSet, partPicks, explodeAmount, onClickIsland, }: {
|
|
13
|
-
readonly cal: CalibrationMetrics;
|
|
14
|
-
readonly islands: readonly MeshIsland[];
|
|
15
|
-
readonly wheelColors: ReadonlyMap<number, string>;
|
|
16
|
-
readonly propellerSet?: ReadonlySet<number>;
|
|
17
|
-
readonly partPicks: Readonly<Record<number, ChopPartRole>>;
|
|
18
|
-
readonly explodeAmount: number;
|
|
19
|
-
readonly onClickIsland: (id: number) => void;
|
|
20
|
-
}): React.JSX.Element;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { useMemo as e, useRef as t } from "react";
|
|
2
|
-
import * as n from "three";
|
|
3
|
-
import { useFrame as r, useThree as i } from "@react-three/fiber";
|
|
4
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
-
import { Container as s, Root as c, Text as l } from "@react-three/uikit";
|
|
6
|
-
// src/importer/ImporterPlinthUikitTags.tsx
|
|
7
|
-
function u(e) {
|
|
8
|
-
let t = new n.Group();
|
|
9
|
-
t.name = `Starter_${e}`;
|
|
10
|
-
let r = e === "c12" ? new n.BoxGeometry(3, 3, 3) : e === "person" ? new n.CapsuleGeometry(.3, 1, 6, 12) : e === "launcher" ? new n.BoxGeometry(.14, .24, .92) : e === "junk" ? new n.CylinderGeometry(.32, .34, .85, 12) : new n.BoxGeometry(1.72, 1.25, 4.25), i = new n.Mesh(r, new n.MeshStandardMaterial({
|
|
11
|
-
color: "#38bdf8",
|
|
12
|
-
roughness: .55,
|
|
13
|
-
flatShading: !0
|
|
14
|
-
}));
|
|
15
|
-
return i.position.y = e === "c12" ? 1.5 : e === "person" ? .88 : .65, t.add(i), t;
|
|
16
|
-
}
|
|
17
|
-
new n.Vector3();
|
|
18
|
-
function d({ position: e, label: n, sub: u, accent: d, onClick: f }) {
|
|
19
|
-
let p = t(null), { camera: m } = i();
|
|
20
|
-
return r(() => {
|
|
21
|
-
p.current && p.current.quaternion.copy(m.quaternion);
|
|
22
|
-
}), /* @__PURE__ */ a("group", {
|
|
23
|
-
ref: p,
|
|
24
|
-
position: [
|
|
25
|
-
e[0],
|
|
26
|
-
e[1],
|
|
27
|
-
e[2]
|
|
28
|
-
],
|
|
29
|
-
children: /* @__PURE__ */ a(c, {
|
|
30
|
-
pixelSize: .0022,
|
|
31
|
-
children: /* @__PURE__ */ o(s, {
|
|
32
|
-
paddingX: 10,
|
|
33
|
-
paddingY: 4,
|
|
34
|
-
borderRadius: 999,
|
|
35
|
-
backgroundColor: "rgba(9, 13, 24, 0.88)",
|
|
36
|
-
borderWidth: 1.5,
|
|
37
|
-
borderColor: d,
|
|
38
|
-
flexDirection: "row",
|
|
39
|
-
alignItems: "center",
|
|
40
|
-
gap: 6,
|
|
41
|
-
hover: { backgroundColor: "#1e293b" },
|
|
42
|
-
onClick: f ? (e) => {
|
|
43
|
-
e.stopPropagation(), f();
|
|
44
|
-
} : void 0,
|
|
45
|
-
children: [/* @__PURE__ */ a(l, {
|
|
46
|
-
fontSize: 12,
|
|
47
|
-
fontWeight: "bold",
|
|
48
|
-
color: d,
|
|
49
|
-
children: n
|
|
50
|
-
}), /* @__PURE__ */ a(l, {
|
|
51
|
-
fontSize: 11,
|
|
52
|
-
color: "#cbd5e1",
|
|
53
|
-
children: u
|
|
54
|
-
})]
|
|
55
|
-
})
|
|
56
|
-
})
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
function f({ cal: t, islands: n, wheelColors: r, propellerSet: i, partPicks: s, explodeAmount: c, onClickIsland: l }) {
|
|
60
|
-
let u = e(() => `${t.aabbSize[0].toFixed(2)}m W × ${t.aabbSize[1].toFixed(2)}m H × ${t.aabbSize[2].toFixed(2)}m L`, [t.aabbSize]), f = e(() => `Ymin ${t.minY >= 0 ? "+" : ""}${t.minY.toFixed(3)}m`, [t.minY]), p = e(() => {
|
|
61
|
-
let e = [];
|
|
62
|
-
for (let t of n) {
|
|
63
|
-
let n = r.get(t.id), a = !!i?.has(t.id), o = s[t.id];
|
|
64
|
-
if (!n && !a && !o) continue;
|
|
65
|
-
let l = Math.sign(t.center[0] || 1) * c * .65, u = [
|
|
66
|
-
t.center[0] + (n ? l : 0),
|
|
67
|
-
t.center[1] + t.size[1] * .5 + .16 + (a ? c * .65 : 0),
|
|
68
|
-
t.center[2]
|
|
69
|
-
];
|
|
70
|
-
if (n) {
|
|
71
|
-
let r = Math.abs(t.center[0]) <= .1 ? "C" : t.center[0] > 0 ? "L" : "R", i = t.center[2] >= 0 ? "F" : "R";
|
|
72
|
-
e.push({
|
|
73
|
-
id: t.id,
|
|
74
|
-
pos: u,
|
|
75
|
-
label: `WHEEL ${i}${r}`,
|
|
76
|
-
sub: `R ${(t.size[1] * .5).toFixed(2)}m`,
|
|
77
|
-
accent: n
|
|
78
|
-
});
|
|
79
|
-
} else a ? e.push({
|
|
80
|
-
id: t.id,
|
|
81
|
-
pos: u,
|
|
82
|
-
label: "ROTOR",
|
|
83
|
-
sub: `${t.triangleIndices.length} tris`,
|
|
84
|
-
accent: "#EC4899"
|
|
85
|
-
}) : o && e.push({
|
|
86
|
-
id: t.id,
|
|
87
|
-
pos: u,
|
|
88
|
-
label: o.toUpperCase(),
|
|
89
|
-
sub: `${t.triangleIndices.length} tris`,
|
|
90
|
-
accent: "#38bdf8"
|
|
91
|
-
});
|
|
92
|
-
if (e.length >= 12) break;
|
|
93
|
-
}
|
|
94
|
-
return e;
|
|
95
|
-
}, [
|
|
96
|
-
n,
|
|
97
|
-
r,
|
|
98
|
-
i,
|
|
99
|
-
s,
|
|
100
|
-
c
|
|
101
|
-
]);
|
|
102
|
-
return /* @__PURE__ */ o("group", { children: [/* @__PURE__ */ a(d, {
|
|
103
|
-
position: [
|
|
104
|
-
0,
|
|
105
|
-
t.aabbSize[1] + t.minY + .34,
|
|
106
|
-
0
|
|
107
|
-
],
|
|
108
|
-
label: "SI BOUNDS",
|
|
109
|
-
sub: `${u} · ${f}`,
|
|
110
|
-
accent: "#00e5ff"
|
|
111
|
-
}), p.map((e) => /* @__PURE__ */ a(d, {
|
|
112
|
-
position: e.pos,
|
|
113
|
-
label: e.label,
|
|
114
|
-
sub: e.sub,
|
|
115
|
-
accent: e.accent,
|
|
116
|
-
onClick: () => l(e.id)
|
|
117
|
-
}, `pill_${e.id}`))] });
|
|
118
|
-
}
|
|
119
|
-
export { f as ImporterPlinthUikitTags, u as makeStarterDomainScene };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import { type CarCabinConfig } from "./cabinMixamoRig.js";
|
|
3
|
-
/**
|
|
4
|
-
* Builds a Mixamo-named 1.75m seated driver rig with analytic 2-bone IK arms (to wheel) and legs (to pedals).
|
|
5
|
-
* Used as a visual fit mannequin in Step 1 and live driver preview in Step 2 (not exported into final GLB).
|
|
6
|
-
*/
|
|
7
|
-
export declare function buildMixamoSeatedDummyGroup(cfg: CarCabinConfig, carMin: readonly [number, number, number], carMax: readonly [number, number, number], steerAngleRad?: number): THREE.Group;
|
|
8
|
-
/**
|
|
9
|
-
* Builds a clean, low-poly interior cabin tub (floor pan, dash, steering wheel, bucket seat(s), rear bulkhead)
|
|
10
|
-
* strictly inset inside the car AABB so solid exterior-only GLBs have a real interior where a character sits.
|
|
11
|
-
*/
|
|
12
|
-
export declare function buildCabinTubGroup(cfg: CarCabinConfig, carMin: readonly [number, number, number], carMax: readonly [number, number, number]): THREE.Group;
|
|
13
|
-
export declare function disposeObjectTree(obj: THREE.Object3D): void;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { MIXAMO_SEATED as e, computeMixamoCabinPoints as t } from "./cabinMixamoRig.js";
|
|
2
|
-
import * as n from "three";
|
|
3
|
-
// src/importer/cabinMeshBuilders.ts
|
|
4
|
-
var r = (e, t, n) => Math.max(t, Math.min(n, e));
|
|
5
|
-
function i(e, t, i, a, o) {
|
|
6
|
-
let s = t.clone().sub(e), c = r(s.length(), Math.abs(i - a) + 1e-4, i + a - 1e-4), l = s.lengthSq() > 1e-10 ? s.normalize() : new n.Vector3(0, 0, 1), u = (i * i - a * a + c * c) / (2 * c), d = Math.sqrt(Math.max(0, i * i - u * u)), f = o.clone().addScaledVector(l, -o.dot(l));
|
|
7
|
-
return f.lengthSq() < 1e-8 ? f.set(0, 1, 0) : f.normalize(), e.clone().addScaledVector(l, u).addScaledVector(f, d);
|
|
8
|
-
}
|
|
9
|
-
function a(e, t, r, i, a, o) {
|
|
10
|
-
let s = new n.Group();
|
|
11
|
-
s.name = t, s.position.copy(r);
|
|
12
|
-
let c = i.clone().sub(r), l = Math.max(.02, c.length()), u = new n.Quaternion().setFromUnitVectors(new n.Vector3(0, 1, 0), c.clone().normalize()), d = new n.Mesh(new n.CapsuleGeometry(a, Math.max(.01, l - a * 2), 4, 8), o);
|
|
13
|
-
return d.position.copy(c).multiplyScalar(.5), d.quaternion.copy(u), s.add(d), e.add(s), s;
|
|
14
|
-
}
|
|
15
|
-
function o(r, o, s, c = 0) {
|
|
16
|
-
let l = t(r, o, s), u = new n.Group();
|
|
17
|
-
u.name = "MixamoSeatedPreview";
|
|
18
|
-
let d = new n.MeshStandardMaterial({
|
|
19
|
-
color: "#38bdf8",
|
|
20
|
-
roughness: .45,
|
|
21
|
-
metalness: .1,
|
|
22
|
-
flatShading: !0
|
|
23
|
-
}), f = new n.MeshStandardMaterial({
|
|
24
|
-
color: "#ffb000",
|
|
25
|
-
roughness: .35,
|
|
26
|
-
emissive: "#ffb000",
|
|
27
|
-
emissiveIntensity: .22,
|
|
28
|
-
flatShading: !0
|
|
29
|
-
}), p = new n.MeshStandardMaterial({
|
|
30
|
-
color: "#0f172a",
|
|
31
|
-
roughness: .2,
|
|
32
|
-
metalness: .4,
|
|
33
|
-
flatShading: !0
|
|
34
|
-
}), m = new n.Vector3(...l.hips), h = new n.Vector3(...l.shoulderL), g = new n.Vector3(...l.shoulderR), _ = h.clone().add(g).multiplyScalar(.5), v = new n.Vector3(...l.eye), y = new n.Vector3(...l.wheelCenter), b = new n.Vector3(0, Math.sin(e.wheelTiltRad), Math.cos(e.wheelTiltRad)).normalize(), x = new n.Quaternion().setFromAxisAngle(b, c), S = new n.Vector3(...l.handL).sub(y).applyQuaternion(x).add(y), C = new n.Vector3(...l.handR).sub(y).applyQuaternion(x).add(y), w = new n.Vector3(...l.footL), T = new n.Vector3(...l.footR), E = new n.Group();
|
|
35
|
-
E.name = "mixamorigHips", E.position.copy(m), E.add(new n.Mesh(new n.BoxGeometry(.28, .14, .2), f)), u.add(E), a(u, "mixamorigSpine", m, _, .125, d), a(u, "mixamorigNeck", _, v.clone().add(new n.Vector3(0, -.05, 0)), .052, f);
|
|
36
|
-
let D = new n.Group();
|
|
37
|
-
D.name = "mixamorigHead", D.position.copy(v);
|
|
38
|
-
let O = new n.Mesh(new n.BoxGeometry(.16, .055, .08), p);
|
|
39
|
-
O.position.set(0, .01, .085), D.add(new n.Mesh(new n.SphereGeometry(.105, 10, 8), d), O), u.add(D);
|
|
40
|
-
let k = i(h, S, e.upperArmLen, e.forearmLen, new n.Vector3(.45, -.8, -.25)), A = i(g, C, e.upperArmLen, e.forearmLen, new n.Vector3(-.45, -.8, -.25));
|
|
41
|
-
a(u, "mixamorigLeftArm", h, k, .046, d), a(u, "mixamorigLeftForeArm", k, S, .038, d), a(u, "mixamorigRightArm", g, A, .046, d), a(u, "mixamorigRightForeArm", A, C, .038, d);
|
|
42
|
-
for (let [e, t] of [["mixamorigLeftHand", S], ["mixamorigRightHand", C]]) {
|
|
43
|
-
let r = new n.Mesh(new n.SphereGeometry(.042, 8, 6), f);
|
|
44
|
-
r.name = e, r.position.copy(t), u.add(r);
|
|
45
|
-
}
|
|
46
|
-
let j = m.clone().add(new n.Vector3(e.hipHalfWidth, -.02, .03)), M = m.clone().add(new n.Vector3(-e.hipHalfWidth, -.02, .03)), N = i(j, w, e.thighLen, e.shinLen, new n.Vector3(.12, .85, .55)), P = i(M, T, e.thighLen, e.shinLen, new n.Vector3(-.12, .85, .55));
|
|
47
|
-
a(u, "mixamorigLeftUpLeg", j, N, .068, d), a(u, "mixamorigLeftLeg", N, w, .052, d), a(u, "mixamorigRightUpLeg", M, P, .068, d), a(u, "mixamorigRightLeg", P, T, .052, d);
|
|
48
|
-
for (let [e, t] of [["mixamorigLeftFoot", w], ["mixamorigRightFoot", T]]) {
|
|
49
|
-
let r = new n.Mesh(new n.BoxGeometry(.09, .05, .2), f);
|
|
50
|
-
r.name = e, r.position.copy(t).add(new n.Vector3(0, 0, .04)), u.add(r);
|
|
51
|
-
}
|
|
52
|
-
return u;
|
|
53
|
-
}
|
|
54
|
-
function s(i, a, o) {
|
|
55
|
-
let s = new n.Group();
|
|
56
|
-
s.name = "CabinTub";
|
|
57
|
-
let c = t(i, a, o), [l, u, d] = i.seatPos, f = new n.MeshStandardMaterial({
|
|
58
|
-
color: "#151922",
|
|
59
|
-
roughness: .92,
|
|
60
|
-
metalness: .06,
|
|
61
|
-
flatShading: !0
|
|
62
|
-
}), p = new n.MeshStandardMaterial({
|
|
63
|
-
color: "#27303f",
|
|
64
|
-
roughness: .85,
|
|
65
|
-
metalness: .05,
|
|
66
|
-
flatShading: !0
|
|
67
|
-
}), m = new n.MeshStandardMaterial({
|
|
68
|
-
color: "#0b0f17",
|
|
69
|
-
roughness: .72,
|
|
70
|
-
metalness: .18,
|
|
71
|
-
flatShading: !0
|
|
72
|
-
}), h = Math.max(.7, o[0] - a[0]), g = r(h - .16, .56, h * .88), _ = r(u - .24, a[1] + .08, u - .08), v = r(d - .36, a[2] + .14, d - .18), y = r(c.wheelCenter[2] + .34, d + .48, o[2] - .16), b = Math.max(.65, y - v), x = (a[0] + o[0]) * .5, S = new n.Mesh(new n.BoxGeometry(g, .04, b), f);
|
|
73
|
-
S.name = "Cabin_Floor", S.position.set(x, _, (v + y) * .5), s.add(S);
|
|
74
|
-
let C = r(c.wheelCenter[1] - _ + .08, .24, Math.max(.26, o[1] - _ - .32)), w = new n.Mesh(new n.BoxGeometry(g, C, .22), f);
|
|
75
|
-
w.name = "Cabin_Dash", w.position.set(x, _ + C * .5, y - .11), s.add(w);
|
|
76
|
-
let T = r(Math.min(o[1] - _ - .12, .65), .28, .72), E = new n.Mesh(new n.BoxGeometry(g, T, .05), f);
|
|
77
|
-
E.name = "Cabin_Bulkhead", E.position.set(x, _ + T * .5, v), s.add(E);
|
|
78
|
-
let D = (e, t) => {
|
|
79
|
-
let a = new n.Group();
|
|
80
|
-
a.name = `Cabin_Seat_${t}`, a.position.set(e, u, d);
|
|
81
|
-
let o = new n.Mesh(new n.BoxGeometry(.44, .08, .44), p);
|
|
82
|
-
o.position.set(0, -.04, .05);
|
|
83
|
-
let c = Math.max(.05, u - _ - .08), l = new n.Mesh(new n.BoxGeometry(.32, c, .34), f);
|
|
84
|
-
l.position.set(0, -.08 - c * .5, .02);
|
|
85
|
-
let m = r(i.reclineDeg, 0, 35) * Math.PI / 180, h = new n.Mesh(new n.BoxGeometry(.44, .56, .09), p);
|
|
86
|
-
h.position.set(0, .26, -.17), h.rotation.x = -m;
|
|
87
|
-
let g = new n.Mesh(new n.BoxGeometry(.24, .16, .08), p);
|
|
88
|
-
g.position.set(0, .61, -.17 - Math.sin(m) * .34), g.rotation.x = -m, a.add(o, l, h, g), s.add(a);
|
|
89
|
-
};
|
|
90
|
-
D(l, "Driver"), i.passengerSeat && i.layout !== "center" && Math.abs(l) * 2 + .46 <= g + .04 && D(-l, "Passenger");
|
|
91
|
-
let O = new n.Group();
|
|
92
|
-
O.name = "Cabin_SteeringWheel", O.position.set(...c.wheelCenter), O.rotation.x = -e.wheelTiltRad;
|
|
93
|
-
let k = new n.Mesh(new n.CylinderGeometry(.042, .042, .04, 8), m);
|
|
94
|
-
k.rotation.x = Math.PI * .5;
|
|
95
|
-
let A = Math.max(.14, Math.min(.45, y - c.wheelCenter[2])), j = new n.Mesh(new n.CylinderGeometry(.024, .028, A, 8), f);
|
|
96
|
-
return j.rotation.x = Math.PI * .5, j.position.set(0, 0, A * .5), O.add(new n.Mesh(new n.TorusGeometry(e.wheelRadius, .018, 6, 12), m), k, new n.Mesh(new n.BoxGeometry(e.wheelRadius * 1.9, .022, .018), m), j), s.add(O), s;
|
|
97
|
-
}
|
|
98
|
-
function c(e) {
|
|
99
|
-
e.traverse((e) => {
|
|
100
|
-
let t = e;
|
|
101
|
-
if (t.geometry && t.geometry.dispose(), t.material) for (let e of Array.isArray(t.material) ? t.material : [t.material]) e.dispose();
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
export { s as buildCabinTubGroup, o as buildMixamoSeatedDummyGroup, c as disposeObjectTree };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { KolmoAuthoredNodePatch } from "../schema/kolmoSchema.js";
|
|
2
|
-
export { buildCabinTubGroup, buildMixamoSeatedDummyGroup, disposeObjectTree } from "./cabinMeshBuilders.js";
|
|
3
|
-
export type DriverSeatLayout = "lhd" | "rhd" | "center";
|
|
4
|
-
export type ShellViewMode = "solid" | "xray" | "cutaway";
|
|
5
|
-
export interface CarCabinConfig {
|
|
6
|
-
readonly enabled: boolean;
|
|
7
|
-
readonly includeInteriorTub: boolean;
|
|
8
|
-
readonly layout: DriverSeatLayout;
|
|
9
|
-
readonly seatPos: readonly [number, number, number];
|
|
10
|
-
readonly steerOffsetZ: number;
|
|
11
|
-
readonly steerOffsetY: number;
|
|
12
|
-
readonly reclineDeg: number;
|
|
13
|
-
readonly passengerSeat: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface CabinFitReport {
|
|
16
|
-
readonly headroomM: number;
|
|
17
|
-
readonly shoulderClearanceM: number;
|
|
18
|
-
readonly headroomOk: boolean;
|
|
19
|
-
readonly shoulderOk: boolean;
|
|
20
|
-
readonly headTopY: number;
|
|
21
|
-
}
|
|
22
|
-
/** Exact 1.75m Mixamo seated anthropometry (meters, relative to seat pan / cushion top). */
|
|
23
|
-
export declare const MIXAMO_SEATED: Readonly<{
|
|
24
|
-
hipsAbovePan: 0.11;
|
|
25
|
-
torsoLen: 0.48;
|
|
26
|
-
neckToEye: 0.17;
|
|
27
|
-
eyeToCrown: 0.11;
|
|
28
|
-
shoulderHalfWidth: 0.21;
|
|
29
|
-
hipHalfWidth: 0.11;
|
|
30
|
-
upperArmLen: 0.3;
|
|
31
|
-
forearmLen: 0.28;
|
|
32
|
-
thighLen: 0.43;
|
|
33
|
-
shinLen: 0.42;
|
|
34
|
-
wheelRadius: 0.165;
|
|
35
|
-
wheelTiltRad: 0.38;
|
|
36
|
-
}>;
|
|
37
|
-
export declare function seatXForLayout(layout: DriverSeatLayout, carWidth: number): number;
|
|
38
|
-
export declare function autoFitCabinConfig(carMin: readonly [number, number, number], carMax: readonly [number, number, number], wheelRadius?: number, layout?: DriverSeatLayout): CarCabinConfig;
|
|
39
|
-
export declare function computeMixamoCabinPoints(cfg: CarCabinConfig, carMin: readonly [number, number, number], carMax: readonly [number, number, number]): {
|
|
40
|
-
hips: [number, number, number];
|
|
41
|
-
eye: [number, number, number];
|
|
42
|
-
crown: [number, number, number];
|
|
43
|
-
shoulderL: [number, number, number];
|
|
44
|
-
shoulderR: [number, number, number];
|
|
45
|
-
wheelCenter: [number, number, number];
|
|
46
|
-
handL: [number, number, number];
|
|
47
|
-
handR: [number, number, number];
|
|
48
|
-
footL: [number, number, number];
|
|
49
|
-
footR: [number, number, number];
|
|
50
|
-
exit: [number, number, number];
|
|
51
|
-
};
|
|
52
|
-
export declare function evaluateCabinFit(cfg: CarCabinConfig, carMin: readonly [number, number, number], carMax: readonly [number, number, number]): CabinFitReport;
|
|
53
|
-
export declare function computeMixamoCabinSockets(cfg: CarCabinConfig, carMin: readonly [number, number, number], carMax: readonly [number, number, number]): KolmoAuthoredNodePatch[];
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { buildCabinTubGroup as e, buildMixamoSeatedDummyGroup as t, disposeObjectTree as n } from "./cabinMeshBuilders.js";
|
|
2
|
-
// src/importer/cabinMixamoRig.ts
|
|
3
|
-
var r = (e) => Number(e.toFixed(4)), i = (e, t, n) => Math.max(t, Math.min(n, e)), a = Object.freeze({
|
|
4
|
-
hipsAbovePan: .11,
|
|
5
|
-
torsoLen: .48,
|
|
6
|
-
neckToEye: .17,
|
|
7
|
-
eyeToCrown: .11,
|
|
8
|
-
shoulderHalfWidth: .21,
|
|
9
|
-
hipHalfWidth: .11,
|
|
10
|
-
upperArmLen: .3,
|
|
11
|
-
forearmLen: .28,
|
|
12
|
-
thighLen: .43,
|
|
13
|
-
shinLen: .42,
|
|
14
|
-
wheelRadius: .165,
|
|
15
|
-
wheelTiltRad: .38
|
|
16
|
-
});
|
|
17
|
-
function o(e, t) {
|
|
18
|
-
if (e === "center") return 0;
|
|
19
|
-
let n = i(t * .22, .24, .46);
|
|
20
|
-
return r(e === "lhd" ? n : -n);
|
|
21
|
-
}
|
|
22
|
-
function s(e, t, n = .32, s = "lhd") {
|
|
23
|
-
let c = Math.max(.9, t[0] - e[0]), l = Math.max(.85, t[1] - e[1]), u = Math.max(1.8, t[2] - e[2]), d = a.hipsAbovePan + a.torsoLen + a.neckToEye + a.eyeToCrown, f = t[1] - d - .06, p = Math.max(e[1] + .18, n * .82), m = r(i(e[1] + l * .3, p, Math.max(p, f))), h = r((e[2] + t[2]) * .5 - u * .05), g = c < 1.15 ? "center" : s;
|
|
24
|
-
return {
|
|
25
|
-
enabled: !0,
|
|
26
|
-
includeInteriorTub: !0,
|
|
27
|
-
layout: g,
|
|
28
|
-
seatPos: [
|
|
29
|
-
o(g, c),
|
|
30
|
-
m,
|
|
31
|
-
h
|
|
32
|
-
],
|
|
33
|
-
steerOffsetZ: r(i(u * .11, .38, .54)),
|
|
34
|
-
steerOffsetY: .4,
|
|
35
|
-
reclineDeg: 14,
|
|
36
|
-
passengerSeat: g !== "center" && c >= 1.35
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function c(e, t, n) {
|
|
40
|
-
let [o, s, c] = e.seatPos, l = i(e.reclineDeg, 0, 35) * Math.PI / 180, u = Math.sin(l), d = Math.cos(l), f = [
|
|
41
|
-
r(o),
|
|
42
|
-
r(s + a.hipsAbovePan),
|
|
43
|
-
r(c)
|
|
44
|
-
], p = f[1] + a.torsoLen * d, m = f[2] - a.torsoLen * u, h = [
|
|
45
|
-
r(o),
|
|
46
|
-
r(p + a.neckToEye),
|
|
47
|
-
r(m + .04)
|
|
48
|
-
], g = [
|
|
49
|
-
r(o),
|
|
50
|
-
r(h[1] + a.eyeToCrown),
|
|
51
|
-
r(m)
|
|
52
|
-
], _ = [
|
|
53
|
-
r(o + a.shoulderHalfWidth),
|
|
54
|
-
r(p),
|
|
55
|
-
r(m)
|
|
56
|
-
], v = [
|
|
57
|
-
r(o - a.shoulderHalfWidth),
|
|
58
|
-
r(p),
|
|
59
|
-
r(m)
|
|
60
|
-
], y = [
|
|
61
|
-
r(o),
|
|
62
|
-
r(s + e.steerOffsetY),
|
|
63
|
-
r(c + e.steerOffsetZ)
|
|
64
|
-
], b = a.wheelRadius, x = .42, S = Math.cos(x) * b, C = Math.sin(x) * b * Math.cos(a.wheelTiltRad), w = -Math.sin(x) * b * Math.sin(a.wheelTiltRad), T = [
|
|
65
|
-
r(y[0] + S),
|
|
66
|
-
r(y[1] + C),
|
|
67
|
-
r(y[2] + w)
|
|
68
|
-
], E = [
|
|
69
|
-
r(y[0] - S),
|
|
70
|
-
r(y[1] + C),
|
|
71
|
-
r(y[2] + w)
|
|
72
|
-
], D = Math.max(t[1] + .08, s - .24), O = Math.min(n[2] - .22, c + e.steerOffsetZ + .22);
|
|
73
|
-
return {
|
|
74
|
-
hips: f,
|
|
75
|
-
eye: h,
|
|
76
|
-
crown: g,
|
|
77
|
-
shoulderL: _,
|
|
78
|
-
shoulderR: v,
|
|
79
|
-
wheelCenter: y,
|
|
80
|
-
handL: T,
|
|
81
|
-
handR: E,
|
|
82
|
-
footL: [
|
|
83
|
-
r(o + .11),
|
|
84
|
-
r(D + .05),
|
|
85
|
-
r(O)
|
|
86
|
-
],
|
|
87
|
-
footR: [
|
|
88
|
-
r(o - .11),
|
|
89
|
-
r(D + .05),
|
|
90
|
-
r(O)
|
|
91
|
-
],
|
|
92
|
-
exit: [
|
|
93
|
-
r(e.layout === "rhd" ? t[0] - .58 : n[0] + .58),
|
|
94
|
-
r(Math.max(.55, s)),
|
|
95
|
-
r(c)
|
|
96
|
-
]
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function l(e, t, n) {
|
|
100
|
-
let i = c(e, t, n), o = r(n[1] - i.crown[1]), s = n[0] - (e.seatPos[0] + a.shoulderHalfWidth), l = e.seatPos[0] - a.shoulderHalfWidth - t[0], u = r(Math.min(s, l));
|
|
101
|
-
return {
|
|
102
|
-
headroomM: o,
|
|
103
|
-
shoulderClearanceM: u,
|
|
104
|
-
headroomOk: o >= .03,
|
|
105
|
-
shoulderOk: u >= .03,
|
|
106
|
-
headTopY: i.crown[1]
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
function u(e, t, n) {
|
|
110
|
-
if (!e.enabled) return [];
|
|
111
|
-
let r = c(e, t, n);
|
|
112
|
-
return [
|
|
113
|
-
{
|
|
114
|
-
nodeName: "Socket_seat",
|
|
115
|
-
translation: r.hips,
|
|
116
|
-
extension: { socket: "seat" }
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
nodeName: "Socket_optic",
|
|
120
|
-
translation: r.eye,
|
|
121
|
-
extension: { socket: "optic" }
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
nodeName: "Socket_exit",
|
|
125
|
-
translation: r.exit,
|
|
126
|
-
extension: { socket: "exit" }
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
nodeName: "Socket_steer_L",
|
|
130
|
-
translation: r.handL,
|
|
131
|
-
extension: { socket: "grip_primary" }
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
nodeName: "Socket_steer_R",
|
|
135
|
-
translation: r.handR,
|
|
136
|
-
extension: { socket: "grip_secondary" }
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
nodeName: "Socket_pedal_L",
|
|
140
|
-
translation: r.footL,
|
|
141
|
-
extension: { socket: "contact" }
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
nodeName: "Socket_pedal_R",
|
|
145
|
-
translation: r.footR,
|
|
146
|
-
extension: { socket: "contact" }
|
|
147
|
-
}
|
|
148
|
-
];
|
|
149
|
-
}
|
|
150
|
-
export { a as MIXAMO_SEATED, s as autoFitCabinConfig, e as buildCabinTubGroup, t as buildMixamoSeatedDummyGroup, c as computeMixamoCabinPoints, u as computeMixamoCabinSockets, n as disposeObjectTree, l as evaluateCabinFit, o as seatXForLayout };
|