// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Eased child inspection reveal // Not compiled or tested in-world // Setup: Put in a child at its closed pose. Owner-touch toggles a half-meter root-Z reveal; each leg lasts two seconds. // Stop / restore: Owner-touch to close, then wait two seconds for Home restoration before removing or resetting. // Notes: Use a small nonphysical rezzed build with clear space. Actual prim transforms change. Original poses live only in script memory. Do not change physical status or link topology during use. Touching during a transition reverses from its current fraction. Home is restored only after the closing transition finishes. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. vector home; float value; float from; float target; integer opened; default { state_entry() { home=llGetLocalPos(); } touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner()||llGetLinkNumber()<2||llGetStatus(STATUS_PHYSICS))return; opened=!opened; from=value; target=0.0; if(opened)target=1.0; llResetTime(); llSetTimerEvent(0.1); } timer() { if(llGetLinkNumber()<2||llGetStatus(STATUS_PHYSICS)) { llSetTimerEvent(0.0); return; } float t=llGetTime()/2.0; if(t>=1.0) { t=1.0; llSetTimerEvent(0.0); } float ease=t*t*(3.0-2.0*t); value=from+(target-from)*ease; llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_POS_LOCAL,home+<0.0,0.0,value*0.5>]); } }