Class: Rgltf::Accessor::Sparse::Values
- Inherits:
-
Properties::Base
- Object
- Properties::Base
- Rgltf::Accessor::Sparse::Values
- Defined in:
- lib/rgltf/properties/accessor.rb
Instance Attribute Summary collapse
-
#buffer_view ⇒ Object
readonly
Returns the value of attribute buffer_view.
-
#byte_offset ⇒ Object
readonly
Returns the value of attribute byte_offset.
Attributes inherited from Properties::Base
#extensions, #extras, #index, #name, #owner_type, #source_json
Instance Method Summary collapse
-
#initialize(json, document:, accessor_index:) ⇒ Values
constructor
A new instance of Values.
Methods inherited from Properties::Base
#extension, #nested_properties, #parse_extensions!
Constructor Details
#initialize(json, document:, accessor_index:) ⇒ Values
Returns a new instance of Values.
130 131 132 133 134 135 136 137 138 |
# File 'lib/rgltf/properties/accessor.rb', line 130 def initialize(json, document:, accessor_index:) super(json, document:, owner_type: :accessor_sparse_values) @buffer_view = document.fetch_reference( :buffer_views, json.fetch('bufferView'), "accessors/#{accessor_index}/sparse/values/bufferView" ) @byte_offset = json.fetch('byteOffset', 0) end |
Instance Attribute Details
#buffer_view ⇒ Object (readonly)
Returns the value of attribute buffer_view.
128 129 130 |
# File 'lib/rgltf/properties/accessor.rb', line 128 def buffer_view @buffer_view end |
#byte_offset ⇒ Object (readonly)
Returns the value of attribute byte_offset.
128 129 130 |
# File 'lib/rgltf/properties/accessor.rb', line 128 def byte_offset @byte_offset end |