Class: Browser::Event::DeviceMotion::Definition

Inherits:
Browser::Event::Definition show all
Defined in:
opal/browser/event/device_motion.rb

Instance Method Summary collapse

Methods inherited from Browser::Event::Definition

#bubbles=, #cancelable=

Instance Method Details

#acceleration=(value) ⇒ Object



11
12
13
# File 'opal/browser/event/device_motion.rb', line 11

def acceleration=(value)
  `#@native.acceleration = #{value.to_n}`
end

#acceleration_with_gravity=(value) ⇒ Object



15
16
17
# File 'opal/browser/event/device_motion.rb', line 15

def acceleration_with_gravity=(value)
  `#@native.accelerationIncludingGravity = #{value.to_n}`
end

#interval=(value) ⇒ Object



23
24
25
# File 'opal/browser/event/device_motion.rb', line 23

def interval=(value)
  `#@native.interval = #{value}`
end

#rotation=(value) ⇒ Object



19
20
21
# File 'opal/browser/event/device_motion.rb', line 19

def rotation=(value)
  `#@native.rotationRate = #{value}`
end