aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2019-12-23 21:09:34 +0100
committersD <stoned@derpymail.org>2019-12-23 21:09:34 +0100
commit7e4b235a28788cd7c30df263e957aecea6172f2c (patch)
tree43835004461651d71bcf3a31cdcb49d28a093375
parent0672207c0fc926f062a937ddd5828fa2999aed60 (diff)
document tick() part1
-rw-r--r--webAO/client.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 2346041..4a1d743 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1258,6 +1258,32 @@ class Viewport {
/**
* Updates the chatbox based on the given text.
*
+ * OK, here's the documentation on how this works:
+ *
+ * 1 flip
+ * For whatever reason it starts off by checking if the character is flipped, every time this is called
+ * This is probably a TODO to move this somewhere else
+ *
+ * 2 flip
+ * If the server supports it, the same is done for the paired character
+ * Both of these should probably be moved to say()
+ *
+ * 3 _animating
+ * If we're not done with this characters animation, i.e. his text isn't fully there, set a timeout for the next tick/step to happen
+ *
+ * 4 isnew
+ * This is run once for every new message
+ * The chatbox and evidence is hidden (TODO even if there is no shout)
+ * and if there is a shout it's audio starts playing
+ *
+ * 5 startpreanim
+ * If the shout timer is over it starts with the preanim
+ * The first thing it checks for is the shake effect (TODO on client this is handled by the @ symbol and not a flag )
+ * Then is the flash/realization effect
+ * After that, the shout image is set to a transparent placeholder gif (TODO just hide it with CSS)
+ * and the main characters preanim gif is loaded
+ * If pairing is supported the paired character will just stand around with his idle sprite
+ *
* XXX: This relies on a global variable `this.chatmsg`!
*/
tick() {