Skip to content

Commit

Permalink
tweak background
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Mar 31, 2024
1 parent 29aa924 commit df86d8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ async function main() {

fsUniformValues.set({
lightDirection: vec3.normalize([1, 8, -10]),
color: cssColorToRGBA(hsl(i / numObjects * 0.2 + 0.6, 1, .6)),
color: cssColorToRGBA(hsl(i / numObjects * 0.1 + 0.6, .8, .7)),
});

device.queue.writeBuffer(fsUniformBuffer, 0, fsUniformValues.arrayBuffer);
Expand Down Expand Up @@ -292,7 +292,7 @@ async function main() {
const half = across * spacing * 0.5;
const eye = [half, half, depth];
const target = [half, half, 0];
const t = time * 0.01 + 0.2;
const t = time * 0.005 + 0.2;
const up = [Math.sin(t), Math.cos(t), 0];

const view = mat4.lookAt(eye, target, up);
Expand Down Expand Up @@ -345,7 +345,7 @@ async function main() {
pass.setVertexBuffer(0, buffers[0]);
pass.setIndexBuffer(indexBuffer, indexFormat);

const t = time * 0.025 + 0.5;
const t = time * 0.0125 + 0.5;
objectInfos.forEach(({vsUniformBuffer, vsUniformValues, bindGroup}, i) => {
const m = vsUniformValues.views.worldViewProjection;
mat4.translation([i % across * spacing, (i / across | 0) * spacing, 0], m);
Expand Down
2 changes: 1 addition & 1 deletion resources/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pre.prettyprint, code.prettyprint {

@media (prefers-color-scheme: dark) {
#frame {
background-color: rgba(0, 0, 0, 0.7);
background-color: rgba(0, 0, 0, 0.9);
color: #ddd;
}

Expand Down

0 comments on commit df86d8d

Please sign in to comment.