Masaya tiklanabilir sahte fatura yigini + tik davranisi + cache surumu
- Kaan onunde masada 3D "Faturalar" kagit yigini; tiklaninca "Alper Tarafindan Duzenlenen Sahte faturalar" sayfasi aciliyor - Karakterlere tek tik: o kisinin siradaki sozune atlar - data.js cache-busting surumu ?v=20260704e'ye yukseltildi Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
122790ac91
commit
577f8bd61a
+34
-4
@@ -100,7 +100,7 @@ function showLoadErr(msg){
|
||||
|
||||
<script src="three.min.js?v=20260704d" onerror="showLoadErr('three.min.js (3D motoru) yüklenemedi')"></script>
|
||||
<script src="OrbitControls.js?v=20260704d" onerror="showLoadErr('OrbitControls.js (kamera kontrolü) yüklenemedi')"></script>
|
||||
<script src="data.js?v=20260704d" onerror="showLoadErr('data.js (toplantı verisi) yüklenemedi')"></script>
|
||||
<script src="data.js?v=20260704e" onerror="showLoadErr('data.js (toplantı verisi) yüklenemedi')"></script>
|
||||
<script>
|
||||
if(typeof MEET==='undefined'){ showLoadErr('data.js yüklenemedi veya bozuk (MEET tanımsız)'); throw new Error('MEET tanımsız — data.js yüklenemedi'); }
|
||||
const ROLES=MEET.roles, TL=MEET.TL;
|
||||
@@ -160,6 +160,28 @@ const rec=new THREE.Mesh(new THREE.BoxGeometry(0.5,0.12,0.28),new THREE.MeshStan
|
||||
rec.position.set(0,TABLE_H+0.14,0); scene.add(rec);
|
||||
const recLbl=makeLabel("🔴 KAYIT","#ff6666",0.55); recLbl.position.set(0,TABLE_H+0.55,0); scene.add(recLbl);
|
||||
|
||||
const paperGroup=new THREE.Group();
|
||||
const paperMat=new THREE.MeshStandardMaterial({color:0xf2ede1,roughness:0.85});
|
||||
const paperLineMat=new THREE.MeshStandardMaterial({color:0xcfc8b8,roughness:0.9});
|
||||
const A5_W=0.42, A5_H=0.6, A5_T=0.006;
|
||||
for(let i=0;i<5;i++){
|
||||
const sheet=new THREE.Mesh(new THREE.BoxGeometry(A5_W,A5_T,A5_H),paperMat);
|
||||
sheet.position.set((Math.random()-0.5)*0.03,TABLE_H+0.08+i*(A5_T+0.001),(Math.random()-0.5)*0.03);
|
||||
sheet.rotation.y=(Math.random()-0.5)*0.28;
|
||||
paperGroup.add(sheet);
|
||||
if(i===4){
|
||||
for(let l=0;l<4;l++){
|
||||
const line=new THREE.Mesh(new THREE.BoxGeometry(A5_W*0.72,0.001,0.012),paperLineMat);
|
||||
line.position.set(sheet.position.x,sheet.position.y+A5_T/2+0.001,sheet.position.z-A5_H*0.28+l*0.12);
|
||||
line.rotation.y=sheet.rotation.y;
|
||||
paperGroup.add(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
paperGroup.position.set(POS3D["Kaan"].x,0,1.35);
|
||||
scene.add(paperGroup);
|
||||
const paperLbl=makeLabel("📄 Faturalar","#e0b400",0.42); paperLbl.position.set(POS3D["Kaan"].x,TABLE_H+0.42,1.35); scene.add(paperLbl);
|
||||
|
||||
const SKIN=0xe8b98c, chars={};
|
||||
function makeChar(role){
|
||||
const p=POS3D[role], col=new THREE.Color(ROLES[role].renk);
|
||||
@@ -285,12 +307,20 @@ document.getElementById('langToggle').addEventListener('click',function(e){
|
||||
|
||||
const roleNextIdx={};
|
||||
function linesForRole(role){ return curTL().filter(function(x){return x.rol===role;}); }
|
||||
function openFakeInvoicePage(){
|
||||
const w=window.open('','_blank');
|
||||
if(!w)return;
|
||||
w.document.title='Sahte Faturalar';
|
||||
w.document.body.style.cssText='background:#0d1117;color:#e6edf3;font-family:"Segoe UI",system-ui,sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;text-align:center;font-size:22px;font-weight:600';
|
||||
w.document.body.textContent='Alper Tarafından Duzenlenen Sahte faturalar';
|
||||
}
|
||||
renderer.domElement.addEventListener('click',function(ev){
|
||||
const rc=new THREE.Raycaster(), m=new THREE.Vector2((ev.clientX/innerWidth)*2-1,-(ev.clientY/innerHeight)*2+1);
|
||||
rc.setFromCamera(m,camera);
|
||||
const gs=Object.keys(chars).map(function(r){return chars[r].grp;});
|
||||
const hit=rc.intersectObjects(gs,true)[0]; if(!hit)return;
|
||||
let g=hit.object; while(g.parent&&gs.indexOf(g)<0)g=g.parent;
|
||||
const clickable=Object.keys(chars).map(function(r){return chars[r].grp;}).concat([paperGroup]);
|
||||
const hit=rc.intersectObjects(clickable,true)[0]; if(!hit)return;
|
||||
let g=hit.object; while(g.parent&&clickable.indexOf(g)<0)g=g.parent;
|
||||
if(g===paperGroup){ openFakeInvoicePage(); return; }
|
||||
const role=Object.keys(chars).find(function(r){return chars[r].grp===g;}); if(!role)return;
|
||||
const lines=linesForRole(role); if(!lines.length)return;
|
||||
let idx=roleNextIdx[role]||0;
|
||||
|
||||
Reference in New Issue
Block a user