mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-15 20:31:46 +00:00
GH page: fix canvas size
This commit is contained in:
@ -86,12 +86,7 @@
|
|||||||
<section class="hero text-center text-light">
|
<section class="hero text-center text-light">
|
||||||
<div class="hero-bg"></div>
|
<div class="hero-bg"></div>
|
||||||
<div class="hero-particles-container">
|
<div class="hero-particles-container">
|
||||||
<canvas
|
<canvas id="hero-particles"></canvas>
|
||||||
id="hero-particles"
|
|
||||||
width="2558"
|
|
||||||
height="1478"
|
|
||||||
style="width: 1279px; height: 739px;"
|
|
||||||
></canvas>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="container-sm">
|
<div class="container-sm">
|
||||||
<div class="hero-inner">
|
<div class="hero-inner">
|
||||||
|
|||||||
@ -156,8 +156,8 @@ starCanvas.prototype.start = function () {
|
|||||||
let h;
|
let h;
|
||||||
|
|
||||||
const setCanvasExtents = () => {
|
const setCanvasExtents = () => {
|
||||||
w = document.body.clientWidth;
|
w = this.canvas.parentNode.clientWidth;
|
||||||
h = document.body.clientHeight;
|
h = this.canvas.parentNode.clientHeight;
|
||||||
this.canvas.width = w;
|
this.canvas.width = w;
|
||||||
this.canvas.height = h;
|
this.canvas.height = h;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user