webvr

Aframe.io: Add border to <a-curvedimage> on mouseover using

老子叫甜甜 提交于 2020-01-07 04:45:08
问题 How would I add a border to a curved image when selected? The following code will change the material color of the image however I'd prefer to add a border or glow instead. AFRAME.registerComponent('selectable', { init: function () { var el = this.el; this.el.addEventListener('mouseenter', function (evt) { this.setAttribute('material', 'color', 'blue'); }); this.el.addEventListener('mouseleave', function (evt) { this.setAttribute('material', 'color', ''); }); } }); Here is a JSBIN showing

How do you create links in a-frame?

99封情书 提交于 2020-01-06 08:17:07
问题 I'm trying to link these curved images in a-frame to my other HTML Pages which are: hall.html clock.html titanic.html I've researched it online but haven't been able to find an answer so if anyone has any experience with a-frame the help would be appreciated. Essentially what I'm trying to do is when someone looks at one of the curved images in a-frame it takes them to the HTML page. Thanks <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>360Belfast</title> <meta name="description"

Can I embed Google Street View into AFrame?

心不动则不痛 提交于 2020-01-04 05:43:20
问题 I'd like to recreate the Geoguesser street view game in VR. Although I understand the game is more complex than simply viewing Google Street View, I want to understand whether any work on the matter exists now. Even simply embedding Google Street View in VR would be helpful, even if it's not a solution in AFrame. Has anyone tried this before? Or can anyone speak to embedding Google Street View in VR? 回答1: It looks like you need to get the Street View panorama image in its full equirectangular

How to render YouTube videos as a texture in A-Frame?

℡╲_俬逩灬. 提交于 2020-01-03 08:37:26
问题 I want to take a YouTube url, and put it into an A-Frame scene as a video texture. Like <a-video src="https://www.youtube.com/watch?v=dQw4w9WgXcQ"> . Is this possible for https://aframe.io? 回答1: With some manual effort, you could either: Proxy YouTube videos as a texture like https://github.com/cvan/webvr360 / https://www.dropbox.com/s/298brayuh24et13/webvr360.mp4?dl=0 Download them locally to serve with a service. Note that these are probably against their terms of service. 来源: https:/

How to mange memory used by A-Frame?

若如初见. 提交于 2020-01-01 19:18:11
问题 I'm building a web app which has 360 degree images loaded into an a-sky primitive. I'm using aframe-react . There are total of 20+ 360 degree images and only one img asset inside a-assets . once user switches scene react will change src of asset img and scene will re render. Everything works fine but it's using lot of memory because of caching. One time it used 4GB+ memory. In mobile the web page crashes after switching through ~8+ images. How do I handle this situation? I tried looking into

Why is my video or videosphere not playing on mobile in A-Frame VR?

早过忘川 提交于 2019-12-29 07:14:34
问题 I have an A-Frame scene with a video or videosphere: <a-scene> <a-assets> <video id="video" src="anothervideo.mp4></video> </a-assets> <a-video src="myvideo.mp4></a-video> <a-videosphere src="#video></a-videosphere> </a-scene> When I test in iOS or Android, I just see a black screen. It works on desktop. 回答1: Speaking of leveraging Enter VR button, try: <a-scene> <a-assets> <video id="video" src="anothervideo.mp4"></video> </a-assets> <a-video class="video" src="myvideo.mp4"></a-video> <a

How to make an app ready for 'ovrweb' protocol (to be viewed in Gear VR)?

杀马特。学长 韩版系。学妹 提交于 2019-12-25 13:38:48
问题 I have a web app that uses ThreeJS. I am currently trying to include WebVR to be used with Gear VR. I am aware that I need to link to that web app using the ovrweb protocol in order to open it in Gear VR. My problem is that it does not. Whenever I use window.location.href = "ovrweb:http://my-app-url" , I am asked to attach the device to Gear VR. But once I do so, the screen remains black. I noticed that the same thing happens whenever I use some non-VR webpage as the URL (like ovrweb:https:/

Is it possible to link to external images / videos with React-VR?

一世执手 提交于 2019-12-25 09:03:47
问题 According to the documentation, there doesn't seem to be any examples of using external images or external videos (i.e. from YouTube). I was wondering if anyone knew if it was possible (like this) <Video style={{ width: 3.0, height:2.0, transform: [{translate: [0, 4, 5]}, {rotateY : 180} ], }} source={{uri: 'https://www.youtube.com/watch?v=vPCoxAlfFsw'}} /> 回答1: MediaPlayerState in react vr home page 来源: https://stackoverflow.com/questions/43748706/is-it-possible-to-link-to-external-images

Aframe: How do I link entities, so the user can link/unlink entities, and so entities will animate together, and interact together

不打扰是莪最后的温柔 提交于 2019-12-24 23:56:42
问题 How would I link and unlink multiple entities together so that they can be animated together. An example is that there is a small pile of entities. When I click on this pile it spreads apart and floats upwards towards the user, so it's not a pile any more but a series of discreet entities each separated by a small distance. The pile exists of 3 entities A, B, and C If I click on the entity with id A then they all scale/position/rotate back into a pile. If I click on entity id B then all

Reflect a user's position and rotation in runtime on a minimap in Aframe

梦想的初衷 提交于 2019-12-23 04:54:12
问题 I am trying to make a minimap for my vr scene and update the user's position and location in runtime. I already made the following: <script> AFRAME.registerComponent('cam-listener', { init: function(){ var canvas = document.querySelector("#myCanvas"); //line 124(log result in the image) console.log(canvas); var context = canvas.getContext("2d"); //line 126(log result in the image) console.log(context); function drawTriangle(x, y) { // the triangle context.beginPath(); context.moveTo(x, y);