@dioramajs/media/reflection
Exports of @dioramajs/media/reflection.
import { default, floorOf, lowest } from '@dioramajs/media/reflection'Functions
floorOf | Where the row at `share` of a picture's height (from its top) lands in the box, as box UV with y up, under the element's object-fit and object-position. Clamped to the box. |
lowest | The share of the picture's height, from its top, down to the bottom of its lowest row with something in it: 1 for a picture without transparency, or one that cannot be read. |
Constants
default | A soft reflection of a product photo on a glossy floor below it: the picture mirrored at its base (the lowest solid row of a cutout, or the bottom edge of a photo), fading and blurring with distance, with an optional contact shadow and ripple. It draws on the canvas below the box: the element stays DOM, the layout does not move and clicks pass through. |