Skip to main content

Flitter is a functional programming language and declarative system for describing 2D and 3D visuals

Project description

Screenshot from a Flitter program showing colourful distorted ellipse shapes with trails moving outwards from the centre of the screen.

Flitter

CI lint CI test CI coverage docs

Flitter is a functional programming language and declarative system for describing 2D and 3D visuals. The language is designed to encourage an iterative, explorative, play-based approach to constructing visuals.

The engine is able to live reload all code and assets (including shaders, images, videos, models, etc.) while retaining the current system state - thus supporting live-coding. It also has support for interacting with running programs via MIDI surfaces.

Flitter is implemented in a mix of Python and Cython and requires at least OpenGL 3.3 (Core Profile) or OpenGL ES 3.0. At least Python 3.10 is also required as the code uses match/case syntax.

Flitter is designed for expressivity and ease of engine development over raw performance, but is fast enough to be able to do interesting things.

The engine that runs the language is capable of:

  • 2D drawing (loosely based on an HTML canvas/SVG model)
  • 3D rendering, including:
    • primitive box, sphere, cylinder and cone shapes
    • external triangular mesh models in a variety of formats including OBJ and STL
    • planar slicing, union, difference and intersection of solid models
    • ambient, directional, point/sphere, line/capsule and spotlight sources (currently shadowless)
    • multiple (simultaneous) cameras with individual control over location, field-of-view, clip planes, render buffer size, color depth, MSAA samples, perspective/orthographic projection, fog, conversion to monochrome and colour tinting
    • PBR forward-rendering pipeline with emissive objects, transparency and translucency, plus the ability to plug in custom GLSL shaders for arbitrary groups of objects
    • texture mapping, including with the output of other visual units (e.g., a drawing canvas or a video)
  • simulating physical particle systems, including spring/rod/rubber-band constraints, gravity, electrostatic charge, adhesion, buoyancy, inertia, drag, barriers and particle collisions
  • playing videos at arbitrary speeds (including in reverse)
  • running GLSL shaders as stacked image filters and generators, with per-frame control of arbitrary uniforms
  • compositing all of the above and rendering to one or more windows
  • saving rendered output to image and video files (including lockstep frame-by-frame video output suitable for producing perfect loops and direct generation of animated GIFs)
  • taking live inputs from Ableton Push 2 or Behringer X-Touch mini MIDI surfaces (other controllers relatively easy to add)
  • driving arbitrary DMX fixtures via an Entec-compatible USB DMX interface
  • driving a LaserCube plugged in over USB (other lasers probably easy-ish to support)

Installation

Flitter can be installed from the flitter-lang PyPI package with:

pip3 install flitter-lang

and then run as:

flitter path/to/some/flitter/script.fl

More details can be found in the installation documentation.

Documentation

The documentation is available on Read the Docs.

There are a few quick examples in the main repository. However, there is also a separate repo containing many more interesting examples that are worth checking out.

License

Flitter is copyright © Jonathan Hogg and licensed under a 2-clause "simplified" BSD license except for the OpenSimplex 2S noise implementation, which is based on code copyright © A. Svensson and licensed under an MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flitter_lang-1.0.0b16.tar.gz (2.7 MB view details)

Uploaded Source

Built Distributions

flitter_lang-1.0.0b16-cp312-cp312-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.12 Windows x86-64

