create index.html for sentinel
Browse files12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title>Red Halo — Editor Safe</title><style>html, body{margin:0;padding:0;height:100%;background:#000;overflow:hidden;}canvas{width:100%;height:100%;display:block;background:#000;}</style></head><body><canvas id="gl"></canvas><script>(() => {const canvas = document.getElementById("gl");const gl = canvas.getContext("webgl", {antialias:true}) ||canvas.getContext("experimental-webgl");if(!gl){document.body.innerHTML = "WebGL not supported";return;}/* ======================Utility====================== */function compile(type,src){const s = gl.createShader(type);gl.shaderSource(s,src);gl.compileShader(s);if(!gl.getShaderParameter(s,gl.COMPILE_STATUS))throw gl.getShaderInfoLog(s);return s;}function program(v,f){const p = gl.createProgram();gl.attachShader(p,compile(gl.VERTEX_SHADER,v));gl.attachShader(p,compile(gl.FRAGMENT_SHADER,f));gl.linkProgram(p);if(!gl.getProgramParameter(p,gl.LINK_STATUS))throw gl.getProgramInfoLog(p);return p;}function createTex(w,h){const t = gl.createTexture();gl.bindTexture(gl.TEXTURE_2D,t);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.LINEAR);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.LINEAR);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.CLAMP_TO_EDGE);gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,w,h,0,gl.RGBA,gl.UNSIGNED_BYTE,null);return t;}function createFbo(t){const f = gl.createFramebuffer();gl.bindFramebuffer(gl.FRAMEBUFFER,f);gl.framebufferTexture2D(gl.FRAMEBUFFER,gl.COLOR_ATTACHMENT0,gl.TEXTURE_2D,t,0);gl.bindFramebuffer(gl.FRAMEBUFFER,null);return f;}/* ======================Quad====================== */const quad = gl.createBuffer();gl.bindBuffer(gl.ARRAY_BUFFER,quad);gl.bufferData(gl.ARRAY_BUFFER,new Float32Array([-1,-1, 1,-1, -1,1,-1,1, 1,-1, 1,1]),gl.STATIC_DRAW);const VS = `attribute vec2 a;varying vec2 v;void main(){v = a*0.5+0.5;gl_Position = vec4(a,0,1);}`;const FS = `precision highp float;varying vec2 v;uniform vec2 r;uniform float t;float ring(vec2 p, float rad){float d = length(p);return smoothstep(0.02,0.0,abs(d-rad));}void main(){vec2 uv = v*2.0-1.0;uv.x *= r.x/r.y;float time = t*0.8;float R = 0.35 + sin(time)*0.01;float base = ring(uv,R);float glow = exp(-8.0*abs(length(uv)-R));vec3 c = vec3(1.0,0.1,0.15)*(base*1.2 + glow*0.6);gl_FragColor = vec4(c,1.0);}`;const prog = program(VS,FS);const uRes = gl.getUniformLocation(prog,"r");const uTime = gl.getUniformLocation(prog,"t");function bind(){gl.useProgram(prog);gl.bindBuffer(gl.ARRAY_BUFFER,quad);const a = gl.getAttribLocation(prog,"a");gl.enableVertexAttribArray(a);gl.vertexAttribPointer(a,2,gl.FLOAT,false,0,0);}/* ======================Resize (Editor Safe)====================== */let W=0,H=0;function resize(){const rect = canvas.getBoundingClientRect();const dpr = Math.max(1,window.devicePixelRatio||1);const w = Math.floor(rect.width*dpr);const h = Math.floor(rect.height*dpr);if(w!==W || h!==H){W=w; H=h;canvas.width=W;canvas.height=H;gl.viewport(0,0,W,H);}}setInterval(resize,100);/* ======================Render====================== */const start = performance.now();function draw(){resize();const time = (performance.now()-start)/1000;gl.clearColor(0,0,0,1);gl.clear(gl.COLOR_BUFFER_BIT);bind();gl.uniform2f(uRes,W,H);gl.uniform1f(uTime,time);gl.drawArrays(gl.TRIANGLES,0,6);requestAnimationFrame(draw);}draw();})();</script></body></html>
index.html+186-17