Class: Three::PlaneGeometry

Inherits:
BufferGeometry show all
Defined in:
lib/three/geometries/plane_geometry.rb

Instance Attribute Summary collapse

Attributes inherited from BufferGeometry

#attributes, #bounding_box, #bounding_sphere, #draw_range, #groups, #id, #index, #name, #type, #user_data, #uuid

Instance Method Summary collapse

Methods inherited from BufferGeometry

#add_group, allocate_id, #clear_groups, #compute_bounding_box, #compute_bounding_sphere, #delete_attribute, #dispose, #get_attribute, #get_index, #has_attribute?, #set_attribute, #set_draw_range, #set_index, #to_h

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(width = 1, height = 1, width_segments: 1, height_segments: 1) ⇒ PlaneGeometry

Returns a new instance of PlaneGeometry.



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/three/geometries/plane_geometry.rb', line 10

def initialize(width = 1, height = 1, width_segments: 1, height_segments: 1)
  super()
  @type = "PlaneGeometry"
  @parameters = {
    width: width,
    height: height,
    width_segments: width_segments,
    height_segments: height_segments
  }

  build(width, height, width_segments.floor, height_segments.floor)
end

Instance Attribute Details

#parametersObject

Returns the value of attribute parameters.



8
9
10
# File 'lib/three/geometries/plane_geometry.rb', line 8

def parameters
  @parameters
end