Import original MIT source package
This commit is contained in:
commit
c1dd88d799
13 files changed
+191
No files matched your search
@@ -0,0 +1 @@
|
||||
<!doctype html><html><head><meta charset="utf-8"><title>MotionGit pilot</title></head><body><canvas id="scene" width="1080" height="1920"></canvas><script src="main.js"></script></body></html>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// Newly authored MotionGit collaboration fixture 2. MIT.
|
||||
const surface = document.querySelector('#scene');
|
||||
const paint = surface.getContext('2d');
|
||||
window.renderFrame = (frame, inputs) => {
|
||||
paint.fillStyle = '#102030';
|
||||
paint.fillRect(0, 0, surface.width, surface.height);
|
||||
paint.fillStyle = '#79c0ff';
|
||||
const progress = Math.max(0, Math.min(1, frame / 30));
|
||||
paint.fillRect(80, 100, (surface.width - 160) * progress, 28);
|
||||
paint.fillStyle = '#ffffff';
|
||||
paint.font = '48px sans-serif';
|
||||
paint.fillText(inputs.title, 80, 230);
|
||||
};
|
||||
Reference in new issue
Block a user