Skip to content

Commit 9be6e38

Browse files
author
monkstone
committed
fix soft_body
1 parent d679613 commit 9be6e38

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

samples/processing_app/library/vecmath/vec2d/soft_body.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Softbody dynamic simulation using curve_vertex
44
# and curve_tightness (and new Vec2D to_curve_vertex)
55
########
6+
load_libraries :vecmath, :fastmath
67

78
attr_reader :accel, :center, :frequency, :radius, :rot_angle
89
attr_reader :organic_constant, :nodes, :renderer, :angle, :node_start
@@ -13,12 +14,12 @@
1314
def setup
1415
size 640, 360
1516
@renderer = AppRender.new(self)
16-
init
17+
init_nodes
1718
no_stroke
1819
frame_rate 30
1920
end
2021

21-
def init
22+
def init_nodes
2223
@accel = Vec2D.new
2324
@center = Vec2D.new(width / 2, height / 2)
2425
@radius = 45

0 commit comments

Comments
 (0)