Shtille's blog A development blog

Logotype SVG creation

In 2018 I’ve already described a logotype model creation. Now I have a need to make a SVG image logotype for site icon. Basic parameters Torus is described by two radiuses R and r, where: \[R = 10*r\] Center of the first torus: \[C_1 = (0, 0)\] Center of the second torus: \[C_2 = (-R\frac{\sqrt{3}}{2}, -R\frac{1}{2})\] Hemitoruses are ... Read more

Fancy overlay over content

Let’s assume we need to get fancy shadow above our child nodes that will look like decoration over content and do not respond on any pointer events. This is easy achievable with ::before node, generated by CSS. HTML: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-w... Read more

Replace map keys function

I’ve made a function to replace Map keys with specific pattern defined by another Map class. /** * Replaces keys with specific pattern. * * @param {Map} map The replace map. Contains (old key, new key) pairs. */ Map.prototype.replaceKeys = function(map) { if (map.size == 0) return; let newMap = new Map(); // At first add changed item... Read more

Map enumeration performance comparison

We need compare two methods of map enumeration: via forEach method via entries enumeration Code setup will be: const N = 100000; var m = new Map(); for (var i = 0; i < 10; ++i) m.set(i,i); The first case: var x = 0; m.forEach(function(value){ x += value; }); The second case: var x = 0; for (const [key,value] of m.entries()) { x ... Read more

ESO rotation choice

Making simple math model for ESO rotation Introduction Rotation is sequence of used skills. We are interested in choosing the best skill rotation to achive the maximum damage per second (DPS), and kill target as fast as possible. Thus we take following assumptions: we ignore light attack weaving, since it has no influence on rotation we i... Read more