3d tooltip
This commit is contained in:
@@ -21,12 +21,17 @@ export default function Home() {
|
||||
setError(errorMessage)
|
||||
}
|
||||
|
||||
const handleSelectModel = (path: string) => {
|
||||
console.log('Model selected:', path)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="relative h-screen">
|
||||
<ModelViewer
|
||||
modelPath="/models/your_model_name.gltf" //пока что передаем модель через navigation page
|
||||
onModelLoaded={handleModelLoaded}
|
||||
onError={handleError}
|
||||
onSelectModel={handleSelectModel}
|
||||
/>
|
||||
|
||||
{error && (
|
||||
|
||||
@@ -261,7 +261,6 @@ const NavigationPage: React.FC = () => {
|
||||
<div className="absolute left-0 top-[73px] bottom-0 bg-[#161824] border-r border-gray-700 z-20 w-[500px]">
|
||||
<div className="h-full overflow-auto p-4">
|
||||
<Monitoring
|
||||
objectId={objectId || undefined}
|
||||
onClose={closeMonitoring}
|
||||
onSelectModel={(path) => {
|
||||
console.log('[NavigationPage] Model selected:', path);
|
||||
@@ -416,7 +415,14 @@ const NavigationPage: React.FC = () => {
|
||||
</div>
|
||||
) : (
|
||||
<ModelViewer
|
||||
key={selectedModelPath || 'no-model'}
|
||||
modelPath={selectedModelPath}
|
||||
onSelectModel={(path) => {
|
||||
console.log('[NavigationPage] Model selected:', path);
|
||||
setSelectedModelPath(path)
|
||||
setModelError(null)
|
||||
setIsModelReady(false)
|
||||
}}
|
||||
onModelLoaded={handleModelLoaded}
|
||||
onError={handleModelError}
|
||||
focusSensorId={selectedDetector?.serial_number ?? selectedAlert?.detector_id?.toString() ?? null}
|
||||
|
||||
Reference in New Issue
Block a user