Merge branch 'master' of github.com:openrndr/orx
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ target/
|
|||||||
build/
|
build/
|
||||||
*.iml/
|
*.iml/
|
||||||
.idea/
|
.idea/
|
||||||
|
gradle.properties
|
||||||
|
|||||||
14
.travis.yml
Normal file
14
.travis.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
jdk: openjdk8
|
||||||
|
language: groovy
|
||||||
|
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- /.*/
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
||||||
|
openssl aes-256-cbc -K $encrypted_80297b79dae4_key -iv $encrypted_80297b79dae4_iv
|
||||||
|
-in gradle.properties.enc -out gradle.properties -d;
|
||||||
|
fi
|
||||||
|
|
||||||
|
script: ./buildViaTravis.sh
|
||||||
@@ -20,7 +20,7 @@ A growing library of assorted data structures, algorithms and utilities.
|
|||||||
- [`orx-obj-loader`](orx-obj-loader/README.md), simple Wavefront .obj mesh loader
|
- [`orx-obj-loader`](orx-obj-loader/README.md), simple Wavefront .obj mesh loader
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
ORX 0.0.24 is built against OPENRNDR 0.3.33-rc2, make sure you use this version in your project. Because OPENRNDR's API is pre 1.0 it tends to change from time to time.
|
ORX 0.0.30 is built against OPENRNDR 0.3.35-rc1, make sure you use this version in your project. Because OPENRNDR's API is pre 1.0 it tends to change from time to time.
|
||||||
|
|
||||||
The easiest way to add ORX to your project is through the use of Jitpack. [Jitpack](http://jitpack.io) is a service that pulls Gradle based libraries from Github, builds them and serves the jar files.
|
The easiest way to add ORX to your project is through the use of Jitpack. [Jitpack](http://jitpack.io) is a service that pulls Gradle based libraries from Github, builds them and serves the jar files.
|
||||||
|
|
||||||
@@ -34,13 +34,13 @@ repositories {
|
|||||||
You can then add any of the ORX artifacts to your `dependencies {}`:
|
You can then add any of the ORX artifacts to your `dependencies {}`:
|
||||||
```
|
```
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.github.openrndr.orx:<orx-artifact>:v0.0.24'
|
compile 'com.github.openrndr.orx:<orx-artifact>:v0.0.30'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
For example if you want to use the `orx-no-clear` artifact one would use:
|
For example if you want to use the `orx-no-clear` artifact one would use:
|
||||||
```
|
```
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.github.openrndr.orx:orx-no-clear:v0.0.24'
|
compile 'com.github.openrndr.orx:orx-no-clear:v0.0.30'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
111
build.gradle
111
build.gradle
@@ -1,28 +1,67 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.17"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.jetbrains.kotlin.jvm' version '1.3.31'
|
// plugin dependencies, load without applying them
|
||||||
|
id 'nebula.kotlin' version '1.3.41' apply false
|
||||||
|
id 'com.jfrog.artifactory' version '4.6.2' apply false
|
||||||
|
|
||||||
|
id 'nebula.contacts' version '4.1.1' apply false
|
||||||
|
id 'nebula.info' version '4.0.2' apply false
|
||||||
|
id 'nebula.dependency-lock' version '6.1.2' apply false
|
||||||
|
id 'nebula.facet' version '5.1.2' apply false
|
||||||
|
id 'nebula.maven-apache-license' version '9.0.2' apply false
|
||||||
|
|
||||||
|
id 'nebula.maven-publish' version '9.0.2' apply false
|
||||||
|
id 'nebula.release' version '8.0.3' apply false
|
||||||
|
id 'nebula.nebula-bintray' version '4.0.2' apply false
|
||||||
|
id 'nebula.source-jar' version '9.0.2' apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
|
||||||
group 'org.openrndr.extra'
|
|
||||||
version '0.0.30'
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
//allprojects {
|
||||||
mavenLocal()
|
// group 'org.openrndr.extra'
|
||||||
mavenCentral()
|
// version '0.0.30'
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
|
//repositories {
|
||||||
|
// mavenLocal()
|
||||||
|
// mavenCentral()
|
||||||
|
//}
|
||||||
|
|
||||||
ext {
|
project.ext {
|
||||||
openrndrVersion = "0.3.35-rc1"
|
openrndrVersion = "0.3.35-rc1"
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
allprojects {
|
||||||
|
|
||||||
|
|
||||||
|
apply plugin: 'idea'
|
||||||
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'nebula.kotlin'
|
||||||
|
apply plugin: 'nebula.contacts'
|
||||||
|
apply plugin: 'nebula.info'
|
||||||
|
apply plugin: 'nebula.dependency-lock'
|
||||||
|
apply plugin: 'nebula.facet'
|
||||||
|
apply plugin: 'nebula.maven-apache-license'
|
||||||
|
apply plugin: 'nebula.release'
|
||||||
|
apply plugin: 'nebula.maven-publish'
|
||||||
|
|
||||||
|
// selectively apply only the bintray plugin, snapshots are not published
|
||||||
|
// nebula-bintray needs to happened after nebula-release since version isn't lazy in the bintray extension
|
||||||
|
apply plugin: 'nebula.nebula-bintray-publishing'
|
||||||
|
apply plugin: 'nebula.source-jar'
|
||||||
|
|
||||||
|
group 'org.openrndr.extra'
|
||||||
|
|
||||||
apply plugin: 'kotlin'
|
|
||||||
apply plugin: 'maven'
|
|
||||||
apply plugin: 'maven-publish'
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
maven {
|
||||||
url = "https://dl.bintray.com/openrndr/openrndr"
|
url = "https://dl.bintray.com/openrndr/openrndr"
|
||||||
@@ -36,35 +75,25 @@ subprojects {
|
|||||||
compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.3.0-RC'
|
compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.3.0-RC'
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
contacts {
|
||||||
publications {
|
'edwin@openrndr.org' {
|
||||||
mavenJava(MavenPublication) {
|
moniker 'Edwin Jakobs'
|
||||||
from components.java
|
github 'edwinRNDR'
|
||||||
artifact sourceJar
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourceJar(type: Jar) {
|
bintray {
|
||||||
classifier = 'sources'
|
pkg {
|
||||||
from sourceSets.main.kotlin
|
userOrg = 'openrndr'
|
||||||
|
repo = 'openrndr'
|
||||||
|
name = 'orx'
|
||||||
|
desc = project.description
|
||||||
|
licenses = ['BSD-2-Clause']
|
||||||
|
vcsUrl = 'https://github.com/openrndr/openrndr.git'
|
||||||
|
websiteUrl = 'https://www.openrndr.org'
|
||||||
|
issueTrackerUrl = 'https://github.com/openrndr/openrndr/issues'
|
||||||
|
labels = ['creative-coding', 'realtime-rendering', 'opengl']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileKotlin {
|
|
||||||
kotlinOptions.jvmTarget = "1.8"
|
|
||||||
}
|
|
||||||
compileTestKotlin {
|
|
||||||
kotlinOptions.jvmTarget = "1.8"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
|
||||||
}
|
|
||||||
|
|
||||||
compileKotlin {
|
|
||||||
kotlinOptions.jvmTarget = "1.8"
|
|
||||||
}
|
|
||||||
compileTestKotlin {
|
|
||||||
kotlinOptions.jvmTarget = "1.8"
|
|
||||||
}
|
}
|
||||||
23
buildViaTravis.sh
Executable file
23
buildViaTravis.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# This script will build the project.
|
||||||
|
|
||||||
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
|
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
|
||||||
|
./gradlew build
|
||||||
|
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
|
||||||
|
echo -e 'Build Branch without Snapshot => Branch ['$TRAVIS_BRANCH']'
|
||||||
|
./gradlew -Prelease.travisci=true build --info
|
||||||
|
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
|
||||||
|
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
|
||||||
|
case "$TRAVIS_TAG" in
|
||||||
|
*-rc\.*)
|
||||||
|
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true candidate --info
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true final --info
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
|
||||||
|
./gradlew build
|
||||||
|
fi
|
||||||
1
gradle.properties.enc
Normal file
1
gradle.properties.enc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
g<1F>h<EFBFBD>x;B<>?<3F>˛<EFBFBD>m<><6D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>><3E><>!Rl?<11><e<><65>!<[W<1F><><EFBFBD><EFBFBD><EFBFBD><15>EF<04><> <19><>5<EFBFBD>E_Ф<5F><07>VW<56><57><EFBFBD><EFBFBD><EFBFBD>
|
||||||
@@ -61,6 +61,15 @@ fun Vector3.Companion.uniformRing(innerRadius: Double = 0.0,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun Vector3.Companion.uniforms(count: Int,
|
||||||
|
min: Double = -1.0,
|
||||||
|
max: Double = 1.0,
|
||||||
|
random: Random = Random.Default): List<Vector3> =
|
||||||
|
List(count) {
|
||||||
|
Vector3.uniform(min, max, random)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fun Vector3.Companion.uniforms(count: Int,
|
fun Vector3.Companion.uniforms(count: Int,
|
||||||
min: Vector3 = -ONE,
|
min: Vector3 = -ONE,
|
||||||
max: Vector3 = ONE,
|
max: Vector3 = ONE,
|
||||||
|
|||||||
Reference in New Issue
Block a user