Class: Three::Postprocessing::DotScreenPass
- Inherits:
-
Object
- Object
- Three::Postprocessing::DotScreenPass
- Defined in:
- lib/three/postprocessing/dot_screen_pass.rb
Constant Summary collapse
- PROPERTY_NAMES =
{ enabled: "enabled" }.freeze
Instance Attribute Summary collapse
-
#angle ⇒ Object
Returns the value of attribute angle.
-
#backend ⇒ Object
readonly
Returns the value of attribute backend.
-
#center ⇒ Object
Returns the value of attribute center.
-
#handle ⇒ Object
readonly
Returns the value of attribute handle.
-
#scale ⇒ Object
Returns the value of attribute scale.
Instance Method Summary collapse
-
#initialize(center: [0.5, 0.5], angle: 1.57, scale: 1, backend: nil, composer: nil, **parameters) ⇒ DotScreenPass
constructor
A new instance of DotScreenPass.
Constructor Details
#initialize(center: [0.5, 0.5], angle: 1.57, scale: 1, backend: nil, composer: nil, **parameters) ⇒ DotScreenPass
Returns a new instance of DotScreenPass.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 16 def initialize(center: [0.5, 0.5], angle: 1.57, scale: 1, backend: nil, composer: nil, **parameters) @backend = backend || composer&.backend || Backends::ThreeJS.new @center = coerce_center(center) @angle = angle @scale = scale @enabled = true @handle = @backend.create_dot_screen_pass(@center.to_a, @angle, @scale) bind_center_changes set_values(parameters) end |
Instance Attribute Details
#angle ⇒ Object
Returns the value of attribute angle.
13 14 15 |
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 13 def angle @angle end |
#backend ⇒ Object (readonly)
Returns the value of attribute backend.
13 14 15 |
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 13 def backend @backend end |
#center ⇒ Object
Returns the value of attribute center.
13 14 15 |
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 13 def center @center end |
#handle ⇒ Object (readonly)
Returns the value of attribute handle.
13 14 15 |
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 13 def handle @handle end |
#scale ⇒ Object
Returns the value of attribute scale.
13 14 15 |
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 13 def scale @scale end |