Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 33 additions & 20 deletions build.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,6 @@
<property name="result.exec.file" location="${test.build.dir}/jacoco.exec"/>

<property name="renjin-version" value="0.8.2411" />

<!-- Maven deps -->
<path id="maven-ant-tasks.classpath" path="${build-lib}/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
<artifact:remoteRepository id="remote.repository" url="https://nexus.bedatadriven.com/content/groups/public/" />
<artifact:dependencies filesetId="dependency.fileset"
versionsId="dependency.versions">
<remoteRepository refid="remote.repository" />
<dependency groupId="org.renjin" artifactId="renjin-script-engine" version="${renjin-version}" />
<dependency groupId="org.renjin" artifactId="renjin-cli" version="${renjin-version}" />
</artifact:dependencies>
<copy todir="${mode-lib}">
<fileset refid="dependency.fileset" />
<mapper classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
from="${dependency.versions}" to="flatten" />
</copy>

<path id="mode-library-classpath">
<pathelement location="${processing.classes.pde}"/>
Expand Down Expand Up @@ -78,7 +59,39 @@
<echo>This is the R mode for Processing, powered by github.com/gaocegege</echo>
</target>

<target name="build">
<target name="checkos">
<condition property="isWindows" value="true">
<os family="windows" />
</condition>

<condition property="isLinux" value="true">
<os family="unix" />
</condition>
</target>

<target name="dep" depends="checkos" if="isLinux">
<echo>The OS platform is Linux X86_64, download corresponding jars from remote.</echo>
<!-- Maven deps -->
<path id="maven-ant-tasks.classpath" path="${build-lib}/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
<artifact:remoteRepository id="remote.repository" url="https://nexus.bedatadriven.com/content/groups/public/" />
<artifact:dependencies filesetId="dependency.fileset"
versionsId="dependency.versions">
<remoteRepository refid="remote.repository" />
<dependency groupId="org.renjin" artifactId="renjin-script-engine" version="${renjin-version}" />
<dependency groupId="org.renjin" artifactId="renjin-cli" version="${renjin-version}" />
</artifact:dependencies>
<copy todir="${mode-lib}">
<fileset refid="dependency.fileset" />
<mapper classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
from="${dependency.versions}" to="flatten" />
</copy>
</target>

<target name="build" depends="dep">
<mkdir dir="build" />
<javac destdir="build" includeantruntime="false">
<src path="src/rprocessing" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- 3.1415

