From 2f5eb6ab368b062dbbde39b3cee6eae23c5452ff Mon Sep 17 00:00:00 2001 From: Amir Rajan Date: Mon, 6 Sep 2021 14:32:04 -0500 Subject: Synced with version 2.26 --- docs/docs.html | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 6 deletions(-) (limited to 'docs/docs.html') diff --git a/docs/docs.html b/docs/docs.html index 5ad5d6c..6967368 100644 --- a/docs/docs.html +++ b/docs/docs.html @@ -2,7 +2,7 @@ DragonRuby Game Toolkit Documentation - +
@@ -52,7 +52,7 @@
  • DOCS: Geometry
  • DOCS: GTK::Geometry#scale_rect
  • Source Code
  • -
    +

    DragonRuby Game Toolkit Live Docs

    @@ -6736,7 +6736,7 @@ class Game def calc_below return unless player.dy <= 0 - tiles_below = find_tiles { |t| t.rect.top <= player.y } + tiles_below = find_tiles { |t| t.rect.top <= player.prev_rect.y } collision = find_colliding_tile tiles_below, (player.rect.merge y: player.next_rect.y) return unless collision if collision.neighbors.b == :none && player.jumped_down_at.elapsed_time < 10 @@ -6767,7 +6767,7 @@ class Game def calc_above return unless player.dy > 0 - tiles_above = find_tiles { |t| t.rect.y >= player.y } + tiles_above = find_tiles { |t| t.rect.y >= player.prev_rect.y } collision = find_colliding_tile tiles_above, (player.rect.merge y: player.next_rect.y) return unless collision return if collision.neighbors.t == :none @@ -13609,6 +13609,57 @@ def tick args args.state.blendmodes.each { |blendmode| draw_blendmode args, blendmode } end + +

    Advanced Rendering - Render Target Noclear - main.rb

    +
    # ./samples/07_advanced_rendering/11_render_target_noclear/app/main.rb
    +def tick args
    +  args.state.x ||= 500
    +  args.state.y ||= 350
    +  args.state.xinc ||= 7
    +  args.state.yinc ||= 7
    +  args.state.bgcolor ||= 1
    +  args.state.bginc ||= 1
    +
    +  # clear the render target on the first tick, and then never again. Draw
    +  #  another box to it every tick, accumulating over time.
    +  clear_target = (args.state.tick_count == 0) || (args.inputs.keyboard.key_down.space)
    +  args.render_target(:accumulation).background_color = [ 0, 0, 0, 0 ];
    +  args.render_target(:accumulation).clear_before_render = clear_target
    +  args.render_target(:accumulation).solids << [args.state.x, args.state.y, 25, 25, 255, 0, 0, 255];
    +  args.state.x += args.state.xinc
    +  args.state.y += args.state.yinc
    +  args.state.bgcolor += args.state.bginc
    +
    +  # animation upkeep...change where we draw the next box and what color the
    +  #  window background will be.
    +  if args.state.xinc > 0 && args.state.x >= 1280
    +    args.state.xinc = -7
    +  elsif args.state.xinc < 0 && args.state.x < 0
    +    args.state.xinc = 7
    +  end
    +
    +  if args.state.yinc > 0 && args.state.y >= 720
    +    args.state.yinc = -7
    +  elsif args.state.yinc < 0 && args.state.y < 0
    +    args.state.yinc = 7
    +  end
    +
    +  if args.state.bginc > 0 && args.state.bgcolor >= 255
    +    args.state.bginc = -1
    +  elsif args.state.bginc < 0 && args.state.bgcolor <= 0
    +    args.state.bginc = 1
    +  end
    +
    +  # clear the screen to a shade of blue and draw the render target, which
    +  #  is not clearing every frame, on top of it. Note that you can NOT opt to
    +  #  skip clearing the screen, only render targets. The screen clears every
    +  #  frame; double-buffering would prevent correct updates between frames.
    +  args.outputs.background_color = [ 0, 0, args.state.bgcolor, 255 ]
    +  args.outputs.sprites << [ 0, 0, 1280, 720, :accumulation ]
    +end
    +
    +$gtk.reset
    +
     

    Tweening Lerping Easing Functions - Easing Functions - main.rb

    # ./samples/08_tweening_lerping_easing_functions/01_easing_functions/app/main.rb
    @@ -37215,6 +37266,7 @@ end
     

    attr_sprite.rb

    # ./dragon/attr_sprite.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # attr_sprite.rb has been released under MIT (*only this file*).
    @@ -37276,6 +37328,7 @@ end
     

    console.rb

    # ./dragon/console.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # console.rb has been released under MIT (*only this file*).
    @@ -38089,6 +38142,7 @@ end
     

    console_color.rb

    # ./dragon/console_color.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # console_color.rb has been released under MIT (*only this file*).
    @@ -38127,6 +38181,7 @@ end
     

    console_font_style.rb

    # ./dragon/console_font_style.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # console_font_style.rb has been released under MIT (*only this file*).
    @@ -38171,6 +38226,7 @@ end
     

    console_menu.rb

    # ./dragon/console_menu.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # console_menu.rb has been released under MIT (*only this file*).
    @@ -38335,6 +38391,7 @@ end
     

    console_prompt.rb

    # ./dragon/console_prompt.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # console_prompt.rb has been released under MIT (*only this file*).
    @@ -40962,11 +41019,13 @@ end
     

    ios_wizard.rb

    # ./dragon/ios_wizard.rb
    -# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # ios_wizard.rb has been released under MIT (*only this file*).
     
    +# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +
     class IOSWizard < Wizard
       def initialize
         @doctor_executed_at = 0
    @@ -42073,6 +42132,7 @@ end
     

    itch_wizard.rb

    # ./dragon/itch_wizard.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # itch_wizard.rb has been released under MIT (*only this file*).
    @@ -42333,6 +42393,7 @@ end
     

    layout.rb

    # ./dragon/layout.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # layout.rb has been released under MIT (*only this file*).
    @@ -43252,11 +43313,13 @@ end
     

    metadata.rb

    # ./dragon/metadata.rb
    -# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +# coding: utf-8
     # Copyright 2021 DragonRuby LLC
     # MIT License
     # metadata.rb has been released under MIT (*only this file*).
     
    +# Contributors outside of DragonRuby who also hold Copyright: Michał Dudziński
    +
     module Metadata
       def metadata_file_path
         "metadata/game_metadata.txt"
    @@ -44316,6 +44379,7 @@ end
     

    runtime/autocomplete.rb

    # ./dragon/runtime/autocomplete.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # autocomplete.rb has been released under MIT (*only this file*).
    @@ -44470,6 +44534,7 @@ end # end GTK
     

    runtime/benchmark.rb

    # ./dragon/runtime/benchmark.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # benchmark.rb has been released under MIT (*only this file*).
    @@ -44585,6 +44650,7 @@ end
     

    runtime/draw.rb

    # ./dragon/runtime/draw.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # draw.rb has been released under MIT (*only this file*).
    @@ -44748,6 +44814,7 @@ end
     

    runtime/framerate.rb

    # ./dragon/runtime/framerate.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # framerate.rb has been released under MIT (*only this file*).
    @@ -44835,6 +44902,7 @@ end # end module GTK
     

    runtime/framerate_diagnostics.rb

    # ./dragon/runtime/framerate_diagnostics.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # framerate_diagnostics.rb has been released under MIT (*only this file*).
    @@ -45655,6 +45723,7 @@ end
     

    wizards.rb

    # ./dragon/wizards.rb
    +# coding: utf-8
     # Copyright 2019 DragonRuby LLC
     # MIT License
     # wizards.rb has been released under MIT (*only this file*).
    -- 
    cgit v1.2.3