Class: Stagecraft::Textures::CubeTexture
- Defined in:
- lib/stagecraft/textures/cube_texture.rb
Instance Attribute Summary collapse
-
#faces ⇒ Object
readonly
Returns the value of attribute faces.
Attributes inherited from Texture
#color_space, #image, #sampler, #version
Instance Method Summary collapse
-
#initialize(faces) ⇒ CubeTexture
constructor
A new instance of CubeTexture.
Methods inherited from Texture
#dispose, #disposed?, load, #on_dispose
Constructor Details
#initialize(faces) ⇒ CubeTexture
Returns a new instance of CubeTexture.
8 9 10 11 12 13 |
# File 'lib/stagecraft/textures/cube_texture.rb', line 8 def initialize(faces, **) raise ArgumentError, "cube texture requires six faces" unless faces.length == 6 @faces = faces.freeze super(nil, **) end |
Instance Attribute Details
#faces ⇒ Object (readonly)
Returns the value of attribute faces.
6 7 8 |
# File 'lib/stagecraft/textures/cube_texture.rb', line 6 def faces @faces end |