Class: Three::Postprocessing::DotScreenPass

Inherits:
Object
  • Object
show all
Defined in:
lib/three/postprocessing/dot_screen_pass.rb

Constant Summary collapse

PROPERTY_NAMES =
{
  enabled: "enabled"
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#angleObject

Returns the value of attribute angle.



13
14
15
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 13

def angle
  @angle
end

#backendObject (readonly)

Returns the value of attribute backend.



13
14
15
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 13

def backend
  @backend
end

#centerObject

Returns the value of attribute center.



13
14
15
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 13

def center
  @center
end

#handleObject (readonly)

Returns the value of attribute handle.



13
14
15
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 13

def handle
  @handle
end

#scaleObject

Returns the value of attribute scale.



13
14
15
# File 'lib/three/postprocessing/dot_screen_pass.rb', line 13

def scale
  @scale
end