Skip to content

Commit 44b87f0

Browse files
committed
fix pbox2d examples
1 parent dd8a82b commit 44b87f0

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

external_library/gem/pbox2d/bumpy_surface_noise.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99

1010
def setup
1111
sketch_title 'Bumpy Surface Noise'
12-
smooth 4
1312
# Initialize box2d physics and create the world
14-
@box2d = WorldBuilder(app: self, gravity: [0, -20])
13+
@box2d = WorldBuilder.build(app: self, gravity: [0, -20])
1514
# to later set a custom gravity
1615
# box2d.gravity([0, -20])
1716
# Create the empty list
@@ -40,4 +39,5 @@ def draw
4039

4140
def settings
4241
size(500, 300)
42+
smooth 4
4343
end

external_library/gem/pbox2d/lib/shape_system.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'forwardable'
2+
13
module Runnable
24
def run
35
reject! { |item| item.done }

external_library/gem/pbox2d/liquidy.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require_relative 'lib/boundary'
44
attr_reader :box2d, :boundaries, :systems
55

6+
# holder for vector values
67
Vect = Struct.new(:x, :y)
78

89
def setup

external_library/gem/pbox2d/polygons.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
attr_reader :box2d, :boundaries, :system
88

9+
# holder for vector values
910
Vect = Struct.new(:x, :y)
1011

1112
def setup

0 commit comments

Comments
 (0)