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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

flitter_lang-1.0.0b14-cp312-cp312-musllinux_1_1_x86_64.whl (12.2 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12 macOS 11.0+ ARM64

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

Uploaded CPython 3.11 Windows x86-64

flitter_lang-1.0.0b14-cp311-cp311-musllinux_1_1_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

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

Uploaded CPython 3.10 Windows x86-64

flitter_lang-1.0.0b14-cp310-cp310-musllinux_1_1_x86_64.whl (11.3 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

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

File metadata

  • Download URL: flitter_lang-1.0.0b14.tar.gz
  • Upload date:
  • Size: 154.0 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.0b14.tar.gz
Algorithm Hash digest
SHA256 a3d4a396731232f860e86c5fea64e6908322b44845ff554bd26ed97ff0c1e32b
MD5 9383c2f1b5f0b1235cfb274cd3002311
BLAKE2b-256 e8bf96f01fc35afa1889312f1cd119aba694915399ec99ff3d0677bb2f6dc08d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d9f12474107f33d9c313398fc1b61aadc4b1d8b1ddad93b7b85ddc5e335ddea2
MD5 74aa56f59d9f78cdeee215f595336cdb
BLAKE2b-256 cf3c53400bbe6e46a7009b2de12ed465caf44ea031fbd8e375a6d7030c7f54bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 92ec04ac9a191bbc00d756d0d6fa02a25c99cc477914b17bdf8a226954eff485
MD5 034bd7301848fec00924bad12ccf28a0
BLAKE2b-256 d51b6529c81817c28c71ce6c1fbe57d04fbe7862dca40ba53c7f7fd1797113fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b29783fbd876c094b586d2edfc0d8acfc6d86481f1a2cc95ff490e9b66a1148b
MD5 393b88d0d30093bb7cb75b98efd741a8
BLAKE2b-256 79d86ee2e2a8a66dbf4dff65bdf4c94f5f4774aa5ef018e3588ea7bae0559172

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ead3d934bf766fe85e0e1879608eff3441e72bea10f18f909ba17661177754c5
MD5 448507f26b95cd95aefe2884c3961056
BLAKE2b-256 6e6b52dcf3c7b2095f5d763bdbb543c39797da3254677b3512d8f7b29816e809

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e87a615516557a3558f5854bb1fa5c0edd2841b24d1aaf2287fd044e470ece33
MD5 263f758568dbef50b0fcdbc796edba96
BLAKE2b-256 0c239591f2067fb3bc312a7f6f6032d2236d05e5cbe1d679fc3920d973ce1cf7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 40ceb172c08b7d770b14b99db2f5b2b1ec22146eada38d9cba6406af9244f2f3
MD5 bce254ba8a68d1a07e6f6913107ac78e
BLAKE2b-256 bc315b4844f1a90beb499bd6575d6f600bd03cde02a965b11030304b3ddb9a53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 25d3107f60adc926ce2d004f87de852ea5140f04233f0418b9f38a5d4c9473d3
MD5 c8836005bf70a601b10f29515c246a27
BLAKE2b-256 47fb63582011d1250a3f93cabb90dbe24587ddd87ad0a5571a90ce28b5def75b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 11d8191df368ddb3437ce71609b3841069d4aa96f0287d04fb02cb1121a23bcc
MD5 1b8bb0e085f5c8324ac14a1c48e5511d
BLAKE2b-256 b44912b28e0ddd964c99008346cb9bb83050a0ed47ab50d39617032d035cd184

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 854b2093a4dc9b14bcf6f4364216916a229ee94ea021eab589a6c2cbc1d290ea
MD5 4ce2252cb8c432bbbe31179f9be40736
BLAKE2b-256 76636d852aacd7c83ee48fc3bdb028950882e16bf62355972de2f707c879c16e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 68c052d88dea7b167fc3d0701674f50b98b986a12858a9af44be56596b5e9eac
MD5 f1181c77c242258b415bf22df6217d15
BLAKE2b-256 c34cdc9ea1195cbb71f6c5ef11ccd7d69743c5f8c831a0a0ef08278279d8e7d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 32a8be2726ea9ed21492769af2b5c4b344cea97a55a341d851481ff093c2e3c5
MD5 4dfe9d4cd7028d776138190d71ae5ee5
BLAKE2b-256 49650b95591cf34abe9490e0b836efae3d587426b6c7a52047c08ce9579ed361

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 5608fb994a9016c2758fc33965501b620c3604d2b83d78cab3cd9bccd2cc4261
MD5 b88f9e8f5ba06e98d2d3e0c748bd9644
BLAKE2b-256 b9a1cdcc807fdbeb3a33febf4442485d018d202514071c29654e789892b2b918

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5bfa32445b6522274f4c098e9f2389af0bc25d074d7b62a81e2023ef059e6c6
MD5 b5214fa664e90bd6351b171ca245fcfe
BLAKE2b-256 c1dd88e4f03f537c9e26e1000bd67545598520a0eb467e650270f63c52b24c8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aef830b3d9f0c7d84c7408ad75fd44d82a07818d7ccbd763ca384f7328d1a54c
MD5 6d4fe63e311216ef5165cc193cad6f0e
BLAKE2b-256 beee62964e0f89213bbc58e500debc5c668d189cd5d560b51f7a39cb121db39f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b14-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f7d885f9b65dad725ef75adf9bbb6c195cec100f7e83d4e66c88a84f53d77880
MD5 561ef18b4ae281b12b9e1191889be4d9
BLAKE2b-256 1d7a206acb8275d7b94cdaf55d719033568aaca00a8c9c99f4dc88469b33e62d

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