Class: TinyGLTF::Model

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/tiny_gltf.rb,
ext/tiny_gltf/rb_tiny_gltf_init.c

Instance Attribute Summary collapse

Attributes included from Base

#model

Instance Method Summary collapse

Methods included from Base

included, #inspect, #to_h, #to_json

Constructor Details

#initializeModel

Returns a new instance of Model.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/tiny_gltf.rb', line 80

def initialize
  @default_scene_index = nil
  @accessors    = []
  @animations   = []
  @buffers      = []
  @buffer_views = []
  @materials    = []
  @meshes       = []
  @nodes        = []
  @textures     = []
  @images       = []
  @skins        = []
  @samplers     = []
  @cameras      = []
  @scenes       = []
  @lights       = []
end

Instance Attribute Details

#default_imageObject



98
99
100
# File 'lib/tiny_gltf.rb', line 98

def default_image
  @default_image ||= Image.new(self, uri: IMAGE_URI_1PX_WHITE_OPAQUE_PNG)
end

#default_samplerObject



102
103
104
# File 'lib/tiny_gltf.rb', line 102

def default_sampler
  @default_sampler ||= Sampler.new(self)
end