Browse Source

not working on crappy fckn phone...maybee noooow?

main
heck 2 years ago
parent
commit
a7ffb1c653
  1. 10
      html/index.html

10
html/index.html

@ -12,8 +12,10 @@
} }
</script> </script>
<script id="fragmentShader" type="x-shader/x-fragment"> <script id="fragmentShader" type="x-shader/x-fragment">
#ifdef GL_ES #ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float; precision highp float;
#else
precision mediump float;
#endif #endif
uniform float iTime; uniform float iTime;
@ -69,6 +71,10 @@
<script type="module"> <script type="module">
import * as THREE from 'https://unpkg.com/three/build/three.module.js'; import * as THREE from 'https://unpkg.com/three/build/three.module.js';
window.requestAnimationFrame = window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame;
let camera, scene, renderer; let camera, scene, renderer;
let uniforms; let uniforms;
let texture; let texture;
@ -128,7 +134,7 @@
function animate() { function animate() {
requestAnimationFrame( animate ); window.requestAnimationFrame( animate );
uniforms[ 'iTime' ].value = performance.now() / 1000; uniforms[ 'iTime' ].value = performance.now() / 1000;
renderer.render( scene, camera ); renderer.render( scene, camera );
} }

Loading…
Cancel
Save