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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.12 macOS 11.0+ ARM64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

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

File metadata

  • Download URL: flitter_lang-1.0.0b13.tar.gz
  • Upload date:
  • Size: 142.4 kB
  • 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.0b13.tar.gz
Algorithm Hash digest
SHA256 cb7ed081a8ba6ed5ccfe2c68b4cf92bb3933bd7c6bbb091a1f348a4cf7b00738
MD5 3241569d1b2e3732b2393834a37b9f4c
BLAKE2b-256 eb5eea481563091c89f5ba5d56612938295ca7d915db3ecc46797cdfc944d939

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9b2b396084e050cbc502a052f88057d94c291139f445f59b057bf8a6e190bf78
MD5 a2f4f12f7c277ccbeac684d1a0efbeea
BLAKE2b-256 291cf0707bb41e0ba3cdac04a9afece609331e414127fa448f78f98ee6faa5f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 deedd9fa4ee992f8f7af2edc1b36f99b620047d968f9e6e3ab94f29c78251238
MD5 7f8670729820e67b108d9cddf87ac240
BLAKE2b-256 9a8a92237ab4ed77ea63ff519dee0e248cac52b86154247f29cb75ab0606d068

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c65fd1a5e4262cf065431e5d3e819b647529e1d4576a7a77ec17e6fc933f532
MD5 0d3faf8b49c60292eb952c2e080de953
BLAKE2b-256 4a75de77e51978d6839dc158127fe0540e0838a0c7ac755426de021814a97c41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 135d0d95a864024d87b5cc5a2d3f4161c36f54abe45e85faec1077b5ec97dc41
MD5 5cf7e7111c16a3bb6f9cbf8cad45bc3d
BLAKE2b-256 1e1de4b380a84b3f6ac6029b4c074a1d78cd70a2274e32dbceb5f6fd12003e61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 806e06bc5ca08d060c10c216404a3f0c57274532ff85437c6eef487c53746763
MD5 33fcf249f0a9141e55a0f1843ac451a7
BLAKE2b-256 d78be0ad6b3f0396f96f6b55e3a18c3d8bd867b6e10e489773c14540c2cbf8ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8159fa0870f308ccf000d8ef6979ea7bdbc856fe2a04314339a9c2b83531f1f6
MD5 08e02394244032134f5759ecefe58b0a
BLAKE2b-256 94950c7543de2cdf40a7ea24ce162d31d17af812568f9511d96a7ebf69cc83e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 408a96a00bf3567afef9b310caaf886cd6809c9b36c019cdd1052317a795c8f9
MD5 0b14ac749471e9513d6b5df344585a85
BLAKE2b-256 6fa9e67c24e1bc9f3ede0b6845926233e9d616786093ebdd1483d1e1f920bc2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 821ad48d89785b42603640dfa8e8a483103230cbd45d745c53dafc5f833ae480
MD5 1174bacad75e7bdfd989827813e057eb
BLAKE2b-256 cb80540dfb1a08029d033ee3f4d05c51719967030ec88063c78e24ea6d919d60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 947e79d691232c2e7dc1ba888ebe780ba6d66234b8f2b4d4ede5518f967f1b0c
MD5 1d8a3787f46f0e9575c43fa893b5fa94
BLAKE2b-256 29aadb92d2d08a42ea8bc6d39a8a6a24ca96fb68926f3aabc1d4e249d6aad529

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fed460f013a6d609eec92e3a04d3940f4d6158f70e79a09884ab4eafcd623a2c
MD5 f30282a8e89fc61aac509465bd981d2a
BLAKE2b-256 490f48ba3d018593a853d36a8c7c07dd148c305c1c624d304193f1dae8a1d65c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f01d4d4a8f2c5adaded2d02c976aa3cff31dbd75683712efd2bc0a858568208b
MD5 145d651bcf07f9c713845fd130c11aa4
BLAKE2b-256 bf5b719aca3c4b550001512c29227bf3bb42de1eac71e06ee6eee529cc4520fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 dd35631a72ddeafbf6cdc9b2dca6bb3079e60b84624df16a8ee9c4bdbd364ad5
MD5 02b9abc9ef9db01863d85227e35582f1
BLAKE2b-256 c58fbeb1f557cc45b6f1ce8eced7d3892ae4bf6f98ab6b6a8522640a81f49e94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 31d30950ae0adf43fc462d44af944d035b7c87357a34d05e32826a1746b37402
MD5 656ebbeae88ab3cf42966a559117fd3e
BLAKE2b-256 5610857b5bc77f9a16eb44c74da5fbc07008fca4347d980253f5599700631c60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4933649c50b4a7a02786699dfebcefe779634c77ce9c9c03a24d0206496b4d8
MD5 4662a38bdcb9dd94e74cb630e81ca77d
BLAKE2b-256 a23cbb832a37684c7cc2d707a480d48fcb2d67b10daa63f14f2d4be779038a8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b13-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b0c4f5b71a8aedf90fd07b65ad791790326587b7a0d53e6b2a155f924d57bbbe
MD5 a46d458fb9bbca348a370cc0bc9700c0
BLAKE2b-256 448a3aaf697be35da51de363d5d69fd5bf166adf7eb7fecefb545c3fa1e26b6e

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