Skip to content

Glare fade-out unaffected by tilt-spring-options #5

@elmimmo

Description

@elmimmo

Glare disappears almost immediately after pointer leaves the card even though the card keeps rotating/settling when using low damping in tilt-spring-options combined with fast (or no) spring-options.

Steps to reproduce

  1. Use a card with noticeable glare.

  2. Set fast activation spring and slow tilt spring, e.g.:

<hover-tilt
  tilt-factor="1.75"
  spring-options='{"stiffness": 0.5, "damping": 0.5}'
  tilt-spring-options='{"stiffness": 0.5, "damping": 0.025}'
  glare-intensity="1.2"
>
  ...
</hover-tilt>
  1. Move pointer quickly in/out.

Expected behavior

Glare fade timing should stay visually coherent with residual spring and tilt motion, therefore be affected by both spring-options and tilt-spring-options (whichever takes longer).

Actual behavior

Glare fades out almost immediately, independent of ongoing tilt spring motion.

Environment

hover-tilt loaded from CDN: https://cdn.jsdelivr.net/npm/hover-tilt/dist/hover-tilt.js
Reproduced in Firefox (147)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions