- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Bumps the github-actions group with 4 updates in the / directory: [actions/setup-go](https://github.com/actions/setup-go), [github/codeql-action/init](https://github.com/github/codeql-action), [github/codeql-action/autobuild](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action). Updates `actions/setup-go` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits]( |
||
| .github | ||
| _clips/demo | ||
| _gallery | ||
| docs | ||
| examples | ||
| internal | ||
| render | ||
| .gitattributes | ||
| .gitignore | ||
| .golangci.yml | ||
| AGENTS.md | ||
| camera.go | ||
| camera_test.go | ||
| channel.go | ||
| channel_test.go | ||
| CLAUDE.md | ||
| clip.go | ||
| clip_test.go | ||
| doc.go | ||
| errors.go | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| light.go | ||
| light_test.go | ||
| linkage.go | ||
| linkage_test.go | ||
| README.md | ||
| reshape.go | ||
| reshape_test.go | ||
| rig.go | ||
| rig_test.go | ||
| scene.go | ||
| scene_test.go | ||
| SECURITY.md | ||
kinetograph
An animation layer for Go: it moves decad bodies, a camera and lights on a joint rig over time, and renders every frame to a numbered PNG with solidlens. It writes no video; ffmpeg or another video tool assembles the PNGs.
Work in progress. The API and supported capabilities may change.
Why this exists
The first clip kinetograph produces is a landing-page video for decad: decad parts turning, sliding apart and
assembling, seen from a moving camera. Its program is the clip subcommand of the _gallery module in
decad: cd _gallery && go run . clip > assemble.sh && sh assemble.sh in a
decad checkout renders it.
It also changes a body's shape over time. A parametric part rebuilds its decad body from parameters that change with the frame, so a block can grow wider across a clip.
kinetograph is not a renderer, a video encoder, a physics engine or a CAD kernel. Rendering is solidlens's, geometry is decad's, coordinate math is r3's and quantities are units's.
What it does
Every motion below is a Channel: units.Value keyframes of one kind (an angle, a length, an opacity) with easing
between them. kinetograph renders each clip to PNG frames, and ffmpeg encodes them to a GIF.
![]() Revolute joints turn a node about an axis through a centre point by an angle channel. |
![]() Prismatic joints slide a node along a direction by a length channel. |
![]() Camera on the rig attaches the camera to a node, so an orbit is a revolute joint about an axis through the camera's target. |
![]() Node lights attach to rig nodes like the camera, and render.Style gives each one a colour and an intensity channel. |
![]() Fade is a part's opacity channel; render mixes a fading part over whatever is behind it. |
![]() Reshape rebuilds a parametric part's decad body from channel values, once per distinct set of values. |
Regenerate every image on this page with cd _gallery && go run . > assemble.sh && sh assemble.sh.
Usage
examples/kinetograph_sequence_example_test.go renders a decad
block turning on one revolute joint while the camera orbits on another.
examples/kinetograph_reshape_example_test.go renders a slab whose
width follows a channel. examples/kinetograph_appearance_example_test.go
fades a block in while a point light circles it. examples/kinetograph_driven_example_test.go
poses a block from a caller's TransformTrack. examples/kinetograph_linkage_example_test.go
films a two-link decad Linkage along its Drive with Scene.AddLinkage, each link posed by decad's
Linkage.PoseAt. examples/kinetograph_schedule_example_test.go
films a crank-rocker, a linkage with a closed loop, with Scene.AddSchedule through one decad Schedule.
go test ./examples/ runs all six and checks their output.
_clips/demo/ renders a 4.5 s demo clip: two pins drop into a drilled plate, and a ring
rises off it and turns half a turn while the camera orbits. cd _clips/demo && go run . -out out writes 108 frames
at 960x720 into out/.
Assemble the frames into a video with ffmpeg:
ffmpeg -framerate 24 -i frame_%06d.png -c:v libx264 -pix_fmt yuv420p clip.mp4
The yuv420p pixel format needs an even image width and height. kinetograph does not check this, because it is a
property of that codec.
A failing frame stops the sequence with a *render.FrameError that names the frame index and time. The same
inputs give byte-identical PNGs on one Go toolchain and architecture; the rules are in
docs/design.md section 7.
Layering
kinetograph/render frames to solidlens scenes and PNG files (imports solidlens)
|
kinetograph channels, rig, camera, lights, scene, clip (this module)
|
decad 3D bodies and Body.Tessellate github.com/lestrrat-3d/decad
|
r3 vectors, rigid transforms github.com/lestrrat-3d/r3
|
units typed quantities (Value, Kind) github.com/lestrrat-3d/units
The arrows point down and never back up. The root package imports decad, r3 and units; render is the
only package that imports solidlens. None of them imports kinetograph.
sketch builds the bodies in the tests, the examples and the _clips and
_gallery programs. No library package imports it.
Design
docs/design.md is the contract: the decisions, the public API, the error behaviour, the determinism rules and the plan for later passes.
License
This project is source-available, and is licensed under the PolyForm Noncommercial License 1.0.0.
- Noncommercial use is free. Individuals, hobby and personal projects, research, education, nonprofits, and government may use, modify, and redistribute it at no cost, subject to the license terms.
- Commercial / business use requires a separate license. Any use by or for a business, or for commercial advantage, is not permitted under the noncommercial license. To obtain a commercial license, reach out on Bluesky at @lestrrat.bsky.social.
Contributions
This repository does not accept external pull requests.





