Class: Sprite_Picture
- Inherits:
-
ShaderedSprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- ShaderedSprite
- Sprite_Picture
- Defined in:
- docs/01450_Systems_00003_Map_Engine.rb
Overview
A sprite that show a Game_Picture on the screen
Constant Summary collapse
- SPRITE_SHADER =
Shader of a Sprite Picture to allow color & tone processing over them
" uniform vec4 tone;\n const vec3 lumaF = vec3(.299, .587, .114);\n uniform sampler2D texture;\n void main()\n {\n vec4 frag = texture2D(texture, gl_TexCoord[0].xy);\n float luma = dot(frag.rgb, lumaF);\n frag.rgb += tone.rgb;\n frag.rgb = mix(frag.rgb, vec3(luma), tone.w);\n frag.a *= gl_Color.a;\n // Result\n gl_FragColor = frag;\n }\n"
Instance Attribute Summary collapse
-
#gif_loop_disabled ⇒ Boolean
Tell if the loop of the gif is disabled or not.
Attributes inherited from LiteRGSS::ShaderedSprite
Attributes inherited from LiteRGSS::Sprite
#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y
Instance Method Summary collapse
-
#dispose
Dispose the picture.
-
#gif_done? ⇒ Boolean
Tell if the gif animation is done.
-
#initialize(viewport, picture) ⇒ Sprite_Picture
constructor
Initialize a new Sprite_Picture.
-
#update
Update the picture sprite display with the information of the current Game_Picture.
Methods inherited from Sprite
#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords
Methods inherited from LiteRGSS::Sprite
new, #set_origin, #set_position
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(viewport, picture) ⇒ Sprite_Picture
Initialize a new Sprite_Picture
282 283 |
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 282 def initialize(, picture) end |
Instance Attribute Details
#gif_loop_disabled ⇒ Boolean
Tell if the loop of the gif is disabled or not
276 277 278 |
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 276 def gif_loop_disabled @gif_loop_disabled end |
Instance Method Details
#dispose
Dispose the picture
285 286 |
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 285 def dispose end |
#gif_done? ⇒ Boolean
Tell if the gif animation is done
292 293 |
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 292 def gif_done? end |
#update
Update the picture sprite display with the information of the current Game_Picture
288 289 |
# File 'docs/01450_Systems_00003_Map_Engine.rb', line 288 def update end |