diff --git a/app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx b/app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx index 23b566b..f80fca0 100644 --- a/app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx +++ b/app/src/components/layout/sidebarRight/mechanics/ConveyorMechanics.tsx @@ -216,7 +216,7 @@ const ConveyorMechanics: React.FC = () => { setSimulationPaths(updatedPaths); }; - const handleSpeedChange = (speed: number) => { + const handleSpeedChange = (speed: number | string) => { if (!selectedPath) return; const updatedPaths = simulationPaths.map((path) => @@ -630,11 +630,12 @@ const ConveyorMechanics: React.FC = () => { )} {selectedPath && !selectedItem && ( -
+
handleSpeedChange(parseFloat(value))} + min={0} + value={selectedPath.path.speed === "Inherit" ? "" : selectedPath.path.speed.toString()} + onChange={(value) => handleSpeedChange((value === "") ? "Inherit" : parseInt(value))} />
)} diff --git a/app/src/modules/market/AssetPreview.tsx b/app/src/modules/market/AssetPreview.tsx index a3eb23c..db8d3c3 100644 --- a/app/src/modules/market/AssetPreview.tsx +++ b/app/src/modules/market/AssetPreview.tsx @@ -9,7 +9,7 @@ import * as THREE from "three"; // Define the shape of the selected card interface SelectedCard { assetName: string; - uploadedOn: string; + uploadedOn: number; price: number; rating: number; views: number; diff --git a/app/src/modules/simulation/behaviour/behaviour.tsx b/app/src/modules/simulation/behaviour/behaviour.tsx index fa976aa..c1281b5 100644 --- a/app/src/modules/simulation/behaviour/behaviour.tsx +++ b/app/src/modules/simulation/behaviour/behaviour.tsx @@ -52,7 +52,7 @@ function Behaviour() { ], assetPosition: [...item.position], assetRotation: [item.rotation.x, item.rotation.y, item.rotation.z], - speed: 1, + speed: 'Inherit', }; newPaths.push(newPath); diff --git a/app/src/types/world/worldTypes.d.ts b/app/src/types/world/worldTypes.d.ts index 39ebeeb..31c032c 100644 --- a/app/src/types/world/worldTypes.d.ts +++ b/app/src/types/world/worldTypes.d.ts @@ -300,7 +300,7 @@ interface ConveyorEventsSchema { }[]; assetPosition: [number, number, number]; assetRotation: [number, number, number]; - speed: number; + speed: number | string; } interface VehicleEventsSchema {