From 8c31b0b4cf2673b97163ee7961b9213423851012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B0=D1=81=D1=83=D0=BB?= Date: Tue, 10 Dec 2024 13:50:03 +0300 Subject: [PATCH 1/2] feat: add normalized nodes, reduce rerenders, add particles --- src/components/App/index.tsx | 4 - .../Graph/Connections/LineComponent.tsx | 33 +- .../Universe/Graph/Connections/index.tsx | 11 +- .../Universe/Graph/Cubes/Text/index.tsx | 292 ++++++++---------- src/components/Universe/Graph/Cubes/index.tsx | 43 ++- src/components/Universe/Graph/index.tsx | 13 +- src/components/Universe/Lights/index.tsx | 11 +- src/components/Universe/index.tsx | 5 +- .../PlayerContols/Controls/index.tsx | 2 +- .../ProgressBar/Markers/Marker/index.tsx | 2 +- .../ProgressBar/Markers/index.tsx | 2 +- src/components/mindset/index.tsx | 48 ++- src/stores/useDataStore/index.ts | 217 +++++-------- src/stores/useGraphStore/index.ts | 24 +- src/types/index.ts | 3 + 15 files changed, 359 insertions(+), 351 deletions(-) diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index 4e0464179..4e99431c5 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -1,4 +1,3 @@ -import { Leva } from 'leva' import { lazy, Suspense, useCallback, useEffect, useRef } from 'react' import { FormProvider, useForm } from 'react-hook-form' import { useSearchParams } from 'react-router-dom' @@ -8,7 +7,6 @@ import styled from 'styled-components' import { Flex } from '~/components/common/Flex' import { GlobalStyle } from '~/components/GlobalStyle' import { Overlay } from '~/components/Universe/Overlay' // Import Overlay directly -import { isDevelopment } from '~/constants' import { useSocket } from '~/hooks/useSockets' import { useAiSummaryStore } from '~/stores/useAiSummaryStore' import { useAppStore } from '~/stores/useAppStore' @@ -341,8 +339,6 @@ export const App = () => { -