Class: Three::AnimationClip
- Inherits:
-
Object
- Object
- Three::AnimationClip
- Defined in:
- lib/three/animation/animation_clip.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#handle ⇒ Object
readonly
Returns the value of attribute handle.
Instance Method Summary collapse
- #duration ⇒ Object
-
#initialize(handle, adapter: Backends::ThreeJS::RubyWasmAdapter.new) ⇒ AnimationClip
constructor
A new instance of AnimationClip.
- #name ⇒ Object
Constructor Details
#initialize(handle, adapter: Backends::ThreeJS::RubyWasmAdapter.new) ⇒ AnimationClip
Returns a new instance of AnimationClip.
9 10 11 12 |
# File 'lib/three/animation/animation_clip.rb', line 9 def initialize(handle, adapter: Backends::ThreeJS::RubyWasmAdapter.new) @handle = handle @adapter = adapter end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
7 8 9 |
# File 'lib/three/animation/animation_clip.rb', line 7 def adapter @adapter end |
#handle ⇒ Object (readonly)
Returns the value of attribute handle.
7 8 9 |
# File 'lib/three/animation/animation_clip.rb', line 7 def handle @handle end |
Instance Method Details
#duration ⇒ Object
18 19 20 |
# File 'lib/three/animation/animation_clip.rb', line 18 def duration @adapter.animation_clip_duration(@handle) end |
#name ⇒ Object
14 15 16 |
# File 'lib/three/animation/animation_clip.rb', line 14 def name @adapter.animation_clip_name(@handle) end |