Skip to content

Refactor: Modularize app.tsx and Decompose GL Utilities#22

Open
dhruvicious wants to merge 3 commits intoiyinchao:mainfrom
dhruvicious:main
Open

Refactor: Modularize app.tsx and Decompose GL Utilities#22
dhruvicious wants to merge 3 commits intoiyinchao:mainfrom
dhruvicious:main

Conversation

@dhruvicious
Copy link

This PR performs a structural refactor of the application by:

  1. Splitting the monolithic app.tsx into dedicated UI components and custom hooks.
  2. Decomposing the previously consolidated GLUtils module (located under /utils) into individual, responsibility-focused modules.

The refactor improves separation of concerns, maintainability, and long-term scalability without introducing any functional changes.

Extracted Components:

  1. BgSelect

Moved Components:

  1. ResizableWindow
  2. PresetControls
  3. Controls

Extracted Hooks:

  1. useBgTextureState
  2. useCanvasInfo
  3. useMouseSpring
  4. useResizeObserver
  5. useWebGLRenderer

Previously, WebGL-related logic was grouped inside a single GLUtils file within /utils.
This PR splits that file into dedicated modules under /GLUtils:

  1. CreateEmptyTexture
  2. FrameBuffer
  3. LoadTextureFromURL
  4. MultiPassRenderer
  5. RenderPass
  6. ShaderProgram
  7. UpdateVideoTexture
  8. types
  9. index (barrel export)

Functional Impact:
None.
This is a non-breaking structural refactor.

@vercel
Copy link

vercel bot commented Feb 24, 2026

@dhruvicious is attempting to deploy a commit to the iyinchao's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant