OsParticleSystem

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "{{osslfunc |threat_level= |permissions= |delay= |Test * |ossl_example=<source lang="lsl"> //Written By Draconis Neurocam //You are free: // * to Share — to copy,...")
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
|threat_level=
+
|threat_level= ignored
|permissions=
+
|permissions= none
 
|delay=
 
|delay=
 +
|function_syntax=osParticleSystem(list rules)
 
|Test
 
|Test
 
*  
 
*  
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
 +
 
//Written By Draconis Neurocam
 
//Written By Draconis Neurocam
    //You are free:
+
//You are free:
    //    * to Share — to copy, distribute and transmit the work
+
//    * to Share — to copy, distribute and transmit the work
    //    * to Remix — to adapt the work
+
//    * to Remix — to adapt the work
    //Under the following conditions:
+
//Under the following conditions:
    //    *
+
//    *
    //      Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
+
//      Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
    //      Attribute this work:
+
//      Attribute this work:
    //      What does "Attribute this work" mean?
+
//      What does "Attribute this work" mean?
    //      The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work.
+
//      The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work.
    //      Doing so will also include metadata on your page so that others can find the original work as well.
+
//      Doing so will also include metadata on your page so that others can find the original work as well.
    //    * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
+
//    * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
    //    * Any of the above conditions can be waived if you get permission from the copyright holder.
+
//    * Any of the above conditions can be waived if you get permission from the copyright holder.
    //    * Nothing in this license impairs or restricts the author's moral rights.
+
//    * Nothing in this license impairs or restricts the author's moral rights.
    //http://creativecommons.org/licenses/by/3.0/
+
//http://creativecommons.org/licenses/by/3.0/
  
    float burst_radius = 1.0;
+
float burst_radius = 1.0;
    float angle_begin  = PI_BY_TWO;
+
float angle_begin  = PI_BY_TWO;
    float angle_end    = PI_BY_TWO;
+
float angle_end    = PI_BY_TWO;
    key  target      = "";
+
key  target      = "";
  
    vector  start_color = <0.5,0.0,1.0>;
+
vector  start_color = <0.5,0.0,1.0>;
    vector  end_color  = <0.0,0.0,0.0>;
+
vector  end_color  = <0.0,0.0,0.0>;
    float  start_alpha = 1.0;
+
float  start_alpha = 1.0;
    float  end_alpha  = 0.1;
+
float  end_alpha  = 0.1;
    vector  start_scale = <0.5,0.5,0.5>;
+
vector  start_scale = <0.5,0.5,0.5>;
    vector  end_scale  = <1.0,1.0,1.0>;
+
vector  end_scale  = <1.0,1.0,1.0>;
    key    texture    = "dcab6cc4-172f-e30d-b1d0-f558446f20d4";
+
key    texture    = "dcab6cc4-172f-e30d-b1d0-f558446f20d4";
    float  start_glow  = 0.0;
+
float  start_glow  = 0.0;
    float  end_glow    = 0.0;
+
float  end_glow    = 0.0;
  
    float  source_max_age      = 0.0;
+
float  source_max_age      = 0.0;
    float  particle_max_age    = 2.0;
+
float  particle_max_age    = 2.0;
    float  burst_rate          = 0.02;
+
float  burst_rate          = 0.02;
    integer burst_particle_count = 2;
+
integer burst_particle_count = 2;
  
    vector  acceleration = <0.0,1.0,1.0>;
+
vector  acceleration = <0.0,1.0,1.0>;
    vector  omega        = <2.0,0.0,0.0>;
+
vector  omega        = <2.0,0.0,0.0>;
    float  speed_min    = 1.0;
+
float  speed_min    = 1.0;
    float  speed_max    = 1.0;
+
float  speed_max    = 1.0;
  
    Particles()
+
Particles()
    {
+
{
        osParticleSystem([
+
    osParticleSystem([
  
            //System Behaviour
+
        //System Behaviour
            PSYS_PART_FLAGS,
+
        PSYS_PART_FLAGS,
                            //PSYS_PART_BOUNCE_MASK
+
                            //PSYS_PART_BOUNCE_MASK
                            PSYS_PART_EMISSIVE_MASK
+
                            PSYS_PART_EMISSIVE_MASK
                            //| PSYS_PART_FOLLOW_SRC_MASK
+
                            //| PSYS_PART_FOLLOW_SRC_MASK
                            | PSYS_PART_FOLLOW_VELOCITY_MASK
+
                            | PSYS_PART_FOLLOW_VELOCITY_MASK
                            | PSYS_PART_INTERP_COLOR_MASK
+
                            | PSYS_PART_INTERP_COLOR_MASK
                            | PSYS_PART_INTERP_SCALE_MASK
+
                            | PSYS_PART_INTERP_SCALE_MASK
                            //| PSYS_PART_RIBBON_MASK
+
                            //| PSYS_PART_RIBBON_MASK
                            //| PSYS_PART_TARGET_LINEAR_MASK
+
                            //| PSYS_PART_TARGET_LINEAR_MASK
                            //| PSYS_PART_TARGET_POS_MASK
+
                            //| PSYS_PART_TARGET_POS_MASK
                            //| PSYS_PART_WIND_MASK
+
                            //| PSYS_PART_WIND_MASK
                            ,
+
 
+
            //System Presentation
+
            PSYS_SRC_PATTERN,
+
                            //PSYS_SRC_PATTERN_ANGLE
+
                            //PSYS_SRC_PATTERN_ANGLE_CONE
+
                            //PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
+
                            PSYS_SRC_PATTERN_DROP
+
                            //PSYS_SRC_PATTERN_EXPLODE
+
 
                             ,
 
                             ,
  
            PSYS_SRC_BURST_RADIUS, burst_radius,
+
        //System Presentation
            //PSYS_SRC_INNERANGLE, angle_begin,    //Either or
+
        PSYS_SRC_PATTERN,
            //PSYS_SRC_OUTERANGLE, angle_end,
+
                        //PSYS_SRC_PATTERN_ANGLE
            PSYS_SRC_ANGLE_BEGIN,  angle_begin,    //Either or
+
                        //PSYS_SRC_PATTERN_ANGLE_CONE
            PSYS_SRC_ANGLE_END,    angle_end,
+
                        //PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
            PSYS_SRC_TARGET_KEY,  target,
+
                        PSYS_SRC_PATTERN_DROP
 +
                        //PSYS_SRC_PATTERN_EXPLODE
 +
                        ,
  
            //Particle appearance
+
        PSYS_SRC_BURST_RADIUS, burst_radius,
            PSYS_PART_START_COLOR, start_color,
+
        //PSYS_SRC_INNERANGLE, angle_begin,     //Either or
            PSYS_PART_END_COLOR,   end_color,
+
        //PSYS_SRC_OUTERANGLE, angle_end,
            PSYS_PART_START_ALPHA, start_alpha,
+
        PSYS_SRC_ANGLE_BEGIN, angle_begin,     //Either or
            PSYS_PART_END_ALPHA,   end_alpha,
+
        PSYS_SRC_ANGLE_END,   angle_end,
            PSYS_PART_START_SCALE, start_scale,
+
        PSYS_SRC_TARGET_KEYtarget,
            PSYS_PART_END_SCALEend_scale,
+
            PSYS_SRC_TEXTURE,      texture,
+
            PSYS_PART_START_GLOW,  start_glow,
+
            PSYS_PART_END_GLOW,    end_glow,
+
  
            //Particle Blending
+
        //Particle appearance
            PSYS_PART_BLEND_FUNC_SOURCE,
+
        PSYS_PART_START_COLOR, start_color,
                                      //PSYS_PART_BF_ONE
+
        PSYS_PART_END_COLOR,  end_color,
                                      //PSYS_PART_BF_ZERO
+
        PSYS_PART_START_ALPHA, start_alpha,
                                      //PSYS_PART_BF_DEST_COLOR
+
        PSYS_PART_END_ALPHA,  end_alpha,
                                      //PSYS_PART_BF_SOURCE_COLOR
+
        PSYS_PART_START_SCALE, start_scale,
                                      //PSYS_PART_BF_ONE_MINUS_DEST_COLOR
+
        PSYS_PART_END_SCALE,  end_scale,
                                      //PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR
+
        PSYS_SRC_TEXTURE,      texture,
                                      PSYS_PART_BF_SOURCE_ALPHA
+
        PSYS_PART_START_GLOW,  start_glow,
                                      //PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA
+
        PSYS_PART_END_GLOW,   end_glow,
                                      ,
+
            PSYS_PART_BLEND_FUNC_DEST,
+
                                      //PSYS_PART_BF_ONE
+
                                      //PSYS_PART_BF_ZERO
+
                                      //PSYS_PART_BF_DEST_COLOR
+
                                      //PSYS_PART_BF_SOURCE_COLOR
+
                                      //PSYS_PART_BF_ONE_MINUS_DEST_COLOR
+
                                      //PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR
+
                                      //PSYS_PART_BF_SOURCE_ALPHA
+
                                      PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA
+
                                      ,
+
  
            //Particle Flow
+
        //Particle Blending
            PSYS_SRC_MAX_AGE,          source_max_age,
+
        PSYS_PART_BLEND_FUNC_SOURCE,
            PSYS_PART_MAX_AGE,        particle_max_age,
+
                                    //PSYS_PART_BF_ONE
            PSYS_SRC_BURST_RATE,      burst_rate,
+
                                    //PSYS_PART_BF_ZERO
            PSYS_SRC_BURST_PART_COUNT, burst_particle_count,
+
                                    //PSYS_PART_BF_DEST_COLOR
 +
                                    //PSYS_PART_BF_SOURCE_COLOR
 +
                                    //PSYS_PART_BF_ONE_MINUS_DEST_COLOR
 +
                                    //PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR
 +
                                    PSYS_PART_BF_SOURCE_ALPHA
 +
                                    //PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA
 +
                                    ,
 +
         PSYS_PART_BLEND_FUNC_DEST,
 +
                                    //PSYS_PART_BF_ONE
 +
                                    //PSYS_PART_BF_ZERO
 +
                                    //PSYS_PART_BF_DEST_COLOR
 +
                                    //PSYS_PART_BF_SOURCE_COLOR
 +
                                    //PSYS_PART_BF_ONE_MINUS_DEST_COLOR
 +
                                    //PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR
 +
                                    //PSYS_PART_BF_SOURCE_ALPHA
 +
                                    PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA
 +
                                    ,
  
            //Particle Motion
+
        //Particle Flow
            PSYS_SRC_ACCEL,           acceleration,
+
        PSYS_SRC_MAX_AGE,         source_max_age,
            PSYS_SRC_OMEGA,           omega,
+
        PSYS_PART_MAX_AGE,         particle_max_age,
            PSYS_SRC_BURST_SPEED_MIN, speed_min,
+
        PSYS_SRC_BURST_RATE,       burst_rate,
            PSYS_SRC_BURST_SPEED_MAX, speed_max
+
        PSYS_SRC_BURST_PART_COUNT, burst_particle_count,
  
            ]);
+
        //Particle Motion
    }
+
        PSYS_SRC_ACCEL,          acceleration,
 +
        PSYS_SRC_OMEGA,          omega,
 +
        PSYS_SRC_BURST_SPEED_MIN, speed_min,
 +
        PSYS_SRC_BURST_SPEED_MAX, speed_max
  
    default
+
        ]);
 +
}
 +
 
 +
