aframevr how to open url - aframe

Using AFrame VR is it possible to "click" a link within the VR scene?
We are trying to build a world where the viewer can gaze on an object, this will then open a URL in the current tab with another VR world in.
These URL's will all be on the same domain.
thanks.

Looks like we can use this:
https://github.com/gasolin/aframe-href-component
e.g.
<a-box id="orange-cube" position="0 3.5 -2" rotation="30 30 0" width="2" depth="2" height="2" color="#F16745" href="https://github.com/gasolin/aframe-href-component"></a-box>

You can also use this Javascript from Mozilla's hyperlink demo: https://github.com/321C4/aframe-link-demo/blob/master/js/aframe-hyperlink.js
Just copy it into your project and you'll be able to use it as they did in their demo.

aframe-href-component is build for that use case. Check the second example which allow you gaze on an object, then open a URL in the current tab.
Beyond this web-like way, there is a work-in-progress WebVR standard to loading VR space with the hyperlink. Follow https://github.com/aframevr/aframe/issues/403 for latest support progress with aframe.
(relative disclosure: I'm the creator of aframe-href-component module)

Related

Ace Editor does not work in Iframe (react-frame-component)

tl;dr Demo of Issue
I'm attempting to integrate Ace Editor in an iframe via React 16. I am using the react-ace component library, though this issue exists if I implement the editor natively as well.
Although everything mostly works when I wrap the editor in react-frame-component, I cannot select highlight text which makes the editor unusable. I suspect this may have to do with the fact that react-frame-component is implemented with Portals, but I'm not sure exactly what the issue is.
I've replicated the issue here. I don't think this problem exists if I loaded the component with a regular <iframe src /> from another domain.
react-frame-component keeps the code in the parent window, and adds elements into an iframe, which confuses mouse handling code in ace to add event listeners to a wrong document
adding var document = el.ownerDocument before
https://github.com/ajaxorg/ace/blob/v1.4.10/lib/ace/lib/event.js#L111 would help.

In a-frame 0.7.0, I can only use in Altspace VR. What's the sync to all users code in a-frame to attach to the cube code that changes color?

In a-frame 0.7.0, I can only use in Altspace VR.
What's the sync to all users code in a-frame to attach to the cube code that changes color?
I want everyone to see the same color of cube when clicked. I just need the sync to all users code please and thank you. It's for the lines of change-color-on-click='green' that I need sync to make this Q-Bert game.
I searched everywhere but I can't find a solution.
Can someone give me the sync to all users code?
This is my code:
<a-box color="blue" src="/vr/cube.jpg" rotation="0 225 0" repeat="1 1" position="4.2 0 -8" scale="1 1 1" change-color-on-click='green'></a-box>

How to add background music in asp.net without bgsound and embed

How to add background music when a website loads for the first time without using embed and bgsound.I am using visual studio 2010 and these two are not supported in this.
I am developing website using master page and i want to use the code in master
page.
What is the best practice to to be able when I open my website and some music starts f sometime.I am not much expert in .net with c#.So finding some problem in it.
If browser also matters?
Regards,
suparna
Add the following code anywhere in the body of your HTML document to embed a music file and play it automatically when a visitor browses your website.
<audio src="music/yoursongname.mp3" autoplay="autoplay" loop="loop"></audio>
Change the "src" attribute so that it contains the path and filename of the music file that you want to embed.
Note: Add the "loop" attribute if you want the music file to play over and over

Why iframe is not loading all webpages in winjs app?

Hi All,
I took a blank WinJS Store app and placed the below code in default.html file
<iframe src="http://www.google.com" height="400" width="400"></iframe>
But the iframe is not loading the google home page. The page is left blank. While if I replace the src value to "http://www.palermo4.com" its working fine. Why is this strange behavior. Do we need to acquire any other permissions kind of thing for some urls? Kindly help me out.
Thanks in Advance
You can't load ooogle in iframe,since they are blocking this facility.
You can use Iframe for some other sites,but you won't get full controll of their JS[Loading sites] ,may have to face some breaking point in such sites.
if you really want to load google try this,.
1. Make your default browser as IE10.
2. trigger an event.
function openYourLink(){
var url = new Windows.Foundation.Uri("http://www.google.com")
Windows.System.Launcher.launchUriAsync(url);
}
In Windows 8.1 you'll also be able to use the webview control which is not sensitive to frame-busting code that sites like Google use.

Inline window for a YouTube video

I have an image surrounded by a link:
<img src="image.png">
I want to open this link in a new window, like what I found in this site: http://www.licensario.com/
You recognize it by the play button that it has. Press on it and an inline windows will appear.
I think they using jquery-youtube-tubeplayer, but I'm not sure.
According to the source of the mentioned website, they using LightBoxMe for the inline window, which is a jQuery plugin in combination with TubePlayer (and here). On each website is written how to use these scripts.

Resources