1.4.0 • Published 3 years ago

aframe-websurfaces v1.4.0

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

aframe-websurfaces

Latest NPM release Minzipped size License

An aframe component for adding interactable web pages to your scene.

Checkout the live example.

Example gif

Usage

To create a websurface, just add the websurface component. This will create an iframe and project it's contents onto a plane:

<a-entity websurface></a-entity>

Properties

PropertyDescriptionDefault
urlthe url of the web page"https://aframe.io"
widthwidth of the websurface1
heightheight of the websurface0.75
isInteractableenables mouse interactiontrue
frameSkipsupdates render* on every n cycles1
autoSceneStylingsets scene.style.position to "absolute"true

*note - only the shape of the web page in the scene is affected by this, the web page will still play at normal speed

Data Endpoints

The following are made externally available, which may be helpful for some complex use cases. For normal use these can be ignored.

PropertyDescription
el.websurface_iframegives the used iframe
el.css3d_contextgives the DOMContext
el.css3d_context.domElementgives the div that stores the css3d

Additional Info

The web page is not actually present inside the aframe scene, only an empty plane is. Because of this, the web page is not visible in VR.

Under the hood this uses a modified version of three-dom-elements, massive props there.

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago