Exemplo n.º 1
0
 private void AddFlare(Color color, Texture texture, float size = -1, float distance = 0, BlendMode blending = BlendMode.Normal, float opacity = 1)
 {
     distance = Mathf.Min(distance, Mathf.Max(0, distance));
     var lensFlareInfo = new LensFlareInfo()
     {
         Texture = texture, 			// THREE.Texture
         Size = size, 				// size in pixels (-1 = use texture.width)
         Distance = distance, 		// distance (0-1) from light source (0=at light source)
         x = 0,
         y = 0,
         Z = 0,		// screen position (-1 => 1) z = 0 is ontop z = 1 is back
         Scale = 1, 					// scale
         Rotation = 1, 				// rotation
         Opacity = opacity,			// opacity
         Color = color,				// color
         Blending = blending		// blending
     };
     lenFlareInfos.Add(lensFlareInfo);
 }
Exemplo n.º 2
0
        private void AddFlare(Color color, Texture texture, float size = -1, float distance = 0, BlendMode blending = BlendMode.Normal, float opacity = 1)
        {
            distance = Mathf.Min(distance, Mathf.Max(0, distance));
            var lensFlareInfo = new LensFlareInfo()
            {
                Texture  = texture,             // THREE.Texture
                Size     = size,                // size in pixels (-1 = use texture.width)
                Distance = distance,            // distance (0-1) from light source (0=at light source)
                x        = 0,
                y        = 0,
                Z        = 0,       // screen position (-1 => 1) z = 0 is ontop z = 1 is back
                Scale    = 1,       // scale
                Rotation = 1,       // rotation
                Opacity  = opacity, // opacity
                Color    = color,   // color
                Blending = blending // blending
            };

            lenFlareInfos.Add(lensFlareInfo);
        }