just a quick question. is it possible to have a layer be an external link to a url, or possibly another framer project?
Sure, put something like this in a click handler:
window.location = "http://www.apple.com"
For some reason I can't get this to work at all. I'm creating a VR prototype, where I'm creating a hotspot using layerA. I then want to make that layerA clickable to an external link.
layerA = new VRLayer heading: 175 elevation: -30 height:275 width:400 opacity:0
layerA.on Events.Click, -> window.location = "http://www.google.nl"
For some reason this doesn't do the trick. Any suggestions?
Not sure if this works with VR Layers, but this does:
layerA = new LayerlayerA.on Events.Click, -> window.location = "http://www.google.com"
VR layers might be the issue. It instantly clicks through with that code snippet Jorn. So with VR it instantly detects a click event. Even when I'm not swiping or clicking through the image to navigate.
Luc van Loon make sure you indent the window.location line.
Thanks Jordan for the suggestion but I believe I've done that correctly. Here's a snippet of my code: http://snippi.com/s/hv27yx0
and the framer project: http://share.framerjs.com/ywxptq3ge10v/
Is it possible to click projected VRLayers? tony = new VRLayer heading: 230 elevation: 10
tony.on Events.Click, -> tony.animate properties: heading: -30 elevation: 5
I did see in the VR documentation a way to trigger something... But it wasn't a click... So perhaps you could have a dummy layer that gets enabled / disabled based on a trigger happening. I believe Jonas Treub built a VR demo with triggers.
The orientation layer blocks all touch/click events. You can disable the orientation layer: vr.orientationLayer = false. Now all events will work like you expect. In a future update of the VRComponent the orientation layer will be replaced by a solution which does not stand in the way of interactivity.
Jordan Robert Dobson Jonas Treub Okay, thanks guys.