부드러운 덩어리가 이동과 충돌에 따라 찌그러지고 떨리며 원형으로 돌아온다A soft mass squashes and jiggles with movement and impact, then returns to a round shape.
경계점 18개가 강성 120/s², 감쇠 15/s로 이동 120px 뒤 2500ms 동안 흔들리다 원형으로 돌아온다
강성이 너무 낮아 모양이 무너지거나 감쇠가 없어 무한히 출렁인다. 실시간 dt를 써서 프레임마다 다르다
기본값은 클립에 쓴 값Defaults are the values used in the clip
| 항목PARAM | 기본DEFAULT | 범위RANGE | 메모NOTE |
|---|---|---|---|
| 경계점 | 18개 | 12~28개 | 원형 배열 |
| 강성 | 120/s² | 80~200/s² | 복원력 |
| 감쇠 | 15/s | 10~25/s | 클수록 빨리 멈춤 |
| 이동 | 120px | 60~200px | 중심 이동 |
// 고정 스텝 스프링: f = -k*(p - rest) - c*v, dt = 1/60
function step(pts) { pts.forEach(p => { const f = p.rest.clone().add(center).sub(p.pos).mul(120).sub(p.v.clone().mul(15)); p.v.add(f.mul(1/60)); }); pts.forEach(p => p.pos.add(p.v.clone().mul(1/60))); }
tl.to({}, { duration: 2.5, ease: 'none', onUpdate() { draw(stateAt(Math.round(this.progress() * 150))); } }, 0);그대로 붙여 넣는다Paste as is
<대상> 덩어리에 소프트 바디 흔들림을 canvas로 넣어줘. 경계점 18개, 강성 120/s², 감쇠 15/s, 고정 스텝 1/60초로 적분하고, 중심이 0.3초에 x 120px 이동한 뒤 2.5초 동안 출렁이다 원형으로 돌아오게 해. 닫힌 곡선으로 그려.
Add soft body jiggle to the blob in <target> on a canvas. 18 boundary points, stiffness 120/s^2, damping 15/s, integrated at a fixed 1/60 second step. The center moves 120px in x at 0.3 seconds, then wobbles for 2.5 seconds and returns to a circle. Draw it as a closed curve.
<파일>에 soft body jiggle을 구현해. 18점, k=120, c=15, dt=1/60, 2.5초(150스텝). 상태는 스텝 수로만 결정하고 30스텝마다 체크포인트 저장. 0.4초, 0.8초, 2.5초를 캡처해 찌그러짐이 시간에 따라 줄어드는지, 2.5초에 원형 반경 오차가 2% 이내인지 확인해.
Implement soft body jiggle in <file>: 18 points, k=120, c=15, dt=1/60, 2.5 seconds (150 steps). Define state by step count only and save a checkpoint every 30 steps. Capture at 0.4s, 0.8s and 2.5s and verify the squash decays over time and the radius error at 2.5s is within 2 percent of a circle.
HyperFrames · ReelForge · Scrolline
개념 출처와 라이선스. 구현은 이 레포에서 새로 씀Concept sources and licenses. Implementations are original to this repo