default
 +
{
 +
    state_entry()
 
     {
 
     {
         state_entry()
+
         Particles();
        {
+
            Particles();
+
        }
+
 
     }
 
     }
 +
}
 +
 
</source>
 
</source>
 
|additional_info=
 
|additional_info=

Latest revision as of 15:26, 14 June 2023

osParticleSystem(list rules)
No descriptions provided
Threat Level This function does not do a threat level check
Permissions none
Extra Delay No function delay specified
Example(s)
//Written By Draconis Neurocam
//You are free:
//    * to Share — to copy, distribute and transmit the work
//    * to Remix — to adapt the work
//Under the following conditions:
//    *
//      Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
//      Attribute this work:
//      What does "Attribute this work" mean?
//      The page you came from contained embedded licensing metadata, including how the creator wishes to be attributed for re-use. You can use the HTML here to cite the work.
//      Doing so will also include metadata on your page so that others can find the original work as well.
//    * For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
//    * Any of the above conditions can be waived if you get permission from the copyright holder.
//    * Nothing in this license impairs or restricts the author's moral rights.
//http://creativecommons.org/licenses/by/3.0/
 
float burst_radius = 1.0;
float angle_begin  = PI_BY_TWO;
float angle_end    = PI_BY_TWO;
key   target       = "";
 
