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.0b15.tar.gz (2.7 MB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

flitter_lang-1.0.0b15-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.0b15-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.0b15-cp312-cp312-macosx_11_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

flitter_lang-1.0.0b15-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.0b15-cp311-cp311-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.11 Windows x86-64

flitter_lang-1.0.0b15-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.0b15-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.0b15-cp311-cp311-macosx_11_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

flitter_lang-1.0.0b15-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.0b15-cp310-cp310-win_amd64.whl (4.3 MB view details)

Uploaded CPython 3.10 Windows x86-64

flitter_lang-1.0.0b15-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.0b15-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.0b15-cp310-cp310-macosx_11_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

flitter_lang-1.0.0b15-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.0b15.tar.gz.

File metadata

  • Download URL: flitter_lang-1.0.0b15.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.0b15.tar.gz
Algorithm Hash digest
SHA256 7dcd047723732aa07c57b715dd18cb740d33286b546eaa41b19548384f12b7be
MD5 0c6a90923e7e1e8d739d6fb1deaabf05
BLAKE2b-256 c5e431ea415ed768f5fc0666cdc8d28e4e0df0f29444a46e1fe72d68fdac59c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f88d71ca22eb0fd1061dd5ea872ebc5cb70a4430205163c0aa5abe48a59cd54e
MD5 d2f25d463544c17d92b75a48f2c3b976
BLAKE2b-256 1af2b53754cac663b3a551b2ab0916657c61b219b19662243f69afee0c0b7a9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0f0201f62a3afc8511e72e7182d7a097d1de532ca14a93ef80e09ec2ce3e8296
MD5 068a801329de095a49409eda8859d17f
BLAKE2b-256 51af3cc47fdb2385bffa218c1cbee1c40cdf4fe1cc70d007fd2dec3c9e15ea01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab54071bc2171c5ed6c5ebb56b1dd6ca0d508d8e0ae9b0d3a50275ebca4ccf5c
MD5 721b0bb11363cc3cbb5fb906c006b0e9
BLAKE2b-256 29da7d7aad232c23e78aff447e843061ee5574c6b263ea92bc8eb9de517667c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e945f6d301b92c2883a25670a6ca0370bcd4f0dda578cf17e122077c2d0a586
MD5 4e4dad10180c2c98b42fd06e6fa89a09
BLAKE2b-256 d85af9ffdb5e54bc28ac0d14bd108faf271fddb3646c1ab19f1eab8a5ae3590b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2fe98acd9637477fe8065bd476e5fb7bc5c951ec59484d73ed30bd44d49d3f56
MD5 24dd22a2c5c123a660804775658a585b
BLAKE2b-256 6e82ff10caf1af542bb5967fe07c519adb0e105856e6ebbef519d448e1739aaf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3b4c28604458e59eca9f2abc02b49e844caba9fea6c9afe10791c3d4dec5b3f9
MD5 527c380fd01ecc1a4ff599bbdd0f4a25
BLAKE2b-256 8db898423a19e6fd96f2e031fa619e6706cbc804ade2a0befb4a44d70aab1f25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 12b13d0eae8f08fe6a95f61e5373490dacccae3f1fd0bfea1eebb821e7f1c930
MD5 9947e2a713e13a56b428fbb03da321cc
BLAKE2b-256 9abca5985b9c2e0db64ee9be88ab32430e4403bb5ad6163ae223437271e2ef7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 181a58d14122ef330e7779b45056d3721d9b0fba1c64b68dad87cb027ca07e6c
MD5 70f0f8ad7ffd748881836f7428bad1c8
BLAKE2b-256 a037900a0e98b80c44966ce2dfe529d91bb2c2f36efc2915613f4fa4a54f121f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e533d04f6a53ca3fd2beba23829ba271ebcec8592b8e9acb3f2f80ff74537f7b
MD5 150c9a63350456683253370ad154f9ea
BLAKE2b-256 6d11cd36872e393eccbf4e9fe42f4f3296cd135109f3bfdff683e5493900a44f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4e3bd8f6ce54bc9597bfaf9a16eb52eedd82b3995319bf494ff8bd1081220d59
MD5 d8377c9db445020995ed8a69142ba70c
BLAKE2b-256 a101e708a8c7555eee759125908a2a1ed27c58539c226cb504f4b60b69652f04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0e4316f5099be1b2c55a15474431fdfe0818c93a7326b4a79d51d5f337d1b634
MD5 4172030b797d1b30ed39e29282046642
BLAKE2b-256 02a7860970098762e79ce8791bb2ab638bb73eda00886d0d2081952b171094da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 af29b2f511f2e7aba8b5f6c43071a59dd48d54408cd735fec9bde0e6ad7f03ff
MD5 4fbc392ebc376f74782413b81f735837
BLAKE2b-256 15ec90e23b5c10d4753d5b722d11729faa3355d3596527400a80782b08c360a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0745f1470e6694a5f627a3855687af233885dda950cbf1e05c51288ef6656a4a
MD5 1785dcdcef2f13962eb6b19914a08dac
BLAKE2b-256 4d0d7787875edd8c155d65d02b4a1559850e26dcd7eadf5460903c0de5d9381f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6ba34dbb9085440b3ff2be324ddfda812ad4ee4bfa133f912d11ade4b4dbf0a5
MD5 4f7c6cc92e1095495bb67a202f261d4f
BLAKE2b-256 6a0df61a63a2ba6114c27234e11bf44a47cf33ea6f258dea4e684d7e3d17180a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b15-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 29243998ed18d2d3e80ccdbce3d7dff4ef3fcce6e4b4ae6b9431c9c3633f2ce3
MD5 6a611687fc66ed31058ad78b323c5dec
BLAKE2b-256 027b2c8f1afb89cad7bd2427098159e82fc4b171691654a65518c08a9ea274b0

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