1.0.1 • Published 3 years ago

aframe-web-portals v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

aframe-web-portals

Latest NPM release Minzipped size License

An aframe component for creating portals to other websites.

Check out the live example.

Example gif

Usage

To create a portal, add the web-portal component.

<a-entity web-portal="url:https://example.com; text:Example"></a-entity>

Properties

PropertyDescriptionDefault
urlthe url of the target web page"https://aframe.io"
texttext to display above the portal""
widthwidth of the portal1.5
heightheight of the portal2.4
frameWidthwidth of the portal frame0.15
enableFrameenables a visual frame around the portaltrue
enableWebsurfaceenables a websurface display of the target sitetrue
enableReturnButtonenables a button overlay upon portal entry for leaving the sitetrue

Additional Info

The component currently uses AABB collision detection. While web-portals still work when rotated at non axis aligned angles (ie. rotation="0 30 0"), the best results will be seen when the portals are aligned with a cardinal world direction (ie. rotation="0 90 0)

1.0.1

3 years ago

1.0.0

3 years ago