Skip to content

refactor(core): separate resource factory input types - #4197

Closed
ibgreen wants to merge 1 commit into
masterfrom
codex/resource-ownership-type-prep
Closed

ibgreen wants to merge 1 commit into
masterfrom
codex/resource-ownership-type-prep

Conversation

@ibgreen

@ibgreen ibgreen commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Goals

Make texture and framebuffer factory input types independently reviewable ahead of #4193.

Changes

Name the two factory input types and use them consistently across Device, the three backend implementations and DynamicTexture. Derive forwarding clone and sampler parameter types from Texture. The aliases currently accept exactly the same inputs as TextureProps and FramebufferProps.

Verification

Compared TypeScript's JavaScript output for every changed source file with the base revision. The emitted JavaScript is identical.


Note

Low Risk
This is a type-only refactoring that preserves existing runtime behavior and type compatibility.

Overview
Introduces dedicated CreateTextureProps and CreateFramebufferProps types (currently aliased to TextureProps and FramebufferProps) and exports them from @luma.gl/core.

Updates Device.createTexture(), Device.createFramebuffer(), and their implementations across WebGL, WebGPU, and Null backends to consume the new factory types. Also updates WEBGLTexture and DynamicTexture to derive method parameters for setSampler() and clone() directly from Texture.

Reviewed by Cursor Bugbot for commit a068e21. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] This PR appears safe to merge.

Summary

Names texture and framebuffer factory inputs without changing their accepted values.

  • Texture and framebuffer factories have their own public input type names.

Reviews (1) · Last reviewed commit: "Separate texture and framebuffer factory..." · Reviewed by Greptile

@ibgreen ibgreen closed this Dec 4, 2026
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