samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb
def sprite_as_border_or_solids args
  sprite = [100, 0, 50, 50, 'sprites/ship.png']
  args.outputs.sprites << sprite

  # Sprite_as_border variable has same parameters (excluding position) as above object,
  # but will appear differently on screen because it is added to args.outputs.borders
  sprite_as_border = [100, 100, 50, 50, 'sprites/ship.png']
  args.outputs.borders << sprite_as_border

  # Sprite_as_solid variable has same parameters (excluding position) as above object,
  # but will appear differently on screen because it is added to args.outputs.solids
  sprite_as_solid = [100, 200, 50, 50, 'sprites/ship.png']
  args.outputs.solids << sprite_as_solid
end
# Shows a sprite output onto the screen as a sprite, border, and solid
# Demonstrates that all three outputs appear differently on screen
Shows a sprite output onto the screen as a sprite, border, and solid
Demonstrates that all three outputs appear differently on screen
Shows a sprite output onto the screen as a sprite border and solid Demonstrates that all three outputs appear differently on screen
def sprite_as_border_or_solids args
  sprite = [100, 0, 50, 50, 'sprites/ship.png']
  args.outputs.sprites << sprite
  sprite_as_border = [100, 100, 50, 50, 'sprites/ship.png']
  args.outputs.borders << sprite_as_border
  sprite_as_solid = [100, 200, 50, 50, 'sprites/ship.png']
  args.outputs.solids << sprite_as_solid
end
def sprite_as_border_or_solids args sprite = [ 100 , 0 , 50 , 50 , 'sprites/ship.png' ] args . outputs . sprites << sprite sprite_as_border = [ 100 , 100 , 50 , 50 , 'sprites/ship.png' ] args . outputs . borders << sprite_as_border sprite_as_solid = [ 100 , 200 , 50 , 50 , 'sprites/ship.png' ] args . outputs . solids << sprite_as_solid end
Shows a sprite output onto the screen as a sprite, border, and solid
Demonstrates that all three outputs appear differently on screen
Shows a sprite output onto the screen as a sprite border and solid Demonstrates that all three outputs appear differently on screen
# Sprite_as_border variable has same parameters (excluding position) as above object, # but will appear differently on screen because it is added to args.outputs.borders # Sprite_as_solid variable has same parameters (excluding position) as above object, # but will appear differently on screen because it is added to args.outputs.solids
args