add demos to README.md

This commit is contained in:
Abe Pazos
2025-08-27 18:32:18 +00:00
parent 1489b503d2
commit 700b666e5c
35 changed files with 1430 additions and 356 deletions

View File

@@ -156,76 +156,123 @@ fun main() = application {
<!-- __demos__ -->
## Demos
### DemoDirectionField01
[source code](src/jvmDemo/kotlin/DemoDirectionField01.kt)
Shows how to use the [DirectionalField] filter.
Draws moving white shapes on black background,
then applies the DirectionalField filter which returns a [ColorBuffer] in which
the red and green components encode the direction to the closest black/white edge.
Hold down a mouse button to see the raw animation.
![DemoDirectionField01Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoDirectionField01Kt.png)
### DemoDirectionField02
[source code](src/jvmDemo/kotlin/DemoDirectionField02.kt)
[source code](src/jvmDemo/kotlin/DemoDirectionField01.kt)
### DemoDirectionField02
Create directional distance field and demonstrate signed distance
![DemoDirectionField02Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoDirectionField02Kt.png)
### DemoDistanceField01
[source code](src/jvmDemo/kotlin/DemoDistanceField01.kt)
[source code](src/jvmDemo/kotlin/DemoDirectionField02.kt)
### DemoDistanceField01
Shows how to use the [DistanceField] filter.
Draws moving white shapes on black background,
then applies the DistanceField filter which returns a [ColorBuffer] in which
the red component encodes the distance to the closest black/white edge.
The value of the green component is negative when on the black background
and positive when inside white shapes. The sign is used in the [shadeStyle] to choose
between two colors.
The inverse of the distance is used to obtain a non-linear brightness.
Hold down a mouse button to see the raw animation.
![DemoDistanceField01Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoDistanceField01Kt.png)
[source code](src/jvmDemo/kotlin/DemoDistanceField01.kt)
### DemoInnerGlow01
[source code](src/jvmDemo/kotlin/DemoInnerGlow01.kt)
![DemoInnerGlow01Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoInnerGlow01Kt.png)
[source code](src/jvmDemo/kotlin/DemoInnerGlow01.kt)
### DemoInnerGlow02
[source code](src/jvmDemo/kotlin/DemoInnerGlow02.kt)
![DemoInnerGlow02Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoInnerGlow02Kt.png)
[source code](src/jvmDemo/kotlin/DemoInnerGlow02.kt)
### DemoShapeSDF01
[source code](src/jvmDemo/kotlin/DemoShapeSDF01.kt)
![DemoShapeSDF01Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoShapeSDF01Kt.png)
[source code](src/jvmDemo/kotlin/DemoShapeSDF01.kt)
### DemoShapeSDF02
[source code](src/jvmDemo/kotlin/DemoShapeSDF02.kt)
![DemoShapeSDF02Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoShapeSDF02Kt.png)
[source code](src/jvmDemo/kotlin/DemoShapeSDF02.kt)
### DemoShapeSDF03
[source code](src/jvmDemo/kotlin/DemoShapeSDF03.kt)
![DemoShapeSDF03Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoShapeSDF03Kt.png)
[source code](src/jvmDemo/kotlin/DemoShapeSDF03.kt)
### DemoShapeSDF04
[source code](src/jvmDemo/kotlin/DemoShapeSDF04.kt)
![DemoShapeSDF04Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoShapeSDF04Kt.png)
[source code](src/jvmDemo/kotlin/DemoShapeSDF04.kt)
### DemoShapeSDF05
[source code](src/jvmDemo/kotlin/DemoShapeSDF05.kt)
![DemoShapeSDF05Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoShapeSDF05Kt.png)
[source code](src/jvmDemo/kotlin/DemoShapeSDF05.kt)
### DemoSkeleton01
[source code](src/jvmDemo/kotlin/DemoSkeleton01.kt)
![DemoSkeleton01Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoSkeleton01Kt.png)
[source code](src/jvmDemo/kotlin/DemoSkeleton01.kt)
### DemoStraightSkeleton01
[source code](src/jvmDemo/kotlin/DemoStraightSkeleton01.kt)
![DemoStraightSkeleton01Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoStraightSkeleton01Kt.png)
[source code](src/jvmDemo/kotlin/DemoStraightSkeleton01.kt)
### DemoVoronoi01
[source code](src/jvmDemo/kotlin/DemoVoronoi01.kt)
![DemoVoronoi01Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoVoronoi01Kt.png)
[source code](src/jvmDemo/kotlin/DemoVoronoi01.kt)
### DemoVoronoi02
[source code](src/jvmDemo/kotlin/DemoVoronoi02.kt)
![DemoVoronoi02Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoVoronoi02Kt.png)
[source code](src/jvmDemo/kotlin/DemoVoronoi02.kt)
### DemoVoronoi03
[source code](src/jvmDemo/kotlin/DemoVoronoi03.kt)
![DemoVoronoi03Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-jumpflood/images/DemoVoronoi03Kt.png)
[source code](src/jvmDemo/kotlin/DemoVoronoi03.kt)