Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Rainbow L94rainbowgbiv  

L94rainbowgbiv

L9.4-rainbow-gbiv.lsl

Category: Rainbow
By : Dana Moore
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for L94rainbowgbiv
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. L94rainbowgbiv_1.lsl
1
2 // Copyright (c) 2008, Scripting Your World
3 // All rights reserved.
4 //
5 // Scripting Your World
6 // By Dana Moore, Michael Thome, and Dr. Karen Zita Haigh
7 // http://syw.fabulo.us
8 // http://www.amazon.com/Scripting-Your-World-Official-Second/dp/0470339837/
9 //
10 // You are permitted to use, share, and adapt this code under the
11 // terms of the Creative Commons Public License described in full
12 // at http://creativecommons.org/licenses/by/3.0/legalcode.
13 // That means you must keep the credits, do nothing to damage our
14 // reputation, and do not suggest that we endorse you or your work.
15
16 // Listing 9.4: Rainbow -- Green, Blue, Indigo, and Violet
17
18 integer NUM_PARTICLES_PER_RADIAN = 50;
19 float RAINBOW_ARC = PI_BY_TWO;
20
21 startRainbowGBIV()
22 {
23 integer numParticles = (integer)(RAINBOW_ARC *
24 NUM_PARTICLES_PER_RADIAN);
25 float age = 10.0; // you can also use these in the call
26 float burstRate = 0.2; // to llParticleSystem()
27 float total = (age * numParticles) / burstRate;
28 llOwnerSay("This emitter manages "+(string)total +" particles");
29
30 // Based on Listing B.1. Unchanged values removed to save trees
33 PSYS_PART_INTERP_SCALE_MASK | // let it grow
35 //Appearance
36 PSYS_PART_START_SCALE, <1.75, 0.3, 0.0>, // <1,1,0>,
37 PSYS_PART_END_SCALE, <2.00, 0.3, 0.0>, // <1,1,0>,
38 PSYS_PART_START_COLOR, <1.0, 0.0, 1.0>, // <1,1,1>,
39 PSYS_PART_END_COLOR, <0.0, 1.0, 0.0>, // <1,1,1>,
40 PSYS_PART_START_ALPHA, 0.8, // 1.00,
41 PSYS_PART_END_ALPHA, 0.8, // 1.00,
42 //Flow
43 PSYS_PART_MAX_AGE, age, // 10.00,
44 PSYS_SRC_BURST_RATE, burstRate, // 0.10,
45 PSYS_SRC_BURST_PART_COUNT, numParticles, // 1,
46 //Placement
47 PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE, // DROP,
48 PSYS_SRC_BURST_RADIUS, 14.0, // 0.00,
49 PSYS_SRC_ANGLE_BEGIN, 0.0, // 0.00,
50 PSYS_SRC_ANGLE_END, RAINBOW_ARC, // 0.00,
51 //Movement
52 PSYS_SRC_BURST_SPEED_MIN, 0.1, // 1.00,
53 PSYS_SRC_BURST_SPEED_MAX, 0.1 // 1.00,
54 ]);
55 }
56
57 default {
58 state_entry() {
60 startRainbowGBIV();
61 }
62 on_rez(integer _n) {
64 }
65 }
66 // END //

Back to the Best Free Tools in Second Life and OpenSim.