Class: SparkleMotion::Nodes::Generators::Const

Inherits:
SparkleMotion::Nodes::Generator show all
Defined in:
lib/sparkle_motion/nodes/generators/const.rb

Overview

For debugging, output 1.0 all the time.

Constant Summary

Constants inherited from SparkleMotion::Node

SparkleMotion::Node::DEBUG_SCALE, SparkleMotion::Node::FRAME_PERIOD

Instance Attribute Summary

Attributes inherited from SparkleMotion::Node

#debug, #history, #lights

Instance Method Summary collapse

Methods inherited from SparkleMotion::Node

#[], #[]=, #snapshot_to!, #update

Constructor Details

#initialize(lights:, value: 1.0) ⇒ Const

Returns a new instance of Const.



6
7
8
9
10
11
# File 'lib/sparkle_motion/nodes/generators/const.rb', line 6

def initialize(lights:, value: 1.0)
  super(lights: lights)
  @lights.times do |n|
    self[n] = value
  end
end