// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Four-quadrant atlas viewer // Not compiled or tested in-world // Setup: Use a square atlas as the face diffuse texture. Set FACE; five owner touches cycle quadrants and restoration. // Stop / restore: Touch through all four quadrants and the fifth touch restores the original settings. Restore before removing or resetting. // Notes: Classic-material controls only; PBR materials may display differently. Use a spare prim and textures whose settings you can read and restore. Another controller must not edit the same face during the preview. Uses 0.5 repeats and ±0.25 offsets. The atlas orientation depends on your image layout. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer FACE = 0; integer step; list saved; default { state_entry() { saved=llGetLinkPrimitiveParams(LINK_THIS,[PRIM_TEXTURE,FACE]); } touch_start(integer count) { if(llDetectedKey(0)!=llGetOwner())return; if(step==4) { llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TEXTURE,FACE]+saved); step=0; llOwnerSay("Original restored."); return; } float x=-0.25; float y=0.25; if(step%2)x=0.25; if(step>1)y=-0.25; llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TEXTURE,FACE,llList2String(saved,0),<0.5,0.5,0.0>,,0.0]); ++step; } }