settings <- function() {
size(500, 500, "processing.opengl.PGraphics3D")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/applyMatrix/applyMatrix0/applyMatrix0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
6 changes: 0 additions & 6 deletions examples/reference/arc/arc1/arc1.rpde
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# arc 1 https://processing.org/reference/arc_.html

# TODO: replace with built-in constants
PI <- 3.1415
HALF_PI <- PI/2
QUARTER_PI <- PI/4
TWO_PI <- PI * 2

arc(50, 55, 50, 50, 0, HALF_PI)
noFill()
arc(50, 55, 60, 60, HALF_PI, PI)
Expand Down
9 changes: 0 additions & 9 deletions examples/reference/arc/arc2/arc2.rpde
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# arc 2 https://processing.org/reference/arc_.html

# TODO: replace with built-in constants
PI <- 3.1415
QUARTER_PI <- PI/4

# TODO: Fix double to int casts
OPEN <- as.integer(1)
CHORD <- as.integer(2)
PIE <- as.integer(3)

arc(50, 50, 80, 80, 0, PI + QUARTER_PI, OPEN)
9 changes: 0 additions & 9 deletions examples/reference/arc/arc3/arc3.rpde
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# arc 3 https://processing.org/reference/arc_.html

# TODO: replace with built-in constants
PI <- 3.1415
QUARTER_PI <- PI/4

# TODO: Fix double to int casts
OPEN <- as.integer(1)
CHORD <- as.integer(2)
PIE <- as.integer(3)

arc(50, 50, 80, 80, 0, PI + QUARTER_PI, CHORD)
11 changes: 0 additions & 11 deletions examples/reference/arc/arc4/arc4.rpde
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# arc 4 https://processing.org/reference/arc_.html

# TODO: replace with built-in constants
PI <- 3.1415
HALF_PI <- PI/2
QUARTER_PI <- PI/4
TWO_PI <- PI * 2

# TODO: Fix double to int casts
OPEN <- as.integer(1)
CHORD <- as.integer(2)
PIE <- as.integer(3)

arc(50, 50, 80, 80, 0, PI + QUARTER_PI, PIE)
2 changes: 0 additions & 2 deletions examples/reference/beginCamera/beginCamera0/beginCamera0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# beginContour 1 https://processing.org/reference/beginContour_.html

CLOSE <- as.integer(2)

size(100, 100)
translate(50, 50)
stroke(255, 0, 0)
Expand Down
5 changes: 0 additions & 5 deletions examples/reference/beginShape/beginShape1/beginShape1.rpde
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# beginShape 1 https://processing.org/reference/beginShape_.html

OPEN <- as.integer(1)
CLOSE <- as.integer(2)
POINTS <- as.integer(3)
LINES <- as.integer(5)

beginShape()
vertex(30, 20)
vertex(85, 20)
Expand Down
5 changes: 0 additions & 5 deletions examples/reference/beginShape/beginShape2/beginShape2.rpde
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# beginShape 2 https://processing.org/reference/beginShape_.html

OPEN <- as.integer(1)
CLOSE <- as.integer(2)
POINTS <- as.integer(3)
LINES <- as.integer(5)

beginShape(POINTS)
vertex(30, 20)
vertex(85, 20)
Expand Down
5 changes: 0 additions & 5 deletions examples/reference/beginShape/beginShape3/beginShape3.rpde
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# beginShape 3 https://processing.org/reference/beginShape_.html

OPEN <- as.integer(1)
CLOSE <- as.integer(2)
POINTS <- as.integer(3)
LINES <- as.integer(5)

beginShape(LINES)
vertex(30, 20)
vertex(85, 20)
Expand Down
5 changes: 0 additions & 5 deletions examples/reference/beginShape/beginShape5/beginShape5.rpde
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# beginShape 5 https://processing.org/reference/beginShape_.html

OPEN <- as.integer(1)
CLOSE <- as.integer(2)
POINTS <- as.integer(3)
LINES <- as.integer(5)

noFill()
beginShape()
vertex(30, 20)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# bezierTangent 1 https://processing.org/reference/bezierTangent_.html

PI <- 3.1415

noFill()
bezier(85, 20, 10, 10, 90, 90, 15, 80)
steps <- 6
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# bezierTangent 2 https://processing.org/reference/bezierTangent_.html

PI <- 3.1415
HALF_PI <- PI/2
QUARTER_PI <- PI/4
TWO_PI <- PI * 2

noFill()
bezier(85, 20, 10, 10, 90, 90, 15, 80)
stroke(255, 102, 0)
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/camera/camera0/camera0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/curvePoint/curvePoint1/curvePoint1.rpde
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# curvePoint 1 https://processing.org/reference/curvePoint_.html

CENTER <- as.integer(3)

noFill()
curve(5, 26, 5, 26, 73, 24, 73, 61)
curve(5, 26, 73, 24, 73, 61, 15, 65)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# curveTangent 1 https://processing.org/reference/curveTangent_.html

PI <- 3.1415
HALF_PI <- PI/2

noFill()
curve(5, 26, 73, 24, 73, 61, 15, 65)
steps <- 6
Expand Down
3 changes: 0 additions & 3 deletions examples/reference/ellipseMode/ellipseMode0/ellipseMode0.rpde
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
RADIUS <- as.integer(2)
CENTER <- as.integer(3)

ellipseMode(RADIUS) # Set ellipseMode to RADIUS
fill(255) # Set fill to white
ellipse(50, 50, 30, 30) # Draw white ellipse using RADIUS mode
Expand Down
3 changes: 0 additions & 3 deletions examples/reference/ellipseMode/ellipseMode1/ellipseMode1.rpde
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
CORNERS <- as.integer(1)
CORNER <- as.integer(0)

ellipseMode(CORNER) # Set ellipseMode is CORNER
fill(255) # Set fill to white
ellipse(25, 25, 50, 50) # Draw white ellipse using CORNER mode
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/endCamera/endCamera0/endCamera0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/endContour/endContour0/endContour0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
CLOSE <- as.integer(2)

size(100, 100)
translate(50, 50)
stroke(255, 0, 0)
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/endShape/endShape0/endShape0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
CLOSE <- as.integer(2)

noFill()

beginShape()
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/frustum/frustum0/frustum0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
CLOSE <- as.integer(2)

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/normal/normal0/normal0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
CLOSE <- as.integer(2)

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/ortho/ortho0/ortho0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/perspective/perspective0/perspective0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
3 changes: 0 additions & 3 deletions examples/reference/rectMode/rectMode0/rectMode0.rpde
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
CORNERS <- as.integer(1)
CORNER <- as.integer(0)

rectMode(CORNER) # Default rectMode is CORNER
fill(255) # Set fill to white
rect(25, 25, 50, 50) # Draw white rect using CORNER mode
Expand Down
3 changes: 0 additions & 3 deletions examples/reference/rectMode/rectMode1/rectMode1.rpde
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
RADIUS <- as.integer(2)
CENTER <- as.integer(3)

rectMode(RADIUS) # Set rectMode to RADIUS
fill(255) # Set fill to white
rect(50, 50, 30, 30) # Draw white rect using RADIUS mode
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/rotate/rotate0/rotate0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

translate(width/2, height/2)
rotate(PI/3)
rect(-26, -26, 52, 52)
2 changes: 0 additions & 2 deletions examples/reference/rotateX/rotateX0/rotateX0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/rotateX/rotateX1/rotateX1.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/rotateY/rotateY0/rotateY0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/rotateY/rotateY1/rotateY1.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/rotateZ/rotateZ0/rotateZ0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/rotateZ/rotateZ1/rotateZ1.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
3 changes: 0 additions & 3 deletions examples/reference/shapeMode/shapeMode0/shapeMode0.rpde
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
CENTER <- as.integer(3)
CORNER <- as.integer(0)

setup <- function() {
size(100, 100)
bot = loadShape("https://raw.githubusercontent.com/processing/processing-docs/master/content/examples/Basics/Shape/LoadDisplaySVG/data/bot1.svg")
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/shearX/shearX0/shearX0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/shearY/shearY0/shearY0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/spotLight/spotLight0/spotLight0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/spotLight/spotLight1/spotLight1.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
PI <- pi

settings <- function() {
size(100, 100, P3D)
}
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/vertex/vertex0/vertex0.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
POINTS <- as.integer(3)

beginShape(POINTS)
vertex(30, 20)
vertex(85, 20)
Expand Down
2 changes: 0 additions & 2 deletions examples/reference/vertex/vertex1/vertex1.rpde
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
POINTS <- as.integer(3)

settings <- function() {
size(100, 100, P3D)
}
Expand Down
Loading