bim-ba/bim-ba.github.io

this can be optimized

Closed this issue · 3 comments

anime on every call creates a new anime instance.

we can create an anime instace with necessary animation before hover method

but this will require some extra checks like component is mounted

const hover = (state: boolean) => {

};

// hovering
//
// TODO: this can be optimized
// `anime` on every call creates a new anime instance.
// we can create an anime instace with necessary animation before hover method
// but this will require some extra checks like component is mounted
//
const hover = (state: boolean) => {
  revealLocation.value = state;
  state
    ? anime({ targets: footerCoordinatesRef.value, ...slightlyScale(1.15) })
    : anime({ targets: footerCoordinatesRef.value, ...normalScale(1) });
};
</script>

<style lang="scss" scoped>

Closed in 9afc726

Closed in 9afc726

Closed in 9afc726