Class: Three::Postprocessing::UnrealBloomPass
- Inherits:
-
Object
- Object
- Three::Postprocessing::UnrealBloomPass
- Defined in:
- lib/three/postprocessing/unreal_bloom_pass.rb
Constant Summary collapse
- PROPERTY_NAMES =
{ enabled: "enabled", strength: "strength", radius: "radius", threshold: "threshold" }.freeze
Instance Attribute Summary collapse
-
#backend ⇒ Object
readonly
Returns the value of attribute backend.
-
#handle ⇒ Object
readonly
Returns the value of attribute handle.
-
#resolution ⇒ Object
readonly
Returns the value of attribute resolution.
Instance Method Summary collapse
-
#initialize(resolution: [1, 1], strength: 1, radius: 0, threshold: 0, backend: nil, composer: nil, **parameters) ⇒ UnrealBloomPass
constructor
A new instance of UnrealBloomPass.
Constructor Details
#initialize(resolution: [1, 1], strength: 1, radius: 0, threshold: 0, backend: nil, composer: nil, **parameters) ⇒ UnrealBloomPass
Returns a new instance of UnrealBloomPass.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/three/postprocessing/unreal_bloom_pass.rb', line 18 def initialize(resolution: [1, 1], strength: 1, radius: 0, threshold: 0, backend: nil, composer: nil, **parameters) @backend = backend || composer&.backend || Backends::ThreeJS.new @resolution = coerce_resolution(resolution) @enabled = true @strength = strength @radius = radius @threshold = threshold @handle = @backend.create_unreal_bloom_pass(@resolution, @strength, @radius, @threshold) set_values(parameters) end |
Instance Attribute Details
#backend ⇒ Object (readonly)
Returns the value of attribute backend.
15 16 17 |
# File 'lib/three/postprocessing/unreal_bloom_pass.rb', line 15 def backend @backend end |
#handle ⇒ Object (readonly)
Returns the value of attribute handle.
15 16 17 |
# File 'lib/three/postprocessing/unreal_bloom_pass.rb', line 15 def handle @handle end |
#resolution ⇒ Object (readonly)
Returns the value of attribute resolution.
15 16 17 |
# File 'lib/three/postprocessing/unreal_bloom_pass.rb', line 15 def resolution @resolution end |