← Blurr Motion pricing-physics-flip-playful
Categorie pricing Tier 2 Techniek #31 Deps matter-js
1. Mechanisme — kopieer 1-op-1, geen styling-keuzes
// Mechanisme: pricing-physics-flip-playful
import gsap from 'https://esm.sh/gsap@3.12.5';
// Pas toe op je eigen selector — geen stijlkeuzes hier.
import Matter from 'https://esm.sh/matter-js@0.19.0';
if(window.matchMedia('(prefers-reduced-motion: reduce)').matches)return;
const{Engine,Render,Runner,Bodies,Composite,Mouse,MouseConstraint}=Matter;const cv=document.querySelector('.matter-canvas');if(!cv)return;const W=cv.offsetWidth,H=cv.offsetHeight;const eng=Engine.create();const rend=Render.create({canvas:cv,engine:eng,options:{width:W,height:H,wireframes:false,background:'transparent'}});Composite.add(eng.world,[Bodies.rectangle(W/2,H+25,W,50,{isStatic:true}),...Array.from({length:4},(_,i)=>Bodies.rectangle(80+i*140,40,100,100,{restitution:0.45,friction:0.05}))]);Composite.add(eng.world,MouseConstraint.create(eng,{mouse:Mouse.create(cv)}));Render.run(rend);Runner.run(Runner.create(),eng);
2. Skeleton — DOM + class-namen, mag herschikken
<!-- Skeleton: pricing-physics-flip-playful -->
<div class="demo-block">
  <!-- DOM-structuur hier -->
</div>
3. Styling-template — verplicht eigen invulling per merk
/* Styling: pricing-physics-flip-playful */
:root {
  --block-bg: ;
  --block-fg: ;
  --block-accent: ;
}