// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Texture orientation preview // Not compiled or tested in-world // Setup: Set FACE and use an original texture you can read and restore. The script captures its texture and UV settings. Owner-touch cycles four orientations. // Stop / restore: After the fourth touch the original UV rotation is restored. Remove or reset only then. // Notes: Changes classic diffuse UV rotation. A PBR material has separate texture transforms. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. Not compiled or tested in-world. integer FACE = 0; integer step; list original; default { state_entry() { original = llGetLinkPrimitiveParams(LINK_THIS, [PRIM_TEXTURE, FACE]); } touch_start(integer count) { if (llDetectedKey(0) != llGetOwner()) return; step = (step + 1) % 4; list settings = llListReplaceList(original, [llList2Float(original, 3) + step * PI_BY_TWO], 3, 3); llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TEXTURE, FACE] + settings); if (!step) llOwnerSay("Original texture rotation restored."); } }