@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,306 +1,94 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { restoreStrippedTextures, stripUnloadedTextures } from "./khrCraftPropCompiler.js";
|
|
2
|
+
import { isMeshObject } from "./sceneSiNormalize.js";
|
|
3
|
+
import { parseUsdPhysicsSpecs } from "./usdPhysicsSpecs.js";
|
|
4
|
+
import { extractUsdaLayers, hasUsdcMagic, normalizeUsdaWhitespace } from "./usdTextParse.js";
|
|
5
|
+
import * as THREE from "three";
|
|
6
|
+
import { exportKhrGlb } from "@khr3/core";
|
|
7
|
+
import { unzipSync, zipSync } from "three/examples/jsm/libs/fflate.module.js";
|
|
8
|
+
import { USDLoader } from "three/examples/jsm/loaders/USDLoader.js";
|
|
5
9
|
// src/importer/usdToGlb.ts
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
], s = (e) => e.byteLength >= 8 && a.every((t, n) => e[n] === t), c = (e) => /\.(usd|usda|usdc|usdz)$/i.test(e.trim());
|
|
23
|
-
function l(t) {
|
|
24
|
-
let n = /* @__PURE__ */ new Map(), r = (t, i, a, o) => {
|
|
25
|
-
let s = i * t.scale.x, c = a * t.scale.y, l = o * t.scale.z;
|
|
26
|
-
if (t.name && n.set(t.name, [
|
|
27
|
-
Math.abs(s),
|
|
28
|
-
Math.abs(c),
|
|
29
|
-
Math.abs(l)
|
|
30
|
-
]), t.position.set(t.position.x * i, t.position.y * a, t.position.z * o), t.scale.set(1, 1, 1), t instanceof e.Mesh && t.geometry && (Math.abs(s - 1) > 1e-5 || Math.abs(c - 1) > 1e-5 || Math.abs(l - 1) > 1e-5)) {
|
|
31
|
-
let n = t.geometry.clone();
|
|
32
|
-
n.applyMatrix4(new e.Matrix4().makeScale(s, c, l));
|
|
33
|
-
let r = s * c * l < 0 ? n.getIndex() : null;
|
|
34
|
-
if (r) {
|
|
35
|
-
let e = r.array;
|
|
36
|
-
for (let t = 0; t + 2 < e.length; t += 3) {
|
|
37
|
-
let n = e[t + 1];
|
|
38
|
-
e[t + 1] = e[t + 2], e[t + 2] = n;
|
|
39
|
-
}
|
|
40
|
-
r.needsUpdate = !0;
|
|
41
|
-
}
|
|
42
|
-
n.computeVertexNormals(), n.computeBoundingBox(), t.geometry = n;
|
|
43
|
-
}
|
|
44
|
-
for (let e of t.children) r(e, s, c, l);
|
|
45
|
-
};
|
|
46
|
-
return r(t, 1, 1, 1), t.updateMatrixWorld(!0), n;
|
|
47
|
-
}
|
|
48
|
-
function u(e) {
|
|
49
|
-
if (typeof e == "string") return [e];
|
|
50
|
-
let t = e instanceof Uint8Array ? e : new Uint8Array(e), r = new TextDecoder();
|
|
51
|
-
return s(t) ? [] : t.byteLength >= 2 && t[0] === 80 && t[1] === 75 ? Object.entries(n(t)).filter(([e, t]) => /\.(usd|usda)$/i.test(e) && !s(t)).map(([, e]) => r.decode(e)) : [r.decode(t)];
|
|
52
|
-
}
|
|
53
|
-
function d(e, t) {
|
|
54
|
-
for (let n of e.split(/\r?\n/)) {
|
|
55
|
-
let e = n.indexOf("=");
|
|
56
|
-
if (e >= 0) {
|
|
57
|
-
let r = n.slice(0, e).trim().split(/\s+/).pop();
|
|
58
|
-
r && (t[r] = n.slice(e + 1).trim());
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function f(e) {
|
|
63
|
-
let t = e.replace(/#[^\n]*/g, ""), n = [], r = [], i = /\b(?:def|over|class)\s+(?:([A-Za-z0-9_]+)\s+)?"([^"]+)"\s*(?:\(([\s\S]*?)\))?\s*\{/g, a = 0;
|
|
64
|
-
for (; a < t.length;) {
|
|
65
|
-
let e = t.indexOf("{", a), o = t.indexOf("}", a);
|
|
66
|
-
if (o !== -1 && (e === -1 || o < e)) {
|
|
67
|
-
let e = r.pop();
|
|
68
|
-
e && d(t.slice(a, o), e.attrs), a = o + 1;
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
if (e === -1) break;
|
|
72
|
-
let s = t.slice(a, e + 1);
|
|
73
|
-
i.lastIndex = 0;
|
|
74
|
-
let c = i.exec(s);
|
|
75
|
-
if (c) {
|
|
76
|
-
let e = r[r.length - 1];
|
|
77
|
-
e && d(s.slice(0, c.index), e.attrs);
|
|
78
|
-
let t = [...r].reverse().find((e) => e !== null)?.path ?? "", i = (c[3] ?? "").match(/apiSchemas\s*=\s*\[([^\]]*)\]/), a = i ? Array.from(i[1].matchAll(/"([^"]+)"/g), (e) => e[1]) : [], o = {
|
|
79
|
-
path: `${t}/${c[2]}`,
|
|
80
|
-
name: c[2],
|
|
81
|
-
typeName: c[1] ?? "Xform",
|
|
82
|
-
apiSchemas: a,
|
|
83
|
-
attrs: {}
|
|
84
|
-
};
|
|
85
|
-
n.push(o), r.push(o);
|
|
86
|
-
} else r.push(null);
|
|
87
|
-
a = e + 1;
|
|
88
|
-
}
|
|
89
|
-
return n;
|
|
90
|
-
}
|
|
91
|
-
var p = (e) => e === void 0 ? void 0 : /^(true|1)$/i.test(e.trim()) ? !0 : !/^(false|0)$/i.test(e.trim()) && void 0, m = (e) => {
|
|
92
|
-
let t = e === void 0 ? NaN : Number(e.replace(/[()"]/g, "").trim());
|
|
93
|
-
return Number.isFinite(t) ? t : void 0;
|
|
94
|
-
}, h = (e) => {
|
|
95
|
-
let t = e?.match(/\(\s*([^\s,)]+)\s*,\s*([^\s,)]+)\s*,\s*([^\s,)]+)\s*\)/), n = t ? [
|
|
96
|
-
Number(t[1]),
|
|
97
|
-
Number(t[2]),
|
|
98
|
-
Number(t[3])
|
|
99
|
-
] : null;
|
|
100
|
-
return n?.every(Number.isFinite) ? n : void 0;
|
|
101
|
-
}, g = (e) => e?.match(/<([^>]+)>/)?.[1]?.split("/").filter(Boolean).pop();
|
|
102
|
-
function _(e, t) {
|
|
103
|
-
if (e.typeName === "Cube") {
|
|
104
|
-
let n = Math.max(.001, m(e.attrs.size) ?? 2);
|
|
105
|
-
return {
|
|
106
|
-
type: "box",
|
|
107
|
-
size: [
|
|
108
|
-
n * t[0],
|
|
109
|
-
n * t[1],
|
|
110
|
-
n * t[2]
|
|
111
|
-
]
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
if (e.typeName === "Sphere") return {
|
|
115
|
-
type: "sphere",
|
|
116
|
-
radius: Math.max(.001, (m(e.attrs.radius) ?? 1) * Math.max(t[0], t[1], t[2]))
|
|
117
|
-
};
|
|
118
|
-
if (e.typeName === "Cylinder" || e.typeName === "Capsule") {
|
|
119
|
-
let n = e.typeName === "Capsule", r = Math.max(.001, (m(e.attrs.radius) ?? (n ? .5 : 1)) * Math.max(t[0], t[2])), i = Math.max(.001, (m(e.attrs.height) ?? (n ? 1 : 2)) * t[1]);
|
|
120
|
-
return {
|
|
121
|
-
type: n ? "capsule" : "cylinder",
|
|
122
|
-
height: i,
|
|
123
|
-
radiusTop: r,
|
|
124
|
-
radiusBottom: r
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
function v(e, t, n, r) {
|
|
130
|
-
let i = /* @__PURE__ */ new Set();
|
|
131
|
-
for (let t of Object.keys(e)) {
|
|
132
|
-
let e = t.match(/^drive:([^:]+):physics:/);
|
|
133
|
-
e && i.add(e[1]);
|
|
134
|
-
}
|
|
135
|
-
let a = Math.abs(n[1]) > .5 ? 1 : Math.abs(n[2]) > .5 ? 2 : 0;
|
|
136
|
-
return [...i].map((n) => {
|
|
137
|
-
let i = m(e[`drive:${n}:physics:stiffness`]), o = m(e[`drive:${n}:physics:damping`]), s = m(e[`drive:${n}:physics:maxForce`]), c = m(e[`drive:${n}:physics:targetPosition`]), l = m(e[`drive:${n}:physics:targetVelocity`]), u = (e[`drive:${n}:physics:type`] ?? "").includes("acceleration") ? "acceleration" : "force";
|
|
138
|
-
return {
|
|
139
|
-
type: t === "revolute" ? "angular" : "linear",
|
|
140
|
-
mode: u,
|
|
141
|
-
axis: a,
|
|
142
|
-
...c === void 0 ? l === void 0 ? { positionTarget: 0 } : {} : { positionTarget: c * r },
|
|
143
|
-
...l === void 0 ? {} : { velocityTarget: l * r },
|
|
144
|
-
...i !== void 0 && i >= 0 ? { stiffness: i } : {},
|
|
145
|
-
...o !== void 0 && o >= 0 ? { damping: o } : {},
|
|
146
|
-
...s !== void 0 && s >= 0 ? { maxForce: s } : {}
|
|
147
|
-
};
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
function y(t, n, r) {
|
|
151
|
-
let i = t.flatMap(f);
|
|
152
|
-
if (i.length === 0) return [];
|
|
153
|
-
let a = /* @__PURE__ */ new Map();
|
|
154
|
-
n.traverse((e) => {
|
|
155
|
-
e !== n && e.name && !a.has(e.name) && a.set(e.name, e);
|
|
156
|
-
});
|
|
157
|
-
let o = /* @__PURE__ */ new Map();
|
|
158
|
-
for (let e of i) {
|
|
159
|
-
let t = m(e.attrs["physics:dynamicFriction"]) ?? m(e.attrs["physics:staticFriction"]), n = m(e.attrs["physics:restitution"]);
|
|
160
|
-
(e.typeName === "PhysicsMaterial" || e.apiSchemas.includes("PhysicsMaterialAPI") || t !== void 0 || n !== void 0) && o.set(e.path, {
|
|
161
|
-
...t !== void 0 && t >= 0 ? { friction: t } : {},
|
|
162
|
-
...n !== void 0 && n >= 0 ? { restitution: n } : {}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
let s = /* @__PURE__ */ new Map(), c = (e) => {
|
|
166
|
-
let t = s.get(e);
|
|
167
|
-
return t || (t = { nodeName: e }, s.set(e, t)), t;
|
|
168
|
-
};
|
|
169
|
-
for (let t of i) {
|
|
170
|
-
let n = a.get(t.name);
|
|
171
|
-
if (!n) continue;
|
|
172
|
-
let i = (t.apiSchemas.includes("PhysicsRigidBodyAPI") || p(t.attrs["physics:rigidBodyEnabled"]) === !0) && p(t.attrs["physics:rigidBodyEnabled"]) !== !1, s = (t.apiSchemas.includes("PhysicsCollisionAPI") || t.apiSchemas.includes("PhysicsMeshCollisionAPI") || p(t.attrs["physics:collisionEnabled"]) === !0) && p(t.attrs["physics:collisionEnabled"]) !== !1;
|
|
173
|
-
if (i) {
|
|
174
|
-
let e = p(t.attrs["physics:kinematicEnabled"]) === !0, r = m(t.attrs["physics:mass"]), i = e ? r !== void 0 && r >= 0 ? r : void 0 : r !== void 0 && r > 0 ? r : 1, a = h(t.attrs["physics:centerOfMass"]), o = h(t.attrs["physics:diagonalInertia"]);
|
|
175
|
-
c(n.name).motion = {
|
|
176
|
-
isKinematic: e,
|
|
177
|
-
...i === void 0 ? {} : { mass: i },
|
|
178
|
-
...a ? { centerOfMass: a } : {},
|
|
179
|
-
...o?.every((e) => e > 0) ? { inertiaDiagonal: o } : {}
|
|
180
|
-
};
|
|
10
|
+
var isUsdFileName = (name) => /\.(usd|usda|usdc|usdz)$/i.test(name.trim());
|
|
11
|
+
function bakeScalesIntoScene(root) {
|
|
12
|
+
const scales = /* @__PURE__ */ new Map();
|
|
13
|
+
const visit = (obj, px, py, pz, pathPrefix) => {
|
|
14
|
+
const sx = px * obj.scale.x;
|
|
15
|
+
const sy = py * obj.scale.y;
|
|
16
|
+
const sz = pz * obj.scale.z;
|
|
17
|
+
const objPath = obj !== root && obj.name ? `${pathPrefix}/${obj.name}` : pathPrefix;
|
|
18
|
+
if (obj.name) {
|
|
19
|
+
const absScale = [
|
|
20
|
+
Math.abs(sx),
|
|
21
|
+
Math.abs(sy),
|
|
22
|
+
Math.abs(sz)
|
|
23
|
+
];
|
|
24
|
+
scales.set(objPath, absScale);
|
|
25
|
+
if (!scales.has(obj.name)) scales.set(obj.name, absScale);
|
|
181
26
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
27
|
+
obj.position.set(obj.position.x * px, obj.position.y * py, obj.position.z * pz);
|
|
28
|
+
obj.scale.set(1, 1, 1);
|
|
29
|
+
if (isMeshObject(obj) && (Math.abs(sx - 1) > 1e-5 || Math.abs(sy - 1) > 1e-5 || Math.abs(sz - 1) > 1e-5)) {
|
|
30
|
+
const geom = obj.geometry.clone();
|
|
31
|
+
geom.applyMatrix4(new THREE.Matrix4().makeScale(sx, sy, sz));
|
|
32
|
+
if (sx * sy * sz < 0) {
|
|
33
|
+
const index = geom.getIndex();
|
|
34
|
+
if (index) {
|
|
35
|
+
const arr = index.array;
|
|
36
|
+
for (let i = 0; i + 2 < arr.length; i += 3) {
|
|
37
|
+
const tmp = arr[i + 1];
|
|
38
|
+
arr[i + 1] = arr[i + 2];
|
|
39
|
+
arr[i + 2] = tmp;
|
|
40
|
+
}
|
|
41
|
+
index.needsUpdate = true;
|
|
42
|
+
} else {
|
|
43
|
+
const count = geom.getAttribute("position")?.count ?? 0;
|
|
44
|
+
const reversed = new Uint32Array(count);
|
|
45
|
+
for (let i = 0; i + 2 < count; i += 3) {
|
|
46
|
+
reversed[i] = i;
|
|
47
|
+
reversed[i + 1] = i + 2;
|
|
48
|
+
reversed[i + 2] = i + 1;
|
|
49
|
+
}
|
|
50
|
+
geom.setIndex(new THREE.BufferAttribute(reversed, 1));
|
|
204
51
|
}
|
|
205
52
|
}
|
|
53
|
+
geom.computeVertexNormals();
|
|
54
|
+
geom.computeBoundingBox();
|
|
55
|
+
obj.geometry = geom;
|
|
206
56
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
if (!s || !a.has(s)) {
|
|
213
|
-
if (s = `${t.name}_WorldAnchor`, !a.has(s)) {
|
|
214
|
-
let r = new e.Object3D();
|
|
215
|
-
r.name = s;
|
|
216
|
-
let i = a.get(t.name);
|
|
217
|
-
i && r.position.copy(i.getWorldPosition(new e.Vector3())), n.add(r), a.set(s, r);
|
|
218
|
-
}
|
|
219
|
-
c(s).motion = { isKinematic: !0 };
|
|
220
|
-
}
|
|
221
|
-
let l = c(o.name);
|
|
222
|
-
l.motion ||= {
|
|
223
|
-
isKinematic: !1,
|
|
224
|
-
mass: 1
|
|
225
|
-
};
|
|
226
|
-
let u = h(t.attrs["physics:axis"]), d = (t.attrs["physics:axis"] ?? "X").replace(/"/g, "").trim().toUpperCase(), f = u ?? (d === "-X" ? [
|
|
227
|
-
-1,
|
|
228
|
-
0,
|
|
229
|
-
0
|
|
230
|
-
] : d === "Y" ? [
|
|
231
|
-
0,
|
|
232
|
-
1,
|
|
233
|
-
0
|
|
234
|
-
] : d === "-Y" ? [
|
|
235
|
-
0,
|
|
236
|
-
-1,
|
|
237
|
-
0
|
|
238
|
-
] : d === "Z" ? [
|
|
239
|
-
0,
|
|
240
|
-
0,
|
|
241
|
-
1
|
|
242
|
-
] : d === "-Z" ? [
|
|
243
|
-
0,
|
|
244
|
-
0,
|
|
245
|
-
-1
|
|
246
|
-
] : [
|
|
247
|
-
1,
|
|
248
|
-
0,
|
|
249
|
-
0
|
|
250
|
-
]), _ = r === "revolute" ? Math.PI / 180 : 1, y = m(t.attrs["physics:lowerLimit"]), b = m(t.attrs["physics:upperLimit"]), x = r === "fixed" ? [] : v(t.attrs, r, f, _);
|
|
251
|
-
l.joint = {
|
|
252
|
-
connectedNodeName: s,
|
|
253
|
-
kind: r,
|
|
254
|
-
...r === "fixed" ? {} : { axis: f },
|
|
255
|
-
...y !== void 0 && b !== void 0 && y <= b ? { limits: [y * _, b * _] } : {},
|
|
256
|
-
enableCollision: p(t.attrs["physics:collisionEnabled"]) === !0,
|
|
257
|
-
...x.length > 0 ? { drives: x } : {}
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
return [...s.values()];
|
|
261
|
-
}
|
|
262
|
-
function b(e) {
|
|
263
|
-
let t = "", n = !1, r = !1, i = 0, a = 0, o = !1;
|
|
264
|
-
for (let s = 0; s < e.length; s++) {
|
|
265
|
-
let c = e[s];
|
|
266
|
-
r ? (t += c, c === "\n" && (r = !1, o = !1)) : !n && c === "#" ? (r = !0, t += c) : c === "\"" && e[s - 1] !== "\\" ? (n = !n, t += c) : n ? t += c : (c === "[" ? i++ : c === "]" && (i = Math.max(0, i - 1)), c === "\n" ? (o = !1, t += c) : (c === "=" && (o = !0), i === 0 && (c === "{" || c === "}") ? (o = !1, t += `\n${c}\n`) : i === 0 && c === "(" && (!o || a > 0) ? (a++, t += a === 1 ? " (\n" : "(", o = !1) : i === 0 && c === ")" && a > 0 ? (a--, t += a === 0 ? "\n)\n" : ")", o = !1) : t += c));
|
|
267
|
-
}
|
|
268
|
-
return t;
|
|
57
|
+
for (const child of obj.children) visit(child, sx, sy, sz, objPath);
|
|
58
|
+
};
|
|
59
|
+
visit(root, 1, 1, 1, "");
|
|
60
|
+
root.updateMatrixWorld(true);
|
|
61
|
+
return scales;
|
|
269
62
|
}
|
|
270
|
-
async function
|
|
271
|
-
|
|
272
|
-
|
|
63
|
+
async function convertUsdToGlb(input, sceneExtras) {
|
|
64
|
+
const loader = new USDLoader();
|
|
65
|
+
const encoder = new TextEncoder();
|
|
66
|
+
const decoder = new TextDecoder();
|
|
67
|
+
let scene;
|
|
68
|
+
if (typeof input === "string") scene = loader.parse(normalizeUsdaWhitespace(input));
|
|
273
69
|
else {
|
|
274
|
-
|
|
275
|
-
if (
|
|
276
|
-
else if (
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
70
|
+
const u8 = new Uint8Array(input instanceof Uint8Array ? input : new Uint8Array(input));
|
|
71
|
+
if (hasUsdcMagic(u8)) scene = loader.parse(u8.buffer);
|
|
72
|
+
else if (u8.byteLength >= 2 && u8[0] === 80 && u8[1] === 75) {
|
|
73
|
+
const entries = unzipSync(u8);
|
|
74
|
+
const normalizedEntries = { ...entries };
|
|
75
|
+
for (const [name, bytes] of Object.entries(entries)) if (/\.(usd|usda)$/i.test(name) && !hasUsdcMagic(bytes)) normalizedEntries[name] = encoder.encode(normalizeUsdaWhitespace(decoder.decode(bytes)));
|
|
76
|
+
const zipped = new Uint8Array(zipSync(normalizedEntries, { level: 0 }));
|
|
77
|
+
scene = loader.parse(zipped.buffer);
|
|
78
|
+
} else scene = loader.parse(normalizeUsdaWhitespace(decoder.decode(u8)));
|
|
282
79
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
if (!(t instanceof e.Mesh) || !t.material) return;
|
|
286
|
-
let n = t.material;
|
|
287
|
-
for (let e of o) {
|
|
288
|
-
let t = n[e];
|
|
289
|
-
t && !t.image && (g.push({
|
|
290
|
-
rec: n,
|
|
291
|
-
slot: e,
|
|
292
|
-
tex: t
|
|
293
|
-
}), n[e] = null);
|
|
294
|
-
}
|
|
295
|
-
});
|
|
80
|
+
const specs = parseUsdPhysicsSpecs(extractUsdaLayers(input), scene, bakeScalesIntoScene(scene));
|
|
81
|
+
const stripped = stripUnloadedTextures(scene);
|
|
296
82
|
try {
|
|
297
83
|
return {
|
|
298
|
-
glb: new Uint8Array(await
|
|
299
|
-
scene
|
|
300
|
-
specs
|
|
84
|
+
glb: new Uint8Array(await exportKhrGlb(scene, specs, sceneExtras)),
|
|
85
|
+
scene,
|
|
86
|
+
specs
|
|
301
87
|
};
|
|
302
88
|
} finally {
|
|
303
|
-
|
|
89
|
+
restoreStrippedTextures(stripped);
|
|
304
90
|
}
|
|
305
91
|
}
|
|
306
|
-
export {
|
|
92
|
+
export { convertUsdToGlb, extractUsdaLayers, isUsdFileName, parseUsdPhysicsSpecs };
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=usdToGlb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usdToGlb.js","names":[],"sources":["../../src/importer/usdToGlb.ts"],"sourcesContent":["import * as THREE from \"three\";\nimport { exportKhrGlb, type KhrExportNodeSpec } from \"@khr3/core\";\nimport { unzipSync, zipSync } from \"three/examples/jsm/libs/fflate.module.js\";\nimport { USDLoader } from \"three/examples/jsm/loaders/USDLoader.js\";\nimport { restoreStrippedTextures, stripUnloadedTextures } from \"./khrCraftPropCompiler.js\";\nimport { isMeshObject } from \"./sceneSiNormalize.js\";\nimport { parseUsdPhysicsSpecs } from \"./usdPhysicsSpecs.js\";\nimport { extractUsdaLayers, hasUsdcMagic, normalizeUsdaWhitespace } from \"./usdTextParse.js\";\n\nexport interface UsdConversionResult {\n glb: Uint8Array;\n scene: THREE.Group;\n specs: KhrExportNodeSpec[];\n}\n\nexport { extractUsdaLayers, parseUsdPhysicsSpecs };\nexport const isUsdFileName = (name: string): boolean => /\\.(usd|usda|usdc|usdz)$/i.test(name.trim());\n\nfunction bakeScalesIntoScene(root: THREE.Group): Map<string, [number, number, number]> {\n const scales = new Map<string, [number, number, number]>();\n const visit = (obj: THREE.Object3D, px: number, py: number, pz: number, pathPrefix: string): void => {\n const sx = px * obj.scale.x;\n const sy = py * obj.scale.y;\n const sz = pz * obj.scale.z;\n const objPath = obj !== root && obj.name ? `${pathPrefix}/${obj.name}` : pathPrefix;\n if (obj.name) {\n const absScale: [number, number, number] = [Math.abs(sx), Math.abs(sy), Math.abs(sz)];\n scales.set(objPath, absScale);\n if (!scales.has(obj.name)) scales.set(obj.name, absScale);\n }\n obj.position.set(obj.position.x * px, obj.position.y * py, obj.position.z * pz);\n obj.scale.set(1, 1, 1);\n if (isMeshObject(obj) && (Math.abs(sx - 1) > 1e-5 || Math.abs(sy - 1) > 1e-5 || Math.abs(sz - 1) > 1e-5)) {\n const geom = obj.geometry.clone();\n geom.applyMatrix4(new THREE.Matrix4().makeScale(sx, sy, sz));\n if (sx * sy * sz < 0) {\n const index = geom.getIndex();\n if (index) {\n const arr = index.array;\n for (let i = 0; i + 2 < arr.length; i += 3) {\n const tmp = arr[i + 1];\n arr[i + 1] = arr[i + 2];\n arr[i + 2] = tmp;\n }\n index.needsUpdate = true;\n } else {\n const count = geom.getAttribute(\"position\")?.count ?? 0;\n const reversed = new Uint32Array(count);\n for (let i = 0; i + 2 < count; i += 3) {\n reversed[i] = i;\n reversed[i + 1] = i + 2;\n reversed[i + 2] = i + 1;\n }\n geom.setIndex(new THREE.BufferAttribute(reversed, 1));\n }\n }\n geom.computeVertexNormals();\n geom.computeBoundingBox();\n obj.geometry = geom;\n }\n for (const child of obj.children) visit(child, sx, sy, sz, objPath);\n };\n visit(root, 1, 1, 1, \"\");\n root.updateMatrixWorld(true);\n return scales;\n}\n\nexport async function convertUsdToGlb(\n input: ArrayBuffer | Uint8Array | string,\n sceneExtras?: Record<string, unknown>,\n): Promise<UsdConversionResult> {\n const loader = new USDLoader();\n const encoder = new TextEncoder();\n const decoder = new TextDecoder();\n let scene: THREE.Group;\n\n if (typeof input === \"string\") {\n scene = loader.parse(normalizeUsdaWhitespace(input));\n } else {\n const u8 = new Uint8Array(input instanceof Uint8Array ? input : new Uint8Array(input));\n if (hasUsdcMagic(u8)) {\n scene = loader.parse(u8.buffer);\n } else if (u8.byteLength >= 2 && u8[0] === 80 && u8[1] === 75) {\n const entries = unzipSync(u8);\n const normalizedEntries: Record<string, Uint8Array> = { ...entries };\n for (const [name, bytes] of Object.entries(entries)) {\n if (/\\.(usd|usda)$/i.test(name) && !hasUsdcMagic(bytes))\n normalizedEntries[name] = encoder.encode(normalizeUsdaWhitespace(decoder.decode(bytes)));\n }\n const zipped = new Uint8Array(zipSync(normalizedEntries, { level: 0 }));\n scene = loader.parse(zipped.buffer);\n } else {\n scene = loader.parse(normalizeUsdaWhitespace(decoder.decode(u8)));\n }\n }\n\n const specs = parseUsdPhysicsSpecs(extractUsdaLayers(input), scene, bakeScalesIntoScene(scene));\n const stripped = stripUnloadedTextures(scene);\n try {\n return {\n glb: new Uint8Array(await exportKhrGlb(scene, specs, sceneExtras)),\n scene,\n specs,\n };\n } finally {\n restoreStrippedTextures(stripped);\n }\n}\n"],"mappings":"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"}
|
|
@@ -1,24 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import
|
|
3
|
-
import { type PaperShellAssembly } from "@khr3/vehicles/paper-shell";
|
|
4
|
-
import * as THREE from "three";
|
|
5
|
-
import type { KolmoAuthoredNodePatch } from "../schema/kolmoSchema.js";
|
|
6
|
-
import type { StampToolId } from "./GateHudBar.js";
|
|
7
|
-
import type { ChopWizardTab } from "./ChopShopPanel.js";
|
|
8
|
-
import { type CarCabinConfig, type DriverSeatLayout, type ShellViewMode } from "./cabinMixamoRig.js";
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
import { buildSurfaceStampPatch } from "./chopShopActions.js";
|
|
9
3
|
import type { CutPartMcpRequest } from "./importerWebMcp.js";
|
|
10
|
-
import {
|
|
11
|
-
import { type GateDomain, type VehicleSubArchetype } from "./gateStore.js";
|
|
12
|
-
import type { VehiclePanelAnimator, WheelVisualSource } from "./khrCompiler.js";
|
|
13
|
-
import { type MeshIsland, type OrientTurns, type WheelAxle } from "./meshIslands.js";
|
|
14
|
-
import { type ActiveChopRole, type ChopPartRole, type CutVec3, type FaceSelection, type SurfaceSelectMode } from "./surfaceCutter.js";
|
|
15
|
-
import { type GateWorldPayload } from "./universalGateBake.js";
|
|
16
|
-
interface CutUndoEntry {
|
|
17
|
-
readonly undo: () => void;
|
|
18
|
-
readonly axles: WheelAxle[];
|
|
19
|
-
readonly propellers: number[];
|
|
20
|
-
readonly picks: Record<number, ChopPartRole>;
|
|
21
|
-
}
|
|
4
|
+
import type { GateWorldPayload } from "./universalGateBake.js";
|
|
22
5
|
export declare function useChopShopController(onSpawnInWorld?: (asset: GateWorldPayload) => void): {
|
|
23
6
|
st: import("./gateStore.js").GateState;
|
|
24
7
|
assetName: string;
|
|
@@ -27,80 +10,75 @@ export declare function useChopShopController(onSpawnInWorld?: (asset: GateWorld
|
|
|
27
10
|
targetMeters: number;
|
|
28
11
|
setTargetMeters: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
29
12
|
setYOffset: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
30
|
-
setTurns: import("react").Dispatch<import("react").SetStateAction<OrientTurns>>;
|
|
31
|
-
axles: WheelAxle[];
|
|
32
|
-
setAxles: import("react").Dispatch<import("react").SetStateAction<WheelAxle[]>>;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
setSurfaceMode: import("react").Dispatch<import("react").SetStateAction<SurfaceSelectMode>>;
|
|
13
|
+
setTurns: import("react").Dispatch<import("react").SetStateAction<import("./sceneSiNormalize.js").OrientTurns>>;
|
|
14
|
+
axles: import("./wheelAxlePairing.js").WheelAxle[];
|
|
15
|
+
setAxles: import("react").Dispatch<import("react").SetStateAction<import("./wheelAxlePairing.js").WheelAxle[]>>;
|
|
16
|
+
wheelCutters: import("./wheelCutterHelpers.js").WheelCutterSpec[];
|
|
17
|
+
setWheelCutters: import("react").Dispatch<import("react").SetStateAction<import("./wheelCutterHelpers.js").WheelCutterSpec[]>>;
|
|
18
|
+
partPicks: Record<number, import("./surfaceTopology.js").ChopPartRole>;
|
|
19
|
+
setPartPicks: import("react").Dispatch<import("react").SetStateAction<Record<number, import("./surfaceTopology.js").ChopPartRole>>>;
|
|
20
|
+
wheelSource: import("./khrCraftPropCompiler.js").WheelVisualSource;
|
|
21
|
+
setWheelSource: import("react").Dispatch<import("react").SetStateAction<import("./khrCraftPropCompiler.js").WheelVisualSource>>;
|
|
22
|
+
activeRole: import("./surfaceTopology.js").ActiveChopRole;
|
|
23
|
+
setActiveRole: import("react").Dispatch<import("react").SetStateAction<import("./surfaceTopology.js").ActiveChopRole>>;
|
|
24
|
+
surfaceMode: import("./surfaceTopology.js").SurfaceSelectMode;
|
|
25
|
+
setSurfaceMode: import("react").Dispatch<import("react").SetStateAction<import("./surfaceTopology.js").SurfaceSelectMode>>;
|
|
44
26
|
creaseDeg: number;
|
|
45
27
|
setCreaseDeg: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
46
28
|
mirrorX: boolean;
|
|
47
|
-
setMirrorX:
|
|
29
|
+
setMirrorX: (next?: boolean) => void;
|
|
30
|
+
toggleMirrorX: (next?: boolean) => void;
|
|
31
|
+
snapAxles: boolean;
|
|
32
|
+
setSnapAxles: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
33
|
+
toggleSnapAxles: (next?: boolean) => void;
|
|
34
|
+
sealArchLiner: boolean;
|
|
35
|
+
setSealArchLiner: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
36
|
+
toggleSealArchLiner: (next?: boolean) => void;
|
|
37
|
+
isCored: boolean;
|
|
38
|
+
hasPostCorePeels: boolean;
|
|
48
39
|
splitCoarse: boolean;
|
|
49
40
|
setSplitCoarse: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
50
|
-
faceSelection: FaceSelection | null;
|
|
51
|
-
setFaceSelection: import("react").Dispatch<import("react").SetStateAction<FaceSelection | null>>;
|
|
52
|
-
selectedCounts: {
|
|
53
|
-
primary: number;
|
|
54
|
-
mirrored: number;
|
|
55
|
-
};
|
|
41
|
+
faceSelection: import("./surfaceTopology.js").FaceSelection | null;
|
|
42
|
+
setFaceSelection: import("react").Dispatch<import("react").SetStateAction<import("./surfaceTopology.js").FaceSelection | null>>;
|
|
56
43
|
loopDots: {
|
|
57
44
|
islandId: number;
|
|
58
|
-
points: CutVec3[];
|
|
45
|
+
points: import("./surfaceTopology.js").CutVec3[];
|
|
59
46
|
} | null;
|
|
60
47
|
setLoopDots: import("react").Dispatch<import("react").SetStateAction<{
|
|
61
48
|
islandId: number;
|
|
62
|
-
points: CutVec3[];
|
|
49
|
+
points: import("./surfaceTopology.js").CutVec3[];
|
|
63
50
|
} | null>>;
|
|
64
51
|
hingeScrub: number;
|
|
65
52
|
setHingeScrub: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
66
53
|
explodeAmount: number;
|
|
67
54
|
setExplodeAmount: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
68
|
-
|
|
69
|
-
handleChangeWizardTab: (tab: ChopWizardTab) => void;
|
|
70
|
-
shellViewMode: ShellViewMode;
|
|
71
|
-
setShellViewMode: import("react").Dispatch<import("react").SetStateAction<ShellViewMode>>;
|
|
72
|
-
cabin: CarCabinConfig;
|
|
73
|
-
cabinFit: import("./cabinMixamoRig.js").CabinFitReport;
|
|
74
|
-
carBounds: {
|
|
75
|
-
min: [number, number, number];
|
|
76
|
-
max: [number, number, number];
|
|
77
|
-
};
|
|
78
|
-
updateCabin: (patch: Partial<CarCabinConfig>) => void;
|
|
79
|
-
setCabinLayout: (layout: DriverSeatLayout) => void;
|
|
80
|
-
autoFitCabin: () => void;
|
|
81
|
-
showDriverInStep2: boolean;
|
|
82
|
-
setShowDriverInStep2: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
83
|
-
undoStack: CutUndoEntry[];
|
|
55
|
+
undoStack: import("./useChopShopState.js").CutUndoEntry[];
|
|
84
56
|
statusNote: string | null;
|
|
85
|
-
stampTool: StampToolId;
|
|
86
|
-
setStampTool: import("react").Dispatch<import("react").SetStateAction<StampToolId>>;
|
|
87
|
-
patches: KolmoAuthoredNodePatch[];
|
|
88
|
-
setPatches: import("react").Dispatch<import("react").SetStateAction<KolmoAuthoredNodePatch[]>>;
|
|
89
|
-
liveBundle: KhrAssetBundle | null;
|
|
57
|
+
stampTool: import("./GateHudBar.js").StampToolId;
|
|
58
|
+
setStampTool: import("react").Dispatch<import("react").SetStateAction<import("./GateHudBar.js").StampToolId>>;
|
|
59
|
+
patches: import("../index.js").KolmoAuthoredNodePatch[];
|
|
60
|
+
setPatches: import("react").Dispatch<import("react").SetStateAction<import("../index.js").KolmoAuthoredNodePatch[]>>;
|
|
61
|
+
liveBundle: import("@khr3/core").KhrAssetBundle | null;
|
|
90
62
|
busy: boolean;
|
|
91
63
|
fileRef: import("react").RefObject<HTMLInputElement | null>;
|
|
92
64
|
rootObjRef: import("react").RefObject<THREE.Group<THREE.Object3DEventMap> | null>;
|
|
93
|
-
|
|
65
|
+
panelJointsRef: import("react").RefObject<import("@khr3/core/vehicle").KhrVehicleJointsHandle | null>;
|
|
94
66
|
workingScene: THREE.Group<THREE.Object3DEventMap> | null;
|
|
95
|
-
assembly: PaperShellAssembly;
|
|
96
|
-
setProxyAssembly: import("react").Dispatch<import("react").SetStateAction<PaperShellAssembly | null>>;
|
|
97
|
-
islands: MeshIsland[];
|
|
67
|
+
assembly: import("@khr3/vehicles/paper-shell").PaperShellAssembly;
|
|
68
|
+
setProxyAssembly: import("react").Dispatch<import("react").SetStateAction<import("@khr3/vehicles/paper-shell").PaperShellAssembly | null>>;
|
|
69
|
+
islands: import("./meshIslands.js").MeshIsland[];
|
|
98
70
|
wheelColors: Map<number, string>;
|
|
99
|
-
loadStarterCar: (url: string, label: string
|
|
71
|
+
loadStarterCar: (url: string, label: string) => Promise<void>;
|
|
100
72
|
ingestFile: (file: File) => Promise<void>;
|
|
101
|
-
applyDomainDefaults: (d: GateDomain, sub: VehicleSubArchetype, proxy: boolean) => void;
|
|
73
|
+
applyDomainDefaults: (d: import("./gateStore.js").GateDomain, sub: import("./gateStore.js").VehicleSubArchetype, proxy: boolean) => void;
|
|
102
74
|
handleBucketIsland: (id: number) => void;
|
|
103
|
-
handlePickFace: (hit: Step1FaceHit) => void;
|
|
75
|
+
handlePickFace: (hit: import("./Step1CalibrationPlinth.js").Step1FaceHit) => void;
|
|
76
|
+
updateWheelCutter: (id: import("./wheelCutterHelpers.js").WheelCutterId, patch: import("./wheelCutterHelpers.js").WheelCutterPatch) => void;
|
|
77
|
+
commitWheelCutter: (id: import("./wheelCutterHelpers.js").WheelCutterId, next: import("./wheelCutterHelpers.js").WheelCutterSpec) => void;
|
|
78
|
+
applyWheelCutters: (overrideCutters?: readonly import("./wheelCutterHelpers.js").WheelCutterSpec[], opts?: {
|
|
79
|
+
sealArchLiner?: boolean;
|
|
80
|
+
mirrorX?: boolean;
|
|
81
|
+
}) => void;
|
|
104
82
|
forgeScene: (label: string, sc: THREE.Group, lenM: number) => void;
|
|
105
83
|
handleCloseLoop: () => void;
|
|
106
84
|
handlePeelSelection: () => void;
|
|
@@ -114,9 +92,8 @@ export declare function useChopShopController(onSpawnInWorld?: (asset: GateWorld
|
|
|
114
92
|
key: string;
|
|
115
93
|
url: string;
|
|
116
94
|
}>;
|
|
117
|
-
handleStampSurface: (e:
|
|
95
|
+
handleStampSurface: (e: Parameters<typeof buildSurfaceStampPatch>[0]) => void;
|
|
118
96
|
wheelCount: number;
|
|
119
|
-
propellerCount: number;
|
|
120
97
|
choppedCount: number;
|
|
121
98
|
unlocked: boolean;
|
|
122
99
|
activeRoleColor: string;
|
|
@@ -126,4 +103,4 @@ export declare function useChopShopController(onSpawnInWorld?: (asset: GateWorld
|
|
|
126
103
|
autoScaleSi: () => void;
|
|
127
104
|
snapC12: () => void;
|
|
128
105
|
};
|
|
129
|
-
export
|
|
106
|
+
export type ChopShopController = ReturnType<typeof useChopShopController>;
|