Class: TinyGLTF::Primitive
- Inherits:
-
Object
- Object
- TinyGLTF::Primitive
show all
- Includes:
- Base
- Defined in:
- lib/tiny_gltf.rb,
ext/tiny_gltf/rb_tiny_gltf_init.c
Instance Attribute Summary
Attributes included from Base
#model
Instance Method Summary
collapse
Methods included from Base
included, #inspect, #to_h, #to_json
Instance Method Details
#accessors ⇒ Object
366
367
368
|
# File 'lib/tiny_gltf.rb', line 366
def accessors
Hash[attributes.map { |(name, index)| [name, model.accessors[index]] }]
end
|
#indices ⇒ Object
362
363
364
|
# File 'lib/tiny_gltf.rb', line 362
def indices
indices_index && model.accessors[indices_index]
end
|
#material ⇒ Object
376
377
378
|
# File 'lib/tiny_gltf.rb', line 376
def material
material_index && model.materials[material_index]
end
|
#morph_targets ⇒ Object
370
371
372
373
374
|
# File 'lib/tiny_gltf.rb', line 370
def morph_targets
morph_targets_indices.collect do |target|
Hash[target.map { |(name, index)| [name, model.accessors[index]] }]
end
end
|