Skip to content

Update ThreeComponent for new createMaterial API#17

Open
AndrewRayCode wants to merge 1 commit into
mainfrom
spork
Open

Update ThreeComponent for new createMaterial API#17
AndrewRayCode wants to merge 1 commit into
mainfrom
spork

Conversation

@AndrewRayCode

Copy link
Copy Markdown
Contributor

Summary

  • Updated createMaterial() call site to match new signature — now takes compileResult and graph directly and returns Material base type
  • Removed stale engineMaterial and cache fields from ThreeRuntime initialization
  • Cast material to any where needed (wireframe, uniforms) since Material base type lacks those properties
  • Depends on [ShaderFrog/core#spork] for the new createMaterial and ThreeRuntime types

Test plan

  • Editor loads without TypeScript errors
  • Shader compiles and material renders in the Three.js preview

🤖 Generated with Claude Code

createMaterial now returns Material base type and handles onBeforeCompile
internally. Update call site to use new signature and cast as needed.
Remove stale engineMaterial and cache fields from ThreeRuntime initialization.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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