Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Incorporate Bobby's seizure warning at the beginning

  • Loading branch information...
commit d5feec3d9fb70fafa1d4471ad644e6bab354e26e 1 parent c12636c
@dmose dmose authored
Showing with 49 additions and 0 deletions.
  1. +20 −0 css/no-comply-styles.css
  2. +29 −0 demo.html
View
20 css/no-comply-styles.css
@@ -122,6 +122,26 @@ body{
background:#000;
}
+#seizure-warning {
+ font-size: 120%;
+ position: absolute;
+ text-align: center;
+ margin: auto;
+ width: 100%;
+ visibility: hidden;
+}
+
+.seizure-warning-continue {
+ font-size: 150%;
+ font-weight: bold;
+ visibility: hidden;
+}
+
+.seizure-warning-continue:hover {
+ cursor: pointer;
+ text-decoration: underline;
+}
+
audio{
position:absolute;
left:339px;
View
29 demo.html
@@ -274,6 +274,8 @@
intro.resize();
postMessage('loaded');
initialized = true;
+ canvas.style.visibility = 'hidden';
+
}
window.addEventListener('DOMContentLoaded', function() { init(); }, false);
@@ -532,6 +534,33 @@
window.addEventListener('resize', center_div, false);
</script>
+ <div id="seizure-warning">
+ <b>Warning:</b> The following demo contains flashing lights and patterns.<br />
+ Please consider this before viewing if you are sensitive to these visual effects.<br /><br />
+ <a class="seizure-warning-continue" id="seizure-warning-continue">CONTINUE</a>
+ </div>
+ <script type="text/javascript">
+ function positionWarning(e) {
+ var warning = document.getElementById('seizure-warning');
+ var t = (window.innerHeight/2 - warning.offsetHeight/2) + "px";
+ warning.style.top = t;
+ }; //positionWarning
+ window.addEventListener('resize', positionWarning, false);
+
+ positionWarning();
+ document.getElementById('seizure-warning').style.visibility = 'visible';
+ setTimeout(function() {
+ document.getElementById('seizure-warning-continue').style.visibility = 'visible';
+ }, 2000);
+ function onWarningClick(e) {
+ var canvas = document.getElementById('cubicvr-canvas');
+ document.getElementById('seizure-warning').style.display = 'none';
+ document.getElementById('seizure-warning-continue').removeEventListener('click', onWarningClick, false);
+ canvas.style.visibility = 'visible';
+ window.removeEventListener('resize', positionWarning, false);
+ } //onWarningClick
+ document.getElementById('seizure-warning-continue').addEventListener('click', onWarningClick, false);
+ </script>
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.