Hello,
This tutorial is about how to use the processing library.
Processing Is a library for easily creating fantastic computer graphics. Exact two years ago on 12. nov. 2007 the computer magazine "c't magazin für computertechnik" published an article about processing. I was really impressed about the pictures In the magazine. Of course you are able to use it In Jabaco too.
Download it from the site processing.org
http://processing.org/download/processing-1.0.9-expert.zip
Unzip it in a folder for example:
C:\program files\processing.org\
just a simple example to explain how to use it in Jabaco:
* Start Jabaco with a new
Console Application.
* The console is not needed, so:
-> In the project explorer select the Project-item
-> In the properties-editor Select
Startup Console And change it to
Window
* In Jabaco click the menu item "Project" -> "References (classpath)..."
* In the dialog click the button "Add Jar-Archive"
* select the library
core.jar from the folder processing-1.0.9-expert\lib .
* add a new class to your project and name it "MyApp" In the properties editor select superclass
processing/core/PApplet
In the class add the following code:
|
Jabaco Source
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
Option Explicit
Import processing#core
Public Sub setup()
size(800, 600, P3D)
fill(204)
End Sub
Public Sub draw()
lights()
background(0)
' Change height of the camera with mouseY
' eyeX, eyeY, eyeZ
' centerX, centerY, centerZ
' upX, upY, upZ
camera(30.0, mouseY, 220.0, _
0.0, 0.0, 0.0, _
0.0, 1.0, 0.0)
' create a box
noStroke()
box(90)
stroke(255)
' create the 3 coordinate axis
line(-100, 0, 0, 100, 0, 0)
line(0, -100, 0, 0, 100, 0)
line(0, 0, -100, 0, 0, 100)
End Sub
|
Module1:
|
Jabaco Source
|
1
2
3
4
5
6
7
|
Public Sub main(ByJava args() As String)
Dim s() As String
Redim s(0 To 1)
s(0) = "--present"
s(1) = "MyApp" '<-- name of the main class that extends PApplet
PApplet.main(s)
End Sub
|
Start the project, you will see a fullscreen black window something like in the picture attached.
You can close it with the stop-button on the bottom left corner.
have fun with Jabaco
OlimilO