From c31c320da18e2216cb10158721948be513e9acd8 Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Wed, 15 Apr 2020 11:57:51 +0200 Subject: [PATCH] Update documentation Closes #78 --- README.md | 14 ++++++++++++-- orx-gui/README.md | 10 ++++++++++ orx-parameters/README.md | 17 ++++++++++++----- orx-timer/README.md | 4 ++-- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ff2e5977..e09350d5 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,19 @@ [ ![Download](https://api.bintray.com/packages/openrndr/openrndr/orx/images/download.svg) ](https://bintray.com/openrndr/openrndr/orx/_latestVersion) A growing library of assorted data structures, algorithms and utilities. - - [`orx-camera`](orx-camera/README.md), 3d camera and controls - [`orx-compositor`](orx-compositor/README.md), a simple toolkit to make composite (layered) images - [`orx-easing`](orx-easing/README.md), a collection of easing functions. -- [`orx-gradient-descent`](orx-gradient-descent/README.md), a gradient descent based minimizer - [`orx-file-watcher`](orx-file-watcher/README.md), `Program` extension method that allows monitoring and hot loading from files. - [`orx-filter-extension`](orx-filter-extension/README.md), `Program` extension method that provides Filter based `extend()` +- [`orx-gui`](orx-gui/README.md), automatic UI generation for annotated classes and properties +- [`orx-gradient-descent`](orx-gradient-descent/README.md), a gradient descent based minimizer +- [`orx-image-fit`](orx-image-fit/README.md), easier drawing of images - [`orx-integral-image`](orx-integral-image/README.md), CPU-based and GPU-based implementation for integral images (summed area tables) - [`orx-interval-tree`](orx-interval-tree/README.md), data structure for accelerating point-in-interval queries. - [`orx-jumpflood`](orx-jumpflood/README.md), a filter/shader based implementation of the jump flood algorithm for finding fast approximate (directional) distance fields - `orx-kdtree`, a kd-tree implementation for fast nearest point searches +- [`orx-keyframer`](orx-keyframer/README.md), versatile parametric keyframer - [`orx-kinect-v1`](orx-kinect-v1/README.md), utilities to use Kinect V1 RGB-D sensors in OPENRNDR programs. - [`orx-mesh-generators`](orx-mesh-generators/README.md), triangular mesh generators - [`orx-midi`](orx-midi/README.md), midi controller interface @@ -23,9 +25,17 @@ A growing library of assorted data structures, algorithms and utilities. - [`orx-olive`](orx-olive/README.md), extensions that turns OPENRNDR in to a live coding environment - [`orx-osc`](orx-osc/README.md), open sound control interface - [`orx-palette`](orx-palette/README.md), manage color palettes +- [`orx-panel`](orx-panel/README.md), the OPENRNDR ui library +- [`orx-parameters`](orx-parameters/README.md), property annotations that allow for automatic ui generation +- [`orx-poison-fill`](orx-poisson-fill/README.md), GPU implementation for Poisson fills. - [`orx-rabbit-control`](orx-rabbit-control/README.md), RabbitControl extension using `orx-parameters` +- [`orx-runway`](orx-runway/README.md), support for RunwayML +- [`orx-shade-styles`](orx-shade-styles/README.md), a collection of shade style presets +- [`orx-shapes`](orx-shapes), tools for generating and modifying shapes - [`orx-syphon`](orx-syphon/README.md), send frames to- and from OPENRNDR and other applications in real time using Syphon - [`orx-temporal-blur`](orx-temporal-blur/README.md), temporal (motion) blur for video production. +- [`orx-timer`](orx-timer/README.md), simple timer functionality for OPENRNDR + # Developer notes ## Create and use local builds of the library diff --git a/orx-gui/README.md b/orx-gui/README.md index d0a425d1..3cf2213e 100644 --- a/orx-gui/README.md +++ b/orx-gui/README.md @@ -26,6 +26,13 @@ import org.openrndr.application import org.openrndr.extra.gui.GUI import org.openrndr.extra.parameters.* +enum class Option { + Option1, + Option2, + Option3 +} + + fun main() = application { program { // -- this @Description annotation is optional @@ -65,6 +72,9 @@ fun main() = application { fun clicked() { println("GUI says hi!") } + + @OptionParameter("An option", order = 11) + var option = Option.Option1 } extend(GUI()) { diff --git a/orx-parameters/README.md b/orx-parameters/README.md index 9a7a1be4..7ff8a914 100644 --- a/orx-parameters/README.md +++ b/orx-parameters/README.md @@ -16,6 +16,8 @@ Currently orx-parameters facilitates the following annotations: - `Vector2Parameter` for `Vector2` properties - `Vector3Parameter` for `Vector3` properties - `Vector4Parameter` for `Vector4` properties + - `DoubleListParameter` for `List` properties + - `OptionParameter` for `Enum` properties Additionally there is an `ActionParameter` that can be used to annotate functions without arguments. @@ -23,7 +25,7 @@ Additionally there is an `ActionParameter` that can be used to annotate function Annotations can be applied to a properties inside a class or object class. -````kotlin +```kotlin val foo = object { @DoubleParameter("a double scalar", 0.0, 1.0, order = 0) var d = 1.0 @@ -37,21 +39,26 @@ val foo = object { @XYParameter("an XY parameter", order = 3) var xy = Vector2.ZERO - @XYParameter("a Vector2 parameter", order = 4) + @Vector2Parameter("a Vector2 parameter", order = 4) var v2 = Vector2.ZERO - @XYParameter("a Vector3 parameter", order = 5) + @Vector3Parameter("a Vector3 parameter", order = 5) var v3 = Vector3.ZERO - @XYParameter("a Vector4 parameter", order = 6) + @Vector4Parameter("a Vector4 parameter", order = 6) var v4 = Vector4.ZERO @ActionParameter("a simple action", order = 7) fun actionFunction() { // -- } + @DoublieListParameter("a double-list parameter", order = 8) + var dl = mutableListOf(0.0, 0.0, 0.0) + + @OptionParameter("an option parameter", order = 9) + var option = SomeEnum.SomeValue } -```` +``` ## Querying parameters diff --git a/orx-timer/README.md b/orx-timer/README.md index ac375d8a..f56cf7f3 100644 --- a/orx-timer/README.md +++ b/orx-timer/README.md @@ -16,11 +16,11 @@ Add `orx-timer` to the `orxFeatures` set in your build.gradle.kts A simple example looks like this: -```$kotlin +```kotlin fun main() = application { program { repeat(2.0) { - println("hello there ) + println("hello there") } extend {