-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
108 lines (106 loc) · 5.07 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/bulma-slider/dist/css/bulma-slider.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/bulma-pageloader/dist/css/bulma-pageloader.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/bulma-badge/dist/css/bulma-badge.min.css">
<title>WebAssembly Demo</title>
</head>
<body>
<section class="hero is-medium has-background-white-ter">
<div class="hero-body">
<p class="title is-1">Image Manipulation</p>
<p class="subtitle is-3">Using C and WebAssembly</p>
</div>
</section>
<div class="tile" id="canvases"></div>
<section class="hero is-medium">
<div class="hero-body">
<p class="title is-1">See it in action</p>
<p class="subtitle is-3">Move the sliders</p>
</div>
</section>
<div class="tile">
<div class="tile is-6 is-clipped">
<canvas id="original"></canvas>
</div>
<div class="tile is-4 columns">
<div class="column mt-6 ml-6 mr-6 pl-6 pt-6 pr-6 pb-6 box">
<div class="field">
<label class="label">Red Channel Adjustment</label>
<div class="control">
<input class="slider has-output is-fullwidth" step="0.01" min="0" max="1.0" value="1.0" type="range" x-id="redAdjustment">
<output for="redAdjustment">1</output>
</div>
</div>
<div class="field">
<label class="label">Green Channel Adjustment</label>
<div class="control">
<input class="slider has-output is-fullwidth" step="0.01" min="0" max="1.0" value="1.0" type="range" x-id="greenAdjustment">
<output for="greenAdjustment">1</output>
</div>
</div>
<div class="field">
<label class="label">Blue Channel Adjustment</label>
<div class="control">
<input class="slider has-output is-fullwidth" step="0.01" min="0" max="1.0" value="1.0" type="range" x-id="blueAdjustment">
<output for="blueAdjustment">1</output>
</div>
</div>
<div class="field">
<label class="label">Alpha Channel Adjustment</label>
<div class="control">
<input class="slider has-output is-fullwidth" step="0.01" min="0" max="1.0" value="0" type="range" x-id="alphaAdjustment">
<output for="alphaAdjustment">0</output>
</div>
</div>
</div>
</div>
</div>
<section class="hero is-medium has-background-white-ter">
<div class="hero-body level">
<div class="level-left">
<div>
<p class="title is-1">Save the result</p>
<p class="subtitle is-3">Click on the button</p>
</div>
</div>
<div class="level-right">
<a class="button is-primary is-large" download="image.png" id="download">Download image</a>
</div>
</div>
</section>
<footer class="footer">
<div class="content has-text-centered">
<p>
<strong>Image Manipulation</strong> by Eki Baskoro.
</p>
</div>
<div class="content has-text-centered">
<a title="ElodinKaldwin, Public domain, via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:C_Programming_Language.svg" class="ml-3 mr-3">
<img width="48" alt="C Programming Language" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/C_Programming_Language.svg/64px-C_Programming_Language.svg.png">
</a>
<a title="Carlos Baraza, CC0, via Wikimedia Commons" href="https://webassembly.org" class="ml-3 mr-3">
<img width="48" alt="WebAssembly Logo" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/WebAssembly_Logo.svg/64px-WebAssembly_Logo.svg.png">
</a>
<a href="https://bulma.io" class="ml-3 mr-3">
<img src="https://bulma.io/images/made-with-bulma.png" alt="Made with Bulma" width="256" height="48">
</a>
</div>
</footer>
<div class="pageloader is-active" id="loader">
<span class="title">Loading application</span>
</div>
<script src="./app/processor.js"></script>
<script type="module" src="./app/app.js"></script>
<script type="module">
import {
PageObject,
WasmApi,
WasmApp
} from './app/app.js';
new WasmApp(Module, new PageObject(), new WasmApi(Module));
</script>
</body>