Class: Neuro::Display::Node

Inherits:
CanvasGroup
  • Object
show all
Includes:
Draw
Defined in:
lib/neuro/display.rb

Constant Summary

Constants included from Draw

Draw::HEIGHT, Draw::LAYERS, Draw::WIDTH, Draw::XGAP, Draw::YGAP

Instance Method Summary collapse

Methods included from Draw

#position

Constructor Details

#initialize(root, nh, layer, i, offsets) ⇒ Node

Returns a new instance of Node.



93
94
95
96
97
98
# File 'lib/neuro/display.rb', line 93

def initialize(root, nh, layer, i, offsets)
  @nh, @layer, @i, @offsets = nh, layer, i, offsets
  x, y = position
  super(root, :x => x, :y => y)
  draw_node
end