Skip to content

Commit dce4444

Browse files
committed
initial AppRender -> GfxRender refactor
1 parent 9d861ae commit dce4444

File tree

10 files changed

+14
-12
lines changed

10 files changed

+14
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
**v0.3.0** Initial version
2+
3+
**v0.4.0** Refactor `AppRender` to `GfxRender`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Or install it yourself as:
2323
All you need to do is `require 'vecmath'` to use `Vec2D` and `Vec3D` classes in your application.
2424
For `:to_vertex` functionality you need to create a renderer:-
2525
```ruby
26-
@renderer = AppRender.new(graphics) # where graphics is instance of PGraphics
26+
@renderer = GfxRender.new(graphics) # where graphics is instance of PGraphics
2727
# Usage
2828
vec.to_vertex(@renderer)
2929
```

docs/_posts/2019-03-01-Using-Vec2D.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ GEM_HOME = '/home/tux/.gem/ruby/2.6.0'
1313
require 'vecmath'
1414
require 'forwardable'
1515

16-
# Here we use the JRubyArt Vec2D class, and AppRender class (for vec.to_vertex)
16+
# Here we use the JRubyArt Vec2D class, and GfxRender class (for vec.to_vertex)
1717
# Further we use the power of ruby (metaprogramming) to make Branch enumerable
1818
# and use Forwardable to define which enumerable methods we want to use.
1919
visor_class :Branch do
@@ -33,7 +33,7 @@ visor_class :Branch do
3333
attr_reader :position, :dir, :path, :children, :xbound, :speed, :ybound, :app
3434

3535
def initialize(pos, dir, speed)
36-
@renderer ||= AppRender.new(graphics)
36+
@renderer ||= GfxRender.new(graphics)
3737
@position = pos
3838
@dir = dir
3939
@speed = speed

docs/_posts/2019-03-01-Using-Vec3D.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ color_mode(RGB, 1)
1515

1616
def draw
1717
background(0)
18-
@renderer ||= AppRender.new(graphics)
18+
@renderer ||= GfxRender.new(graphics)
1919
# Move the origin so that the scene is centered on the screen.
2020
translate(width / 2, height / 2, 0.0)
2121
# Set up the lighting.

docs/_posts/2019-03-01-welcome-to-vecmath-gem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ categories: vecmath update
66
---
77
# Background
88

9-
The vecmath Vec2D and Vec3D classes were originally build for JRubyArt and provide more ruby-like vector classes than the somewhat suspect vanilla processing PVector class (that doesn't know whether it's 2D or 3D). Further the AppRender class enables direct writing of vector to vertex
9+
The vecmath Vec2D and Vec3D classes were originally build for JRubyArt and provide more ruby-like vector classes than the somewhat suspect vanilla processing PVector class (that doesn't know whether it's 2D or 3D). Further the GfxRender class enables direct writing of vector to vertex
1010

1111
# Building the Gem
1212

docs/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ permalink: about
66

77
- Vec2D and Vec3D classes from [JRubyArt](https://github.com/ruby-processing/JRubyArt)
88

9-
- AppRender and ShapeRender that allow for direct writing of vector to vertex
9+
- GfxRender and ShapeRender that allow for direct writing of vector to vertex
1010

1111
- ColorUtil facilitates use of web string for colors
1212

lib/vecmath.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ module Vecmath
66
Java::Monkstone::JRLibrary.load(JRuby.runtime)
77
end
88

9-
java_import 'monkstone.vecmath.AppRender'
9+
java_import 'monkstone.vecmath.GfxRender'
1010
java_import 'monkstone.vecmath.ShapeRender'
1111
java_import 'monkstone.ColorUtil'

lib/vecmath/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Vecmath
2-
VERSION = "0.3.0"
2+
VERSION = "0.4.0"
33
end

samples/mycelium.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'vecmath'
44
require 'forwardable'
55

6-
# Here we use the JRubyArt Vec2D class, and AppRender class (for vec.to_vertex)
6+
# Here we use the JRubyArt Vec2D class, and GfxRender class (for vec.to_vertex)
77
# Further we use the power of ruby (metaprogramming) to make Branch enumerable
88
# and use Forwardable to define which enumerable methods we want to use.
99
visor_class :Branch do
@@ -23,7 +23,7 @@
2323
attr_reader :position, :dir, :path, :children, :xbound, :speed, :ybound, :app
2424

2525
def initialize(pos, dir, speed)
26-
@renderer ||= AppRender.new(graphics)
26+
@renderer ||= GfxRender.new(graphics)
2727
@position = pos
2828
@dir = dir
2929
@speed = speed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
* Renderer
77
* Copyright (c) 2018 Martin Prout
88
*/
9-
public class AppRender implements JRender {
9+
public class GfxRender implements JRender {
1010

1111
final PGraphics g;
1212

1313
/**
1414
*
1515
* @param pg PGraphics
1616
*/
17-
public AppRender(final PGraphics pg) {
17+
public GfxRender(final PGraphics pg) {
1818
this.g = pg;
1919
}
2020

0 commit comments

Comments
 (0)