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
    • texture mapping, including with the output of other visual units (e.g., a drawing canvas or a video)
    • planar slicing and union, difference and intersection of solid models
    • ambient, directional, point/sphere, line/capsule and spotlight sources (currently shadowless)
    • Physically-based rendering material shading, emissive objects and transparency
    • multiple cameras with individual control over location, field-of-view, near and far clip planes, render buffer size, color depth, MSAA samples, perspective/orthographic projection, fog, conversion to monochrome and colour tinting
  • 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 (although video will stutter if it makes extensive use of P-frames)
  • 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)
  • driving arbitrary DMX fixtures via a USB DMX interface (currently via an Entec-compatible interface or my own crazy hand-built devices)
  • driving a LaserCube plugged in over USB (other lasers probably easy-ish to support)
  • taking live inputs from Ableton Push 2 or Behringer X-Touch mini MIDI surfaces (other controllers relatively easy to add)

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 the Flitter Read the Docs pages.

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

flitter_lang-1.0.0b11-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.0b11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.3 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12 macOS 11.0+ ARM64

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

Uploaded CPython 3.11 Windows x86-64

flitter_lang-1.0.0b11-cp311-cp311-musllinux_1_1_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

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

Uploaded CPython 3.10 Windows x86-64

flitter_lang-1.0.0b11-cp310-cp310-musllinux_1_1_x86_64.whl (11.4 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

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

File metadata

  • Download URL: flitter-lang-1.0.0b11.tar.gz
  • Upload date:
  • Size: 139.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for flitter-lang-1.0.0b11.tar.gz
Algorithm Hash digest
SHA256 8570b18c707f8509cd2e8e389455838859cfab22dcae5470350161847086d512
MD5 334cefa9abd7860a7a4529ac4b1e3bcb
BLAKE2b-256 2a2372adf843aa19f01f184dc61c308690640c9bf6495830d8da59a32eb9b1f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a3d09341e402532366f8cb2a42dc4a67ddf21fa0569800edd5547c7b01dfc666
MD5 41069a0f402e9ee67ab9d5b434966951
BLAKE2b-256 1ba87f90d55abf5045158a6c6c35deaf2f55ab88312bfbb26600925c84eee690

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 66a0e297df3aea37ae45fda0b557ad5096ff2e7df0ae7655a2ea15c18433351d
MD5 ff5ad6d1af5487b36aeb351f3f9c4809
BLAKE2b-256 84d3b45decd3fb29c2cca0d31a327acf4fa64a90e39c3a84c62be8d186f566d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f64b882be4fc9c02f448c7a72bd2a75ef2bd295f0668b28ea6bce0acde2c3d76
MD5 851768f7d9bbadc3ab43baf2bcc3f631
BLAKE2b-256 9b74434781bbb4a0a87f7cf5fec1c92eab71d69020e216782d05ad003ec74969

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 084c12621c6722393468246d1095d61d855438e522e8f9c56b42fff6371552b1
MD5 81435987cd194b3c652e9945d80c2ea6
BLAKE2b-256 d0ec24175065eaa70921de9b14491c1f743b51f80c517054f6c7583fe7a319fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c6c871f55a89d7e89e35cc80439177edb3300c2625fd1038e8622f2abe0918a2
MD5 4c5af8c6747affed78d024292cc3637a
BLAKE2b-256 4d2ff2f2381df0598352fc200674e0155422930a9e058cf337c60d03b248964c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8c00bcbab6b60863d42ab8dad32ef41b3156263cab4f25248a73f9ba56744d99
MD5 d4d8bcd76ca12f8035222ba9910c8f28
BLAKE2b-256 64c65445db857927614994d03e0000b07ef79d0aa71b2d380d016acb9b39caf3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 dd3f50c03c2ed2c36d9d86a40b2deb983c933dd562bbaa11755e6fd8b66832b7
MD5 02edf9f2c72e7cbab6986e35a16679f7
BLAKE2b-256 37c034f93085b2bd125a590c52b57d74acc7565e3399464ac4211a8455e24530

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af440a4019e8d28ac943210c9a8af8c7882778247f875b9e6580e49406612cce
MD5 89a8bc47c30e821391b3588e874909ce
BLAKE2b-256 6c24654e6d518e50fc86cd7fd619f5bc5b9ffe5f997916ce308bee59eb51943e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 84b432d5a4358adc75c242940e18053d5b1468b28d7cb86738c1c29d7bc4c5e7
MD5 5fdfa202164d98b257e5c9fba008967e
BLAKE2b-256 fba5fdbf1ee61a517e546c2134d42c0eea0c0a3f47bcef54ee28ba47c1c2c8b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5ad141abf492f73cb1b7d96dc2c447543cd555dd9c4c8b8c9848ac26bb3d336a
MD5 9162c9e3ba60fd52d5d07f0e0715b65a
BLAKE2b-256 a18c4cf8cb1b7ea11d830b4d726af5b5ac114663bed4bfea2a56c14353bbde07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c3c99c1b741983619679c57a361ab9e900a4bc197a3715b129b7b167be6ccc93
MD5 dc61b3e200ee589e905429e8bd9486d5
BLAKE2b-256 d434d570bbd48824d3c22f3a6f4767eb4b306a4911ae6232816252c3520f1396

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e2de111ccf99d5a0ccb5aaa80919f45190982902c4ab91238340bec21b4adb7b
MD5 124c2ed4099c27cee5b74610be8aa793
BLAKE2b-256 f2df2345a857e00d889878c90631b3b3b51a99635d5fdd3e4b0d1833425c5044

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e6aeb1ce941a328ab5e595b7d1486ff8fc00a18b672f5f803270580f6d4ecbc6
MD5 447c98086cd001229dd6c77ae7c01291
BLAKE2b-256 ccfabb016783ca7d40f3fa07222a7cfd5a0c7b39994110e7f64e0c6fd41c9eb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 27585e0e98a3fdb8a5599a4364cbc26e19928e3fe13df665aa10eafc011d40a8
MD5 6c73db6af527b68c77933756fa1e4a82
BLAKE2b-256 478e7de2448e478a467176d87a7a81d1d32c73fe63f4ed3ebb44eb010a6a5722

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flitter_lang-1.0.0b11-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ad095c2216ad820232e9b2aca5074eec1f175c1a8efbe01337be29f1cb7a89e4
MD5 60ab048a54f7dd0d61c2aa0ba7e4defd
BLAKE2b-256 ca38c577e327ecc51e6d525d8a8c341081304dceda6725c3df4e5647780ea550

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