Compare commits
1 Commits
openrndr-t
...
openrndr-t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d6ac87a34 |
15
.github/workflows/build-on-commit.yaml
vendored
15
.github/workflows/build-on-commit.yaml
vendored
@@ -1,15 +0,0 @@
|
|||||||
name: Build on commit
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 14
|
|
||||||
- name: Build sources
|
|
||||||
run: ./gradlew build
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
name: Publish Linux/x64 binaries
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- v0.*
|
|
||||||
- v0.*.*
|
|
||||||
- v1.*
|
|
||||||
- v1.*.*
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 14
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 14
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew jpackageZip
|
|
||||||
- name: Create Release
|
|
||||||
uses: ncipollo/release-action@v1.6.1
|
|
||||||
id: create_release
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
allowUpdates: true
|
|
||||||
replaceArtifacts: false
|
|
||||||
body: Fully automated release
|
|
||||||
artifacts: "./build/distributions/openrndr-application-linux-x64.zip"
|
|
||||||
30
.github/workflows/publish-binaries-macos.yaml
vendored
30
.github/workflows/publish-binaries-macos.yaml
vendored
@@ -1,30 +0,0 @@
|
|||||||
name: Publish macOS binaries
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- v0.*
|
|
||||||
- v0.*.*
|
|
||||||
- v1.*
|
|
||||||
- v1.*.*
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 14
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 14
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew jpackageZip
|
|
||||||
- name: Create Release
|
|
||||||
uses: ncipollo/release-action@v1.6.1
|
|
||||||
id: create_release
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
allowUpdates: true
|
|
||||||
replaceArtifacts: false
|
|
||||||
body: Fully automated release
|
|
||||||
artifacts: "./build/distributions/openrndr-application-macos.zip"
|
|
||||||
30
.github/workflows/publish-binaries-windows.yaml
vendored
30
.github/workflows/publish-binaries-windows.yaml
vendored
@@ -1,30 +0,0 @@
|
|||||||
name: Publish Windows binaries
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- v0.*
|
|
||||||
- v0.*.*
|
|
||||||
- v1.*
|
|
||||||
- v1.*.*
|
|
||||||
-
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 14
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 14
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew jpackageZip
|
|
||||||
- name: Create Release
|
|
||||||
uses: ncipollo/release-action@v1.6.1
|
|
||||||
id: create_release
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
allowUpdates: true
|
|
||||||
replaceArtifacts: false
|
|
||||||
body: Fully automated release
|
|
||||||
artifacts: "./build/distributions/openrndr-application-windows.zip"
|
|
||||||
18
README.md
18
README.md
@@ -1,24 +1,12 @@
|
|||||||
# OPENRNDR template project
|
# openrndr-template
|
||||||
A feature rich template for creating OPENRNDR programs based on Gradle/Kts
|
A feature rich template for creating OPENRNDR programs based on Gradle/Kts
|
||||||
|
|
||||||
|
You will find some [basic instructions](https://guide.openrndr.org/#/02_Getting_Started_with_OPENRNDR/C00_SetupYourFirstProgram) in the [OPENRNDR guide](https://guide.openrndr.org)
|
||||||
|
|
||||||
The template consists of a configuration for Gradle and an example OPENRNDR program. The Gradle configuration should serve as the
|
The template consists of a configuration for Gradle and an example OPENRNDR program. The Gradle configuration should serve as the
|
||||||
go-to starting point for writing OPENRNDR-based software.
|
go-to starting point for writing OPENRNDR-based software.
|
||||||
|
|
||||||
If you are looking at this from IntelliJ IDEA you can start by expanding the _project_ tab on the left. You will find a template program in `src/main/kotlin/TemplateProgram.kt`
|
|
||||||
|
|
||||||
You will find some [basic instructions](https://guide.openrndr.org/#/02_Getting_Started_with_OPENRNDR/C00_SetupYourFirstProgram) in the [OPENRNDR guide](https://guide.openrndr.org)
|
|
||||||
|
|
||||||
## Gradle tasks
|
## Gradle tasks
|
||||||
- `run` runs the TemplateProgram
|
- `run` runs the TemplateProgram
|
||||||
- `jar` creates an executable platform specific jar file with all dependencies
|
- `jar` creates an executable platform specific jar file with all dependencies
|
||||||
- `zipDistribution` creates a zip file containing the application jar and the data folder
|
- `zipDistribution` creates a zip file containing the application jar and the data folder
|
||||||
- `jpackageZip` creates a zip with a stand-alone executable for the current platform (works with Java 14 only)
|
|
||||||
|
|
||||||
## Cross builds
|
|
||||||
To create runnable jars for a platform different from the platform you use to build one uses `./gradlew jar --PtargetPlatform=<platform>`. The supported platforms are `windows`, `macos`, `linux-x64` and `linux-arm64`. Note that the `linux-arm64` platform will only work with OPENRNDR snapshot builds from master and OPENRNDR 0.3.39 (a future version).
|
|
||||||
|
|
||||||
## Github Actions
|
|
||||||
|
|
||||||
This repository contains a number of Github Actions in `./github/workflows`.
|
|
||||||
The actions enable a basic build run on commit, plus publication actions that are executed when
|
|
||||||
a commit is tagged with a version number like `v0.*` or `v1.*`.
|
|
||||||
267
build.gradle.kts
267
build.gradle.kts
@@ -1,111 +1,45 @@
|
|||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
||||||
import org.gradle.internal.os.OperatingSystem
|
import org.gradle.internal.os.OperatingSystem
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
|
|
||||||
|
|
||||||
/* the name of this project, default is the template version but you are free to change these */
|
val kotlinVersion = "1.3.50"
|
||||||
group = "org.openrndr.template"
|
|
||||||
version = "0.3.14"
|
|
||||||
|
|
||||||
val applicationMainClass = "TemplateProgramKt"
|
|
||||||
|
|
||||||
/* Which additional (ORX) libraries should be added to this project. */
|
|
||||||
val orxFeatures = setOf(
|
|
||||||
// "orx-boofcv",
|
|
||||||
// "orx-camera",
|
|
||||||
// "orx-chataigne",
|
|
||||||
"orx-compositor",
|
|
||||||
// "orx-dnk3",
|
|
||||||
// "orx-easing",
|
|
||||||
// "orx-file-watcher",
|
|
||||||
// "orx-parameters",
|
|
||||||
// "orx-filter-extension",
|
|
||||||
"orx-fx",
|
|
||||||
// "orx-glslify",
|
|
||||||
// "orx-gradient-descent",
|
|
||||||
"orx-gui",
|
|
||||||
"orx-image-fit",
|
|
||||||
// "orx-integral-image",
|
|
||||||
// "orx-interval-tree",
|
|
||||||
// "orx-jumpflood",
|
|
||||||
// "orx-kdtree",
|
|
||||||
// "orx-mesh-generators",
|
|
||||||
// "orx-midi",
|
|
||||||
// "orx-no-clear",
|
|
||||||
"orx-noise",
|
|
||||||
// "orx-obj-loader",
|
|
||||||
"orx-olive",
|
|
||||||
// "orx-osc",
|
|
||||||
// "orx-palette",
|
|
||||||
// "orx-poisson-fill",
|
|
||||||
// "orx-rabbit-control,
|
|
||||||
// "orx-runway",
|
|
||||||
"orx-shade-styles",
|
|
||||||
// "orx-shader-phrases",
|
|
||||||
// "orx-shapes",
|
|
||||||
// "orx-syphon",
|
|
||||||
// "orx-temporal-blur",
|
|
||||||
// "orx-time-operators",
|
|
||||||
// "orx-kinect-v1",
|
|
||||||
|
|
||||||
"orx-panel"
|
|
||||||
)
|
|
||||||
|
|
||||||
/* Which OPENRNDR libraries should be added to this project? */
|
|
||||||
val openrndrFeatures = setOf(
|
|
||||||
"video"
|
|
||||||
)
|
|
||||||
|
|
||||||
/* Which version of OPENRNDR and ORX should be used? */
|
|
||||||
val openrndrUseSnapshot = false
|
|
||||||
val openrndrVersion = if (openrndrUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.44"
|
|
||||||
|
|
||||||
val orxUseSnapshot = false
|
|
||||||
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.53"
|
|
||||||
|
|
||||||
//<editor-fold desc="This is code for OPENRNDR, no need to edit this .. most of the times">
|
|
||||||
val supportedPlatforms = setOf("windows", "macos", "linux-x64", "linux-arm64")
|
|
||||||
|
|
||||||
val openrndrOs = if (project.hasProperty("targetPlatform")) {
|
|
||||||
val platform : String = project.property("targetPlatform") as String
|
|
||||||
if (platform !in supportedPlatforms) {
|
|
||||||
throw IllegalArgumentException("target platform not supported: $platform")
|
|
||||||
} else {
|
|
||||||
platform
|
|
||||||
}
|
|
||||||
} else when (OperatingSystem.current()) {
|
|
||||||
OperatingSystem.WINDOWS -> "windows"
|
|
||||||
OperatingSystem.MAC_OS -> "macos"
|
|
||||||
OperatingSystem.LINUX -> when(val h = DefaultNativePlatform("current").architecture.name) {
|
|
||||||
"x86-64" -> "linux-x64"
|
|
||||||
"aarch64" -> "linux-arm64"
|
|
||||||
else ->throw IllegalArgumentException("architecture not supported: $h")
|
|
||||||
}
|
|
||||||
else -> throw IllegalArgumentException("os not supported")
|
|
||||||
}
|
|
||||||
//</editor-fold>
|
|
||||||
|
|
||||||
enum class Logging {
|
|
||||||
NONE,
|
|
||||||
SIMPLE,
|
|
||||||
FULL
|
|
||||||
}
|
|
||||||
|
|
||||||
/* What type of logging should this project use? */
|
|
||||||
val applicationLogging = Logging.FULL
|
|
||||||
|
|
||||||
val kotlinVersion = "1.4.0"
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
kotlin("jvm") version("1.4.0")
|
kotlin("jvm") version("1.3.50")
|
||||||
id("com.github.johnrengelman.shadow") version ("6.1.0")
|
|
||||||
id("org.beryx.runtime") version ("1.11.4")
|
|
||||||
}
|
}
|
||||||
|
group = "org.openrndr.template"
|
||||||
|
version = "0.3.2"
|
||||||
|
|
||||||
|
val applicationMainClass = "TemplateProgramKt"
|
||||||
|
val applicationFullLogging = false
|
||||||
|
|
||||||
|
val openrndrUseSnapshot = false
|
||||||
|
val openrndrVersion = if (openrndrUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.35"
|
||||||
|
val openrndrOs = when (OperatingSystem.current()) {
|
||||||
|
OperatingSystem.WINDOWS -> "windows"
|
||||||
|
OperatingSystem.MAC_OS -> "macos"
|
||||||
|
OperatingSystem.LINUX -> "linux-x64"
|
||||||
|
else -> throw IllegalArgumentException("os not supported")
|
||||||
|
}
|
||||||
|
|
||||||
|
// supported features are: video, panel
|
||||||
|
val openrndrFeatures = setOf("video", "panel")
|
||||||
|
|
||||||
|
val panelUseSnapshot = false
|
||||||
|
val panelVersion = if (panelUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.17-m3"
|
||||||
|
|
||||||
|
val orxUseSnapshot = false
|
||||||
|
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.32"
|
||||||
|
|
||||||
|
// supported features are: orx-camera, orx-compositor,orx-easing, orx-filter-extension,orx-file-watcher, orx-kinect-v1
|
||||||
|
// orx-integral-image, orx-interval-tree, orx-jumpflood,orx-kdtree, orx-mesh-generators,orx-midi, orx-no-clear,
|
||||||
|
// orx-noise, orx-obj, orx-olive
|
||||||
|
|
||||||
|
val orxFeatures = setOf("orx-noise")
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
if (openrndrUseSnapshot || orxUseSnapshot) {
|
if (openrndrUseSnapshot || orxUseSnapshot || panelUseSnapshot) {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
}
|
}
|
||||||
maven(url = "https://dl.bintray.com/openrndr/openrndr")
|
maven(url = "https://dl.bintray.com/openrndr/openrndr")
|
||||||
@@ -123,66 +57,48 @@ fun DependencyHandler.openrndrNatives(module: String): Any {
|
|||||||
return "org.openrndr:openrndr-$module-natives-$openrndrOs:$openrndrVersion"
|
return "org.openrndr:openrndr-$module-natives-$openrndrOs:$openrndrVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun DependencyHandler.orxNatives(module: String): Any {
|
|
||||||
return "org.openrndr.extra:$module-natives-$openrndrOs:$orxVersion"
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
/* This is where you add additional (third-party) dependencies */
|
runtime(openrndr("gl3"))
|
||||||
|
runtime(openrndrNatives("gl3"))
|
||||||
|
compile(openrndr("core"))
|
||||||
|
compile(openrndr("svg"))
|
||||||
|
compile(openrndr("animatable"))
|
||||||
|
compile(openrndr("extensions"))
|
||||||
|
compile(openrndr("filter"))
|
||||||
|
|
||||||
// implementation("org.jsoup:jsoup:1.12.2")
|
compile("org.jetbrains.kotlinx", "kotlinx-coroutines-core","1.3.0-RC")
|
||||||
// implementation("com.google.code.gson:gson:2.8.6")
|
|
||||||
|
|
||||||
runtimeOnly(openrndr("gl3"))
|
compile("io.github.microutils", "kotlin-logging","1.7.2")
|
||||||
runtimeOnly(openrndrNatives("gl3"))
|
|
||||||
implementation(openrndr("openal"))
|
|
||||||
runtimeOnly(openrndrNatives("openal"))
|
|
||||||
implementation(openrndr("core"))
|
|
||||||
implementation(openrndr("svg"))
|
|
||||||
implementation(openrndr("animatable"))
|
|
||||||
implementation(openrndr("extensions"))
|
|
||||||
implementation(openrndr("filter"))
|
|
||||||
|
|
||||||
implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core","1.3.9")
|
if (!applicationFullLogging) {
|
||||||
implementation("io.github.microutils", "kotlin-logging","1.12.0")
|
runtime("org.slf4j","slf4j-nop","1.7.25")
|
||||||
|
} else {
|
||||||
when(applicationLogging) {
|
runtime("org.apache.logging.log4j", "log4j-slf4j-impl", "2.12.0")
|
||||||
Logging.NONE -> {
|
runtime("com.fasterxml.jackson.core", "jackson-databind", "2.8.7")
|
||||||
runtimeOnly("org.slf4j","slf4j-nop","1.7.30")
|
runtime("com.fasterxml.jackson.dataformat", "jackson-dataformat-yaml", "2.8.7")
|
||||||
}
|
|
||||||
Logging.SIMPLE -> {
|
|
||||||
runtimeOnly("org.slf4j","slf4j-simple","1.7.30")
|
|
||||||
}
|
|
||||||
Logging.FULL -> {
|
|
||||||
runtimeOnly("org.apache.logging.log4j", "log4j-slf4j-impl", "2.13.3")
|
|
||||||
runtimeOnly("com.fasterxml.jackson.core", "jackson-databind", "2.11.1")
|
|
||||||
runtimeOnly("com.fasterxml.jackson.dataformat", "jackson-dataformat-yaml", "2.11.1")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("video" in openrndrFeatures) {
|
if ("video" in openrndrFeatures) {
|
||||||
implementation(openrndr("ffmpeg"))
|
compile(openrndr("ffmpeg"))
|
||||||
runtimeOnly(openrndrNatives("ffmpeg"))
|
runtime(openrndrNatives("ffmpeg"))
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("panel" in openrndrFeatures) {
|
||||||
|
compile("org.openrndr.panel:openrndr-panel:$panelVersion")
|
||||||
}
|
}
|
||||||
|
|
||||||
for (feature in orxFeatures) {
|
for (feature in orxFeatures) {
|
||||||
implementation(orx(feature))
|
compile(orx(feature))
|
||||||
}
|
|
||||||
|
|
||||||
if ("orx-kinect-v1" in orxFeatures) {
|
|
||||||
runtimeOnly(orxNatives("orx-kinect-v1"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("orx-olive" in orxFeatures) {
|
if ("orx-olive" in orxFeatures) {
|
||||||
implementation("org.jetbrains.kotlin:kotlin-script-runtime:$kotlinVersion")
|
compile("org.jetbrains.kotlin", "kotlin-scripting-compiler-embeddable")
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation(kotlin("stdlib-jdk8"))
|
implementation(kotlin("stdlib-jdk8"))
|
||||||
testImplementation("junit", "junit", "4.12")
|
testCompile("junit", "junit", "4.12")
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
configure<JavaPluginConvention> {
|
configure<JavaPluginConvention> {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
@@ -190,65 +106,28 @@ tasks.withType<KotlinCompile> {
|
|||||||
kotlinOptions.jvmTarget = "1.8"
|
kotlinOptions.jvmTarget = "1.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<Jar> {
|
||||||
project.setProperty("mainClassName", applicationMainClass)
|
|
||||||
tasks {
|
|
||||||
named<ShadowJar>("shadowJar") {
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes["Main-Class"] = applicationMainClass
|
attributes["Main-Class"] = applicationMainClass
|
||||||
}
|
}
|
||||||
minimize {
|
doFirst {
|
||||||
exclude(dependency("org.openrndr:openrndr-gl3:.*"))
|
from(configurations.compileClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
|
||||||
exclude(dependency("org.jetbrains.kotlin:kotlin-reflect:.*"))
|
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
|
||||||
}
|
|
||||||
}
|
|
||||||
named<org.beryx.runtime.JPackageTask>("jpackage") {
|
|
||||||
doLast {
|
|
||||||
when (OperatingSystem.current()) {
|
|
||||||
OperatingSystem.WINDOWS, OperatingSystem.LINUX -> {
|
|
||||||
copy {
|
|
||||||
from("data") {
|
|
||||||
include("**/*")
|
|
||||||
}
|
|
||||||
into("build/jpackage/openrndr-application/data")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
OperatingSystem.MAC_OS -> {
|
|
||||||
copy {
|
|
||||||
from("data") {
|
|
||||||
include("**/*")
|
|
||||||
}
|
|
||||||
into("build/jpackage/openrndr-application.app/data")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exclude(listOf("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA", "**/module-info*"))
|
||||||
|
archiveFileName.set("application-$openrndrOs.jar")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Zip>("jpackageZip") {
|
tasks.create("zipDistribution", Zip::class.java) {
|
||||||
archiveFileName.set("openrndr-application-$openrndrOs.zip")
|
archiveFileName.set("application-$openrndrOs.zip")
|
||||||
from("$buildDir/jpackage") {
|
from("./") {
|
||||||
include("**/*")
|
include("data/**")
|
||||||
}
|
}
|
||||||
}
|
from("$buildDir/libs/application-$openrndrOs.jar")
|
||||||
tasks.findByName("jpackageZip")?.dependsOn("jpackage")
|
}.dependsOn(tasks.jar)
|
||||||
|
|
||||||
runtime {
|
tasks.create("run", JavaExec::class.java) {
|
||||||
jpackage {
|
main = applicationMainClass
|
||||||
imageName = "openrndr-application"
|
classpath = sourceSets.main.get().runtimeClasspath
|
||||||
skipInstaller = true
|
}.dependsOn(tasks.build)
|
||||||
if (OperatingSystem.current() == OperatingSystem.MAC_OS) {
|
|
||||||
jvmArgs.add("-XstartOnFirstThread")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
options.empty()
|
|
||||||
options.add("--strip-debug")
|
|
||||||
options.add("--compress")
|
|
||||||
options.add("1")
|
|
||||||
options.add("--no-header-files")
|
|
||||||
options.add("--no-man-pages")
|
|
||||||
modules.empty()
|
|
||||||
modules.add("jdk.unsupported")
|
|
||||||
modules.add("java.management")
|
|
||||||
}
|
|
||||||
|
|||||||
BIN
data/fonts/IBMPlexMono-Regular.ttf
Normal file
BIN
data/fonts/IBMPlexMono-Regular.ttf
Normal file
Binary file not shown.
Binary file not shown.
@@ -1,92 +0,0 @@
|
|||||||
Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
|
|
||||||
|
|
||||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
||||||
This license is copied below, and is also available with a FAQ at:
|
|
||||||
http://scripts.sil.org/OFL
|
|
||||||
|
|
||||||
-----------------------------------------------------------
|
|
||||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
PREAMBLE
|
|
||||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
||||||
development of collaborative font projects, to support the font creation
|
|
||||||
efforts of academic and linguistic communities, and to provide a free and
|
|
||||||
open framework in which fonts may be shared and improved in partnership
|
|
||||||
with others.
|
|
||||||
|
|
||||||
The OFL allows the licensed fonts to be used, studied, modified and
|
|
||||||
redistributed freely as long as they are not sold by themselves. The
|
|
||||||
fonts, including any derivative works, can be bundled, embedded,
|
|
||||||
redistributed and/or sold with any software provided that any reserved
|
|
||||||
names are not used by derivative works. The fonts and derivatives,
|
|
||||||
however, cannot be released under any other type of license. The
|
|
||||||
requirement for fonts to remain under this license does not apply
|
|
||||||
to any document created using the fonts or their derivatives.
|
|
||||||
|
|
||||||
DEFINITIONS
|
|
||||||
"Font Software" refers to the set of files released by the Copyright
|
|
||||||
Holder(s) under this license and clearly marked as such. This may
|
|
||||||
include source files, build scripts and documentation.
|
|
||||||
|
|
||||||
"Reserved Font Name" refers to any names specified as such after the
|
|
||||||
copyright statement(s).
|
|
||||||
|
|
||||||
"Original Version" refers to the collection of Font Software components as
|
|
||||||
distributed by the Copyright Holder(s).
|
|
||||||
|
|
||||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
||||||
or substituting -- in part or in whole -- any of the components of the
|
|
||||||
Original Version, by changing formats or by porting the Font Software to a
|
|
||||||
new environment.
|
|
||||||
|
|
||||||
"Author" refers to any designer, engineer, programmer, technical
|
|
||||||
writer or other person who contributed to the Font Software.
|
|
||||||
|
|
||||||
PERMISSION & CONDITIONS
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
||||||
redistribute, and sell modified and unmodified copies of the Font
|
|
||||||
Software, subject to the following conditions:
|
|
||||||
|
|
||||||
1) Neither the Font Software nor any of its individual components,
|
|
||||||
in Original or Modified Versions, may be sold by itself.
|
|
||||||
|
|
||||||
2) Original or Modified Versions of the Font Software may be bundled,
|
|
||||||
redistributed and/or sold with any software, provided that each copy
|
|
||||||
contains the above copyright notice and this license. These can be
|
|
||||||
included either as stand-alone text files, human-readable headers or
|
|
||||||
in the appropriate machine-readable metadata fields within text or
|
|
||||||
binary files as long as those fields can be easily viewed by the user.
|
|
||||||
|
|
||||||
3) No Modified Version of the Font Software may use the Reserved Font
|
|
||||||
Name(s) unless explicit written permission is granted by the corresponding
|
|
||||||
Copyright Holder. This restriction only applies to the primary font name as
|
|
||||||
presented to the users.
|
|
||||||
|
|
||||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
||||||
Software shall not be used to promote, endorse or advertise any
|
|
||||||
Modified Version, except to acknowledge the contribution(s) of the
|
|
||||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
||||||
permission.
|
|
||||||
|
|
||||||
5) The Font Software, modified or unmodified, in part or in whole,
|
|
||||||
must be distributed entirely under this license, and must not be
|
|
||||||
distributed under any other license. The requirement for fonts to
|
|
||||||
remain under this license does not apply to any document created
|
|
||||||
using the Font Software.
|
|
||||||
|
|
||||||
TERMINATION
|
|
||||||
This license becomes null and void if any of the above conditions are
|
|
||||||
not met.
|
|
||||||
|
|
||||||
DISCLAIMER
|
|
||||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
||||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
||||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
||||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
||||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 95 KiB |
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
#Thu Aug 01 12:32:31 CEST 2019
|
#Thu Aug 01 12:32:31 CEST 2019
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
import org.openrndr.application
|
|
||||||
import org.openrndr.color.ColorRGBa
|
|
||||||
import org.openrndr.extra.olive.oliveProgram
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is a template for a live program.
|
|
||||||
*
|
|
||||||
* It uses oliveProgram {} instead of program {}. All code inside the
|
|
||||||
* oliveProgram {} can be changed while the program is running.
|
|
||||||
*/
|
|
||||||
|
|
||||||
fun main() = application {
|
|
||||||
configure {
|
|
||||||
width = 800
|
|
||||||
height = 800
|
|
||||||
}
|
|
||||||
oliveProgram {
|
|
||||||
extend {
|
|
||||||
drawer.clear(ColorRGBa.PINK)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
import org.openrndr.application
|
import org.openrndr.application
|
||||||
import org.openrndr.color.ColorRGBa
|
import org.openrndr.color.ColorRGBa
|
||||||
import org.openrndr.draw.loadFont
|
import org.openrndr.draw.FontImageMap
|
||||||
import org.openrndr.draw.loadImage
|
import org.openrndr.draw.loadImage
|
||||||
import org.openrndr.draw.tint
|
import org.openrndr.draw.tint
|
||||||
import kotlin.math.cos
|
|
||||||
import kotlin.math.sin
|
|
||||||
|
|
||||||
fun main() = application {
|
fun main() = application {
|
||||||
configure {
|
configure {
|
||||||
@@ -13,19 +11,20 @@ fun main() = application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
program {
|
program {
|
||||||
val image = loadImage("data/images/pm5544.png")
|
|
||||||
val font = loadFont("data/fonts/default.otf", 64.0)
|
val image = loadImage("file:data/images/pm5544.png")
|
||||||
|
val font = FontImageMap.fromUrl("file:data/fonts/IBMPlexMono-Regular.ttf", 64.0)
|
||||||
|
|
||||||
extend {
|
extend {
|
||||||
drawer.drawStyle.colorMatrix = tint(ColorRGBa.WHITE.shade(0.2))
|
drawer.drawStyle.colorMatrix = tint(ColorRGBa.WHITE.shade(0.2))
|
||||||
drawer.image(image)
|
drawer.image(image)
|
||||||
|
|
||||||
drawer.fill = ColorRGBa.PINK
|
drawer.fill = ColorRGBa.PINK
|
||||||
drawer.circle(cos(seconds) * width / 2.0 + width / 2.0, sin(0.5 * seconds) * height / 2.0 + height / 2.0, 140.0)
|
drawer.circle(Math.cos(seconds)*width/2.0+width/2.0, Math.sin(0.5*seconds)*height/2.0 + height/2.0, 140.0)
|
||||||
|
|
||||||
drawer.fontMap = font
|
drawer.fontMap = font
|
||||||
drawer.fill = ColorRGBa.WHITE
|
drawer.fill = ColorRGBa.WHITE
|
||||||
drawer.text("OPENRNDR", width / 2.0, height / 2.0)
|
drawer.text("OPENRNDR", width/2.0, height /2.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,11 +2,10 @@ Configuration:
|
|||||||
status: warn
|
status: warn
|
||||||
Appenders:
|
Appenders:
|
||||||
Console:
|
Console:
|
||||||
- name: Console_Info
|
name: Console
|
||||||
target: SYSTEM_ERR
|
target: SYSTEM_OUT
|
||||||
PatternLayout:
|
PatternLayout:
|
||||||
Pattern: "%highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=green, TRACE=green} %style{[%t]}{white} %style{%-30.30c{1.}}{white} %style{ ↘ %m%n%ex}{white}"
|
Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"
|
||||||
#Pattern: "%style{%d{yyyy-MM-dd HH:mm:ss.SSS}}{white} %highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=green, TRACE=green} %style{[%t]}{white} %style{%-30.30c{1.}}{cyan} %style{:%m%n%ex}{white}"
|
|
||||||
File:
|
File:
|
||||||
append: false
|
append: false
|
||||||
name: File_Appender
|
name: File_Appender
|
||||||
@@ -15,7 +14,7 @@ Configuration:
|
|||||||
Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"
|
Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"
|
||||||
Loggers:
|
Loggers:
|
||||||
Root:
|
Root:
|
||||||
level: info
|
level: debug
|
||||||
AppenderRef:
|
AppenderRef:
|
||||||
- ref: Console_Info
|
- ref: Console
|
||||||
- ref: File_Appender
|
- ref: File_Appender
|
||||||
Reference in New Issue
Block a user