v22
This commit is contained in:
parent
e7e7912211
commit
3aa9d129f1
4 changed files with 19 additions and 10 deletions
Binary file not shown.
|
|
@ -138,13 +138,16 @@ base.data.materials.clear(); base.data.materials.append(mat)
|
||||||
# ----------------------------- Vorschau-Render -----------------------------
|
# ----------------------------- Vorschau-Render -----------------------------
|
||||||
try:
|
try:
|
||||||
sc = bpy.context.scene
|
sc = bpy.context.scene
|
||||||
|
# Meshy-tauglich: heller, neutraler Hintergrund + gleichmaessiges Licht
|
||||||
try:
|
try:
|
||||||
bg = next((n for n in sc.world.node_tree.nodes if n.type == 'BACKGROUND'), None)
|
bg = next((n for n in sc.world.node_tree.nodes if n.type == 'BACKGROUND'), None)
|
||||||
if bg: bg.inputs[1].default_value = 1.2
|
if bg:
|
||||||
|
bg.inputs[0].default_value = (0.92, 0.92, 0.92, 1)
|
||||||
|
bg.inputs[1].default_value = 1.6
|
||||||
except Exception: pass
|
except Exception: pass
|
||||||
bpy.ops.object.light_add(type='SUN', location=(140, -180, 260)); bpy.context.object.data.energy = 3.5
|
bpy.ops.object.light_add(type='SUN', location=(140, -180, 260)); bpy.context.object.data.energy = 2.2
|
||||||
bpy.ops.object.light_add(type='AREA', location=(-140, -60, 180))
|
bpy.ops.object.light_add(type='AREA', location=(-140, -60, 180))
|
||||||
bpy.context.object.data.energy = 6000; bpy.context.object.data.size = 280
|
bpy.context.object.data.energy = 9000; bpy.context.object.data.size = 320
|
||||||
bpy.ops.object.empty_add(location=(0, 0, 5)); tgt = bpy.context.object
|
bpy.ops.object.empty_add(location=(0, 0, 5)); tgt = bpy.context.object
|
||||||
bpy.ops.object.camera_add(location=(235, -295, 270)); cam = bpy.context.object
|
bpy.ops.object.camera_add(location=(235, -295, 270)); cam = bpy.context.object
|
||||||
cam.data.lens = 50
|
cam.data.lens = 50
|
||||||
|
|
|
||||||
|
|
@ -275,6 +275,8 @@
|
||||||
.slcDonut.clickable .donutSeg{cursor:pointer;transition:opacity .12s}
|
.slcDonut.clickable .donutSeg{cursor:pointer;transition:opacity .12s}
|
||||||
.slcDonut.clickable .donutSeg:hover{opacity:.82}
|
.slcDonut.clickable .donutSeg:hover{opacity:.82}
|
||||||
.slcDonut .donutSeg.bad{stroke:var(--bad);stroke-width:4}
|
.slcDonut .donutSeg.bad{stroke:var(--bad);stroke-width:4}
|
||||||
|
.akteItem.flash{animation:akteFlash 1.6s ease-out}
|
||||||
|
@keyframes akteFlash{0%,55%{background:#fff3bf}100%{background:transparent}}
|
||||||
.slcCap{font-size:11px;color:var(--muted);margin-top:4px;text-align:center}
|
.slcCap{font-size:11px;color:var(--muted);margin-top:4px;text-align:center}
|
||||||
@media(max-width:680px){.classifyTop{grid-template-columns:1fr}.classifyCard{max-width:300px;margin:0 auto}.classifyMain{margin-top:6px}}
|
@media(max-width:680px){.classifyTop{grid-template-columns:1fr}.classifyCard{max-width:300px;margin:0 auto}.classifyMain{margin-top:6px}}
|
||||||
.choice{text-align:left;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer;font-size:15px;font-weight:600}
|
.choice{text-align:left;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer;font-size:15px;font-weight:600}
|
||||||
|
|
@ -1106,7 +1108,7 @@ function defaultState(){
|
||||||
classifyDone:false, classifyWrong:null,
|
classifyDone:false, classifyWrong:null,
|
||||||
freigabeDone:false, freigabeWrong:null,
|
freigabeDone:false, freigabeWrong:null,
|
||||||
entryDone:false, entryWrong:null,
|
entryDone:false, entryWrong:null,
|
||||||
bonusReveal:false, bonusDone:{}, servicesDone:{},
|
bonusReveal:false, bonusDone:{}, servicesDone:{}, akteFlash:null,
|
||||||
index:0, stage:"discuss", quizIndex:0,
|
index:0, stage:"discuss", quizIndex:0,
|
||||||
actStep:0, actReveal:false, actDone:false, arteWrong:null,
|
actStep:0, actReveal:false, actDone:false, arteWrong:null,
|
||||||
picks:{}, done:{}, akte:{},
|
picks:{}, done:{}, akte:{},
|
||||||
|
|
@ -1173,7 +1175,7 @@ function renderAkte(){
|
||||||
html += `<h3>${PHASEN[ph].label}</h3>`;
|
html += `<h3>${PHASEN[ph].label}</h3>`;
|
||||||
group.forEach(a=>{
|
group.forEach(a=>{
|
||||||
const ok = !!have[a];
|
const ok = !!have[a];
|
||||||
html += `<div class="akteItem ${ok?'have':''}">
|
html += `<div class="akteItem ${ok?'have':''} ${a===S.akteFlash?'flash':''}">
|
||||||
<span class="aId" style="background:${PHASEN[ph].color}">${a}</span>
|
<span class="aId" style="background:${PHASEN[ph].color}">${a}</span>
|
||||||
<span class="aNm">${ARTEFAKTE[a].name}${ARTEFAKTE[a].live?' · <i>lebend</i>':''}</span>
|
<span class="aNm">${ARTEFAKTE[a].name}${ARTEFAKTE[a].live?' · <i>lebend</i>':''}</span>
|
||||||
<span class="aChk">${ok?'✓':'○'}</span>
|
<span class="aChk">${ok?'✓':'○'}</span>
|
||||||
|
|
@ -1558,6 +1560,7 @@ function enterStation(idx){
|
||||||
S.stage = STATIONEN[idx].typ==="gate" ? "gate" : "act";
|
S.stage = STATIONEN[idx].typ==="gate" ? "gate" : "act";
|
||||||
S.gatePick = null; S.quizIndex = 0;
|
S.gatePick = null; S.quizIndex = 0;
|
||||||
S.actStep = 0; S.actReveal = false; S.actDone = false; S.arteWrong = null;
|
S.actStep = 0; S.actReveal = false; S.actDone = false; S.arteWrong = null;
|
||||||
|
S.akteFlash = null; document.body.classList.remove("akteOpen");
|
||||||
}
|
}
|
||||||
function gateGoto(st, i){
|
function gateGoto(st, i){
|
||||||
S.done[st.id] = true;
|
S.done[st.id] = true;
|
||||||
|
|
@ -1811,13 +1814,16 @@ function wire(st){
|
||||||
const b = id => $("#"+id);
|
const b = id => $("#"+id);
|
||||||
if(b("actReveal")) b("actReveal").onclick = ()=>{ S.actReveal=true; save(); draw(); };
|
if(b("actReveal")) b("actReveal").onclick = ()=>{ S.actReveal=true; save(); draw(); };
|
||||||
if(b("actNext")) b("actNext").onclick = ()=>{ S.actStep=(S.actStep||0)+1; S.actReveal=false; save(); draw(); };
|
if(b("actNext")) b("actNext").onclick = ()=>{ S.actStep=(S.actStep||0)+1; S.actReveal=false; save(); draw(); };
|
||||||
if(b("actToDone")) b("actToDone").onclick = ()=>{ S.actDone=true; save(); draw(); };
|
if(b("actToDone")) b("actToDone").onclick = ()=>{ S.actDone=true; S.akteFlash=null; document.body.classList.remove("akteOpen"); save(); draw(); };
|
||||||
// Artefakt-Choice
|
// Artefakt-Choice
|
||||||
$("#panel").querySelectorAll(".arteChoice[data-a]").forEach(el=>{
|
$("#panel").querySelectorAll(".arteChoice[data-a]").forEach(el=>{
|
||||||
el.onclick = ()=>{ const a = el.dataset.a;
|
el.onclick = ()=>{ const a = el.dataset.a; let correct=false;
|
||||||
if(a === STATION_ARTEFAKT[st.id]){ S.arteWrong=null; addArtefakt(a); S.actReveal=true; }
|
if(a === STATION_ARTEFAKT[st.id]){ S.arteWrong=null; addArtefakt(a); S.akteFlash=a; S.actReveal=true; correct=true; }
|
||||||
else { S.arteWrong = a; }
|
else { S.arteWrong = a; }
|
||||||
save(); draw(); };
|
save(); draw();
|
||||||
|
// Akte-Seitenleiste oeffnen, damit man sieht, dass das Artefakt nun drin ist
|
||||||
|
if(correct){ document.body.classList.remove("navOpen","rollenOpen"); document.body.classList.add("akteOpen"); }
|
||||||
|
};
|
||||||
});
|
});
|
||||||
if(b("actBack")) b("actBack").onclick = ()=>{
|
if(b("actBack")) b("actBack").onclick = ()=>{
|
||||||
if(S.actDone){ S.actDone=false; }
|
if(S.actDone){ S.actDone=false; }
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* Service Worker — SLC-Workshop Companion (App-Shell, offline-first) */
|
/* Service Worker — SLC-Workshop Companion (App-Shell, offline-first) */
|
||||||
const CACHE = "slc-companion-v25";
|
const CACHE = "slc-companion-v26";
|
||||||
const SHELL = ["./", "index.html", "manifest.webmanifest", "icon.svg"];
|
const SHELL = ["./", "index.html", "manifest.webmanifest", "icon.svg"];
|
||||||
// Action-Card-Grafiken (cards/s<service>-c<change>.png) fuer Offline vorab cachen (alle 24).
|
// Action-Card-Grafiken (cards/s<service>-c<change>.png) fuer Offline vorab cachen (alle 24).
|
||||||
const CARDS = [];
|
const CARDS = [];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue