From 78e5c26df5552f71a80ef37a6e0b018551bd0aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Franc=CC=A7ois=20Pe=CC=81russe?= Date: Thu, 30 Apr 2026 21:46:58 -0400 Subject: [PATCH] Migrate examples to image.filter / image.wrap API 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) --- .../How to Codea/0. Migration Guide/3. Drawing.codea/Main.lua | 3 +-- .../How to Codea/5. Shaders/?? - Procedural Flames/Main.lua | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/source/code/Examples/How to Codea/0. Migration Guide/3. Drawing.codea/Main.lua b/docs/source/code/Examples/How to Codea/0. Migration Guide/3. Drawing.codea/Main.lua index af921f6..c7f59d8 100644 --- a/docs/source/code/Examples/How to Codea/0. Migration Guide/3. Drawing.codea/Main.lua +++ b/docs/source/code/Examples/How to Codea/0. Migration Guide/3. Drawing.codea/Main.lua @@ -18,8 +18,7 @@ function setup() -- Load an image atlas local adventure = asset.builtin.Pixel_Adventure slime = image.read(adventure.Enemies.Slime.."/Idle-Run (44x30).png") - slime.sampler.u = image.clamp - slime.sampler.v = image.clamp + slime.wrap = image.wrap.clamp -- Slice up the atlas using the sprite cell size -- Individual slices can be accessed with atlas[i] diff --git a/docs/source/code/Examples/How to Codea/5. Shaders/?? - Procedural Flames/Main.lua b/docs/source/code/Examples/How to Codea/5. Shaders/?? - Procedural Flames/Main.lua index 96812be..241203a 100644 --- a/docs/source/code/Examples/How to Codea/5. Shaders/?? - Procedural Flames/Main.lua +++ b/docs/source/code/Examples/How to Codea/5. Shaders/?? - Procedural Flames/Main.lua @@ -232,8 +232,8 @@ function setup() trails = shader.read(asset.Trails) trailEffect = shader.read(asset.Trail_Effect_Baked) - trailEffect._gradient1.sampler.u = image.clamp - trailEffect._gradient.sampler.u = image.clamp + trailEffect._gradient1.sampler.u = image.wrap.clamp + trailEffect._gradient.sampler.u = image.wrap.clamp --trailEffect._gradient = trailEffect._gradient