forked from processing-js/processing-js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
requestActionFrame logic added, with a flag frameRateIsUsed. Example …
…added in examples/seneca/bug862
- Loading branch information
Showing
6 changed files
with
93 additions
and
14 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 @@ | ||
<iframe src="wfr.html" width = 49% height=98% > You need iframe </iframe> <iframe src="wofr.html" width = 49% height = 98% > You need iframe </iframe> |
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,15 @@ | ||
void setup(){ | ||
size(300, 300, P3D); | ||
noStroke(); | ||
frameRate(30); | ||
} | ||
|
||
void draw(){ | ||
background(0); | ||
lights(); | ||
translate(width/2, height/2, 0); | ||
for(int i = 0; i < 100; i++){ | ||
sphere(30); | ||
} | ||
document.getElementById('fpswfr').innerHTML = Math.floor(frameRate); | ||
} |
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,14 @@ | ||
void setup(){ | ||
size(300, 300, P3D); | ||
noStroke(); | ||
} | ||
|
||
void draw(){ | ||
background(0); | ||
lights(); | ||
translate(width/2, height/2, 0); | ||
for(int i = 0; i < 100; i++){ | ||
sphere(30); | ||
} | ||
document.getElementById('fpswofr').innerHTML = Math.floor(frameRate); | ||
} |
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,4 @@ | ||
With frameRate(30) | ||
<script src="../../../processing.js"></script> | ||
<canvas datasrc="testwfr.pjs" width="500" height="500"></canvas> | ||
<span id='fpswfr'></span> |
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,4 @@ | ||
Without frameRate() | ||
<script src="../../../processing.js"></script> | ||
<canvas datasrc="testwofr.pjs" width="500" height="500"></canvas> | ||
<span id='fpswofr'></span> |
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