Running prettier

This commit is contained in:
Rezmason
2022-08-07 19:17:59 -07:00
parent a0c1f22fd1
commit 6aa025870c
3 changed files with 12 additions and 10 deletions

View File

@@ -14,12 +14,15 @@ const drawToCanvas = () => {
const setupCamera = async () => {
try {
const stream = await navigator.mediaDevices.getUserMedia({video: {
const stream = await navigator.mediaDevices.getUserMedia({
video: {
width: { min: 800, ideal: 1280 },
frameRate: { ideal: 60 }
}, audio: false});
frameRate: { ideal: 60 },
},
audio: false,
});
const videoTrack = stream.getVideoTracks()[0];
const {width, height} = videoTrack.getSettings();
const { width, height } = videoTrack.getSettings();
video.width = width;
video.height = height;

View File

@@ -92,7 +92,7 @@ const defaults = {
],
raindropLength: 1, // Adjusts the frequency of raindrops (and their length) in a column
slant: 0, // The angle at which rain falls; the orientation of the glyph grid
resolution: .75, // An overall scale multiplier
resolution: 0.75, // An overall scale multiplier
useHalfFloat: false,
renderer: "webgpu", // The preferred web graphics API
useHoloplay: false,
@@ -179,7 +179,7 @@ const versions = {
fallSpeed: 0.35,
cycleStyle: "cycleRandomly",
cycleSpeed: 0.8,
glyphEdgeCrop: .1,
glyphEdgeCrop: 0.1,
paletteEntries: [
{ hsl: [0.39, 0.9, 0.0], at: 0.0 },
{ hsl: [0.39, 1.0, 0.6], at: 0.5 },

View File

@@ -12,10 +12,9 @@ window.onclick = (e) => {
clicks[index * 3 + 1] = 1 - e.clientY / e.srcElement.clientHeight;
clicks[index * 3 + 2] = (Date.now() - start) / 1000;
index = (index + 1) % numClicks;
}
};
export default ({ regl, config }, inputs) => {
const cameraTex = regl.texture(cameraCanvas);
const output = makePassFBO(regl, config.useHalfFloat);
@@ -29,7 +28,7 @@ export default ({ regl, config }, inputs) => {
cameraTex,
clicks: () => clicks,
aspectRatio: () => aspectRatio,
cameraAspectRatio: () => cameraAspectRatio
cameraAspectRatio: () => cameraAspectRatio,
},
framebuffer: output,
});