Skip to content

Conversation

creativoma
Copy link

Why

Multiple files in the codebase contain outdated FIXME comments referencing @types/[email protected] and use custom type definitions instead of the official THREE.WebGLProgramParametersWithUniforms type that is now available in the current version of @types/three.

Resolves #2514

What

  • Replaced custom shader types with official THREE.WebGLProgramParametersWithUniforms in 4 files
  • Removed outdated FIXME comments that referenced waiting for @types/[email protected]
  • Added proper TypeScript imports for the Three.js types
  • Fixed undefined checks for shader.defines in MeshTransmissionMaterial

Files updated:

  • src/core/MeshWobbleMaterial.tsx - Updated onBeforeCompile parameter type
  • src/core/MeshDistortMaterial.tsx - Updated onBeforeCompile parameter type
  • src/core/useBoxProjectedEnv.tsx - Replaced MaterialShader interface with official type
  • src/core/MeshTransmissionMaterial.tsx - Updated type and added null checks for shader.defines

Benefits:

  • Better TypeScript support and IDE experience
  • Consistency with official Three.js ecosystem
  • Access to all properties from WebGLProgramParameters (like fragmentShader, defines, etc.)
  • Cleaner codebase without outdated comments

Checklist

  • Documentation updated - Not applicable (internal type improvement)
  • Storybook entry added - Not applicable (no new components)
  • Ready to be merged

Copy link

vercel bot commented Aug 16, 2025

@creativoma is attempting to deploy a commit to the Poimandres Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

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.

Update @types/three to enable WebGLProgramParametersWithUniforms type

1 participant