Comments (6)
Hi,
You can use the public method .toggleDeviceOrientation()
. I think the best way to do what you want is calling this method in a onready
callback. For example:
var PSV = new PhotoSphereViewer({
container: 'psv',
panorama: 'pano.jpg',
onready: function() {
PSV.toggleDeviceOrientation();
}
});
It should work. :)
from photo-sphere-viewer.
Will this still work? It would not for me. It would be nice to have the ability to auto-load gyroscope and at the same time allow touch control
from photo-sphere-viewer.
I just tested it, it still works for me. Can you please copy/paste here the code you use?
from photo-sphere-viewer.
Hi Jeremy,
The coding is great, I am probably missing something as Javascript is not my normal coding language. Would it be possible to get some help?
I have 2 issues:
- gyro wont activate on load - I am using android on Samsung if that help.
- Is there a way to keep gyro and full screen active for user?
`
<style> html, body { width: 100%; height: 100%; overflow: hidden; margin: 0; padding: 0; } #photosphere, section{ width: 100%; height: 100%; } .psv-button.custom-button { font-size: 22px; line-height: 20px; } </style> <script type="text/javascript">function goToNewPage()
{
var url = document.getElementById('list').value;
if(url != 'none') {
window.location = url;
}
}
<div id="photosphere"></div>
</body>
from photo-sphere-viewer.
Hello guys,
It works not well when I use the method .toggleDeviceOrientation() in android device. I don't how to fix it. Any advice?
from photo-sphere-viewer.
I have this error when I try to start the gyro with onready
Uncaught TypeError: PSV.toggleDeviceOrientation is not a function
besides the gyro is not working for me neither
Is there a way maybe to pass the alpha beta gamma params to psv directly?
from photo-sphere-viewer.
Related Issues (20)
- Panorama rotation is not smooth when viewed in PC browser
- Change background color for cropped panoramas?
- How to embed PSV in responsive templates? HOT 3
- TS2350: Only a void function can be called with the 'new' keyword.
- How to save the current screenshot HOT 1
- Responsive
- Video playback on mobile phones will be too laggy
- Not working on iPhone browsers
- Mouse zooming scene problem
- The panorama can't be loaded - Solved HOT 1
- How to disable the loader? HOT 1
- Is there any effect when changing the scene by setPanorama? HOT 1
- 救命!photo-sphere-viewer 全景图 loading 结束后是黑屏可能是什么原因?图片地址可以直接在浏览器打开 HOT 2
- method setPanorama, event panorama-loaded, and changes between 3.x and 5.0 HOT 1
- Cannot download photosphere with markers HOT 1
- how can i change the current image?
- imageLayer how to get array position
- The panorama can't be loaded HOT 2
- imageLayer 有四个值定义图像/视频的角 报错 THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS falseProgram Info Log: Vertex shader is not compiled.
- [Support]: Adding different 3D arrow models to the Virtual Tour Plugin and changing their vertical position
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from photo-sphere-viewer.