@@ -7,16 +7,19 @@ with trails moving outwards from the centre of the screen.](https://github.com/j
77[ ![ CI test] ( https://github.com/jonathanhogg/flitter/actions/workflows/ci-test.yml/badge.svg? )] ( https://github.com/jonathanhogg/flitter/actions/workflows/ci-test.yml )
88[ ![ docs] ( https://readthedocs.org/projects/flitter/badge/?version=latest )] ( https://flitter.readthedocs.io/en/latest/?badge=latest )
99
10- ** Flitter** is a functional programming language wrapped around a declarative
11- system for describing 2D and 3D visuals. [ The language] ( https://github.com/jonathanhogg/flitter/blob/main/docs/language.md )
10+ ** Flitter** is a functional programming language and declarative system for
11+ describing 2D and 3D visuals. [ The
12+ language] ( https://github.com/jonathanhogg/flitter/blob/main/docs/language.md )
1213is designed to encourage an iterative, explorative, play-based approach to
13- constructing generative visuals. The engine that runs ** Flitter** programs is
14- able to live reload all code (including shaders) and assets (images, models,
15- etc.) while retaining current system state - thus supporting live-coding. It
16- also has support for interacting with running programs via MIDI surfaces.
14+ constructing visuals.
15+
16+ The engine is able to live reload all code and assets (including shaders,
17+ images, videos, models, etc.) while retaining the current system state - thus
18+ supporting live-coding. It also has support for interacting with running
19+ programs via MIDI surfaces.
1720
1821** Flitter** is designed for expressivity and ease of engine development over
19- raw performance, but is sufficiently fast to be able to do interesting things.
22+ raw performance, but is fast enough to be able to do interesting things.
2023
2124The engine that runs the language is capable of:
2225
@@ -29,13 +32,14 @@ The engine that runs the language is capable of:
2932 drawing canvas or a video)
3033 - planar slicing and union, difference and intersection of solid models
3134 - ambient, directional, point and spotlight sources (currently shadowless)
32- - [ PBR ] ( https://en.wikipedia.org/wiki/Physically_based_rendering ) material
33- shading, emissive objects and transparency
35+ - Physically-based rendering material shading, emissive objects and
36+ transparency
3437 - multiple cameras with individual control over location, field-of-view, near
3538 and far clip planes, render buffer size, color depth, MSAA samples,
3639 perspective/orthographic projection, fog, conversion to monochrome and
3740 colour tinting
38- - simulating simple [ physical particle systems] ( https://github.com/jonathanhogg/flitter/blob/main/docs/physics.md ) ,
41+ - simulating simple [ physical particle
42+ systems] ( https://github.com/jonathanhogg/flitter/blob/main/docs/physics.md ) ,
3943including spring/rod/rubber-band constraints, gravity, electrostatic charge,
4044adhesion, buoyancy, inertia, drag, barriers and particle collisions
4145- playing videos at arbitrary speeds, including in reverse (although video will
@@ -53,120 +57,32 @@ support)
5357- taking live inputs from Ableton Push 2 or Behringer X-Touch mini MIDI
5458surfaces (other controllers relatively easy to add)
5559
56- Fundamentally, the system repeatedly evaluates a program with a beat counter
57- and the current system state. The output of the program is a tree of nodes that
58- describe visuals to be rendered, systems to be simulated and control interfaces
59- to be made available to the user. A series of renderers turn the nodes
60- describing the visuals into 2D and 3D drawing commands (or DMX packets, or laser
61- DAC values).
62-
63- ## Installing/running
64-
65- ** Flitter** is implemented in a mix of Python and Cython and requires OpenGL
66- 3.3 or above. At least Python 3.10 is * required* as the code uses ` match ` /` case `
67- syntax.
60+ ## Installation
6861
69- I develop and use it exclusively on Intel macOS. I have done some limited
70- testing on an Intel Ubuntu VM and on Apple Silicon and it seems to run fine on
71- both of those platforms. I've not heard of anyone trying it on Windows yet, but
72- there's no particular reason why it shouldn't work. If you have success or
73- otherwise on another platform please let me know / raise an issue.
74-
75- If you want to try ** Flitter** then you can install the latest [ ` flitter-lang `
76- PyPI package] ( https://pypi.org/project/flitter-lang/ ) with:
62+ ** Flitter** can be installed from the [ ` flitter-lang ` PyPI
63+ package] ( https://pypi.org/project/flitter-lang/ ) with:
7764
7865``` sh
7966pip3 install flitter-lang
8067```
8168
82- and then:
69+ and then run as :
8370
8471``` sh
8572flitter path/to/some/flitter/script.fl
8673```
8774
88- I'd recommend doing this in a Python [ virtual env] ( https://docs.python.org/3/library/venv.html ) ,
89- but you do you.
90-
91- If you want to live on the bleeding edge, then you can install from the current
92- head of the ` main ` branch with:
93-
94- ``` sh
95- pip3 install https://github.com/jonathanhogg/flitter/archive/main.zip
96- ```
97-
98- However, if you clone this repo instead, then you can install from the top
99- level directory:
100-
101- ``` sh
102- git clone https://github.com/jonathanhogg/flitter.git
103- cd flitter
104- pip3 install .
105- ```
106-
107- and have direct access to the example programs:
108-
109- ``` sh
110- flitter examples/hoops.fl
111- ```
112-
113- You might want to add the ` --verbose ` option to get some more logging. You can
114- see the full list of available options with ` --help ` .
115-
116- ### Install and runtime dependencies
117-
118- The first-level runtime dependencies are:
119-
120- - ` av ` - for encoding and decoding video
121- - ` glfw ` - for OpenGL windowing
122- - ` lark ` - for the language parser
123- - ` loguru ` - for enhanced logging
124- - ` mako ` - for templating of the GLSL source
125- - ` manifold3d ` - used by ` trimesh ` for 3D boolean operations
126- - ` mapbox_earcut ` - used by ` trimesh ` for triangulating polygons
127- - ` moderngl ` - for a higher-level API to OpenGL
128- - ` networkx ` - used by ` trimesh ` for graph algorithms
129- - ` numpy ` - for fast memory crunching
130- - ` pillow ` - for saving screenshots as image files
131- - ` pyserial ` - for talking to DMX interfaces
132- - ` pyusb ` - for low-level communication with the Push 2 and LaserCube
133- - ` regex ` - used by ` lark ` for advanced regular expressions
134- - ` rtmidi2 ` - for talking MIDI to control surfaces
135- - ` rtree ` - used by ` trimesh ` for spatial tree intersection
136- - ` scipy ` - used by ` trimesh ` for computing convex hulls
137- - ` shapely ` - used by ` trimesh ` for polygon operations
138- - ` skia-python ` - for 2D drawing
139- - ` trimesh ` - for loading 3D meshes
140-
141- and the install-time dependencies are:
142-
143- - ` cython ` - because half of ** Flitter** is implemented in Cython for speed
144- - ` setuptools ` - to run the build file
145-
146- ### Editable installations
147-
148- If you want to muck about with the code then ensure that ` cython ` and
149- ` setuptools ` are installed in your runtime environment, do an editable
150- package deployment, and then throw away the built code and let ` pyximport `
151- (re)compile it on-the-fly as you go:
152-
153- ``` sh
154- pip3 install cython setuptools
155- pip3 install --editable .
156- rm ** /* .c ** /* .so
157- ```
158-
159- If you want to lint the code and run the tests then you might also want to
160- install ` flake8 ` , ` cython-lint ` and ` pytest ` (plus ` pytest-xvfb ` on Linux if
161- you want to run the functional tests without a windowing environment).
75+ More details can be found in the [ installation
76+ documentation] ( https://flitter.readthedocs.io/en/latest/install.html ) .
16277
163- ## Learning Flitter
78+ ## Documentation
16479
165- The documentation is available in the [ docs
166- folder ] ( https://github.com/jonathanhogg/flitter/blob/main/docs ) or at the
167- [ Flitter readthedocs site ] ( https://flitter.readthedocs.io/ ) .
80+ The documentation is available on the [ Flitter ** Read ** * the * ** Docs **
81+ pages ] ( https://flitter.readthedocs.io/ ) or in the [ docs
82+ folder ] ( https://github.com/jonathanhogg/flitter/blob/main/docs ) .
16883
169- There are a few quick [ examples] ( https://github.com/jonathanhogg/flitter/blob/main/examples )
84+ There are a few quick
85+ [ examples] ( https://github.com/jonathanhogg/flitter/blob/main/examples )
17086in the main repository. However, there is also a separate repo containing [ many
17187more interesting examples] ( https://github.com/jonathanhogg/flitter-examples )
17288that are worth checking out.
0 commit comments