Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added examples/assets/eraser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/assets/pencil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/color_draw_something.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<body>

<div class="demo-title">
<p><a href="http://trackingjs.com" target="_parent">tracking.js</a> - use magenta color to draw and cyan to erase</p>
<p><a href="http://trackingjs.com" target="_parent">tracking.js</a> - use magenta color to draw and cyan to erase or <a href="color_draw_something_controller_mobile.html" target="_parent">open this on mobile</a></p>
</div>

<div class="demo-frame">
Expand Down
57 changes: 57 additions & 0 deletions examples/color_draw_something_controller_mobile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!doctype html>

<html>
<head>
<meta charset="utf-8">
<title>tracking.js - magenta screen</title>
<link rel="stylesheet" href="assets/demo.css">

<script src="../build/tracking-min.js"></script>
<script src="../../dat-gui/build/dat.gui.min.js"></script>

<style>
.demo-frame-mobile {
background-color: magenta;
width: 100%;
height: 80vh;
}

.demo-toolbar {
height: 20vh;
text-align: center;
}

#pencil{ padding-right: 10%; }

#eraser{ padding-left: 10%; }

</style>
</head>
<body>
<div class="demo-title">
<p><a href="http://trackingjs.com" target="_parent">tracking.js</a> - tool for draw something demo - open on mobile</p>
</div>

<div class="demo-frame-mobile" id="screen">
</div>

<div class="demo-toolbar">
<img src="assets/pencil.png" id="pencil" onclick="background_magenta()">
<img src="assets/eraser.png" id="eraser" onclick="background_cyan()">
</div>

</body>

<script>
// Icons from Flaticon.com CC 3.0

function background_magenta(){
document.getElementById('screen').style.backgroundColor="magenta";
}

function background_cyan(){
document.getElementById('screen').style.backgroundColor="cyan";
}

</script>
</html>