// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Volume-preserving height study // Not compiled or tested in-world // Setup: Use an ordinary nonphysical prim well within build limits. Owner-touch previews/restores. // Stop / restore: Owner-touch again to restore the startup snapshot before removal or reset, unless setup describes a different cycle. Do not relink during a preview. // Notes: Use a spare modifiable build. Saved state lives only in script memory. Preserves bounding-box volume, not hollow or arbitrary mesh surface volume. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer preview; vector home; default { state_entry() { home=llGetScale(); } touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner())return; if(llGetStatus(STATUS_PHYSICS))return; preview=!preview; if(preview) { vector size=; if(size.x<0.01||size.y<0.01||size.z>64.0) { preview=FALSE; return; } llSetScale(size); } else { llSetScale(home); } } }