forked from gabboraron/JS13K2024_Witch-hunter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
1 lines (1 loc) · 8.84 KB
/
index.html
1
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="description" content=""><script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script><script src="https://unpkg.com/[email protected]/dist/aframe-environment-component.min.js"></script><script src="https://unpkg.com/[email protected]/dist/aframe-event-set-component.min.js"></script><script src="https://cdn.jsdelivr.net/gh/c-frame/[email protected]/dist/aframe-extras.min.js"></script><script>function dcE(t){return document.createElement(t)};function sA(t,e){return e.forEach((e=>{t.setAttribute(e[0],e[1])})),t};function dgEsA(t,e,n){document.getElementById(t).setAttribute(e,n)};function dq(t){return document.querySelector(t)}</script><script src="characters.js"></script><script src="witches.js"></script><script src="minihighligh.js"></script><script src="miniinfo-panel.js"></script></head><body><a-scene background="color: #212" cursor="rayOrigin: mouse;" cursor-mobile="rayOrigin: mouse; fuse: true; fuseTimeout: 500" raycaster="objects: .teleportation-point, .raycastable" position="0 0 -1" geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.03" material="color: white; shader: flat"><a-entity id="environment" environment="preset: checkerboard" seed="1"></a-entity><a-assets timeout="10000"><a-entity id="img"></a-entity><img id="charlesBorromeo" src="cb.png" crossorigin="anonymous"> <img id="charlesBorromeoPoster" src="cb.png" crossorigin="anonymous"> <img id="heinrichKramer" src="hk.png" crossorigin="anonymous"> <img id="heinrichKramerPoster" src="hk.png" crossorigin="anonymous"> <img id="jacobSprenger" src="js.png" crossorigin="anonymous"> <img id="jacobSprengerPoster" src="js.png" crossorigin="anonymous"> <img id="matthewHopkins" src="mh.png" crossorigin="anonymous"> <img id="matthewHopkinsPoster" src="mh.png" crossorigin="anonymous"> <img id="samuelParris" src="sp.png" crossorigin="anonymous"> <img id="samuelParrisPoster" src="sp.png" crossorigin="anonymous"> <img id="catPoster" src="cat.png" crossorigin="anonymous"> <img id="agneswaterhousePoster" src="aw.png" crossorigin="anonymous"> <img id="catherinpeytonPoster" src="cp.png" crossorigin="anonymous"> <img id="elizabethplainacherPoster" src="ep.png" crossorigin="anonymous"> <img id="johannesjuniusPoster" src="jj.png" crossorigin="anonymous"><a-mixin id="frame" geometry="primitive: plane; width: 0.5783552; height: 0.8192" material="color: white; shader: flat" animation__scale="property: scale; to: 1.2 1.2 1.2; dur: 200; startEvents: mouseenter" animation__scale_reverse="property: scale; to: 1 1 1; dur: 200; startEvents: mouseleave"></a-mixin><a-mixin id="poster" geometry="primitive: plane; width: 0.544768; height: 0.786432" material="color: white; shader: flat" material="shader: flat" position="0 0 0.005"></a-mixin><a-mixin id="CharacterImage" geometry="primitive: plane; width: 1.5; height: 0.81" material="src: #hein; shader: flat; transparent: true" position="0 0.495 0.002"></a-mixin></a-assets><a-entity id="background" position="0 0 0" geometry="primitive: sphere; radius: 2.0" material="color: red; side: back; shader: flat" scale="0.001 0.001 0.001" visible="false" class="raycastable"></a-entity><a-entity id="rig"><a-entity id="camera" camera look-controls="pointerLockEnabled: true" magicwindowtrackingenabled="true" wasd-controls="acceleration:100" position="0 1.6 0"><a-entity cursor="fuse: true; fuseTimeout: 500" raycaster="objects: .teleportation-point" position="0 0 -1" geometry="primitive: ring; radiusInner: 0.02; radiusOuter: 0.03" material="color: white; shader: flat"></a-entity></a-entity></a-entity><a-entity id="teleportation-points"><a-text value="Click to teleport" position="-1.31 0.98 -10.69594" color="white" font="mozillavr" scale="1.84 1.63 0.5" text="color: #f02424"></a-text><a-text value="Choose your character" position="-2.07807 0.64299 -2.35108" color="white" font="mozillavr" scale="1.84 1.63 0.5" text="color: #f02424" rotation="-45 0 0"></a-text><a-cylinder class="teleportation-point" color="#39BB82" height="0.05" radius="0.25" position="0 0.025 -10.69594" event-set__mouseenter="[object Object]" event-set__mouseleave="[object Object]" onclick="smoothTeleport()" material="" geometry=""></a-cylinder></a-entity><a-entity position="0 1.6 0" camera look-controls="pointerLockEnabled: true"><a-entity id="fadeBackground" geometry="primitive: sphere; radius: 2.5" material="color: black; side: back; shader: flat; transparent: true; opacity: 0.6" visible="false"></a-entity></a-entity><a-entity id="leftHand" laser-controls="hand: left" raycaster="objects: .raycastable"></a-entity><a-entity id="rightHand" laser-controls="hand: right" raycaster="objects: .raycastable" line="color: #118A7E"></a-entity><a-entity id="ui" position="0 1.6 -2.5"><a-entity id="menu" highlight><a-entity id="mainCharacters"></a-entity><script>function createCharacterButton(e,t,r,n){return`\n <a-entity id="${e}Button" position="${t}" mixin="frame" class="raycastable menu-button" scale="1.5 1.5 1.5">\n <a-entity material="src: #${r}" mixin="poster"></a-entity>\n <a-entity\n class="choose-button raycastable menu-button"\n position="0 -0.5 0.01"\n geometry="primitive: plane; width: 0.6; height: 0.15"\n material="color: #4CAF50"\n text="value: Choose; align: center; color: white; wrapCount: 8;"\n font="mozillavr"\n main-character-chooser\n data-character="${n}">\n </a-entity>\n </a-entity>\n `}const characters=[{id:"charlesBorromeo",position:"0 0 0",posterSrc:"charlesBorromeoPoster",name:"Charles Borromeo"},{id:"heinrichKramer",position:"1.2 0 0",posterSrc:"heinrichKramerPoster",name:"Heinrich Kramer"},{id:"jacobSprenger",position:"-1.2 0 0",posterSrc:"jacobSprengerPoster",name:"Jacob Sprenger"},{id:"matthewHopkins",position:"-2.4 0 0",posterSrc:"matthewHopkinsPoster",name:"Matthew Hopkins"}];characters.forEach((e=>{document.getElementById("mainCharacters").innerHTML+=createCharacterButton(e.id,e.position,e.posterSrc,e.name)}));</script><a-entity id="npcCharacters" visible="false"><a-entity id="cat" position="0.03343 -0.31764 -5" mixin="frame" class="raycastable menu-button" scale="" visible="" geometry="width: 0.578; height: 0.819" animation__scale="dur: 200; property: scale; startEvents: mouseenter; to: 1.2 1.2 1.2" animation__scale_reverse="dur: 200; property: scale; startEvents: mouseleave; to: 1 1 1"><a-entity id="talkingCatPoster" material="src: #catPoster; color: #046de7" mixin="poster" geometry=""></a-entity><a-entity id="catText" class="sc1" position="-1.06947 0.28773 1" text="value: A hunter of witches, I presume? You smell of fire, fear, and desperation. Tell me, human... are you seeking to snuff out the flames of those who wield power beyond your understanding?; align: center; color: red; wrapCount: 20" font="mozillavr"></a-entity><a-entity id="catYesButton" class="choose-button raycastable menu-button" position="-1.52589 -0.58949 0.01" geometry="primitive: plane; width: 0.6; height: 0.15" material="color: white" text="value: Hunting; align: center; color: white; wrapCount: 8" font="mozillavr"></a-entity><a-entity id="catNoButton" class="choose-button raycastable menu-button" position="-0.66136 -0.59376 0.01" geometry="primitive: plane; width: 0.6; height: 0.15" material="color: #046de7" text="value: Help; align: center; color: white; wrapCount: 8" font="mozillavr"></a-entity></a-entity></a-entity><a-entity id="infoPanel" position="0 0 0.5" info-panel visible="false" scale="0.001 0.001 0.001" geometry="primitive: plane; width: 1.5; height: 1.8" material="color: #333333; shader: flat; transparent: false" class="raycastable"><a-entity id="charlesBorromeoCharacterImage" mixin="CharacterImage" material="src: #charlesBorromeo" visible="false"></a-entity><a-entity id="heinrichKramerCharacterImage" mixin="CharacterImage" material="src: #heinrichKramer" visible="false"></a-entity><a-entity id="jacobSprengerCharacterImage" mixin="CharacterImage" material="src: #jacobSprenger" visible="false"></a-entity><a-entity id="matthewHopkinsCharacterImage" mixin="CharacterImage" material="src: #matthewHopkins" visible="false"></a-entity><a-entity id="samuelParrisCharacterImage" mixin="CharacterImage" material="src: #samuelParris" visible="false"></a-entity><a-entity id="catCharacterImage" mixin="CharacterImage" material="src: #cat" visible="false"></a-entity><a-entity id="characterName" position="-0.68 -0.1 0" text="shader: msdf; anchor: left; width: 1.5; font: mozillavr; color: white; value: aaa"></a-entity><a-entity id="characterDescription" position="-0.68 -0.2 0" text="baseline: top; shader: msdf; anchor: left; font: mozillavr; color: white; value: lll"></a-entity></a-entity></a-entity></a-scene></body><script src="minicharacterselection.js"></script><script src="ministartwitchhunt.js"></script><script src="minicat.js"></script></html>