Skip to content

Migrate examples to image.filter / image.wrap API#32

Merged
jfperusse merged 1 commit into
mainfrom
update/image-filter-wrap-api
May 2, 2026
Merged

Migrate examples to image.filter / image.wrap API#32
jfperusse merged 1 commit into
mainfrom
update/image-filter-wrap-api

Conversation

@jfperusse
Copy link
Copy Markdown
Collaborator

Summary

The top-level constants image.point, image.linear, image.repeat, image.clamp, image.mirror, and the per-instance image.smooth bool are being removed in the Codea engine in favor of namespaced sub-tables (image.filter.* / image.wrap.*) plus a graphics-style scope (style.filter / style.wrap). See twolivesleft/codea PR #381.

This PR updates the two example projects under "How to Codea" that referenced the removed constants:

  • docs/source/code/Examples/How to Codea/0. Migration Guide/3. Drawing.codea/Main.lua — also adopts the new image-level setter shorthand (myImg.wrap = image.wrap.clamp instead of two separate sampler.u / sampler.v assignments).
  • docs/source/code/Examples/How to Codea/5. Shaders/?? - Procedural Flames/Main.lua.

Test plan

  • Open the Migration Guide / Drawing example in Codea4 (after the engine PR merges) and verify the slime atlas renders without wrapping artifacts.
  • Open the Procedural Flames example and verify the trail effect samples cleanly.

🤖 Generated with Claude Code

The top-level constants image.point, image.linear, image.repeat,
image.clamp, image.mirror, and the per-instance image.smooth bool are
being removed in the Codea engine in favor of namespaced sub-tables
(image.filter.* / image.wrap.*) plus a graphics-style scope
(style.filter / style.wrap). See twolivesleft/codea PR #381.

Update the two example projects under "How to Codea" that referenced
the removed constants. The Migration Guide example also adopts the
new image-level setter shorthand (myImg.wrap = image.wrap.clamp).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 1, 2026 01:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Codea “How to Codea” example projects to the new image.filter.* / image.wrap.* API after removal of the legacy top-level image.* constants, ensuring examples remain compatible with the updated engine.

Changes:

  • Replace deprecated image.clamp usage with image.wrap.clamp in the Procedural Flames shader example.
  • Migrate atlas image wrapping in the Migration Guide / Drawing example to the new image-level wrap setter shorthand.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/source/code/Examples/How to Codea/5. Shaders/?? - Procedural Flames/Main.lua Updates shader texture sampler wrap constant from image.clamp to image.wrap.clamp.
docs/source/code/Examples/How to Codea/0. Migration Guide/3. Drawing.codea/Main.lua Replaces per-axis sampler wrap assignments with slime.wrap = image.wrap.clamp.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jfperusse jfperusse merged commit 3fd3fda into main May 2, 2026
5 checks passed
@jfperusse jfperusse deleted the update/image-filter-wrap-api branch May 2, 2026 17:53
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.

2 participants