///////////////////////////////////////////////////////////////////////////
//    Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3    //
///////////////////////////////////////////////////////////////////////////
// Can be called after "update" (write or append) operations on the 
// PrimDrive™ in order to highlight the data-consumption and clustering 
// of sectors.
wasPrimDriveLED(integer head, integer tail) {
    // when tail overlaps head, we're done
    if(tail < head) return;
    string d = wasGetLinkDescription(tail);
    // indicate unformated blocks in red
    if(d == UNFORMATTED_MARKER) {
        llSetLinkPrimitiveParamsFast(tail, [
            PRIM_COLOR, 
            ALL_SIDES, 
            <1,0,0>, 
            1]
        );
        jump continue;
    }
    integer size = llStringLength(d);
    // GC
    d = "";
    llSetLinkPrimitiveParamsFast(tail, [
        PRIM_COLOR, 
        ALL_SIDES, 
        wasPercentToGradientBrighness(
            100*size/(float)BYTES_PER_SECTOR, 
            <1,1,1>, ZERO_VECTOR), 
        .17 + size/(float)BYTES_PER_SECTOR]
    );
@continue;
    // GC
    d = "";
    wasPrimDriveLED(head, --tail);
}

secondlife/primfs_and_primdrive/primdrive/led.txt · Last modified: 2022/11/24 07:46 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.