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

Uploaded Source

Built Distributions

flitter_lang-1.0.0b17-cp312-cp312-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.12 Windows x86-64

flitter_lang-1.0.0b17-cp312-cp312-musllinux_1_1_x86_64.whl (15.2 MB view details)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.3 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b17-cp312-cp312-macosx_11_0_arm64.whl (4.6 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

flitter_lang-1.0.0b17-cp312-cp312-macosx_10_9_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

flitter_lang-1.0.0b17-cp311-cp311-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.11 Windows x86-64

flitter_lang-1.0.0b17-cp311-cp311-musllinux_1_1_x86_64.whl (15.5 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b17-cp311-cp311-macosx_11_0_arm64.whl (4.5 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

flitter_lang-1.0.0b17-cp311-cp311-macosx_10_9_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

flitter_lang-1.0.0b17-cp310-cp310-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.10 Windows x86-64

flitter_lang-1.0.0b17-cp310-cp310-musllinux_1_1_x86_64.whl (14.4 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

flitter_lang-1.0.0b17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

flitter_lang-1.0.0b17-cp310-cp310-macosx_11_0_arm64.whl (4.5 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

flitter_lang-1.0.0b17-cp310-cp310-macosx_10_9_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for flitter_lang-1.0.0b17.tar.gz
Algorithm Hash digest
SHA256 b27e3a64f6f78d90c7f5fbc1ec741d5cc60bd650b8382cbe2074011e7764a3ca
MD5 3205e6df081c8e9c7de9e3599ba0ae77
BLAKE2b-256 0f1879bc0e3f719f0841e23de11c23b3b10bd82a98eab76be228df6b23363d3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5e57a57ea8d2753d08b8e95d5c265b78c8cac5a8b28f46cb6eee852613526468
MD5 78f28bb35af63a8a6e6776e257222c0f
BLAKE2b-256 e1d22885b51ab9a6cc51a91a677b300f92b4ca580f6b382235e7e908268fb8ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 b2a061c0d8323df6f758d03f4d25e74ec2b43187100497af2464c713700f50a6
MD5 b4263572a72742d29202bf8222fed086
BLAKE2b-256 ddf40655591386cd4c33426f0d395dd51d9d97098ab4930870fb9079ff06ff6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 38c2d64df8c90994b4dcd851fc474ba187237a76843d577dafe1aab22da3d4d8
MD5 5c14eda5fd77fa19a169fc4667794763
BLAKE2b-256 0f2464d6928e25287eddb9ae37ac8ea4767a0c0c7ea8f352c42252f3ec321b75

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3cdb809f896443356eab1fe3d1090fe44d7dc3219d3f52e04f97be182de39752
MD5 ea0718d13e74147877fff7e51bcc8b53
BLAKE2b-256 659e0b81e902260649ae265ca149f63217053d5f1d43f206affdf220b2db85e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e4c941aa9b0531d8a98991f5f7478068d4d3564a0da406b9cb69fe385bb3addd
MD5 8ed89564db2f46eb4d71fdb7c0224bdb
BLAKE2b-256 f89101576131878013c4babe298039f00b7b983b8e758ed1df5983bc69cec58f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0419882417312898ff97e26714c3835ffc396670cd207c1b2d4f31d606d95f05
MD5 9991c66a6f92ff220247a5138b29277f
BLAKE2b-256 e32162ece7d9db51e90f246931a269c66051fe3db36e8b0db38d69755ea48724

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 1b90aa8443ab0e9b93a9f849859db288a2130957d2223225309bb02a207cae30
MD5 8f726012efaf836a42b6d6952c209dc7
BLAKE2b-256 9dd9977c0c19dafc0b734132262c0b083dee025f68ed0c10a7a87c0c5ca1c481

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3574270f5c2f32d18e8b57c80213b47f813bf89fc3af63bafa3de5ea91143c83
MD5 671396d670680892eb249c518e49e661
BLAKE2b-256 afba6f05a7e0d81abfecc4c067d061218a775814ae70dda4263447e371efe186

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3e54cb8307f871c64f136789f3bd0227e33a2905ac41687c221ed770240e2e21
MD5 4454e9c39909aeeb82a33d33d335d11c
BLAKE2b-256 32820284251c398c5dac6ed0dd05951277595d85b101feef5d5a267ac0d00d1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 65cfe62b7a2715a36b3e7cf56cf3352580584d9853ab14804fe2fb0cd0e91188
MD5 0aa6329a96503851b839ed24072d032e
BLAKE2b-256 e421289e67e59eb768b3df7e06a0688b01a128952753be4377c842f444f60ef4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 73c7900e130a2bbd5cbf52771b5a8792be11f7e018381660873f589f33568e74
MD5 453f5bd37ac706d4e6865b1ec20527b5
BLAKE2b-256 6776cb9aa2c1a385fd0aab80af972766f1cef2bcabb7521fc71942af6fa8a704

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 08477009559e96c96bc2b256e3f5d900d247be39831d5cae187b4f1b0ee49342
MD5 86108459d4774935c6c2bc57882f7863
BLAKE2b-256 1411757cae9cd6e4988ea545de7ba69d1dee66f3fc3f6da190d4689b1e4815d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 22bc75b78c6a10c3bcf36398f262be0036a7b663a41625564d14ac0a79f8c12a
MD5 a6c0cb183e22c5a6f047c5b6ce7be96c
BLAKE2b-256 e86ec22abc719741a449f24c8c4aa2302bfc79d3a78ef3d83d8d90a2d898f8cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6a70398df5376f1991a2ffc8ec2d2497aa018e087e09291a72d155c1fb084aa
MD5 ce882b94f98c47a669664a980fe9791d
BLAKE2b-256 e121694cb1cc1a836b5e55f858fefd70838253abebce19a711b38def64226097

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b17-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 aa09c6832104d01217ba1f8ea334aa8dad584887b2c1e234837161551112ed5e
MD5 b70111191d33fd4ac310c2702fe4e52b
BLAKE2b-256 7e274ab33a2382dc6378db0bfc47dbd52ff6c336f9e88ef5a5ff89b9eb98552b

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