{"id":952,"date":"2026-08-05T14:09:09","date_gmt":"2026-08-05T12:09:09","guid":{"rendered":"https:\/\/iconoclaste.net\/blog\/?p=952"},"modified":"2026-08-07T05:05:25","modified_gmt":"2026-08-07T03:05:25","slug":"bebexplosion","status":"publish","type":"post","link":"https:\/\/iconoclaste.net\/blog\/2026\/08\/05\/bebexplosion\/","title":{"rendered":"B\u00e9bexplosion"},"content":{"rendered":"\n<div id=\"iconoclaste-bebexplosion\">\n  <img fetchpriority=\"high\" id=\"beb-img\"\n       src=\"https:\/\/iconoclaste.net\/blog\/wp-content\/uploads\/2026\/08\/bebexplosion_01.jpg\"\n       width=\"513\"\n       height=\"800\"\n       loading=\"eager\"\n       decoding=\"async\">\n\n  <audio id=\"beb-audio-exp\"\n         src=\"https:\/\/iconoclaste.net\/blog\/wp-content\/uploads\/2026\/08\/explosion.mp3\"\n         preload=\"auto\"\n         playsinline\n         style=\"display:none;\"><\/audio>\n\n  <div id=\"beb-counter\">Vous avez explos\u00e9 0 b\u00e9b\u00e9.<\/div>\n<\/div>\n\n<style>\n  #iconoclaste-bebexplosion {\n    position: relative;\n    max-width: 513px;\n    margin: 0 auto 1.5em;\n    line-height: 0;\n    background: transparent;\n    cursor: pointer;\n    -webkit-tap-highlight-color: transparent;\n    user-select: none;\n    -webkit-user-select: none;\n    text-align: center;\n  }\n\n  #iconoclaste-bebexplosion img {\n    display: block;\n    width: 100%;\n    height: auto;\n    vertical-align: top;\n    pointer-events: none;\n    background: #000;\n  }\n\n  #beb-counter {\n    display: inline-block;\n    line-height: 1.3;\n    margin-top: 12px;\n    padding: 6px 14px;\n    text-align: center;\n    font-family: \"Courier New\", Courier, monospace;\n    font-size: 14px;\n    color: #fff;\n    background: #ff33ff;\n    border-radius: 3px;\n    cursor: default;\n    pointer-events: none;\n  }\n<\/style>\n\n<script>\n(function () {\n  \"use strict\";\n\n  if (window.__iconoclasteBebExplosionInit) return;\n  window.__iconoclasteBebExplosionInit = true;\n\n  const BASE = \"https:\/\/iconoclaste.net\/blog\/wp-content\/uploads\/2026\/08\/bebexplosion_\";\n  const TOTAL = 13;\n  const SPEED = 65;\n  const LOOP_SPEED = 95;\n\n  const frames = [];\n  for (let i = 1; i <= TOTAL; i++) {\n    frames.push(BASE + String(i).padStart(2, \"0\") + \".jpg\");\n  }\n\n  function init() {\n    const container = document.getElementById(\"iconoclaste-bebexplosion\");\n    const img       = document.getElementById(\"beb-img\");\n    const audioExp  = document.getElementById(\"beb-audio-exp\");\n    const counterEl = document.getElementById(\"beb-counter\");\n\n    if (!container || !img || !audioExp) return;\n\n    let state = \"idle\";\n    let timer = null;\n    let explosionCount = 0;\n\n    frames.forEach(function (src) {\n      const preload = new Image();\n      preload.src = src;\n    });\n    try { audioExp.load(); } catch (e) {}\n\n    let audioUnlocked = false;\n    function unlockAudio() {\n      if (audioUnlocked) return;\n      audioUnlocked = true;\n      audioExp.muted = true;\n      audioExp.volume = 0;\n      const p = audioExp.play();\n      if (p !== undefined) {\n        p.then(function () {\n          audioExp.pause();\n          audioExp.currentTime = 0;\n          audioExp.muted = false;\n          audioExp.volume = 1;\n        }).catch(function () {\n          audioExp.muted = false;\n          audioExp.volume = 1;\n        });\n      } else {\n        audioExp.muted = false;\n        audioExp.volume = 1;\n      }\n    }\n\n    function updateCounter() {\n      if (!counterEl) return;\n      const label = explosionCount <= 1 ? \"b\u00e9b\u00e9\" : \"b\u00e9b\u00e9s\";\n      counterEl.textContent = \"Vous avez explos\u00e9 \" + explosionCount + \" \" + label + \".\";\n    }\n\n    function clearTimer() {\n      if (timer) {\n        clearInterval(timer);\n        timer = null;\n      }\n    }\n\n    function goIdle() {\n      clearTimer();\n      state = \"idle\";\n      img.src = frames[0];\n      container.classList.remove(\"playing\");\n    }\n\n    function startIntro() {\n      unlockAudio();\n\n      state = \"intro\";\n      container.classList.add(\"playing\");\n\n      let idx = 1;\n      img.src = frames[idx];\n\n      timer = setInterval(function () {\n        idx++;\n        if (idx > 3) {\n          clearTimer();\n          startLoop();\n        } else {\n          img.src = frames[idx];\n        }\n      }, SPEED);\n    }\n\n    function startLoop() {\n      state = \"looping\";\n\n      let toggle = 0;\n      img.src = frames[4];\n\n      timer = setInterval(function () {\n        toggle = 1 - toggle;\n        img.src = frames[4 + toggle];\n      }, LOOP_SPEED);\n    }\n\n    function startClimax() {\n      state = \"climax\";\n      clearTimer();\n\n      explosionCount++;\n      updateCounter();\n\n      try {\n        audioExp.muted = false;\n        audioExp.volume = 1;\n        audioExp.currentTime = 0;\n        const pExp = audioExp.play();\n        if (pExp !== undefined) {\n          pExp.catch(function () {\n            setTimeout(function () {\n              audioExp.currentTime = 0;\n              audioExp.play().catch(function () {});\n            }, 50);\n          });\n        }\n      } catch (e) {}\n\n      let idx = 6;\n      img.src = frames[idx];\n\n      timer = setInterval(function () {\n        idx++;\n        if (idx > 12) {\n          clearTimer();\n          goIdle();\n        } else {\n          img.src = frames[idx];\n        }\n      }, SPEED);\n    }\n\n    function onInteraction(e) {\n      if (e.type === \"touchend\") {\n        e.preventDefault();\n      }\n\n      if (state === \"idle\") {\n        startIntro();\n      } else if (state === \"looping\") {\n        startClimax();\n      }\n    }\n\n    container.addEventListener(\"click\", onInteraction);\n    container.addEventListener(\"touchend\", onInteraction, { passive: false });\n\n    goIdle();\n    updateCounter();\n  }\n\n  if (document.readyState === \"loading\") {\n    document.addEventListener(\"DOMContentLoaded\", init);\n  } else {\n    init();\n  }\n})();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Vous avez explos\u00e9 0 b\u00e9b\u00e9.<\/p>\n","protected":false},"author":1,"featured_media":986,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57,269],"tags":[286,280,285],"class_list":["post-952","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-animgif","category-experiences","tag-explosion","tag-inutile","tag-jouet-flash"],"_links":{"self":[{"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/posts\/952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/comments?post=952"}],"version-history":[{"count":7,"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/posts\/952\/revisions"}],"predecessor-version":[{"id":963,"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/posts\/952\/revisions\/963"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/media\/986"}],"wp:attachment":[{"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/media?parent=952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/categories?post=952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iconoclaste.net\/blog\/wp-json\/wp\/v2\/tags?post=952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}