@@ -7,8 +7,6 @@ import { RenderPass } from 'https://cdn.jsdelivr.net/npm/three@0.158.0/examples/
77import { UnrealBloomPass } from 'https://cdn.jsdelivr.net/npm/three@0.158.0/examples/jsm/postprocessing/UnrealBloomPass.js' ;
88import { OutputPass } from 'https://cdn.jsdelivr.net/npm/three@0.158.0/examples/jsm/postprocessing/OutputPass.js' ;
99import { OrbitControls } from 'https://cdn.jsdelivr.net/npm/three@0.158.0/examples/jsm/controls/OrbitControls.js' ;
10- import { fetchaudio } from './fetchaudio.js' ;
11- import { audioCache } from './var/audiocache.js' ;
1210import { GUI } from 'https://cdn.jsdelivr.net/npm/lil-gui@0.18/+esm' ;
1311import { float , If , PI , color , cos , instanceIndex , Loop , mix , atan , vec2 , length , mod , sin , instancedArray , Fn , uint , uniform , uniformArray , hash , vec3 , vec4 , ceil , min , time } from '../../build/three.tsl.js' ;
1412import { listener , sound } from './var/threesound.js' ;
@@ -21,6 +19,47 @@ let button1 = document.createElement('button')
2119const audioLoader = new THREE . AudioLoader ( ) ;
2220let main = document . getElementById ( 'main' )
2321let currentSceneHandler = null ;
22+ let inject = true
23+ document . body . insertAdjacentHTML ( 'beforebegin' , `<div class="Warning" id="warnin" style="position: absolute;border: 2px solid white;top: 50%;padding-top:44px;left: 50%;transform: translate(-50%,-50%) scale(0.7);transform-origin: center ;display: flex;width: 750px;height: 400px;flex-direction:column;background-color: black;z-index:600">
24+ <div>
25+ <div style="color: white;text-align: center;" class="header">GPU REQUIRED</div>
26+ <svg width="100%" height="20">
27+ <line x1="224" y1="10" x2="528" y2="10" stroke="white"/>
28+ </svg>
29+ </div>
30+ <div class="content" style="color: white;width:100%;position: absolute;top: 58%;left: 50%;transform: translate(-50%,-50%);text-align: center;padding: 0 47px;">
31+ You need a GPU or at least an integrated one <br /> for the website to work properly, though <br /> integrated GPUs aren't recommended.
32+ </div>
33+ </div>` )
34+ function handleClick ( ) {
35+ const item = document . getElementById ( 'warnin' ) ;
36+
37+ if ( inject && item ) {
38+ inject = false ;
39+
40+ item . innerHTML = `
41+ <div style="font-size: 46px;font-family: 'MyCustomFont1';color: azure;position: absolute;top: 25%;left: 50%;transform: translate(-50%,-50%);text-align: center;width: 100%;">
42+ If the website isn't working <span style="color: rgb(133, 23, 23);">properly</span>
43+ </div>
44+
45+ <svg style="width: 100%;height:10%;position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);">
46+ <line x1="32.5" y1="20" x2="718.5" y2="20" stroke="white"/>
47+ </svg>
48+
49+ <div style="font-size: 48px;font-family: 'MyCustomFont1';color: azure;position: absolute;top: 70%;left: 50%;transform: translate(-50%,-50%);text-align: center;width: 100%;">
50+ check out the <a target="_blank" href="https://flavortown.hackclub.com/projects/4068" style="background-color: rgb(24, 20, 20);color: white;text-decoration: none;">\`Demo\`</a> in my repo
51+ </div>
52+ ` ;
53+ } else if ( item && ! inject ) {
54+ item . remove ( ) ;
55+ document . removeEventListener ( 'click' , handleClick ) ;
56+ }
57+ }
58+
59+ document . addEventListener ( 'click' , handleClick ) ;
60+
61+
62+
2463function configaudio ( buffer ) {
2564 minN = 0
2665 minh = 0 ;
0 commit comments