HTML Link for hotspot?

Markgill47
Posts: 5
Joined: Mon Jun 05, 2017 12:55 pm

HTML Link for hotspot?

Postby Markgill47 » Thu Jul 06, 2017 7:01 pm

Is there a way to have a hotspot lead to a different HTML page?

Or,

Is there a way to have a hotspot load a different JSON file into the viewer?

Thanks

User avatar
rroux
ForgeJS Team
Posts: 120
Joined: Wed Oct 26, 2016 12:19 pm

Re: HTML Link for hotspot?

Postby rroux » Fri Jul 07, 2017 9:18 am

Hi Markgill47,

The answer is here: viewtopic.php?f=8&t=33#p68

Please, tell me if it helps you.

Have a nice day!
- Raphaël

Markgill47
Posts: 5
Joined: Mon Jun 05, 2017 12:55 pm

Re: HTML Link for hotspot?

Postby Markgill47 » Fri Jul 07, 2017 12:25 pm

That looks like it's exactly what I'm looking for. Thanks for the reply

I'm guessing if I want a return link to point to a different scene than the default scene in the original page, I could put that in the link URL, or is there a better way to do that?

Mark

User avatar
rroux
ForgeJS Team
Posts: 120
Joined: Wed Oct 26, 2016 12:19 pm

Re: HTML Link for hotspot?

Postby rroux » Tue Jul 11, 2017 12:10 pm

Hi,

To go to another scene, you can describe a specific action for it.

  1. {
  2.     "uid": "action-load-scene-3",
  3.     "target": "viewer.story",
  4.  
  5.     "method":
  6.     {
  7.         "name": "loadScene",
  8.         "args": ["scene-3"]
  9.     }
  10. }


in this action we invoke the method called loadScene of the viewer.story module and pass it the uid of the target scene.
- Raphaël

Who is online

Users browsing this forum: No registered users and 2 guests