synchro du labo (0bf0da65) : app.blade.php, README.md
This commit is contained in:
21
README.md
Normal file
21
README.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# 🖱 Souris
|
||||||
|
|
||||||
|
Le wormion suit ton geste — viz souris (coords, traînée, clics). 100% local.
|
||||||
|
|
||||||
|
| | |
|
||||||
|
| --- | --- |
|
||||||
|
| id | `souris` |
|
||||||
|
| fournit | `pointer-in` |
|
||||||
|
| bions qu'il nomme | `jOSApps` |
|
||||||
|
| fichiers | `app.blade.php` |
|
||||||
|
| dans le labo | `resources/views/ploxions/souris/` (dépôt `my_website2`) |
|
||||||
|
|
||||||
|
## Contribuer
|
||||||
|
|
||||||
|
- **Dans le xer** : https://labo.j0bot.ch/px/atelier?ploxion=souris — prends-le, modifie-le, vois-le tourner, « ⧗ envoyer le tsoin ».
|
||||||
|
- **Dans VS Code** : `xb prendre souris` (ou l'extension xerboxion › ⇩ Prendre), puis ⧗ Envoyer.
|
||||||
|
- Le chemin complet : https://labo.j0bot.ch/px/contribuer
|
||||||
|
|
||||||
|
Ce dépôt est un **miroir** du labo (synchronisé par `bin/ploxions-forge.mjs`, depuis le commit `0bf0da65`) : une modif se propose par un tsoin ou une branche du labo, pas directement ici.
|
||||||
|
|
||||||
|
© 2026 chill-tekk · ne pas nuire
|
||||||
45
app.blade.php
Normal file
45
app.blade.php
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{{-- PL0XI0N Souris — entrée WORMION : visualise le mouvement + les clics dans
|
||||||
|
la fenêtre (coords live, traînée, ripples de clic). 100% client-side.
|
||||||
|
Droit au silence : unmount retire les écouteurs + l'animation. --}}
|
||||||
|
<style>
|
||||||
|
.pms{position:relative;height:100%;background:radial-gradient(circle at 50% 40%,#0a1410,#04060a);color:rgba(220,240,235,.92);font-family:ui-sans-serif,system-ui,sans-serif;overflow:hidden;cursor:crosshair;touch-action:none}
|
||||||
|
.pms__hint{position:absolute;top:14px;left:0;right:0;text-align:center;font-size:.82rem;color:rgba(180,210,200,.55);pointer-events:none}
|
||||||
|
.pms__hud{position:absolute;bottom:12px;left:14px;font-family:'Share Tech Mono',ui-monospace,monospace;font-size:.82rem;color:rgba(0,255,159,.85);pointer-events:none}
|
||||||
|
.pms__cursor{position:absolute;width:16px;height:16px;margin:-8px 0 0 -8px;border:2px solid rgba(0,255,159,.9);border-radius:50%;box-shadow:0 0 12px rgba(0,255,159,.6);pointer-events:none;transition:transform .04s linear}
|
||||||
|
.pms__dot{position:absolute;width:6px;height:6px;margin:-3px 0 0 -3px;border-radius:50%;background:rgba(0,200,255,.7);pointer-events:none;animation:pmsfade 1s ease forwards}
|
||||||
|
@keyframes pmsfade{from{opacity:.7;transform:scale(1)}to{opacity:0;transform:scale(.3)}}
|
||||||
|
.pms__ring{position:absolute;border:2px solid rgba(0,255,159,.8);border-radius:50%;margin:-6px 0 0 -6px;width:12px;height:12px;pointer-events:none;animation:pmsring .5s ease-out forwards}
|
||||||
|
@keyframes pmsring{from{opacity:.9;transform:scale(.4)}to{opacity:0;transform:scale(5)}}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
(function(){
|
||||||
|
'use strict';
|
||||||
|
var ID='souris';
|
||||||
|
var LIVE=null; // posé au mount : { pos }
|
||||||
|
function describe(){
|
||||||
|
var p=LIVE?LIVE.pos():null;
|
||||||
|
return { v:1, id:ID, title:'Souris', icon:'🖱', items:[
|
||||||
|
{ p:1, kind:'stat', label:'position', value:p?('x '+Math.round(p.x)+' · y '+Math.round(p.y)):'aucun mouvement' }
|
||||||
|
] };
|
||||||
|
}
|
||||||
|
function mount(container){
|
||||||
|
container.innerHTML='<div class="pms" data-root tabindex="0">'
|
||||||
|
+'<div class="pms__hint">🖱 Souris — le wormion suit ton geste. Bouge / clique ici.</div>'
|
||||||
|
+'<div class="pms__cursor" data-cur style="display:none"></div>'
|
||||||
|
+'<div class="pms__hud" data-hud>x — · y — · btn —</div></div>';
|
||||||
|
var root=container.querySelector('[data-root]'), cur=container.querySelector('[data-cur]'), hud=container.querySelector('[data-hud]');
|
||||||
|
var last=0, lastPos=null;
|
||||||
|
function pos(e){ var r=root.getBoundingClientRect(); return {x:e.clientX-r.left,y:e.clientY-r.top}; }
|
||||||
|
function onMove(e){ var p=pos(e); lastPos=p; cur.style.display='block'; cur.style.transform='translate('+p.x+'px,'+p.y+'px)';
|
||||||
|
hud.textContent='x '+Math.round(p.x)+' · y '+Math.round(p.y)+' · btn '+(e.buttons||'—');
|
||||||
|
var now=Date.now(); if(now-last>28){ last=now; var d=document.createElement('div'); d.className='pms__dot'; d.style.left=p.x+'px'; d.style.top=p.y+'px'; root.appendChild(d); setTimeout(function(){d.remove();},1000); } }
|
||||||
|
function onDown(e){ var p=pos(e); var r=document.createElement('div'); r.className='pms__ring'; r.style.left=p.x+'px'; r.style.top=p.y+'px'; root.appendChild(r); setTimeout(function(){r.remove();},500); }
|
||||||
|
root.addEventListener('pointermove',onMove);
|
||||||
|
root.addEventListener('pointerdown',onDown);
|
||||||
|
LIVE={ pos:function(){return lastPos;} };
|
||||||
|
return { unmount:function(){ LIVE=null; root.removeEventListener('pointermove',onMove); root.removeEventListener('pointerdown',onDown); container.innerHTML=''; } };
|
||||||
|
}
|
||||||
|
window.jOSApps=window.jOSApps||{};
|
||||||
|
window.jOSApps[ID]={manifest:{id:ID,name:'Souris',icon:'🖱'},mount:mount,describe:describe};
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user