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 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.

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.0b12.tar.gz (142.3 kB view details)

Uploaded Source

Built Distributions

flitter_lang-1.0.0b12-cp312-cp312-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.12 Windows x86-64

flitter_lang-1.0.0b12-cp312-cp312-musllinux_1_1_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b12-cp312-cp312-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

flitter_lang-1.0.0b12-cp312-cp312-macosx_10_9_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

flitter_lang-1.0.0b12-cp311-cp311-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.11 Windows x86-64

flitter_lang-1.0.0b12-cp311-cp311-musllinux_1_1_x86_64.whl (12.6 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b12-cp311-cp311-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

flitter_lang-1.0.0b12-cp311-cp311-macosx_10_9_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

flitter_lang-1.0.0b12-cp310-cp310-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

flitter_lang-1.0.0b12-cp310-cp310-musllinux_1_1_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b12-cp310-cp310-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

flitter_lang-1.0.0b12-cp310-cp310-macosx_10_9_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: flitter_lang-1.0.0b12.tar.gz
  • Upload date:
  • Size: 142.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for flitter_lang-1.0.0b12.tar.gz
Algorithm Hash digest
SHA256 0d7d08541a6e99547379a065ed7fcd1948715e3db6ad91dbd887652b1030ee86
MD5 6e085bc7050293f8e60d1ebedd163e92
BLAKE2b-256 24ca27bff7ef0a54d89676d8b1f294d8d7efa46b5e712f74e71c5dd9fda1a036

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 12f610f43f32a2fbba3c500a99f5dba42c917e881e56ab004f42dd89455a0f1e
MD5 090f383ca2d8dcc9b0abfe5817a87481
BLAKE2b-256 acab39eebd8dd2f446db98510941a3b5f1c112052ab78dda47e799c39e1cb5c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 f27c677e605a51512564f62a0dbc8c8e989549e1afe55abac69e77faae5d3247
MD5 3e5b80bc1c87095b736ca3f9feee9bae
BLAKE2b-256 3ea8d80dd6832dda9cb0f3fc7ea14517dbe6b6ac50a212e783e98cdb161aa5b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 df8c2caf3435136f4bf02eed84ce38d8297504c2ca43d753122767509a4aa5d9
MD5 1a07cda90b56c71ebf1c2e43c0706ca0
BLAKE2b-256 931a740c81cd487ad7f5bd9dc96f9dc82af2c6822d31fb38872096cbaa623321

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d164a7962c096c292998267ad3657bfaa058dad0d890b0b6ab3c4a799648437c
MD5 b5e0b00f814a499bb3639ea8fb90b2eb
BLAKE2b-256 2d011984b054e974a2b8c234f403ffe3af4b5dbd296b7151b36625ffa82497d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5295302a6d1657f6ce2a65e0a956c7a3b253d3177c226f8961c82315f6f076a9
MD5 02560ecd598fd6c337397c92b7e1221f
BLAKE2b-256 a93b49b1433ece28708600d58ea1dc0466254d0b62a721be3a33cd958aeafa15

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3d474f9d1acb6af1c0b1829fab7adb0afd69ca04fce5d3067171bcea2a876b56
MD5 afe1c403bfe5350d95bc9733e602780f
BLAKE2b-256 936fd779cda5302a1422f1b083db21a463df9c00afd92dfa25cc91f9b72ddcf1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 50497edfcb6dc0cb64f92c60951dc8bcd8166715746dc73aa59aa1f932af403d
MD5 51d6ba35b72c8a67706c30dd796a9c8e
BLAKE2b-256 ad2fd10d79bf190c0a8af01267eedc56dde4275bd407606b1a966f9f65f4f684

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f936bd24b536cc39d606eef0b4962864cf1da3cafc25ac98616eb1c0204e5fc0
MD5 849e188f91c08dcee2f1c8ec26d8b571
BLAKE2b-256 0c5efdf576dfe79bc86ebff2cb17eaf211e6091ecd93f91725fb38c6543d8f87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 304764216f678624403614f946619123911f711e69514e5a60a4c3bce2713664
MD5 1a99b603c15c01d98d0b7b3abaa321b9
BLAKE2b-256 e56bf65f2258cb5c01d3168b790fb088da7bec5251fb2e1bdd0e5b358099e5f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 67d3d85b98a59e98f16b3ac17d952e4c3a74f552f74fc2e36ddbf27f0cbc6dc0
MD5 8d9ace9a521aa35e5b3d80d95d2df60f
BLAKE2b-256 95e5b3432c5248ff7abd81014d65a2869d936af13d3f4a0efe863ace79eb29ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1f863ccff73de4871cc113214d1eefea37458bc84f36832162e9f9f8905842ac
MD5 619c4e7fd3b34e3e1a6b3c2be18cd870
BLAKE2b-256 567c077bd67a53caeb4fb381f2d3273ae2cfa4e81b64eb364cbe708e8f965f5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 f23001198ed25aee41d5b0bc7749644822d48de6975dbf2cf2329ab67cebe3b0
MD5 265b0d30ef3e07d99860b9d0cb1f9dac
BLAKE2b-256 09604c3f8647d20088e76478f3af38dfb4b0d125ac959aa73b945f6317d19622

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8358739cbddd4b60ae61d99b8c2e6b1a289ca533c7f58b375445c1ce73a3bc8f
MD5 9af2896a3aed185c30be65ef2a2dfaaa
BLAKE2b-256 669362491650546eb8256f232e3a00156dac00af0478de1707b6dd03dad2cb82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a0a9668188309689c6f2a9e1cbba9cb27274e1942dcf8b19031469da3f32d380
MD5 48cf429c786ea5f6bd49255995746b62
BLAKE2b-256 4b5cc05a573088cd083d5dfb7ac928ea9b2538a6584ff36a8f59ca016c70a481

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b12-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7b187fdb8d4ef9879ae68b89522fbd7c4e2c9421ba15727119af795b0e8838ef
MD5 37cdcc9083b40cba46e65f334b067df8
BLAKE2b-256 d9fac2763385c4da8e3eb2ed81a76926e006ea8e6d2ef78af9d442578b7a37d4

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