Class: Rgltf::Camera::Orthographic
- Inherits:
-
Properties::Base
- Object
- Properties::Base
- Rgltf::Camera::Orthographic
- Defined in:
- lib/rgltf/properties/camera.rb
Instance Attribute Summary collapse
-
#xmag ⇒ Object
readonly
Returns the value of attribute xmag.
-
#ymag ⇒ Object
readonly
Returns the value of attribute ymag.
-
#zfar ⇒ Object
readonly
Returns the value of attribute zfar.
-
#znear ⇒ Object
readonly
Returns the value of attribute znear.
Attributes inherited from Properties::Base
#extensions, #extras, #index, #name, #owner_type, #source_json
Instance Method Summary collapse
-
#initialize(json, document:) ⇒ Orthographic
constructor
A new instance of Orthographic.
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
#xmag ⇒ Object (readonly)
Returns the value of attribute xmag.
39 40 41 |
# File 'lib/rgltf/properties/camera.rb', line 39 def xmag @xmag end |
#ymag ⇒ Object (readonly)
Returns the value of attribute ymag.
39 40 41 |
# File 'lib/rgltf/properties/camera.rb', line 39 def ymag @ymag end |
#zfar ⇒ Object (readonly)
Returns the value of attribute zfar.
39 40 41 |
# File 'lib/rgltf/properties/camera.rb', line 39 def zfar @zfar end |
#znear ⇒ Object (readonly)
Returns the value of attribute znear.
39 40 41 |
# File 'lib/rgltf/properties/camera.rb', line 39 def znear @znear end |