Skip to content

Commit a04854c

Browse files
committed
renaming to vr
1 parent d1b9b22 commit a04854c

File tree

16 files changed

+97
-113
lines changed

16 files changed

+97
-113
lines changed

build.gradle

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ allprojects {
2020
jcenter()
2121
flatDir dirs: "$rootDir/core/library"
2222
flatDir dirs: "$rootDir/core/build/libs"
23-
flatDir dirs: "$rootDir/libraries/cardboard/lib"
23+
flatDir dirs: "$rootDir/libraries/vr/lib"
2424
flatDir dirs: android_platform
2525
}
2626

@@ -31,7 +31,7 @@ allprojects {
3131
dependencies {
3232
compile name: 'android'
3333
compile project(":core")
34-
compile project(":libraries:cardboard")
34+
compile project(":libraries:vr")
3535
compile group: 'org.processing', name: 'core', version: '3.2.3'
3636
compile group: 'org.processing', name: 'pde', version: '3.2.3'
3737
compile group: 'org.processing', name: 'java-mode', version: '3.2.3'
@@ -72,18 +72,18 @@ task dist {
7272
Files.copy(file("mode.properties").toPath(),
7373
file("$root/mode.properties").toPath(), REPLACE_EXISTING);
7474

75-
FileUtils.copyDirectory(file("libraries/cardboard/examples"),
76-
file("$root/libraries/cardboard/examples"))
77-
FileUtils.copyDirectory(file("libraries/cardboard/gvrsdk"),
78-
file("$root/libraries/cardboard/gvrsdk"))
79-
FileUtils.copyDirectory(file("libraries/cardboard/lib"),
80-
file("$root/libraries/cardboard/lib"))
81-
FileUtils.copyDirectory(file("libraries/cardboard/library"),
82-
file("$root/libraries/cardboard/library"))
83-
FileUtils.copyDirectory(file("libraries/cardboard/src"),
84-
file("$root/libraries/cardboard/src"))
85-
Files.copy(file("libraries/cardboard/library.properties").toPath(),
86-
file("$root/libraries/cardboard/library.properties").toPath(), REPLACE_EXISTING);
75+
FileUtils.copyDirectory(file("libraries/vr/examples"),
76+
file("$root/libraries/vr/examples"))
77+
FileUtils.copyDirectory(file("libraries/vr/gvrsdk"),
78+
file("$root/libraries/vr/gvrsdk"))
79+
FileUtils.copyDirectory(file("libraries/vr/lib"),
80+
file("$root/libraries/vr/lib"))
81+
FileUtils.copyDirectory(file("libraries/vr/library"),
82+
file("$root/libraries/vr/library"))
83+
FileUtils.copyDirectory(file("libraries/vr/src"),
84+
file("$root/libraries/vr/src"))
85+
Files.copy(file("libraries/vr/library.properties").toPath(),
86+
file("$root/libraries/vr/library.properties").toPath(), REPLACE_EXISTING);
8787

8888
ZipUtil.pack(file("$buildDir/zip"), new File("release/AndroidMode.zip"))
8989
Files.copy(file("mode.properties").toPath(),

build.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@
9292
<include name="examples/**" />
9393
<include name="icons/**" />
9494
<include name="theme/**" />
95-
<include name="libraries/cardboard/library.properties" />
96-
<include name="libraries/cardboard/examples/**" />
97-
<include name="libraries/cardboard/gvrsdk/**" />
98-
<include name="libraries/cardboard/lib/**" />
99-
<include name="libraries/cardboard/library/**" />
100-
<include name="libraries/cardboard/src/**" />
95+
<include name="libraries/vr/library.properties" />
96+
<include name="libraries/vr/examples/**" />
97+
<include name="libraries/vr/gvrsdk/**" />
98+
<include name="libraries/vr/lib/**" />
99+
<include name="libraries/vr/library/**" />
100+
<include name="libraries/vr/src/**" />
101101
<exclude name="**/._*" />
102102
</zipfileset>
103103
</zip>
@@ -112,12 +112,12 @@
112112

113113
<target name="subprojects-clean">
114114
<subant buildpath="core" target="clean"/>
115-
<subant buildpath="libraries/cardboard" target="clean"/>
115+
<subant buildpath="libraries/vr" target="clean"/>
116116
</target>
117117

118118
<target name="subprojects-build">
119119
<subant buildpath="core" target="build"/>
120-
<subant buildpath="libraries/cardboard" target="build"/>
120+
<subant buildpath="libraries/vr" target="build"/>
121121
</target>
122122

123123

libraries/cardboard/.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>processing-cardboard</name>
3+
<name>processing-vr</name>
44
<comment></comment>
55
<projects>
66
</projects>

libraries/cardboard/README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
# Cardboard library for Processing-Android
2-
3-
This library includes a stereo renderer to create Cardboard apps.
4-
5-
## Installation
6-
7-
It is still not available through the Contributions Manager, so you need to install it manually"
8-
9-
1. Download the [carboard.zip](https://github.com/codeanticode/processing-cardboard/releases/download/latest/cardboard.zip) file from the latest relesase.
10-
2. Unpack the zip file, and move the cardboard folder to the libraries' folder inside your sketchbook path.
11-
3. Follow [this tutorial](http://android.processing.org/tutorials/cardboard_intro/index.html) for a detailed guide on how to write cardboard apps with Processing.
1+
# VR library for Processing-Android
122

3+
This library includes a stereo renderer to create VR apps.
134

libraries/cardboard/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jar {
3737
}
3838

3939
clean.doFirst {
40-
delete "library/cardboard.jar"
40+
delete "library/vr.jar"
4141
}
4242

4343
import groovy.util.AntBuilder
@@ -46,12 +46,12 @@ import static java.nio.file.StandardCopyOption.*;
4646

4747
task dist {
4848
doLast {
49-
File cardBoardJar = file("library/cardboard.jar");
49+
File vrJar = file("library/vr.jar");
5050
//create intermediate folder if they don't exist
51-
cardBoardJar.mkdirs();
51+
vrJar.mkdirs();
5252
// make copy of jar file to library folder
53-
Files.copy(file("$buildDir/libs/cardboard.jar").toPath(),
54-
cardBoardJar.toPath(), REPLACE_EXISTING);
53+
Files.copy(file("$buildDir/libs/vr.jar").toPath(),
54+
vrJar.toPath(), REPLACE_EXISTING);
5555
}
5656
}
5757

libraries/cardboard/build.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?xml version="1.0"?>
2-
<project name="Processing Cardboard Library" default="build">
2+
<project name="Processing VR Library" default="build">
33

44
<property name="processing.dir" value="../../../processing" />
55
<property environment="env"/>
66

77
<target name="clean" description="Clean the build directories">
88
<delete dir="bin" />
9-
<delete file="library/cardboard.jar" />
9+
<delete file="library/vr.jar" />
1010
</target>
1111

12-
<target name="build" depends="sdk_chatter,compile" description="Build cardboard library for Processing Android" >
12+
<target name="build" depends="sdk_chatter,compile" description="Build VR library for Processing Android" >
1313
<mkdir dir="library" />
14-
<jar basedir="bin" destfile="library/cardboard.jar" />
14+
<jar basedir="bin" destfile="library/vr.jar" />
1515
</target>
1616

1717
<target name="sdk_chatter" unless="env.ANDROID_SDK">

libraries/cardboard/examples/Cube/Cube.pde

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import processing.cardboard.*;
1+
import processing.vr.*;
22

33
void setup() {
4-
fullScreen(PCardboard.STEREO);
4+
fullScreen(PVR.STEREO);
55
}
66

77
void draw() {
8-
// PGraphicsCardboard pgc = (PGraphicsCardboard)g;
9-
// if (pgc.eyeType == PCardboard.LEFT) {
8+
// PGraphicsVR pgc = (PGraphicsVR)g;
9+
// if (pgc.eyeType == PVR.LEFT) {
1010
// background(200, 50, 50);
11-
// } else if (pgc.eyeType == PCardboard.RIGHT) {
11+
// } else if (pgc.eyeType == PVR.RIGHT) {
1212
// background(50, 50, 200);
13-
// } else if (pgc.eyeType == PCardboard.MONOCULAR) {
13+
// } else if (pgc.eyeType == PVR.MONOCULAR) {
1414
// background(50, 200, 50);
1515
// }
1616

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
component=cardboard
1+
component=vr

libraries/cardboard/examples/Mono/Mono.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import processing.cardboard.*;
1+
import processing.vr.*;
22

33
void setup() {
4-
fullScreen(PCardboard.MONO);
4+
fullScreen(PVR.MONO);
55
}
66

77
void draw() {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
component=cardboard
1+
component=vr
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name = Cardboard
1+
name = VR
22
authorList = Processing Foundation
33
url = http://android.processing.org
44
category = 3D
5-
sentence = Renderer to develop Cardboard apps
5+
sentence = Renderer to develop VR apps
66
paragraph =
7-
version = 6
8-
prettyVersion = 0.8
7+
version = 7
8+
prettyVersion = 0.9
99
minRevision = 248
1010
maxRevision = 0

libraries/cardboard/src/processing/cardboard/PGraphicsCardboard.java renamed to libraries/cardboard/src/processing/vr/PGraphicsVR.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
Boston, MA 02111-1307 USA
2121
*/
2222

23-
package processing.cardboard;
23+
package processing.vr;
2424

2525
import com.google.vr.sdk.base.Eye;
2626
import com.google.vr.sdk.base.HeadTransform;
@@ -32,7 +32,7 @@
3232
import processing.opengl.PGraphics3D;
3333
import processing.opengl.PGraphicsOpenGL;
3434

35-
public class PGraphicsCardboard extends PGraphics3D {
35+
public class PGraphicsVR extends PGraphics3D {
3636
private boolean initialized = false;
3737

3838
public int eyeType;
@@ -69,7 +69,7 @@ public void preApplyMatrix(PMatrix3D source) {
6969

7070

7171
protected void headTransform(HeadTransform headTransform) {
72-
initCardboard();
72+
initVR();
7373

7474
// Get the head view and rotation so the user can use them for object selecton and
7575
// other operations.
@@ -82,7 +82,7 @@ protected void eyeTransform(Eye eye) {
8282
eyeType = eye.getType();
8383
viewPort = eye.getViewport();
8484

85-
// Matrices in Processing are row-major, and Cardboard API is column-major
85+
// Matrices in Processing are row-major, and GVR API is column-major
8686
float[] p = eye.getPerspective(cameraNear, cameraFar);
8787
perspectiveMatrix.set(p[0], p[4], p[8], p[12],
8888
p[1], p[5], p[9], p[13],
@@ -97,7 +97,7 @@ protected void eyeTransform(Eye eye) {
9797
}
9898

9999

100-
private void initCardboard() {
100+
private void initVR() {
101101
if (!initialized) {
102102
headRotation = new float[4];
103103
headView = new float[16];

libraries/cardboard/src/processing/cardboard/PGraphicsCardboardMono.java renamed to libraries/cardboard/src/processing/vr/PGraphicsVRMono.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
Boston, MA 02111-1307 USA
2121
*/
2222

23-
package processing.cardboard;
23+
package processing.vr;
2424

2525
import android.view.SurfaceHolder;
2626
import processing.android.AppComponent;
2727
import processing.core.PSurface;
2828

29-
public class PGraphicsCardboardMono extends PGraphicsCardboard {
29+
public class PGraphicsVRMono extends PGraphicsVR {
3030
@Override
3131
public PSurface createSurface(AppComponent component, SurfaceHolder holder, boolean reset) { // ignore
3232
if (reset) pgl.resetFBOLayer();
33-
return new PSurfaceCardboard(this, component, holder, false);
33+
return new PSurfaceVR(this, component, holder, false);
3434
}
3535
}

libraries/cardboard/src/processing/cardboard/PGraphicsCardboardStereo.java renamed to libraries/cardboard/src/processing/vr/PGraphicsVRStereo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
Boston, MA 02111-1307 USA
2121
*/
2222

23-
package processing.cardboard;
23+
package processing.vr;
2424

2525
import android.view.SurfaceHolder;
2626
import processing.android.AppComponent;
2727
import processing.core.PSurface;
2828

29-
public class PGraphicsCardboardStereo extends PGraphicsCardboard {
29+
public class PGraphicsVRStereo extends PGraphicsVR {
3030
@Override
3131
public PSurface createSurface(AppComponent component, SurfaceHolder holder, boolean reset) { // ignore
3232
if (reset) pgl.resetFBOLayer();
33-
return new PSurfaceCardboard(this, component, holder, true);
33+
return new PSurfaceVR(this, component, holder, true);
3434
}
3535
}

0 commit comments

Comments
 (0)