Class: Rgltf::Animation::Channel::Target
- Inherits:
-
Properties::Base
- Object
- Properties::Base
- Rgltf::Animation::Channel::Target
- Defined in:
- lib/rgltf/properties/animation.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from Properties::Base
#extensions, #extras, #index, #name, #owner_type, #source_json
Instance Method Summary collapse
-
#initialize(json, document:, animation_index:, channel_index:) ⇒ Target
constructor
A new instance of Target.
Methods inherited from Properties::Base
#extension, #nested_properties, #parse_extensions!
Constructor Details
#initialize(json, document:, animation_index:, channel_index:) ⇒ Target
Returns a new instance of Target.
50 51 52 53 54 55 56 57 58 |
# File 'lib/rgltf/properties/animation.rb', line 50 def initialize(json, document:, animation_index:, channel_index:) super(json, document:, owner_type: :animation_target) @node = optional_node(json['node'], document, animation_index, channel_index) @path = json.fetch('path').to_sym return if Channel::TARGET_PATHS.include?(json['path']) && node return if animation_pointer?(json) raise FormatError, "invalid animation target #{json.inspect}" end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
48 49 50 |
# File 'lib/rgltf/properties/animation.rb', line 48 def node @node end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
48 49 50 |
# File 'lib/rgltf/properties/animation.rb', line 48 def path @path end |