// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Inventory icon particle preview // Not compiled or tested in-world // Setup: Add a transparent-background texture named particle_icon to this exact prim. Owner-touch toggles the emitter. // Stop / restore: Touch to clear the emitter before removing. Existing particles fade according to their lifetime; use Stop particle effect if the starter was removed early. // Notes: Viewer-only particles do not provide collision geometry. Uses a sparse emission rate and replaces any previous emitter settings. This previews your asset as a particle, not as a prim face. Transparent padding changes apparent sprite size and texture rights still apply. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer active; default { touch_start(integer count) { if(llDetectedKey(0)!=llGetOwner())return; if(!active&&llGetInventoryType("particle_icon")!=INVENTORY_TEXTURE) { llOwnerSay("Add particle_icon texture."); return; } active=!active; if(!active) { llParticleSystem([]); return; } llParticleSystem([PSYS_PART_FLAGS,PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK, PSYS_SRC_PATTERN,PSYS_SRC_PATTERN_ANGLE_CONE,PSYS_SRC_TEXTURE,"particle_icon", PSYS_SRC_ANGLE_BEGIN,0.0,PSYS_SRC_ANGLE_END,0.0,PSYS_PART_START_COLOR,<1.0,1.0,1.0>,PSYS_PART_END_COLOR,<1.0,1.0,1.0>, PSYS_PART_START_ALPHA,0.9,PSYS_PART_END_ALPHA,0.0,PSYS_PART_START_SCALE,<0.15,0.15,0.0>,PSYS_PART_END_SCALE,<0.3,0.3,0.0>, PSYS_PART_MAX_AGE,3.0,PSYS_SRC_BURST_RATE,1.0,PSYS_SRC_BURST_PART_COUNT,1,PSYS_SRC_BURST_SPEED_MIN,0.15,PSYS_SRC_BURST_SPEED_MAX,0.15]); } }