mirror of
https://github.com/CodeF53/personal-site.git
synced 2024-09-20 06:10:34 +00:00
1/4 background render res
This commit is contained in:
parent
1937b69097
commit
f5cf8be8ff
4 changed files with 8 additions and 8 deletions
|
@ -11,7 +11,7 @@ body { margin: 0 }
|
|||
width: 100vw;
|
||||
max-width: 100vw;
|
||||
// fill vertically exactly to remaining screen size (since we
|
||||
--root-size: calc(100vh - var(--header-height));
|
||||
--root-size: calc(100svh - var(--header-height));
|
||||
max-height: var(--root-size);
|
||||
min-height: var(--root-size);
|
||||
// center contents
|
||||
|
|
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
@ -8,8 +8,8 @@ export function initDrawVars(ctx_: CanvasRenderingContext2D) {
|
|||
}
|
||||
|
||||
export function updateDrawVars() {
|
||||
volumeMultiplier = (window.innerHeight * window.innerWidth / 150)
|
||||
ctx.lineWidth = 3
|
||||
volumeMultiplier = (ctx.canvas.width * ctx.canvas.height) / 150
|
||||
ctx.lineWidth = 0.75
|
||||
}
|
||||
|
||||
function getTransparency(point0: PointLike, point1: PointLike) {
|
||||
|
|
|
@ -7,8 +7,8 @@ export function handleResize() {
|
|||
const oldHeight = height
|
||||
|
||||
// update canvas dimensions
|
||||
width = window.innerWidth
|
||||
height = window.innerHeight
|
||||
width = window.innerWidth / 4
|
||||
height = window.innerHeight / 4
|
||||
canvas.width = width
|
||||
canvas.height = height
|
||||
|
||||
|
@ -27,8 +27,8 @@ export function handleResize() {
|
|||
}
|
||||
|
||||
export function initCanvas(_canvas: HTMLCanvasElement) {
|
||||
width = window.innerWidth
|
||||
height = window.innerHeight
|
||||
width = window.innerWidth / 4
|
||||
height = window.innerHeight / 4
|
||||
|
||||
canvas = _canvas
|
||||
canvas.width = width
|
||||
|
@ -38,7 +38,7 @@ export function initCanvas(_canvas: HTMLCanvasElement) {
|
|||
initDrawVars(ctx)
|
||||
}
|
||||
|
||||
function initPoints(numPoints: number = 50, maxSpeed: number = 0.5) {
|
||||
function initPoints(numPoints: number = 50, maxSpeed: number = 0.125) {
|
||||
Point.all = []
|
||||
Point.maxX = width
|
||||
Point.maxY = height
|
||||
|
|
Loading…
Reference in a new issue