Class: Three::CubeTexture
- Inherits:
-
Texture
- Object
- EventDispatcher
- Texture
- Three::CubeTexture
- Defined in:
- lib/three/textures/cube_texture.rb
Constant Summary collapse
- FACE_COUNT =
6
Instance Attribute Summary
Attributes inherited from Texture
#center, #color_space, #flip_y, #id, #mag_filter, #mapping, #matrix, #matrix_auto_update, #min_filter, #offset, #repeat, #rotation, #source, #user_data, #uuid, #wrap_s, #wrap_t
Instance Method Summary collapse
-
#initialize(sources, mapping: Three::CubeReflectionMapping, color_space: Three::NoColorSpace, flip_y: false, wrap_s: Three::ClampToEdgeWrapping, wrap_t: Three::ClampToEdgeWrapping, mag_filter: Three::LinearFilter, min_filter: Three::LinearMipmapLinearFilter, offset: nil, repeat: nil, center: nil, rotation: 0, matrix_auto_update: true, matrix: nil) ⇒ CubeTexture
constructor
A new instance of CubeTexture.
- #source=(value) ⇒ Object
- #sources ⇒ Object
- #sources=(value) ⇒ Object
- #to_h ⇒ Object
Methods inherited from Texture
allocate_id, #dispose, #update_matrix
Methods included from Dirty
#add_dirty_dependent, #dirty?, #dirty_dependents, #dirty_field?, #dirty_fields, #mark_clean!, #mark_dirty!, #remove_dirty_dependent
Methods inherited from EventDispatcher
#add_event_listener, #dispatch_event, #has_event_listener?, #remove_event_listener
Constructor Details
#initialize(sources, mapping: Three::CubeReflectionMapping, color_space: Three::NoColorSpace, flip_y: false, wrap_s: Three::ClampToEdgeWrapping, wrap_t: Three::ClampToEdgeWrapping, mag_filter: Three::LinearFilter, min_filter: Three::LinearMipmapLinearFilter, offset: nil, repeat: nil, center: nil, rotation: 0, matrix_auto_update: true, matrix: nil) ⇒ CubeTexture
Returns a new instance of CubeTexture.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/three/textures/cube_texture.rb', line 9 def initialize( sources, mapping: Three::CubeReflectionMapping, color_space: Three::NoColorSpace, flip_y: false, wrap_s: Three::ClampToEdgeWrapping, wrap_t: Three::ClampToEdgeWrapping, mag_filter: Three::LinearFilter, min_filter: Three::LinearMipmapLinearFilter, offset: nil, repeat: nil, center: nil, rotation: 0, matrix_auto_update: true, matrix: nil ) super( validate_sources(sources), mapping: mapping, color_space: color_space, flip_y: flip_y, wrap_s: wrap_s, wrap_t: wrap_t, mag_filter: mag_filter, min_filter: min_filter, offset: offset, repeat: repeat, center: center, rotation: rotation, matrix_auto_update: matrix_auto_update, matrix: matrix ) end |
Instance Method Details
#source=(value) ⇒ Object
51 52 53 |
# File 'lib/three/textures/cube_texture.rb', line 51 def source=(value) super(validate_sources(value)) end |
#sources ⇒ Object
43 44 45 |
# File 'lib/three/textures/cube_texture.rb', line 43 def sources source end |
#sources=(value) ⇒ Object
47 48 49 |
# File 'lib/three/textures/cube_texture.rb', line 47 def sources=(value) self.source = value end |
#to_h ⇒ Object
55 56 57 |
# File 'lib/three/textures/cube_texture.rb', line 55 def to_h super.merge(type: "CubeTexture", sources: sources) end |