Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 376 Bytes

File metadata and controls

16 lines (13 loc) · 376 Bytes

🎬 three-scrollify

Declarative scroll-triggered animations for Three.js — like CSS for 3D.

import { createScrollSheet } from 'three-scrollify';

createScrollSheet(meshes, {
  "section-1": {
    box1: {
      position: (m) => [0, 0, -3],
      rotation: (m) => [0, Math.PI/4, 0],
      customStyle: (m) => m.material.color.set("dodgerblue")
    }
  }
}, 0.4);