-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No changes at all, just satisfying VSCode/Git
- Loading branch information
1 parent
8b6f970
commit 5d57a28
Showing
22 changed files
with
2,445 additions
and
2,447 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
.vscode/ | ||
node_modules/ | ||
.git/ | ||
*.log | ||
*.key | ||
yarn.lock | ||
.disabled.* | ||
dist/ | ||
coverage/ | ||
.vscode/ | ||
node_modules/ | ||
.git/ | ||
*.log | ||
*.key | ||
yarn.lock | ||
.disabled.* | ||
dist/ | ||
coverage/ |
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
.vscode/ | ||
node_modules/ | ||
.git/ | ||
lib/ | ||
plugins/ | ||
.gitignore | ||
.npmignore | ||
*.log | ||
.vscode/ | ||
node_modules/ | ||
.git/ | ||
.gitignore | ||
.npmignore | ||
*.log | ||
*.key |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# move.lab | ||
lab.js plugin responsible for basic animation (we move lab visual components for you). | ||
|
||
# Usage Instructions | ||
This documents are under construction. | ||
See the folder 'example' for a functioning example. | ||
|
||
## Author | ||
Bruno Moreira-Guedes <[email protected]> | ||
## Acknowledgements | ||
# move.lab | ||
lab.js plugin responsible for basic animation (we move lab visual components for you). | ||
|
||
# Usage Instructions | ||
This documents are under construction. | ||
See the folder 'example' for a functioning example. | ||
|
||
## Author | ||
Bruno Moreira-Guedes <[email protected]> | ||
## Acknowledgements | ||
I would like to acknowledge the author is financially supported by the Brazilian agency CAPES, by the provision of a 1500 BRL/month stipend during his master's program. |
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 |
---|---|---|
@@ -1,63 +1,63 @@ | ||
class Screen { | ||
constructor(opts={}) { | ||
this.options = opts; | ||
this._timer = 0; | ||
this.started = false; | ||
this.ended = false; | ||
var _canvas = document.getElementById('canvas'); | ||
this.options.canvas = _canvas; | ||
} | ||
|
||
queueAnimationFrame() { | ||
window.requestAnimationFrame((t) => this.updateTimer(t)); | ||
} | ||
|
||
updateTimer(newTime=0) { | ||
this.timer = newTime; | ||
} | ||
|
||
doEvent(evt) { | ||
for (let plg of this.options.plugins) { | ||
plg.handle(this, evt); | ||
} | ||
} | ||
|
||
prepare() { | ||
this.doEvent('prepare'); | ||
} | ||
|
||
run() { | ||
this.doEvent('run'); | ||
this.doEvent('render'); | ||
} | ||
|
||
show() { | ||
this.doEvent('show'); | ||
} | ||
|
||
reset() { | ||
this.timer = 0; | ||
} | ||
|
||
end() { | ||
this.doEvent('end'); | ||
this.ended = true; | ||
} | ||
|
||
get timer() { | ||
return this._timer; | ||
} | ||
|
||
set timer(t) { | ||
this._timer = t; | ||
if (t >= this.options.timeout) { | ||
this.end(); | ||
} | ||
} | ||
} | ||
|
||
export const lab = { | ||
canvas: { | ||
Screen: Screen, | ||
}, | ||
class Screen { | ||
constructor(opts={}) { | ||
this.options = opts; | ||
this._timer = 0; | ||
this.started = false; | ||
this.ended = false; | ||
var _canvas = document.getElementById('canvas'); | ||
this.options.canvas = _canvas; | ||
} | ||
|
||
queueAnimationFrame() { | ||
window.requestAnimationFrame((t) => this.updateTimer(t)); | ||
} | ||
|
||
updateTimer(newTime=0) { | ||
this.timer = newTime; | ||
} | ||
|
||
doEvent(evt) { | ||
for (let plg of this.options.plugins) { | ||
plg.handle(this, evt); | ||
} | ||
} | ||
|
||
prepare() { | ||
this.doEvent('prepare'); | ||
} | ||
|
||
run() { | ||
this.doEvent('run'); | ||
this.doEvent('render'); | ||
} | ||
|
||
show() { | ||
this.doEvent('show'); | ||
} | ||
|
||
reset() { | ||
this.timer = 0; | ||
} | ||
|
||
end() { | ||
this.doEvent('end'); | ||
this.ended = true; | ||
} | ||
|
||
get timer() { | ||
return this._timer; | ||
} | ||
|
||
set timer(t) { | ||
this._timer = t; | ||
if (t >= this.options.timeout) { | ||
this.end(); | ||
} | ||
} | ||
} | ||
|
||
export const lab = { | ||
canvas: { | ||
Screen: Screen, | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
module.exports = { | ||
env: { | ||
test: { | ||
plugins: [ | ||
"@babel/plugin-transform-modules-commonjs", | ||
], | ||
}, | ||
}, | ||
module.exports = { | ||
env: { | ||
test: { | ||
plugins: [ | ||
"@babel/plugin-transform-modules-commonjs", | ||
], | ||
}, | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,53 +1,53 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Moving Lab!</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- | ||
Here the JavaScript file is called, change the src='' to the | ||
relative path where your actual script is. | ||
--> | ||
<script type="module" defer src="./example.mjs"></script> | ||
|
||
<!-- | ||
Adjust the following path to match your lab.js installation | ||
--> | ||
<link rel="stylesheet" href="./lib/lab.css"> | ||
</head> | ||
<body> | ||
<!-- | ||
Read lab.js documentation for a reference on the contents below. | ||
Also check the lab.js-starterkit for an example! | ||
--> | ||
<div class="container fullscreen"> | ||
<header | ||
class="content-vertical-center content-horizontal-center"> | ||
<div> | ||
<small>We're going to move your lab!</small> | ||
</div> | ||
</header> | ||
<main | ||
class="content-vertical-center content-horizontal-center" | ||
data-labjs-section="main"> | ||
<div> | ||
<img src="https://media.giphy.com/media/xTk9ZvMnbIiIew7IpW/source.gif" width="200px" alt="loading icon" style="padding: 1rem"><br> | ||
<p> | ||
<strong>It is loading</strong>,<br> | ||
wait a minute! | ||
(or check the error console if it's taking too long, | ||
it should not take more than just some seconds to load) | ||
</p> | ||
</div> | ||
</main> | ||
<footer class="content-vertical-center content-horizontal-center"> | ||
<div> | ||
<small class="text-muted"> | ||
<a href='https://github.com/brunodOut/move.lab'>move.lab 2021</a> | ||
</small> | ||
</div> | ||
</footer> | ||
</div> | ||
</body> | ||
</html> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Moving Lab!</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- | ||
Here the JavaScript file is called, change the src='' to the | ||
relative path where your actual script is. | ||
--> | ||
<script type="module" defer src="./example.mjs"></script> | ||
|
||
<!-- | ||
Adjust the following path to match your lab.js installation | ||
--> | ||
<link rel="stylesheet" href="./lib/lab.css"> | ||
</head> | ||
<body> | ||
<!-- | ||
Read lab.js documentation for a reference on the contents below. | ||
Also check the lab.js-starterkit for an example! | ||
--> | ||
<div class="container fullscreen"> | ||
<header | ||
class="content-vertical-center content-horizontal-center"> | ||
<div> | ||
<small>We're going to move your lab!</small> | ||
</div> | ||
</header> | ||
<main | ||
class="content-vertical-center content-horizontal-center" | ||
data-labjs-section="main"> | ||
<div> | ||
<img src="https://media.giphy.com/media/xTk9ZvMnbIiIew7IpW/source.gif" width="200px" alt="loading icon" style="padding: 1rem"><br> | ||
<p> | ||
<strong>It is loading</strong>,<br> | ||
wait a minute! | ||
(or check the error console if it's taking too long, | ||
it should not take more than just some seconds to load) | ||
</p> | ||
</div> | ||
</main> | ||
<footer class="content-vertical-center content-horizontal-center"> | ||
<div> | ||
<small class="text-muted"> | ||
<a href='https://github.com/brunodOut/move.lab'>move.lab 2021</a> | ||
</small> | ||
</div> | ||
</footer> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.