vector  start_color = <0.5,0.0,1.0>;
vector  end_color   = <0.0,0.0,0.0>;
float   start_alpha = 1.0;
float   end_alpha   = 0.1;
vector  start_scale = <0.5,0.5,0.5>;
vector  end_scale   = <1.0,1.0,1.0>;
key     texture     = "dcab6cc4-172f-e30d-b1d0-f558446f20d4";
float   start_glow  = 0.0;
float   end_glow    = 0.0;
 
float   source_max_age       = 0.0;
float   particle_max_age     = 2.0;
float   burst_rate           = 0.02;
integer burst_particle_count = 2;
 
vector  acceleration = <0.0,1.0,1.0>;
vector  omega        = <2.0,0.0,0.0>;
float   speed_min    = 1.0;
float   speed_max    = 1.0;
 
Particles()
{
    osParticleSystem([
 
        //System Behaviour
        PSYS_PART_FLAGS,
                            //PSYS_PART_BOUNCE_MASK
                            PSYS_PART_EMISSIVE_MASK
                            //| PSYS_PART_FOLLOW_SRC_MASK
                            | PSYS_PART_FOLLOW_VELOCITY_MASK
                            | PSYS_PART_INTERP_COLOR_MASK
                            | PSYS_PART_INTERP_SCALE_MASK
                            //| PSYS_PART_RIBBON_MASK
                            //| PSYS_PART_TARGET_LINEAR_MASK
                            //| PSYS_PART_TARGET_POS_MASK
                            //| PSYS_PART_WIND_MASK
                            ,
 
        //System Presentation
        PSYS_SRC_PATTERN,
                        //PSYS_SRC_PATTERN_ANGLE
                        //PSYS_SRC_PATTERN_ANGLE_CONE
                        //PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
                        PSYS_SRC_PATTERN_DROP
                        //PSYS_SRC_PATTERN_EXPLODE
                        ,
 
        PSYS_SRC_BURST_RADIUS, burst_radius,
        //PSYS_SRC_INNERANGLE, angle_begin,     //Either or
        //PSYS_SRC_OUTERANGLE, angle_end,
        PSYS_SRC_ANGLE_BEGIN,  angle_begin,     //Either or
        PSYS_SRC_ANGLE_END,    angle_end,
        PSYS_SRC_TARGET_KEY,   target,
 
        //Particle appearance
        PSYS_PART_START_COLOR, start_color,
        PSYS_PART_END_COLOR,   end_color,
        PSYS_PART_START_ALPHA, start_alpha,
        PSYS_PART_END_ALPHA,   end_alpha,
        PSYS_PART_START_SCALE, start_scale,
        PSYS_PART_END_SCALE,   end_scale,
        PSYS_SRC_TEXTURE,      texture,
        PSYS_PART_START_GLOW,  start_glow,
        PSYS_PART_END_GLOW,    end_glow,
 
        //Particle Blending
        PSYS_PART_BLEND_FUNC_SOURCE,
                                    //PSYS_PART_BF_ONE
                                    //PSYS_PART_BF_ZERO
                                    //PSYS_PART_BF_DEST_COLOR
                                    //PSYS_PART_BF_SOURCE_COLOR
                                    //PSYS_PART_BF_ONE_MINUS_DEST_COLOR
                                    //PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR
                                    PSYS_PART_BF_SOURCE_ALPHA
                                    //PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA
                                    ,
        PSYS_PART_BLEND_FUNC_DEST,
                                    //PSYS_PART_BF_ONE
                                    //PSYS_PART_BF_ZERO
                                    //PSYS_PART_BF_DEST_COLOR
                                    //PSYS_PART_BF_SOURCE_COLOR
                                    //PSYS_PART_BF_ONE_MINUS_DEST_COLOR
                                    //PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR
                                    //PSYS_PART_BF_SOURCE_ALPHA
                                    PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA
                                    ,
 
        //Particle Flow
        PSYS_SRC_MAX_AGE,          source_max_age,
        PSYS_PART_MAX_AGE,         particle_max_age,
        PSYS_SRC_BURST_RATE,       burst_rate,
        PSYS_SRC_BURST_PART_COUNT, burst_particle_count,
 
        //Particle Motion
        PSYS_SRC_ACCEL,           acceleration,
        PSYS_SRC_OMEGA,           omega,
        PSYS_SRC_BURST_SPEED_MIN, speed_min,
        PSYS_SRC_BURST_SPEED_MAX, speed_max
 
        ]);
}
 
default
{
    state_entry()
    {
        Particles();
    }
}


[edit] See Also

  • Test
Personal tools
General
About This Wiki