Class: Rgltf::Camera::Orthographic

Inherits:
Properties::Base show all
Defined in:
lib/rgltf/properties/camera.rb

Instance Attribute Summary collapse

Attributes inherited from Properties::Base

#extensions, #extras, #index, #name, #owner_type, #source_json

Instance Method Summary collapse

Methods inherited from Properties::Base

#extension, #nested_properties, #parse_extensions!

Constructor Details

#initialize(json, document:) ⇒ Orthographic

Returns a new instance of Orthographic.



41
42
43
44
45
46
47
# File 'lib/rgltf/properties/camera.rb', line 41

def initialize(json, document:)
  super(json, document:, owner_type: :camera_orthographic)
  @xmag = json.fetch('xmag')
  @ymag = json.fetch('ymag')
  @zfar = json.fetch('zfar')
  @znear = json.fetch('znear')
end

Instance Attribute Details

#xmagObject (readonly)

Returns the value of attribute xmag.



39
40
41
# File 'lib/rgltf/properties/camera.rb', line 39

def xmag
  @xmag
end

#ymagObject (readonly)

Returns the value of attribute ymag.



39
40
41
# File 'lib/rgltf/properties/camera.rb', line 39

def ymag
  @ymag
end

#zfarObject (readonly)

Returns the value of attribute zfar.



39
40
41
# File 'lib/rgltf/properties/camera.rb', line 39

def zfar
  @zfar
end

#znearObject (readonly)

Returns the value of attribute znear.



39
40
41
# File 'lib/rgltf/properties/camera.rb', line 39

def znear
  @znear
end