Skip to content

Instantly share code, notes, and snippets.

View ssudoku's full-sized avatar

Sudhakar ssudoku

View GitHub Profile
@ssudoku
ssudoku / a-frame-basic.html
Created August 30, 2017 06:51
a-frame basic embed code
<div class=”vr-container”> <!-- container div -->
<a-scene class=”vr-background”> <!-- the a-frame embed code -->
<a-entity rotation="0 0 0"> <!-- rotation value sets the starting view point, play around! -->
<a-animation attribute="rotation"
dur="600000"
easing="linear"
fill="forwards"
to="0 360 0"
repeat="indefinite"></a-animation> <!-- remove if you don’t like the automatic movement -->
<a-sky src="your-image-link"></a-sky>
@ssudoku
ssudoku / basic.css
Created August 30, 2017 06:50
a-frame pano viewer css
// Without these next 2 rules, a-frame will hide the rest of the page and disable scrolling
body.a-body {
height: auto;
overflow: auto;
}
html.a-html {
height: auto;
overflow: auto;
position: static;
}
@ssudoku
ssudoku / after-overlay.html
Created August 30, 2017 06:48
after adding overlay content
<div class=”vr-container”> <!-- container div -->
<a-scene class=”vr-background”> <!-- the a-frame embed code -->
<a-entity rotation="0 0 0"> <!-- rotation value sets the starting view point, play around! -->
<a-animation attribute="rotation"
dur="600000"
easing="linear"
fill="forwards"
to="0 360 0"
repeat="indefinite"></a-animation> <!-- remove if you don’t like the automatic movement -->
<a-sky src="your-image-link"></a-sky>
@ssudoku
ssudoku / overlay-content.css
Created August 30, 2017 06:47
css for the overlaying content
.vr-container .vr-overlay-content {
position: absolute;
z-index: 1; // positions the content over the viewer
pointer-events: none; // this is important as it enables your interactions on the overlay to be detected by a-frame
}
.vr-overlay-content .action {
pointer-events: initial; // enables clicks on the button, which was disabled by pointer-events: none
}
@ssudoku
ssudoku / gist:a6aa4666e87440a92657973e5a5564ed
Created August 30, 2017 06:41
overlaying content over a-frame
<div class=”vr-container”> <!-- container div -->
<a-scene class=”vr-background”> <!-- the a-frame embed code -->
<a-entity rotation="0 0 0"> <!-- rotation value sets the starting view point, play around! -->
<a-animation attribute="rotation"
dur="600000"
easing="linear"
fill="forwards"
to="0 360 0"
repeat="indefinite"></a-animation> <!-- remove if you don’t like the automatic movement -->
<a-sky src="your-image-link"></a-sky>
@ssudoku
ssudoku / gist:e7162152c5232d36010b3db8fb3cda08
Created August 30, 2017 06:40
a-frame pano viewer css
// Without these next 2 rules, a-frame will hide the rest of the page and disable scrolling
body.a-body {
height: auto;
overflow: auto;
}
html.a-html {
height: auto;
overflow: auto;
position: static;
}
@ssudoku
ssudoku / gist:f0d9aa3dd06d7493b9cb091c9bce8422
Created August 30, 2017 06:38
a-frame pano embed code
<div class=”vr-container”> <!-- container div -->
<a-scene class=”vr-background”> <!-- the a-frame embed code -->
<a-entity rotation="0 0 0"> <!-- rotation value sets the starting view point, play around! -->
<a-animation attribute="rotation"
dur="600000"
easing="linear"
fill="forwards"
to="0 360 0"
repeat="indefinite"></a-animation> <!-- remove if you don’t like the automatic movement -->
<a-sky src="your-image-link"></a-sky>
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>