-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
196 lines (134 loc) · 8.12 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Canvas Particles</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://cdn.jsdelivr.net/gh/BarbWire-1/js-particles-factory/minified/particles-factory.umd.js"></script>
</head>
<body>
<div id="canvas-container">
<!-- <canvas id="canvas" ></canvas> -->
<canvas id="my-particles" width="500" height="500"></canvas>
</div>
<h1>Here you can explore the different possible settings for the particles-factory</h1>
<div id="controlPanelContainer">
<div id="controlPanel" class="controlPanel">
<div class="controlPanelHeader">
<button id="togglePanel" data-action="togglePanel" class="toggleButton"><span
style="color: white">Settings </span>▶</button>
</div>
<div id="inputSection" class="controlPanelContent">
<h3>▶ main</h3>
<div class="inputContainer" style="display: flex; flex-direction: column; max-height: 1000px">
<!-- show on load -->
<label for="numParticles">Number of Particles:</label>
<input id="numParticles" data-bind="main.numParticles" type="number" min="0" max="40000"
step="10">
<label for="frameRate">FrameRate:</label>
<input id="frameRate" data-bind="main.frameRate" type="number" id="frameRate" step="1"
min="1" max="60">
<label for="speed">Speed:</label>
<input id="speed" data-bind="main.speed" type="number" id="speed" step="0.1"min="0.1"
max="5">
<label for="mouseReactive">Mouse Distance:</label>
<input id="mouseReactive" data-bind="main.mouseDistance" type="number" min="0" max="400"
step="10">
<label for="bgFillStyle">Background Color:</label>
<input id="bgFillStyle" data-bind="main.fillStyle" type="color">
<div class="checkbox-container">
<input id="isResponsiveFlag" data-bind="main.isResponsive" type="checkbox" >
<label for="isResponsiveFlag">Responsive</label><br>
<input id="isFullScreenFlag" data-bind="main.isFullScreen" type="checkbox" class="last" >
<label for="isFullScreenFlag">Full Screen</label>
</div>
</div>
<hr>
<h3 data-action="toggleVisibility">▶ particles</h3>
<div class="inputContainer">
<label for="particlesSize">Particles Size:</label>
<input id="particlesSize" data-bind="particles.size" type="number" min="1" max="100"
step="1">
<label for="particlesOpacity">Particles Opacity:</label>
<input id="particlesOpacity" data-bind="particles.opacity" type="number" min="0" max="1" step="0.05"
value="0.7">
<label for="particlesFillStyle">Particles Color:</label>
<input id="particlesFillStyle" data-bind="particles.fillStyle" type="color" value='#0033ff'>
<div class="checkbox-container">
<label for="particlesShape">Particles Shape</label><br>
<select id="particlesShape" data-bind="particles.shape">
<option value="circle">Circle</option>
<option value="square">Square</option>
<option value="rhombus">Rhombus</option>
<option value="hexagon">Hexagon</option>
<option value="triangle">Triangle</option>
</select><br><hr>
<input id="particlesFlag" data-bind="particles.draw" type="checkbox">
<label for="particlesFlag">Draw Particles</label><br>
<input id="particlesStrokeFlag" data-bind="particles.stroke" type="checkbox">
<label for="particlesStrokeFlag">Draw Stroke</label><br>
<input id="particlesTransparency" data-bind="particles.noFill" type="checkbox" >
<label for="particlesTransparency">No Fill</label><br>
<input id="particlesCollisionFlag" data-bind="particles.collision" type="checkbox" >
<label for="particlesCollisionFlag">Particles Collision</label><br>
<input id="particlesRandomSize" data-bind="particles.randomSize" type="checkbox">
<label for="particlesRandomSize">Random Size</label><br>
<input id="particlesRandomColor" data-bind="particles.randomFill" type="checkbox" class="last">
<label for="particlesRandomColor">Random Fill</label>
</div>
</div>
<hr>
<h3 data-action="toggleVisibility">▶ lines</h3>
<div class="inputContainer">
<label for="connectDistance">Connect Distance:</label>
<input id="connectDistance" data-bind="lines.connectDistance" type="number" min="0"
max="400" step="10">
<label for="linesStrokeStyle">Stroke Color:</label>
<input id="linesStrokeStyle" data-bind="lines.strokeStyle" type="color" id="stroke" >
<label for="linesWidth">Lines Width:</label>
<input id="linesWidth" data-bind="lines.lineWidth" type="number" min="0.1" max="5" step="0.1"
>
<label for="linesOpacity">Lines Opacity:</label>
<input id="linesOpacity" data-bind="lines.opacity" type="number" min="0" max="1" step="0.05"
>
<div class="checkbox-container">
<input id="withLinesFlag" data-bind="lines.draw" type="checkbox" class="last">
<label for="withLinesFlag">Draw Lines</label>
</div>
</div>
<hr>
</div>
<div id="buttonContainer" class="button-container">
<button id="toggleAnimation" data-action="toggleAnimation">Toggle Animation</button>
<button id="toggleContent" style="height: 50px">Information and Usage</button>
<button id="downloadButton">Download Config</button>
</div>
</div>
</div>
<!-- Link with text and GitHub icon -->
<a href="https://github.com/BarbWire-1/js-particles-factory" target="_blank"
<a href="https://github.com/BarbWire-1/js-particles-factory"target="_blank"
rel="noopener noreferrer">
<i class="fab fa-github"></i>
Github Repo
</a>
<div id="content-container" class="display-toggle">
<h4 class="description">Use Particles As Interactive Background</h4>
<div id="landing">
<h2 style="text-align: center">Here you can explore the different possible settings for the particles-factory
</h2>
<p style="text-align: center; line-height: 1.8">
If you like what you see, you can download the object holding the current configuration data and use it for
instantiating your own particles background.<br>
Check out the following example<a style="display: inline"
href="https://github.com/BarbWire-1/js-particles-factory-example"
target="_blank">EXAMPLE INSTANTIATION</a><br>for more details.<br>
You'd only need the ParticlesFactory and instantiate it.<br>Handler and Proxy are for this userInterface.
</p>
</div>
<!-- <button id="test-button">I'm listening :)</button> -->
</div>
<script type="module" src="main.js"></script>
</body>
</html>