Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
samput1
samput1's Profile
1
Posts
3
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Fullscreen app using processing.js and <canvas>
[6 Replies]
03-Jan-2011 03:41 PM
Forum:
Processing with Other Languages
I am trying to make a .pde display fullscreen using processing.js and the <canvas> tag.
But it is not taking into account the browser menu etc.
Can anyone help?
// Global variables
float radius = 10.0;
int X, Y;
int nX, nY;
int delay = 16;
// Setup the Processing Canvas
void setup(){
size(screen.width,screen.height);
strokeWeight( 10 );
frameRate( 25 );
X = width / 2;
Y = height / 2;
nX = X;
nY = Y;
smooth();
}
// Main draw loop
void draw(){
radius = radius + sin( frameCount / 4 );
// Track circle to new destination
X+=(nX-X)/delay;
Y+=(nY-Y)/delay;
// Fill canvas grey
background( 100 );
// Set fill-color to blue
//fill( 0, 121, 184 );
noFill();
// Set stroke-color white
stroke(0);
// Draw circle
ellipse( X, Y, radius, radius );
}
// Set circle's next destination
void mouseMoved(){
nX = mouseX;
nY = mouseY;
}
«Prev
Next »
Moderate user : samput1
Forum