Skip to content

Commit

Permalink
No changes at all, just satisfying VSCode/Git
Browse files Browse the repository at this point in the history
  • Loading branch information
oldlavender committed Sep 13, 2021
1 parent 8b6f970 commit 5d57a28
Show file tree
Hide file tree
Showing 22 changed files with 2,445 additions and 2,447 deletions.
18 changes: 9 additions & 9 deletions .gitignore
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/
14 changes: 6 additions & 8 deletions .npmignore
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
1,322 changes: 661 additions & 661 deletions LICENSE

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions README.md
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.
124 changes: 62 additions & 62 deletions __mocks__/lab.js
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,
},
};
16 changes: 8 additions & 8 deletions babel.config.cjs
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",
],
},
},
};
106 changes: 53 additions & 53 deletions example/example.html
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>
Loading

0 comments on commit 5d57a28

Please sign in to comment.