Readme files: add missing "kotlin" to code fences (#336)

This commit is contained in:
Abe Pazos
2024-05-27 12:37:21 +00:00
committed by GitHub
parent 45d67a7ef9
commit d8682f34f9
12 changed files with 37 additions and 23 deletions

View File

@@ -134,6 +134,7 @@ one detail that doesn't occur in normal programs: the UI state is reset when a
script is changed and re-evaluated. This is overcome by using an annotated `Reloadable` object.
An example `live.kts` script that uses `orx-gui` and `Reloadable`:
```kotlin
@file:Suppress("UNUSED_LAMBDA_EXPRESSION")
import org.openrndr.Program
@@ -172,6 +173,7 @@ import org.openrndr.extra.parameters.DoubleParameter
![DemoOptions01Kt](https://github.com/openrndr/orx/blob/media/orx-gui/images/DemoOptions01Kt.png
[DemoSimple01Kt](src/demo/kotlin/DemoSimple01Kt.kt
![DemoSimple01Kt](https://github.com/openrndr/orx/blob/media/orx-gui/images/DemoSimple01Kt.png
<!-- __demos__ -->
## Demos
### DemoAppearance01

View File

@@ -5,7 +5,7 @@ Provides live coding functionality: updates a running OPENRNDR program when you
## usage
make sure that you add the following to your list of dependencies (next to orx-olive)
```
```gradle
implementation "org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.3.31"
```
@@ -42,6 +42,7 @@ Along with the extension comes a mechanism that allows state to be reloaded from
This functionality is offered by the `Reloadable` class.
An example `live.kts` in which the reloadable state is used:
```kotlin
@file:Suppress("UNUSED_LAMBDA_EXPRESSION")
import org.openrndr.color.ColorRGBa
@@ -68,7 +69,7 @@ The Reloadable store can be cleared using the `clearReloadables` function.
To store GPU resources or objects that use GPU resources (a.o. `ColorBuffer`, `VertexBuffer`, `Shader`, `BufferTexture`) in a `Reloadable` object one uses OPENRNDR's
`persistent {}` builder function.
```!kotlin
```kotlin
@file:Suppress("UNUSED_LAMBDA_EXPRESSION")
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.*
@@ -133,6 +134,7 @@ import org.openrndr.draw.*
}
}
```
<!-- __demos__ -->
## Demos
### DemoOlive01

View File

@@ -6,6 +6,7 @@ Send frames to- and from OPENRNDR to other applications in real time using _Syph
### Syphon Server
#### Sharing the whole view
```kotlin
import org.openrndr.application
import org.openrndr.color.ColorRGBa
@@ -33,6 +34,7 @@ fun main() {
```
#### Sharing a different render target
```kotlin
import org.openrndr.application
import org.openrndr.color.ColorRGBa
@@ -75,6 +77,7 @@ fun main() {
```
### Syphon Client
```kotlin
fun main() = application {
configure {

View File

@@ -6,7 +6,7 @@ GIF, H265, PNG, Prores, TIFF and Webp `VideoWriterProfile`s for `ScreenRecorder`
### GIF
```
```kotlin
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.videoprofiles.*
@@ -26,7 +26,7 @@ fun main() = application {
Then use `gifsicle` or a similar tool to reduce the gif file size. For example:
```
```bash
$ gifsicle --loop --delay=4 --colors 16 --optimize=2 heavy.gif >lessheavy.gif
```