Class: Three::Postprocessing::RenderPass

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

Constant Summary collapse

PROPERTY_NAMES =
{
  enabled: "enabled"
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scene, camera, backend: nil, composer: nil, **parameters) ⇒ RenderPass

Returns a new instance of RenderPass.



15
16
17
18
19
20
21
22
# File 'lib/three/postprocessing/render_pass.rb', line 15

def initialize(scene, camera, backend: nil, composer: nil, **parameters)
  @scene = scene
  @camera = camera
  @backend = backend || composer&.backend || Backends::ThreeJS.new
  @enabled = true
  @handle = @backend.create_render_pass(scene, camera)
  set_values(parameters)
end

Instance Attribute Details

#backendObject (readonly)

Returns the value of attribute backend.



12
13
14
# File 'lib/three/postprocessing/render_pass.rb', line 12

def backend
  @backend
end

#cameraObject (readonly)

Returns the value of attribute camera.



12
13
14
# File 'lib/three/postprocessing/render_pass.rb', line 12

def camera
  @camera
end

#handleObject (readonly)

Returns the value of attribute handle.



12
13
14
# File 'lib/three/postprocessing/render_pass.rb', line 12

def handle
  @handle
end

#sceneObject (readonly)

Returns the value of attribute scene.



12
13
14
# File 'lib/three/postprocessing/render_pass.rb', line 12

def scene
  @scene
end