SME
Pondelok, 25. január, 2021 | Meniny má GejzaKrížovkyKrížovky

Mafia II

Štvrtý vývojársky denník, v ktorom uvidíte aj zábery z hrania, sa venuje technológii hry.

Skryť Vypnúť reklamu
Skryť Vypnúť reklamu
Skryť Vypnúť reklamu

TOP videá

loadCSS('https://a.smedata.sk/artemis/bundles/smeartemisweb/sme/css/sme-main.css?r=235ab'); (function() { function hasAttribute(element, name) { if (typeof element.getAttribute(name) == 'undefined' || element.getAttribute(name) == null || element.getAttribute(name) == '') { return false; } return true; } function hasClass(element, cls) { return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1; } // scan and append dynamic height function scanDynamicElements() { // get items var scanElems = document.getElementsByClassName('js-dynamic-size'); if (scanElems.length == 0) { return false; } // loop items for (i = 0; i < scanElems.length; i++) { var scanedElem = scanElems[i]; // check if we got all data if (!hasAttribute(scanedElem, 'data-aspect-ratio')) { continue; } var ratio = scanedElem.getAttribute('data-aspect-ratio'); // get current width var width = parseInt(scanedElem.clientWidth); // set new height var w=window,d=document,e=d.documentElement,g=d.getElementsByTagName('body')[0],x=w.innerWidth||e.clientWidth||g.clientWidth; if ( hasClass(scanedElem, 'fbpost') || hasClass(scanedElem, 'fbhtml5post') || hasClass(scanedElem, 'instagram')) { // do not set the height if (x <= 380) { scanedElem.style.margin = '0 0 0 -10px'; } } else { scanedElem.style.height = Math.floor(width / ratio ) + 'px'; } // if 'alliframe' embed and iframe as child, set the height to that child if ( ( hasClass(scanedElem, 'alliframe') || hasClass(scanedElem, 'fbvideo') || hasClass(scanedElem, 'scribd') ) && scanedElem.firstChild.tagName == 'IFRAME') { scanedElem.firstChild.style.height = Math.floor(width / ratio ) + 'px'; } } resizeTriggered = false; } // trigger scan for dynamic height - on reload //scanDynamicElements(); setTimeout(function(){ scanDynamicElements(); }, 1300); var resizeTriggered = false; window.onresize = function() { if (resizeTriggered ) return; setTimeout(function(){ scanDynamicElements(); }, 300); resizeTriggered = true; }; })();