partey_workadventure/docs/maps/website-in-map.md
David Négrier ce3c53ae3f Adding the ability to inject websites directly inside maps
This PR adds the ability to inject a website INSIDE a map (as an iframe inside a Phaser HTML object)
The iFrame will be rendered transparently, unless you set a background-color on the body, which opens a number of cool possibilities.

Needs to be done: allowing the iframe API in those iframes.
2021-08-05 12:30:05 +02:00

929 B

{.section-title.accent.text-primary}

Putting a website inside a map

You can inject a website directly into your map, at a given position.

To do this in Tiled:

  • Select an object layer
  • Create a rectangular object, at the position where you want your website to appear
  • Add a url property to your object pointing to the URL you want to open
A "website" object

The url can be absolute, or relative to your map.

{.alert.alert-info} Internally, WorkAdventure will create an "iFrame" to load the website. Some websites forbid being opened by iframes using the `X-Frame-Options HTTP header.