非公開 画面90度回転

    @@ -4,40 +4,41 @@ * @private */ javascript:(function(){ - const d=document, c=d.getElementById('game-container'), v=d.getElementById('gameCanvas'); - if(!c || !v) return; + const d=document, g=d.getElementById('game-container'), v=d.getElementById('gameCanvas'), a=(e,s)=>e&&Object.assign(e.style,s); + if(!g||!v)return; - /* 1. 枠の全画面化と中央配置 */ - const w=v.width, h=v.height, s=Math.min(window.innerWidth/h, window.innerHeight/w)*0.95; - Object.assign(c.style, {position:'fixed', top:'50%', left:'50%', width:w+'px', height:h+'px', maxWidth:'none', maxHeight:'none', zIndex:'9999', transform:`translate(-50%,-50%) rotate(90deg) scale(${s})`}); + /* 1. 枠の回転と配置 */ + const w=v.width, h=v.height, s=Math.min(window.innerWidth/h, window.innerHeight/w)*0.96; + a(g, {position:'fixed',top:'50%',left:'50%',width:w+'px',height:h+'px',maxWidth:'none',maxHeight:'none',zIndex:'9999',transform:`translate(-50%,-50%) rotate(90deg) scale(${s})`}); - /* 2. UI要素の逆回転と再配置 */ - const adj = (id, st) => { const e=d.getElementById(id)||d.querySelector(id); if(e) Object.assign(e.style, {position:'absolute', transform:'rotate(-90deg)', transformOrigin:'center center', ...st}); }; + /* 2. 各UIパーツを個別に「逆回転」させて正対化 */ + const r=(id,st)=>a(d.getElementById(id)||d.querySelector(id), {position:'absolute',transform:'rotate(-90deg)',transformOrigin:'center',...st}); - adj('minimap', {width:'140px', height:'140px', bottom:'60px', left:'60px', zIndex:'10010'}); - adj('.score-panel', {top:'20px', right:'-30px', scale:'0.7'}); - adj('leaderboard', {top:'20px', right:'20px', scale:'0.8'}); - - /* 3. モーダル類の一括正対化 */ - ['login-modal','result-modal','settings-modal','help-modal','history-modal'].forEach(id=>adj(id, {top:'50%', left:'50%', transform:'translate(-50%,-50%) rotate(-90deg)', width:'85vw', height:'85vh'})); - - /* 4. 操作方向の90度補正 */ - if (typeof sendInput === 'function' && !window._inH) { - window._inH = 1; const _o=window.sendInput; - window.sendInput = () => { const x=inputState.dx, y=inputState.dy; inputState.dx=y; inputState.dy=-x; _o(); inputState.dx=x; inputState.dy=y; }; + /* ミニマップ・モード表示・スコアを一括補正 */ + r('minimap', {width:'130px',height:'130px',bottom:'60px',left:'60px',zIndex:'10010'}); + r('mode-display', {top:'50%',left:'20px',width:h+'px',transform:'translate(-50%,0) rotate(-90deg)'}); + r('.score-panel', {top:'20px',right:'-30px',scale:'0.7'}); + r('leaderboard', {top:'20px',right:'20px',scale:'0.8'}); + + /* 3. モーダル類 */ + ['login-modal','result-modal','settings-modal','help-modal'].forEach(id=>r(id,{top:'50%',left:'50%',transform:'translate(-50%,-50%) rotate(-90deg)',width:'85vw',height:'85vh'})); + + /* 4. 操作補正(90度) */ + if(typeof sendInput==='function'&&!window._inH){ + window._inH=1; const o=window.sendInput; + window.sendInput=()=>{const x=inputState.dx,y=inputState.dy; inputState.dx=y; inputState.dy=-x; o(); inputState.dx=x; inputState.dy=y;}; } - /* 5. 名前・絵文字の水平維持とブースト判定補正 */ - if (!window._fT) { - window._fT = CanvasRenderingContext2D.prototype.fillText; - CanvasRenderingContext2D.prototype.fillText = function(t,x,y,m) { - if (Math.abs(x)<40 && Math.abs(y)<40 && !t.includes('%')) { - this.save(); this.rotate(-Math.PI/2); window._fT.call(this,t,-y,x,m); this.restore(); - } else window._fT.apply(this,arguments); + /* 5. プレイヤー名の水平維持 + ブースト判定補正 */ + if(!window._fT){ + window._fT=CanvasRenderingContext2D.prototype.fillText; + CanvasRenderingContext2D.prototype.fillText=function(t,x,y,m){ + if(Math.abs(x)<45&&Math.abs(y)<45&&!t.includes('%')){this.save();this.rotate(-Math.PI/2);window._fT.call(this,t,-y,x,m);this.restore();} + else window._fT.apply(this,arguments); }; - v.addEventListener('mousedown', e => { if(e.clientY > window.innerHeight*0.7) triggerBoost(); }, true); + /* 画面下部(見た目)のタップでブースト */ + v.addEventListener('mousedown',e=>{if(e.clientY>window.innerHeight*0.7)triggerBoost();},true); } - window.removeEventListener('resize', window.resize); d.body.style.backgroundColor='#000'; })();
  • /*
     * @title 画面90度回転
     * @description ゲーム画面を90度回転させるぞ 配信とかでも見えやすくなるはずだっ
     * @private
     */
    javascript:(function(){
        const d=document, g=d.getElementById('game-container'), v=d.getElementById('gameCanvas'), a=(e,s)=>e&&Object.assign(e.style,s);
        if(!g||!v)return;
    
        /* 1. 枠の回転と配置 */
        const w=v.width, h=v.height, s=Math.min(window.innerWidth/h, window.innerHeight/w)*0.96;
        a(g, {position:'fixed',top:'50%',left:'50%',width:w+'px',height:h+'px',maxWidth:'none',maxHeight:'none',zIndex:'9999',transform:`translate(-50%,-50%) rotate(90deg) scale(${s})`});
    
        /* 2. 各UIパーツを個別に「逆回転」させて正対化 */
        const r=(id,st)=>a(d.getElementById(id)||d.querySelector(id), {position:'absolute',transform:'rotate(-90deg)',transformOrigin:'center',...st});
        
        /* ミニマップ・モード表示・スコアを一括補正 */
        r('minimap', {width:'130px',height:'130px',bottom:'60px',left:'60px',zIndex:'10010'});
        r('mode-display', {top:'50%',left:'20px',width:h+'px',transform:'translate(-50%,0) rotate(-90deg)'});
        r('.score-panel', {top:'20px',right:'-30px',scale:'0.7'});
        r('leaderboard', {top:'20px',right:'20px',scale:'0.8'});
    
        /* 3. モーダル類 */
        ['login-modal','result-modal','settings-modal','help-modal'].forEach(id=>r(id,{top:'50%',left:'50%',transform:'translate(-50%,-50%) rotate(-90deg)',width:'85vw',height:'85vh'}));
    
        /* 4. 操作補正(90度) */
        if(typeof sendInput==='function'&&!window._inH){
            window._inH=1; const o=window.sendInput;
            window.sendInput=()=>{const x=inputState.dx,y=inputState.dy; inputState.dx=y; inputState.dy=-x; o(); inputState.dx=x; inputState.dy=y;};
        }
    
        /* 5. プレイヤー名の水平維持 + ブースト判定補正 */
        if(!window._fT){
            window._fT=CanvasRenderingContext2D.prototype.fillText;
            CanvasRenderingContext2D.prototype.fillText=function(t,x,y,m){
                if(Math.abs(x)<45&&Math.abs(y)<45&&!t.includes('%')){this.save();this.rotate(-Math.PI/2);window._fT.call(this,t,-y,x,m);this.restore();}
                else window._fT.apply(this,arguments);
            };
            /* 画面下部(見た目)のタップでブースト */
            v.addEventListener('mousedown',e=>{if(e.clientY>window.innerHeight*0.7)triggerBoost();},true);
        }
        window.removeEventListener('resize', window.resize);
        d.body.style.backgroundColor='#000';
    })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2026/05/07 21:37:28 - 4 hours ago
  2. 2026/05/07 21:36:45 - 4 hours ago
  3. 2026/05/07 21:35:51 - 4 hours ago
  4. 2026/05/07 21:33:04 - 4 hours ago
  5. 2026/05/07 21:32:51 - 4 hours ago
  6. 2026/05/07 21:32:34 - 4 hours ago
  7. 2026/05/07 21:31:47 - 4 hours ago
  8. 2026/05/07 21:30:08 - 4 hours ago
  9. 2026/05/07 21:29:42 - 4 hours ago
  10. 2026/05/07 21:29:00 - 4 hours ago
  11. 2026/05/07 21:28:35 - 4 hours ago
  12. 2026/05/07 21:28:13 - 4 hours ago
  13. 2026/05/07 21:27:47 - 4 hours ago
  14. 2026/05/07 21:26:34 - 4 hours ago
  15. 2026/05/07 21:25:12 - 4 hours ago
  16. 2026/05/07 21:24:27 - 4 hours ago
  17. 2026/05/07 21:23:48 - 4 hours ago
  18. 2026/05/07 21:19:16 - 4 hours ago
  19. 2026/05/07 21:18:28 - 4 hours ago
  20. 2026/05/07 21:18:05 - 4 hours ago
  21. 2026/05/07 21:16:56 - 4 hours ago
  22. 2026/05/07 21:15:57 - 4 hours ago
  23. 2026/05/07 21:13:29 - 4 hours ago
  24. 2026/05/07 21:12:09 - 4 hours ago
  25. 2026/05/07 21:11:27 - 4 hours ago
  26. 2026/05/07 21:10:51 - 4 hours ago
  27. 2026/05/07 21:10:17 - 4 hours ago
  28. 2026/05/07 21:09:44 - 4 hours ago
  29. 2026/05/07 21:06:24 - 4 hours ago
  30. 2026/05/07 21:04:49 - 4 hours ago
  31. 2026/05/07 20:58:38 - 4 hours ago
  32. 2026/05/07 20:55:41 - 5 hours ago
  33. 2026/05/07 20:44:19 - 5 hours ago
  34. 2026/05/07 20:33:33 - 5 hours ago
  35. 2026/05/07 20:27:57 - 5 hours ago
  36. 2026/05/07 20:21:47 - 5 hours ago
  37. 2026/05/07 20:15:17 - 5 hours ago
  38. 2026/05/07 20:07:46 - 5 hours ago
  39. 2026/05/07 19:45:31 - 6 hours ago
  40. 2026/05/07 19:36:35 - 6 hours ago
  41. 2026/05/07 19:32:05 - 6 hours ago
  42. 2026/05/07 19:30:04 - 6 hours ago
  43. 2026/05/07 19:22:33 - 6 hours ago
  44. 2026/05/07 14:18:43 - 11 hours ago