flitter_lang-1.0.0b16-cp312-cp312-musllinux_1_1_x86_64.whl (14.8 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b16-cp312-cp312-macosx_11_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

flitter_lang-1.0.0b16-cp312-cp312-macosx_10_9_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

flitter_lang-1.0.0b16-cp311-cp311-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.11 Windows x86-64

flitter_lang-1.0.0b16-cp311-cp311-musllinux_1_1_x86_64.whl (15.1 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b16-cp311-cp311-macosx_11_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

flitter_lang-1.0.0b16-cp311-cp311-macosx_10_9_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

flitter_lang-1.0.0b16-cp310-cp310-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.10 Windows x86-64

flitter_lang-1.0.0b16-cp310-cp310-musllinux_1_1_x86_64.whl (14.0 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b16-cp310-cp310-macosx_11_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

flitter_lang-1.0.0b16-cp310-cp310-macosx_10_9_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

File details

Details for the file flitter_lang-1.0.0b16.tar.gz.

File metadata

  • Download URL: flitter_lang-1.0.0b16.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for flitter_lang-1.0.0b16.tar.gz
Algorithm Hash digest
SHA256 e6e7ce3425af36d9ee7b3d65075d47be6343ee1bb55575bbd4bacbe955064e22
MD5 9cc1c4c07cad161e21b7ad389f738cd7
BLAKE2b-256 705a6cfbb1efb30d7ce5bb82fcabdfffab54e654f906f42636f2dd45407fea0f

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 38c2d261aa024973ecef629f7b606daf8819961be3202c846d88d3e85dc33eb5
MD5 07ab466009d33d843f32300308310c6e
BLAKE2b-256 02dfd4bd14925da5248f83eef1ec81106fb0a30179cd919142f971d6ebe23a56

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp312-cp312-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 127b04824fb4105998473ca18c8d427d22c06e85d3720856d7c2f8e9f3bb6555
MD5 127fde3e24375ae513acf1996ef04d73
BLAKE2b-256 0e60ae468b96314e9efc710094ffc06c1a1af3895e5816359293ed3d83b166b5

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 535333911ce017510100be82d00a3d253baa5617343d0576cf894588b4190580
MD5 806309f1f2fe015f1e8d869e25fea333
BLAKE2b-256 57a5a86fe2dea583ebc5f72e6f2f46c3cae2a3a0d69dcabe22da150d00c31e33

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b1ecae4fdae94b71c36cd9ba0c8de201b45b05738f2401ce4ecaee409e51470b
MD5 738631c77cac789cf04c389f1785d80e
BLAKE2b-256 6003a62cb1d327e91b8f2c7af695d2499799c437a7996fcd06ab0aa91a203dfc

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ee5ee34927dbaca1b80d2cd54e5a6ae415a029941e303183cd0f2820702cf537
MD5 a8eb5075542e00f192dc7a4680c3703b
BLAKE2b-256 f45b9dd1ba2c1176de5446ef44966357dc030076eb15a065221e0914266d908a

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7803dac9ae6f78b75353c82b323cbf5a790732d942c0f90bba0db6857820ce48
MD5 6d87d83efe001d9016e3626f5f3c2efb
BLAKE2b-256 83fa09dbff3dc4bda1f886979ff1683aad90e9d7b5f83cf64363b89d2838fc78

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e3637672ccadc11f16f0daf4cc35f3283747beb293c58538fb2e24eb34f666f1
MD5 eccee2a3c3212adc8ae4eb3e97f61647
BLAKE2b-256 0cf8d1057d75fa54014d72d71c36432ac98cf2b5e97ac014b6c202d2da53eedc

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d6cbf682f299aeb876f1a3f2209c07f648fa7626704975f2a69c2dbacfa219a
MD5 282643aa9e1aa7c72b977180096b52fd
BLAKE2b-256 a42a11b6eaf3735933e8903864f51646fa6ab4aae47985ef2abc2439dc494f31

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6518ef50bd84e4f97b7a61d658d6c5ac16c865312e15f10c76963940a2743642
MD5 5e95fee2164321796ac54c576f82d219
BLAKE2b-256 9b476235e1965cfee656a475a61196d1719533960940a00cb7f4f0e7bcddd781

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1d8fe9205d0c55ac75bc0c9a7587c89221cf91256d56eb8b1d4f3ab008392f18
MD5 617aef8d453a642c1c30a38fb930404a
BLAKE2b-256 e47aa6c4c20362c3dd0e360dda7a2d8c9bcb9dc72cb90451c93c3d441884e584

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 effb46504b01a7800e9a3435cfecc895ddde11c41f7d39a6cbc5905a16975f02
MD5 95d09220d89ef7801c0275cacbb0b746
BLAKE2b-256 7f31bb7caf98109bd36451c13bd02eb0db7be1c1d9668f2dee37779a6a1ac976

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 75f03e29e6dbf147225dffe8c815eaf0815f527531087601e9ae925816a8ebc7
MD5 f95dbb9612f443f8ca3c055493d17749
BLAKE2b-256 7dd75cae0bb4dde79efd822815cfdf9ccef71b481237b8c8f62561cec802cecb

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 55395351bc1f12ebc34ed13e1d1a3af0cf24bf577481c6ce0c03ba2c05071a8d
MD5 83df43d8cb573c8e84fced645b24e028
BLAKE2b-256 f61ed8f4fbc33f12731888b01db8d5d8926d9c372d2e3de32761315b688d7106

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b95e1aa4e812c540713ecc0feaf2b4848d15157081fa6f1a5178da8c80168f5e
MD5 264ddda59e24a5e204fb2e2a69a05779
BLAKE2b-256 a9ce15aca15cc661a7e989c2a68215775d55e1a7d44a8d919934636840bbce8c

See more details on using hashes here.

File details

Details for the file flitter_lang-1.0.0b16-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for flitter_lang-1.0.0b16-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e1f230d841ab80f76772325af569755bc09080379856895b15cf347c1c64649b
MD5 000e31d9e512a6058cc2547587f060b1
BLAKE2b-256 ce5b52e42fa93ffd0ca3474506c88fc521bc007140b0c287df4ce3404d57d36e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page