device-orientation

How do I get DeviceOrientationEvent and DeviceMotionEvent to work on Safari?

随声附和 提交于 2020-05-26 11:46:10
问题 I'm trying to implement DeviceOrientationEvent and DeviceMotionEvent on my website for a 3D effect. However, the console doesn't log any info and apparently iOS 13 requires a user set permission to start doing this. I can't seem to figure out how to set it up properly. I've done some research and this is what I found: https://github.com/w3c/deviceorientation/issues/57#issuecomment-498417027 All other methods provided online are not usable anymore sadly. window.addEventListener(

How do I get DeviceOrientationEvent and DeviceMotionEvent to work on Safari?

自古美人都是妖i 提交于 2020-05-26 11:46:08
问题 I'm trying to implement DeviceOrientationEvent and DeviceMotionEvent on my website for a 3D effect. However, the console doesn't log any info and apparently iOS 13 requires a user set permission to start doing this. I can't seem to figure out how to set it up properly. I've done some research and this is what I found: https://github.com/w3c/deviceorientation/issues/57#issuecomment-498417027 All other methods provided online are not usable anymore sadly. window.addEventListener(

Getting a trajectory from accelerometer and gyroscope (IMU)

余生长醉 提交于 2020-01-31 04:06:56
问题 I am well aware of the existence of this question but mine will differ. I also know that there could be significant errors with this approach but I want to understand the configuration also theoretically. I have some basic questions which I find hard to answer for myself clearly. There is a lot of information about accelerometers and gyroscopes but I still haven't found an explanation "from first principles" of some basic properties. So I have a plate sensor that contains an accelerometer and

Getting a trajectory from accelerometer and gyroscope (IMU)

我的未来我决定 提交于 2020-01-31 04:05:26
问题 I am well aware of the existence of this question but mine will differ. I also know that there could be significant errors with this approach but I want to understand the configuration also theoretically. I have some basic questions which I find hard to answer for myself clearly. There is a lot of information about accelerometers and gyroscopes but I still haven't found an explanation "from first principles" of some basic properties. So I have a plate sensor that contains an accelerometer and

Getting a trajectory from accelerometer and gyroscope (IMU)

不想你离开。 提交于 2020-01-31 04:05:05
问题 I am well aware of the existence of this question but mine will differ. I also know that there could be significant errors with this approach but I want to understand the configuration also theoretically. I have some basic questions which I find hard to answer for myself clearly. There is a lot of information about accelerometers and gyroscopes but I still haven't found an explanation "from first principles" of some basic properties. So I have a plate sensor that contains an accelerometer and

iOS part of viewcontroller goes black when orientation changes

偶尔善良 提交于 2020-01-24 16:40:54
问题 When I change viewcontroller orientation while it's loading on particular orientation, part of the screen goes blank at the bottom. Steps to reproduce: Have tableview(Not necessary I think. could be any view) in a view controller Push a new viewcontroller which also has a tableview(Not necessary I think. could be any view) during an action Rotate the screen from one orientation to Another(Portrait to landscape or landscape to portrait).now you will be able to see the dark part. Press back

Three.js Device Orientation Controls to point at a specific target on load

无人久伴 提交于 2020-01-23 10:39:51
问题 I'm using the Device Orientation Controls in Three.js to set up a web application for Google Cardboard. When I load the scene, the default target of the camera is the Y direction (Z on the phone) where there might not be any objects. I'd like to define a direction before loading. Does anyone have any suggestions on how to do this without the need to rotate the objects in the scene? Thanks in advance for your help! 回答1: Add your camera to a THREE.Object3D(). Rotate the parent object. 回答2: I

How to change the device orientation to portrait when the current orientation is faceup or facedown

孤街浪徒 提交于 2020-01-13 07:09:28
问题 Is there a possible way to autorotate the device orientation to portrait when the current orientation of the device is faceup or facedown? 回答1: You can use this trick to make the system refresh your controller orientation anytime you want: [self presentViewController:[UIViewController new] animated:NO completion:NULL]; [self dismissViewControllerAnimated:NO completion:NULL]; This will call supportedInterfaceOrientations on your controller. Just return UIInterfaceOrientationMaskPortrait when

How to change the device orientation to portrait when the current orientation is faceup or facedown

微笑、不失礼 提交于 2020-01-13 07:08:29
问题 Is there a possible way to autorotate the device orientation to portrait when the current orientation of the device is faceup or facedown? 回答1: You can use this trick to make the system refresh your controller orientation anytime you want: [self presentViewController:[UIViewController new] animated:NO completion:NULL]; [self dismissViewControllerAnimated:NO completion:NULL]; This will call supportedInterfaceOrientations on your controller. Just return UIInterfaceOrientationMaskPortrait when

In App Billing - Rapid Device Orientation - causes crash (IllegalStateException)

╄→гoц情女王★ 提交于 2020-01-01 10:51:37
问题 I implemented In-app Billing (v3) according to Android's Implementing In-app Billing guide. All works fine, until I rotate the device, then immediately rotate it back to it's original orientation. Actually, sometimes it works, and sometimes it crashes with: java.lang.IllegalStateException: IabHelper was disposed of, so it cannot be used. Seems this is related to the asynchronous nature of IAB, though I'm not positive. Any thoughts? 回答1: You're probably getting the exception because somewhere