mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 06:29:30 -07:00
fix: type safety in grainient
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -211,7 +211,7 @@ const setup = () => {
|
||||
const width = Math.max(1, Math.floor(rect.width));
|
||||
const height = Math.max(1, Math.floor(rect.height));
|
||||
renderer.setSize(width, height);
|
||||
const res = program.uniforms.iResolution.value as Float32Array;
|
||||
const res = (program.uniforms.iResolution as { value: Float32Array }).value;
|
||||
res[0] = gl.drawingBufferWidth;
|
||||
res[1] = gl.drawingBufferHeight;
|
||||
};
|
||||
@@ -223,8 +223,7 @@ const setup = () => {
|
||||
let raf = 0;
|
||||
const t0 = performance.now();
|
||||
const loop = (t: number) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(program.uniforms.iTime as any).value = (t - t0) * 0.001;
|
||||
(program.uniforms.iTime as { value: number }).value = (t - t0) * 0.001;
|
||||
renderer.render({ scene: mesh });
|
||||
raf = requestAnimationFrame(loop);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user