Readme files: add missing "kotlin" to code fences (#336)
This commit is contained in:
@@ -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
|
||||

|
||||
```
|
||||
```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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user