-
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
339 changed files
with
460 additions
and
497 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: openrndr/openrndr | ||
path: openrndr | ||
ref: openrndr-0.4 | ||
- uses: actions/checkout@v2.3.4 | ||
with: | ||
path: orx | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 14 | ||
- uses: actions/cache@v2.3.4 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Build OPENRNDR snapshot | ||
run: | | ||
cd ~/openrndr | ||
./gradlew publishToMavenLocal -Prelease.version=0.5.1-SNAPSHOT | ||
- name: Build ORX | ||
run: | | ||
cd ~/orx | ||
./gradlew build |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
74 changes: 37 additions & 37 deletions
74
openrndr-demos/src/demo/kotlin/DemoContourIntersections01.kt
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,37 +1,37 @@ | ||
import org.openrndr.application | ||
import org.openrndr.color.ColorRGBa | ||
import org.openrndr.shape.Ellipse | ||
import org.openrndr.shape.OrientedEllipse | ||
import org.openrndr.shape.intersections | ||
|
||
fun main() { | ||
application { | ||
program { | ||
val c1 = Ellipse(width / 2.0, height / 2.0, 200.0, 100.0).contour | ||
extend { | ||
drawer.clear(ColorRGBa.PINK) | ||
drawer.fill = null | ||
val c2 = OrientedEllipse(mouse.position, 100.0, 200.0, seconds*45.0).contour | ||
drawer.contour(c1) | ||
//drawer.contour(c2) | ||
val ints = intersections(c1, c2) | ||
|
||
if (ints.isEmpty()) { | ||
drawer.contour(c2) | ||
} else { | ||
(ints + ints.take(1)).map { it.b.contourT }.zipWithNext().forEach { | ||
val end = if (it.second <= it.first) it.second + 1.0 else it.second | ||
val sub = c2.sub(it.first, end) | ||
val l = sub.length | ||
val ta = sub.tForLength(15.0) | ||
val tb = sub.tForLength(l - 15.0) | ||
drawer.contour(sub.sub(ta, tb)) | ||
} | ||
} | ||
for (i in ints) { | ||
drawer.circle(i.position, 10.0) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
//import org.openrndr.application | ||
//import org.openrndr.color.ColorRGBa | ||
//import org.openrndr.shape.Ellipse | ||
//import org.openrndr.shape.OrientedEllipse | ||
//import org.openrndr.shape.intersections | ||
// | ||
//fun main() { | ||
// application { | ||
// program { | ||
// val c1 = Ellipse(width / 2.0, height / 2.0, 200.0, 100.0).contour | ||
// extend { | ||
// drawer.clear(ColorRGBa.PINK) | ||
// drawer.fill = null | ||
// val c2 = OrientedEllipse(mouse.position, 100.0, 200.0, seconds*45.0).contour | ||
// drawer.contour(c1) | ||
// //drawer.contour(c2) | ||
// val ints = intersections(c1, c2) | ||
// | ||
// if (ints.isEmpty()) { | ||
// drawer.contour(c2) | ||
// } else { | ||
// (ints + ints.take(1)).map { it.b.contourT }.zipWithNext().forEach { | ||
// val end = if (it.second <= it.first) it.second + 1.0 else it.second | ||
// val sub = c2.sub(it.first, end) | ||
// val l = sub.length | ||
// val ta = sub.tForLength(15.0) | ||
// val tb = sub.tForLength(l - 15.0) | ||
// drawer.contour(sub.sub(ta, tb)) | ||
// } | ||
// } | ||
// for (i in ints) { | ||
// drawer.circle(i.position, 10.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
Oops, something went wrong.