characters : animer la height identiquement à la width
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3ec0dde771
commit
fc07d19d6b
1 changed files with 3 additions and 1 deletions
|
|
@ -30,7 +30,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
function scaleCharacters(scrollY) {
|
||||
const charOffset = Math.max(0, charMax - (scrollY / 16) * CHAR_SPEED);
|
||||
const charWidth = CHAR_WIDTH_MIN + (charOffset / charMax) * (CHAR_WIDTH_MAX - CHAR_WIDTH_MIN);
|
||||
charactersWrapper.querySelector("svg").setAttribute("width", charWidth + "px");
|
||||
const svg = charactersWrapper.querySelector("svg");
|
||||
svg.setAttribute("width", charWidth + "px");
|
||||
svg.setAttribute("height", charWidth + "px");
|
||||
}
|
||||
|
||||
function moveLogo(scrollY) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue