-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Milestone
Description
Summary
Port the Pile theme's parallax scrolling and 3D grid depth effect to Anima for use with Nova Blocks Cards Collection blocks.
What this does
Parallax Scrolling
- Vanilla JS + requestAnimationFrame (no GSAP dependency)
- Each grid item gets
translateYoffset based on scroll position - Travel distance =
itemHeight × (parallaxAmount / 100) / 2 - Items with 3D class (
js-3d) travel 2× further for depth illusion - Vertical padding added to grid container to accommodate travel
3D Grid
- Applies
js-3dclass in a checkerboard or column pattern - Configurable target (Individual items vs Columns) and pattern (Odd vs Even)
- CSS:
transform: scale(0.88)on 3D items creates "pushed back" visual depth - Uses transform instead of width reduction — no layout shift
CSS fixes
overflow: visibleon grid layout and items for parallax movementmin-width: 0on grid items — prevents CSS Gridmin-width: autofrom making columns wider than the container whenoverflow: visiblewill-change: transformfor GPU compositing
Files
src/js/components/pile-parallax/index.js(new) — parallax enginesrc/js/components/app.js— imports and initializes pile-parallaxsrc/scss/components/_pile-parallax.scss(new) — parallax + 3D CSSsrc/scss/style.scss— imports the new componentdist/js/scripts.js,dist/js/scripts.min.js— compiled output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels