Give each point weight

Contents Previous Next

Install

npm install -g @lmctl-ai/lmctl

lmvideo 0.1.38 is released. Source examples are pinned to public commit aab2677.

Download lmvideo 0.1.38

The points of the presentation arrive as bouncing balls. Motion is replayed through a smooth periodic phase to form the loop.

Run this example

lmctl autorun https://raw.githubusercontent.com/lmctl-ai/lmvideo/aab2677a4b6264ae6afae8ad64a1d7c1dcd3a052/examples/physics/bullet-container.lms

Source

mkdir("build/physics");
program=_lmcode_ cli="lmvideo" install="github:lmctl-ai/lmvideo@v0.1.38";
let p=physics_presentation(512,384,20261104).title("THREE IDEAS",60.0,55.0,"#ef91b1").bullet("ONE",120.0,150.0,"#f2c86d").bullet("TWO",260.0,150.0,"#79c7c0").bullet("THREE",400.0,150.0,"#9fa5dc");let cache=timeline_create(512,384);
for(i in range(0,180)){cache.add(p.render(),1);p.step(1);}
video.size(512,384);video.fps(24);video.frames(96);video.output("build/physics/bullet-container.mp4");video.begin();
for(f in range(0,video.count())){video.frame();let q=sin(3.1415926535*float(f)/96.0);let im=cache.frame(int(q*q*179.0+0.5));canvas.clear("#101827");canvas.image(im,0.0,0.0);canvas.text("time-replayed physics",16.0,28.0,font(15.0),paint().color("#fff1d6"));if(f==32){video.save_frame("build/physics/bullet-container.png");}}
video.end();
end _lmcode_
r=run_lmcode(program);assert(r.ok,(r.ok ? "" : r.message));

Raw LMScript source

The points of the presentation arrive as bouncing balls. (4.0 seconds)
Give each point weight
The points of the presentation arrive as bouncing balls.