Files
junisaber/src/index.html

92 lines
4.5 KiB
HTML
Raw Normal View History

2018-07-18 20:48:45 +02:00
<!DOCTYPE html>
<html>
<head>
<title>Supersaber</title>
2018-09-12 11:35:20 -07:00
<script src="vendor/aframe.effects.js"></script>
2018-07-18 20:48:45 +02:00
<script src="build/build.js"></script>
</head>
<body>
2018-09-12 11:35:20 -07:00
<a-scene
bind__beat-loader="challengeId: challenge.id; difficulty: challenge.difficulty"
bind__song="challengeId: challenge.id; isPlaying: !menu.active && !challenge.isLoading"
bind__song-preview-system="selectedChallengeId: menuSelectedChallenge.id"
bind-toggle__overlay="menu.active"
2018-09-12 11:35:20 -07:00
console-shortcuts
debug-controller
2018-09-18 02:52:07 -07:00
effect-bloom="strength: 0.7"
proxy-event="event: menuchallengeselect; to: #searchResultsContainer, #menuDifficultiesGroup"
overlay="object: #menu, #keyboard, #rightHand, #leftHand"
2018-09-12 14:08:11 -07:00
search
2018-09-13 18:49:11 -07:00
stage-colors="blue"
fog="color: #a00; density: 0.035; type: exponential">
2018-07-18 20:48:45 +02:00
<a-assets timeout="10000">
2018-09-12 14:08:11 -07:00
<!-- Stage -->
2018-09-13 18:32:45 -07:00
<a-image id="backglowTexture" src="assets/img/stage/backglow.png"></a-image>
<a-image id="floor" src="assets/img/stage/floor.png"></a-image>
2018-09-12 14:08:11 -07:00
<a-image id="skyTexture" src="assets/img/stage/sky.jpg"></a-image>
<a-image id="smokeTexture" src="assets/img/stage/smoke.png"></a-image>
<a-asset-item id="backglow-obj" src="assets/models/backglow.obj"></a-asset-item>
<a-mixin id="laser" laser geometry="height: 300; depth: 0.16; width: 0.16" materials="neon"></a-mixin>
<audio id="hoverSound" src="assets/sounds/hover.ogg"></audio>
<audio id="saberDraw" src="assets/sounds/saberDraw.wav"></audio>
2018-09-13 18:32:35 -07:00
2018-07-21 10:21:30 +02:00
<img id="gridImg" src="assets/img/grid.png">
2018-07-18 20:48:45 +02:00
<img id="playImg" src="assets/img/play.png">
<img id="sliceImg" src="assets/img/slice.png">
<img id="downIconImg" src="assets/img/downIcon.png">
2018-08-13 21:13:23 -07:00
<a-mixin id="slice" slice9="color: #050505; transparent: true; opacity: 0.7; src: #sliceImg; left: 50; right: 52; top: 50; bottom: 52; padding: 0.18"></a-mixin>
<a-mixin id="font" text="font: assets/fonts/Teko-Bold.json; shader: msdf; letterSpacing: 1"></a-mixin>
<a-mixin id="textFont" text="font: assets/fonts/Teko-Bold.json; shader: msdf; letterSpacing: 1"></a-mixin>
2018-07-18 20:48:45 +02:00
</a-assets>
<audio id="introSong" src="assets/sounds/introSong.ogg" autoplay loop></audio>
2018-09-18 03:29:39 -07:00
2018-09-14 12:58:41 -07:00
<a-entity id="container">
2018-09-12 14:08:11 -07:00
{% include './templates/stage.html' %}
2018-07-18 20:48:45 +02:00
{% include './templates/gameUi.html' %}
{% include './templates/menu.html' %}
</a-entity>
<!-- Player. -->
<a-mixin
id="raycaster"
raycaster="objects: [raycastable]; far: 3"
line="opacity: 0.75"></a-mixin>
2018-07-18 20:48:45 +02:00
<a-entity id="cameraRig">
<a-entity id="camera" position="0 1.6 0.5" camera look-controls wasd-controls></a-entity>
{% macro saber (hand, otherHand, color) %}
<a-entity id="{{ hand }}Hand"
bind__hand-swapper="enabled: menu.active && activeHand === '{{ otherHand }}'"
bind__pauser="enabled: !menu.active"
bind__saber-controls="bladeEnabled: !menu.active"
saber-controls="hand: {{ hand }}"
haptics="events: mouseenter; dur: 35; force: 0.075">
2018-09-20 05:48:29 -07:00
<a-entity class="fakeGlow" rotation="90 0 0" position="0 0.01 0" bind__visible="menu.active">
<a-entity geometry="primitive: cylinder; height: 0.1831; radius: 0.0055" material="color: {{ color }}; shader: flat; opacity: 0.11"></a-entity>
<a-entity geometry="primitive: cylinder; height: 0.1832; radius: 0.0065" material="color: {{ color }}; shader: flat; opacity: 0.09"></a-entity>
<a-entity geometry="primitive: cylinder; height: 0.1833; radius: 0.0075" material="color: {{ color }}; shader: flat; opacity: 0.06"></a-entity>
<a-entity geometry="primitive: cylinder; height: 0.1834; radius: 0.0085" material="color: {{ color }}; shader: flat; opacity: 0.04"></a-entity>
</a-entity>
<a-entity
class="raycaster"
mixin="raycaster"
bind__raycaster="enabled: menu.active && activeHand === '{{ hand }}'; showLine: menu.active && activeHand === '{{ hand }}'"
cursor
line="color: {{ color }}"></a-entity>
</a-entity>
{% endmacro %}
{{ saber('left', 'right', 'pink') }}
{{ saber('right', 'left', 'cyan') }}
2018-07-18 20:48:45 +02:00
</a-entity>
{% if not IS_PRODUCTION %}
<a-entity id="mouseCursor" mixin="raycaster" cursor="rayOrigin: mouse"
bind__raycaster="enabled: !inVR" raycaster="showLine: false"></a-entity>
{% endif %}
2018-07-18 20:48:45 +02:00
</a-scene>
</body>
</html>