-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
2,758 additions
and
2,291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
# ORX (OPENRNDR EXTRA) | ||
|
||
[![](https://jitpack.io/v/openrndr/orx.svg)](https://jitpack.io/#openrndr/orx) | ||
|
||
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-filter-extension`](orx-filter-extension/README.md), Program extension method that provides Filter based `extend()` | ||
- [`orx-integral-image`](orx-integral-image/README.md), a CPU-based implementation for integral images (summed area tables) | ||
- `orx-jumpflood`, 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-mesh-generators`](orx-mesh-generators/README.md), triangular mesh generators | ||
- [`orx-noise`](orx-noise/README.md), library for random number generation and noise | ||
- [`orx-no-clear`](orx-no-clear/README.md), a simple extension that provides drawing without clearing the background | ||
- [`orx-obj-loader`](orx-obj-loader/README.md), simple Wavefront .obj mesh loader | ||
|
||
## Usage | ||
ORX 0.0.19 is built against OPENRNDR 0.3.32, 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. | ||
|
||
To setup Jitpack support in your project all you have to do is add the Jitpack repository to your `repositories {}`. It is advised to have the jitpack repository as the last entry. | ||
``` | ||
repositories { | ||
maven { url 'https://jitpack.io' } | ||
} | ||
``` | ||
|
||
You can then add any of the ORX artefacts to your `dependencies {}`: | ||
``` | ||
dependencies { | ||
compile 'com.github.openrndr.orx:<orx-artifact>:v0.0.19' | ||
} | ||
``` | ||
|
||
For example if you want to use the `orx-no-clear` artifact one would use: | ||
``` | ||
dependencies { | ||
compile 'com.github.openrndr.orx:orx-no-clear:v0.0.19' | ||
} | ||
``` | ||
# ORX (OPENRNDR EXTRA) | ||
|
||
[![](https://jitpack.io/v/openrndr/orx.svg)](https://jitpack.io/#openrndr/orx) | ||
|
||
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-filter-extension`](orx-filter-extension/README.md), Program extension method that provides Filter based `extend()` | ||
- [`orx-integral-image`](orx-integral-image/README.md), a CPU-based implementation for integral images (summed area tables) | ||
- `orx-jumpflood`, 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-mesh-generators`](orx-mesh-generators/README.md), triangular mesh generators | ||
- [`orx-noise`](orx-noise/README.md), library for random number generation and noise | ||
- [`orx-no-clear`](orx-no-clear/README.md), a simple extension that provides drawing without clearing the background | ||
- [`orx-obj-loader`](orx-obj-loader/README.md), simple Wavefront .obj mesh loader | ||
|
||
## Usage | ||
ORX 0.0.19 is built against OPENRNDR 0.3.32, 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. | ||
|
||
To setup Jitpack support in your project all you have to do is add the Jitpack repository to your `repositories {}`. It is advised to have the jitpack repository as the last entry. | ||
``` | ||
repositories { | ||
maven { url 'https://jitpack.io' } | ||
} | ||
``` | ||
|
||
You can then add any of the ORX artefacts to your `dependencies {}`: | ||
``` | ||
dependencies { | ||
compile 'com.github.openrndr.orx:<orx-artifact>:v0.0.19' | ||
} | ||
``` | ||
|
||
For example if you want to use the `orx-no-clear` artifact one would use: | ||
``` | ||
dependencies { | ||
compile 'com.github.openrndr.orx:orx-no-clear:v0.0.19' | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#version 330 core | ||
|
||
uniform sampler2D tex0; | ||
in vec2 v_texCoord0; | ||
|
||
out vec4 o_color; | ||
|
||
void main() { | ||
vec2 step = 1.0 / textureSize(tex0, 0); | ||
float ref = step(0.5 , texture(tex0, v_texCoord0).r); | ||
vec4 outc = vec4(-1.0, -1.0, 0.0, 1.0); | ||
|
||
float contour = 0.0; | ||
for (y = -1; y <= 1; ++y) { | ||
for (x = -1; x <= 1; ++x) { | ||
float smp = step(0.5, texture(tex0, v_texCoord0 + vec2(x,y) * step).r); | ||
if (smp != ref) { | ||
contour = 1.0; | ||
} | ||
} | ||
} | ||
|
||
o_color = vec4(contour, contour, contour, 1.0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,67 @@ | ||
plugins { | ||
id 'org.jetbrains.kotlin.jvm' version '1.3.10' | ||
} | ||
|
||
allprojects { | ||
group 'org.openrndr.extra' | ||
version '0.0.19' | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
ext { | ||
openrndrVersion = "0.3.32-rc1" | ||
} | ||
|
||
subprojects { | ||
|
||
apply plugin: 'kotlin' | ||
apply plugin: 'maven' | ||
apply plugin: 'maven-publish' | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { | ||
url = "https://dl.bintray.com/openrndr/openrndr" | ||
} | ||
} | ||
|
||
dependencies { | ||
compile "org.openrndr:openrndr-core:$openrndrVersion" | ||
compile "org.openrndr:openrndr-filter:$openrndrVersion" | ||
compile "org.openrndr:openrndr-shape:$openrndrVersion" | ||
compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.0.1' | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
|
||
artifact sourceJar | ||
} | ||
} | ||
} | ||
|
||
task sourceJar(type: Jar) { | ||
classifier = 'sources' | ||
from sourceSets.main.kotlin | ||
} | ||
|
||
|
||
|
||
} | ||
|
||
dependencies { | ||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8" | ||
} | ||
|
||
compileKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
compileTestKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
plugins { | ||
id 'org.jetbrains.kotlin.jvm' version '1.3.10' | ||
} | ||
|
||
allprojects { | ||
group 'org.openrndr.extra' | ||
version '0.0.20' | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
ext { | ||
openrndrVersion = "0.3.32-rc1" | ||
} | ||
|
||
subprojects { | ||
|
||
apply plugin: 'kotlin' | ||
apply plugin: 'maven' | ||
apply plugin: 'maven-publish' | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { | ||
url = "https://dl.bintray.com/openrndr/openrndr" | ||
} | ||
} | ||
|
||
dependencies { | ||
compile "org.openrndr:openrndr-core:$openrndrVersion" | ||
compile "org.openrndr:openrndr-filter:$openrndrVersion" | ||
compile "org.openrndr:openrndr-shape:$openrndrVersion" | ||
compile group: 'org.jetbrains.kotlinx', name: 'kotlinx-coroutines-core', version: '1.0.1' | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
|
||
artifact sourceJar | ||
} | ||
} | ||
} | ||
|
||
task sourceJar(type: Jar) { | ||
classifier = 'sources' | ||
from sourceSets.main.kotlin | ||
} | ||
|
||
|
||
|
||
} | ||
|
||
dependencies { | ||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8" | ||
} | ||
|
||
compileKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
compileTestKotlin { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# orx-camera | ||
|
||
# orx-camera | ||
|
||
3D camera and controls for OPENRNDR. This supersedes the to be deprecated functionality in OPENRNDR. |
Oops, something went wrong.