-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
681 lines (660 loc) · 24.4 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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>RPG Ambience</title>
<link rel="stylesheet" href="css/ambience.css">
<link rel="icon" type="image/png" href="images/icon.png">
<script src="source/extensions.js"></script>
<script src="source/List.js"></script>
<script src="libraries/jquery-1.9.1.js"></script>
<script src="libraries/jquery-ui-1.10.2.custom.js"></script>
<script src="libraries/spectrum-1.0.9.js"></script>
<link rel="stylesheet" href="libraries/spectrum-1.0.9.css">
<script src="libraries/angular.js"></script>
<script src="libraries/angular-ui.js"></script>
<script src="libraries/angular-ui-bootstrap-0.2.0.js"></script>
<script src="libraries/angular-ui-sortable.js"></script>
<script src="libraries/when/when.js"></script>
<script src="libraries/key.js"></script>
<script src="libraries/object-url-from-data-url.js"></script>
<script src="libraries/ambience-stage/libraries/manymation/source/manymation.js"></script>
<script src="libraries/ambience-stage/source/Stage.js"></script>
<script src="libraries/ambience-stage/source/ScenePlayer.js"></script>
<script src="libraries/ambience-stage/source/MediaPlayers/Background.js"></script>
<script src="libraries/ambience-stage/source/MediaPlayers/Image.js"></script>
<script src="libraries/ambience-stage/source/MediaPlayers/Sound.js"></script>
<script src="libraries/ambience-stage/source/MediaPlayers/Text.js"></script>
<script src="libraries/ambience-stage/source/Scene.js"></script>
<script>var Ambience = {};</script>
<script src="source/Controller.js"></script>
<script src="source/Player.js"></script>
<script src="source/Adventure.js"></script>
<script src="source/ExampleAdventure.js"></script>
<script src="source/Scene.js"></script>
<script src="source/Scene.Background.js"></script>
<script src="source/Scene.Image.js"></script>
<script src="source/Scene.Text.js"></script>
<script src="source/Scene.Sound.js"></script>
<script src="source/MediaFile.js"></script>
<script src="source/TaskQueue.js"></script>
<script src="source/Library.js"></script>
<script src="source/BackendFile.js"></script>
<script src="source/LocalBackend.js"></script>
<script src="source/GoogleDriveBackend.js"></script>
<script src="source/FileButton.js"></script>
<script src="source/TextButton.js"></script>
<script src="source/ScenePreview.js"></script>
<script src="source/ToggleButton.js"></script>
<script src="source/PlayerDirective.js"></script>
<script src="source/Fullscreen.js"></script>
<script src="source/KeyInput.js"></script>
<script src="source/Spectrum.js"></script>
<script src="source/bootstrap.js"></script>
</head>
<body data-ng-controller="Ambience.Controller">
<div
id="editor"
class="editor"
data-ng-show="app.library.adventuresHaveBeenLoaded">
<div class="adventure-controls">
<ul class="action-list adventure">
<li class="action">
<select
data-ng-model="app.adventure"
data-ng-options="a.title for a in app.library.adventures"></select>
</li>
<li class="action new">
<button
type="button"
data-ng-click="createAdventure()">New Adventure</button>
</li>
<li class="action rename">
<text-button
data-ng-model="app.adventure.title"
data-ng-label="Rename Adventure"
data-active-when="app.renameInProgress"></text-button>
</li>
<li class="action delete">
<button
type="button"
data-ng-click="removeAdventure(app.adventure)">Delete Adventure</button>
</li>
</ul>
<div id="next-version-blurb" data-ui-if="!nextVersionBlurbClosed">
What do you want to see in the next version of RPG Ambience?
<a href="http://blog.rpg-ambience.com/articles/next-version/" target="_blank">Share your thoughts!</a>
<button data-ng-click="closeNextVersionBlurb()">Close</button>
</div>
</div>
<div class="scene-controls">
<tabs class="view-list" id="view-list">
<pane
id="scene-tab"
class="scene-view"
data-heading="Scenes">
<div class="notice" data-ui-if="!app.adventure">
<p>You have no adventures</p>
<p>
<button
type="button"
data-ng-click="loadExampleAdventure()">Load an Example Adventure</button>
</p>
</div>
<div class="scene-list" data-ui-if="app.adventure">
<ul
data-ui-sortable="{ distance: 10, axis: 'y' }"
data-ng-model="app.adventure.scenes">
<li
class="scene"
data-ng-repeat="scene in app.adventure.scenes"
data-ng-class="{ selected: isSelected(scene) }">
<a
href=""
data-ng-click="selectScene(scene)">
<scene-preview data-scene="scene"></scene-preview>
<span data-ui-if="scene.name">{{scene.name}}</span>
<span data-ui-if="scene.key" class="key">{{scene.key}}</span>
<div class="icons">
<img data-ui-if="scene.mixin" src="images/mixin.svg" title="Mixin">
<img data-ui-if="scene.isForeground" src="images/foreground.svg" title="Foreground">
</div>
</a>
</li>
</ul>
<div class="add-scene">
<button
type="button"
data-ng-click="addSceneAfter(app.scene, app.adventure)">Add Scene</button>
</div>
</div>
<div class="scene-editor" data-ui-if="app.adventure">
<div class="scene">
<ul class="action-list">
<li class="action copy">
<button
type="button"
data-ng-click="copyScene(app.scene, app.adventure)">Copy Scene</button>
</li>
<li class="action remove">
<button
type="button"
data-ng-click="removeScene(app.scene, app.adventure)">Delete Scene</button>
</li>
</ul>
<scene-preview data-scene="app.scene"></scene-preview>
<div class="options general">
<table>
<tr>
<th><label for="name">Name</label></th>
<td>
<input
id="name"
type="text"
placeholder="Untitled"
data-ng-model="app.scene.name">
</td>
</tr>
<tr>
<th><label for="key">Hotkey</label></th>
<td>
<key-input
id="key"
data-ng-model="app.scene.key"></key-input>
</td>
</tr>
<tr>
<th><label for="layer">Layer</label></th>
<td>
<ul class="control-list">
<li>
<select
id="layer"
data-ng-model="app.scene.layer">
<option value="background">Background</option>
<option value="foreground">Foreground</option>
</select>
</li>
<li>
<label for="mixin" title="{{help.mixin}}">
<input
id="mixin"
type="checkbox"
data-ng-model="app.scene.mixin">
Mixin
</label>
</li>
</ul>
</td>
</tr>
</table>
</div>
<tabs class="options specific">
<pane
data-heading="Image"
id="image-tab">
<div class="primary-secondary">
<span
class="primary"
data-ui-if="app.scene.image.file">{{app.scene.image.file.name}}</span>
<!-- "less than" does not work properly below, probably due to some coercion. However, the XMLHttpRequest "load" listener makes sure that progress is notified as 1.0 on completion. -->
<div class="primary" data-ui-if="app.scene.image.file && app.scene.image.file.progress != 1.0">
<progress max="1.0" value="{{app.scene.image.file.progress}}"></progress>
</div>
<span
class="primary placeholder"
data-ui-if="!app.scene.image.file">No image selected</span>
<button
type="button"
class="secondary"
data-ng-hide="app.scene.image.file"
data-ng-click="selectImage(app.scene)">{{app.library.selectImageFileLabel}}</button>
<button
type="button"
class="secondary"
data-ng-show="app.scene.image.file"
data-ng-click="removeImage(app.scene)">Remove</button>
</div>
<ul class="control-list">
<li>
<label for="size-contain">
<input
id="size-contain"
type="radio"
name="image-size"
value="contain"
data-ng-model="app.scene.image.size">
<span>Fit</span>
</label>
</li>
<li>
<label for="size-cover">
<input
id="size-cover"
type="radio"
name="image-size"
value="cover"
data-ng-model="app.scene.image.size">
<span>Fill</span>
</label>
</li>
</ul>
</pane>
<pane
data-heading="Sound"
id="sound-tab">
<div class="track-list">
<p
class="placeholder"
data-ui-if="app.scene.sound.tracks.length == 0">
No tracks added
</p>
<ol
data-ui-sortable="{ distance: 10, axis: 'y' }"
data-ng-model="app.scene.sound.tracks">
<li data-ng-repeat="track in app.scene.sound.tracks" class="primary-secondary">
<span
class="primary"
data-ng-class="{ unsupported: !trackIsPlayable(track) }">
{{track.name}}
</span>
<!-- See image section above for comments. -->
<div class="primary" data-ui-if="track.progress != 1.0">
<progress max="1.0" value="{{track.progress}}"></progress>
</div>
<button
type="button"
class="secondary"
data-ng-click="removeTrack(track, app.scene)">Remove</button>
<audio
data-ng-src="{{track.url}}"
preload="auto"></audio>
</li>
</ol>
<button
type="button"
data-ng-click="selectTracks(app.scene)">{{app.library.selectSoundFilesLabel}}</button>
</div>
<table>
<tr>
<th><label>Playback</label></th>
<td>
<ul class="control-list">
<li>
<label for="loop">
<input
id="loop"
type="checkbox"
data-ng-model="app.scene.sound.loop">
<span>Loop</span>
</label>
</li>
<li>
<label for="shuffle">
<input
id="shuffle"
type="checkbox"
data-ng-model="app.scene.sound.shuffle">
<span>Shuffle</span>
</label>
</li>
</ul>
</td>
</tr>
<tr>
<th>
<label for="volume">Volume</label>
</th>
<td>
<input
id="volume"
type="number"
min="0"
max="100"
step="10"
data-ng-model="app.scene.sound.volume">
<span class="note">%</span>
</td>
</tr>
<tr>
<th><label for="overlap" title="{{help.overlap}}">Overlap</label></th>
<td>
<input
id="overlap"
type="number"
min="0"
data-ng-model="app.scene.sound.overlap">
<span class="note">seconds</span>
</td>
</tr>
</table>
</pane>
<pane
data-heading="Text"
id="text-tab">
<div class="text-string">
<textarea
id="text"
rows="5"
placeholder="Text"
data-ng-model="app.scene.text.string"></textarea>
</div>
<ul class="control-list font-properties">
<li>
<input
id="font"
type="text"
placeholder="Font"
data-ng-model="app.scene.text.font">
</li>
<li>
<input
id="font-size"
type="number"
min="3"
max="30"
step="0.5"
data-ng-model="app.scene.text.size">
</li>
<li>
<label for="bold">
<input
id="bold"
type="checkbox"
data-ng-model="app.scene.text.bold">
<span><b>Bold</b></span>
</label>
</li>
<li>
<label for="italic">
<input
id="italic"
type="checkbox"
data-ng-model="app.scene.text.italic">
<span><i>Italic</i></span>
</label>
</li>
<li>
<input
id="font-color"
type="color"
data-ng-model="app.scene.text.color"
data-spectrum>
</li>
</ul>
<table>
<tr>
<th><label for="text-alignment">Align</label></th>
<td>
<select
id="text-alignment"
data-ng-model="app.scene.text.alignment">
<option value="left">Left</option>
<option value="center">Center</option>
<option value="right">Right</option>
</select>
</td>
</tr>
<tr>
<th><label for="text-padding">Padding</label></th>
<td>
<input
id="text-padding"
type="number"
min="0"
max="40"
step="2"
data-ng-model="app.scene.text.padding">
</td>
</tr>
</table>
</pane>
<pane
data-heading="Other"
id="other-tab">
<table>
<tr>
<th><label for="background-color">Background</label></th>
<td>
<input
id="background-color"
type="color"
data-ng-model="app.scene.background.color"
data-spectrum>
</td>
</tr>
<tr>
<th><label for="fade">Fade</label></th>
<td>
<ul class="control-list">
<li>
<input
id="fade"
type="number"
min="0"
data-ng-model="app.scene.fade.duration">
<span class="note">seconds</span>
</li>
<li>
<select data-ng-model="app.scene.fade.direction">
<option value="in out">In and out</option>
<option value="in">In</option>
<option value="out">Out</option>
</select>
</li>
</ul>
</td>
</tr>
</table>
</pane>
</tabs>
</div>
</div>
</pane>
<pane
id="playback-tab"
class="playback-view"
data-heading="Playback">
<div class="enter-fullscreen" data-ui-if="features.fullscreen">
<button type="button" data-fullscreen>Enter Fullscreen</button>
</div>
<ul class="playback-scene-list">
<li data-ng-repeat="scene in app.adventure.scenes">
<button data-ng-click="playScene(scene)">
<scene-preview data-scene="scene"></scene-preview>
<div class="label">
<span class="name">{{scene.name}}</span>
<span data-ui-if="scene.key" class="key">{{scene.key}}</span>
</div>
</button>
</li>
</ul>
<div class="stop-playback">
<button
type="button"
data-ng-click="stopScene()">Stop Scene</button>
</div>
</pane>
<pane
id="art-search-tab"
data-heading="Art Search">
<form class="primary-secondary">
<input
type="search"
class="primary"
placeholder="Search for digital art on DeviantArt"
data-ng-model="searchEngines.query">
<button
type="submit"
class="secondary"
tabindex="-1"
data-ng-click="searchEngines.deviantArt.execute(searchEngines.query)">Search DeviantArt</button>
</form>
<form class="primary-secondary">
<input
type="search"
class="primary"
placeholder="Search for concept art on Google"
data-ng-model="searchEngines.query">
<button
type="submit"
class="secondary"
tabindex="-1"
data-ng-click="searchEngines.google.execute(searchEngines.query)">Search Google</button>
</form>
</pane>
<pane
id="backup-tab"
class="backup-view"
data-heading="Backup">
<h2>Open Adventure From File</h2>
<file-button data-when-file-selected="addAdventureFromFile"></file-button>
<h2>Adventure Backup</h2>
<p>If you are unable to save your adventures due to network failure or some other error, use the buttons below to save them as files to your computer. You can later save them under "Open Adventure From File" above.</p>
<ul>
<li data-ng-repeat="adventure in app.library.adventures">
<button data-ng-click="app.library.saveAdventureToComputer(adventure)">{{adventure.title}}</button>
</li>
</ul>
</pane>
<pane
id="help-tab"
class="help-view"
data-heading="Help">
<ul class="table-of-contents">
<li><a href="#help-introduction">What RPG Ambience is</a></li>
<li><a href="#help-overview">How RPG Ambience works</a></li>
<li><a href="#help-playing-scenes">Playing scenes</a></li>
<li><a href="#help-stopping-scenes">Stopping scenes</a></li>
<li><a href="#help-saving-adventures">Saving adventures</a></li>
<li><a href="#help-adventure-backup">Adventure backup</a></li>
<li><a href="#help-finding-art">Where to find art</a></li>
<li><a href="#help-developers">For developers</a></li>
<li><a href="#help-contact">Contact</a></li>
<li><a href="#help-disclaimer">Disclaimer</a></li>
</ul>
<h2 id="help-introduction">What RPG Ambience is</h2>
<p>RPG Ambience is a media player that enables roleplayers to bring their sessions to life using sound and visuals. It is free software that runs directly in your browser.</p>
<h2 id="help-overview">How RPG Ambience works</h2>
<p>RPG Ambience is built around <dfn>scenes</dfn>. Scenes are made up of images, sounds, and text grouped together in any combination. Scenes are played and stopped using keyboard shortcuts. <dfn>Adventures</dfn> are collections of related scenes.</p>
<p>The interface of RPG Ambience consists of two parts: the editor and the player.</p>
<ul>
<li><dfn>The editor</dfn> (the left part of the screen) contains your adventures and the scenes in them, including controls to edit them.</li>
<li><dfn>The player</dfn> (the right part of the screen) is where the scenes in your adventures are played. The player can be opened in a separate window.</li>
</ul>
<h2 id="help-playing-scenes">Playing scenes</h2>
<p>There are four ways to play a scene:</p>
<ul>
<li>Click on the scene under the <em>Playback</em> tab.</li>
<li>Press the <button type="button">Play</button> button below the player.</li>
<li>Press the hotkey associated with the scene.</li>
<li>Type the scene's name and press <button type="button">Enter</button> on your keyboard.</li>
</ul>
<p>When starting a scene by typing its name, it's enough to type only the first few letters of the name.</p>
<h2 id="help-stopping-scenes">Stopping scenes</h2>
<p>There are three ways to stop a scene:</p>
<ul>
<li>Press the <button type="button">Stop</button> button under the <em>Playback</em> tab.</li>
<li>Press the <button type="button">Stop</button> button below the player.</li>
<li>Press <button type="button">Enter</button> on your keyboard.</li>
</ul>
<p>Using any of these commands will only stop the topmost scene that is currently playing. To also stop the scene below it, use the command again.</p>
<h2 id="help-saving-adventures">Saving adventures</h2>
<p>If you choose to save your adventures in Google Drive, all of the adventures that you create, including the sound and image files in them, are automatically saved on a regular basis and every time you close RPG Ambience.</p>
<h2 id="help-adventure-backup">Adventure backup</h2>
<p>If you are unable to save your adventures due to network failure or some other error, use the buttons under the <em>Backup</em> tab to save them as files to your computer. You can later upload them manually to Google Drive.</p>
<h2 id="help-finding-art">Where to find art</h2>
<p>If you want art to use in RPG Ambience but don't know where to begin looking, try using the search forms under the <em>Art Search</em> tab.</p>
<h2 id="help-developers">For developers</h2>
<p>RPG Ambience is licensed under the <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>. Its source code is available in the project's <a href="https://github.com/JakobKallin/RPG-Ambience">GitHub repository</a>.</p>
<h2 id="help-contact">Contact</h2>
<p>You can leave feedback about RPG Ambience in the following ways:</p>
<ul>
<li>Send an email to <a href="mailto:[email protected]">[email protected]</a>.</li>
<li>Post to <a href="https://groups.google.com/forum/#!forum/rpg-ambience">the project's Google Group</a>.</li>
<li>Post the project's <a href="https://plus.google.com/107989941817857897295">Google+ page</a> or <a href="https://www.facebook.com/RPGAmbience">Facebook page</a>.</li>
<li>Create an issue on <a href="https://github.com/JakobKallin/RPG-Ambience/issues">the project's GitHub page</a> (for bug reports).</li>
</ul>
<h2 id="help-disclaimer">Disclaimer</h2>
<p>While RPG Ambience does its best to save all of your data, data loss can still occur because of network failures or programming errors. Do not use RPG Ambience to store your only copy of important data.</p>
</pane>
</tabs>
<div
class="scene-player"
data-ng-show="!app.stageIsDetached">
<ambience-player
class="stage"
data-is-detached="app.stageIsDetached"
data-adventure="app.adventure"></ambience-player>
<ul class="playback-controls">
<li>
<button
type="button"
data-ng-click="playScene(app.scene)">Play</button>
</li>
<li>
<button
type="button"
data-ng-click="stopScene()">Stop</button>
</li>
</ul>
<ul class="player-controls">
<li>
<toggle-button
data-ng-model="app.stageIsDetached"
data-ng-true="Restore Player"
data-ng-false="Open Player in New Window"></toggle-button>
</li>
</ul>
</div>
</div>
</div>
<div class="splash" data-ui-if="app.library.adventuresAreBeingLoaded">
<div>
<p>Loading your adventures…</p>
<p class="note">If nothing happens, please allow pop-ups and refresh the page</p>
</div>
</div>
<div class="splash" data-ui-if="!libraryIsSelected">
<div>
<p>Where do you want to save your adventures?</p>
<ul class="buttons">
<li>
<button
type="button"
data-ng-click="selectLibrary(app.libraries.googleDrive)">
<img src="images/google-drive.png">
<span>Google Drive ™</span>
</button>
</li>
</ul>
<ul class="buttons">
<li>
<button
type="button"
data-ng-click="selectLibrary(app.libraries.local)">
<p>I just want to try RPG Ambience</p>
<p class="note">Your adventures will not be saved</p>
</button>
</li>
</ul>
</div>
</div>
<div id="splash" class="splash">
<div>
<p>Loading RPG Ambience…</p>
</div>
</div>
<div id="splash-unsupported" class="splash" style="display: none">
<div>
<p>Unfortunately, your browser does not support RPG Ambience.</p>
<p>RPG Ambience is known to work in the following browsers:</p>
<ul>
<li>Google Chrome 28</li>
<li>Internet Explorer 10</li>
<li>Mozilla Firefox 22</li>
</ul>
</div>
</div>
</body>
</html>