Spaces:
Running
Running
Prometech Computer Sciences Corp
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -743,6 +743,18 @@ font-family: var(--terminal-font) !important;
|
|
| 743 |
text-shadow: 0 0 4px rgba(0,255,65,0.35);
|
| 744 |
}
|
| 745 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 746 |
</style>
|
| 747 |
"""
|
| 748 |
|
|
@@ -754,6 +766,84 @@ with gr.Blocks(title="PrettyBird – Behavioral Consciousness Engine (BCE)") as
|
|
| 754 |
<div id="stars2"></div>
|
| 755 |
<div id="stars3"></div>
|
| 756 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 757 |
|
| 758 |
gr.Markdown(HEADER_MD)
|
| 759 |
|
|
|
|
| 743 |
text-shadow: 0 0 4px rgba(0,255,65,0.35);
|
| 744 |
}
|
| 745 |
|
| 746 |
+
/* Binary rain canvas (background layer) */
|
| 747 |
+
#pb-binary {
|
| 748 |
+
position: fixed;
|
| 749 |
+
inset: 0;
|
| 750 |
+
width: 100vw;
|
| 751 |
+
height: 100vh;
|
| 752 |
+
z-index: 1; /* stars: 0, binary: 1, ui: 2+ */
|
| 753 |
+
pointer-events: none;
|
| 754 |
+
opacity: 0.55; /* istersen 0.35-0.7 arası */
|
| 755 |
+
mix-blend-mode: screen; /* neon daha iyi durur */
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
</style>
|
| 759 |
"""
|
| 760 |
|
|
|
|
| 766 |
<div id="stars2"></div>
|
| 767 |
<div id="stars3"></div>
|
| 768 |
""")
|
| 769 |
+
gr.HTML("""
|
| 770 |
+
<canvas id="pb-binary"></canvas>
|
| 771 |
+
|
| 772 |
+
<script>
|
| 773 |
+
(() => {
|
| 774 |
+
const canvas = document.getElementById("pb-binary");
|
| 775 |
+
if (!canvas) return;
|
| 776 |
+
|
| 777 |
+
const ctx = canvas.getContext("2d", { alpha: true });
|
| 778 |
+
|
| 779 |
+
const COLORS = ["#118188", "#233cad"]; // camgöbeği + codeblue
|
| 780 |
+
const PHRASE = "CICIKUŞ PROMETECH DAVRANIŞSAL BİLİNÇ MOTORU";
|
| 781 |
+
|
| 782 |
+
let w, h, cols, drops, fontSize;
|
| 783 |
+
|
| 784 |
+
function resize() {
|
| 785 |
+
const dpr = Math.max(1, window.devicePixelRatio || 1);
|
| 786 |
+
w = Math.floor(window.innerWidth);
|
| 787 |
+
h = Math.floor(window.innerHeight);
|
| 788 |
+
|
| 789 |
+
canvas.style.width = w + "px";
|
| 790 |
+
canvas.style.height = h + "px";
|
| 791 |
+
canvas.width = Math.floor(w * dpr);
|
| 792 |
+
canvas.height = Math.floor(h * dpr);
|
| 793 |
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
| 794 |
+
|
| 795 |
+
fontSize = Math.max(14, Math.min(20, Math.floor(w / 80))); // responsive
|
| 796 |
+
cols = Math.floor(w / fontSize);
|
| 797 |
+
drops = new Array(cols).fill(0).map(() => Math.random() * h);
|
| 798 |
+
}
|
| 799 |
+
|
| 800 |
+
// random: 0/1 ve araya nadiren phrase’ten karakter
|
| 801 |
+
function pickChar() {
|
| 802 |
+
if (Math.random() < 0.06) {
|
| 803 |
+
return PHRASE[Math.floor(Math.random() * PHRASE.length)];
|
| 804 |
+
}
|
| 805 |
+
return Math.random() < 0.5 ? "0" : "1";
|
| 806 |
+
}
|
| 807 |
+
|
| 808 |
+
function draw() {
|
| 809 |
+
// fade (iz bırakma)
|
| 810 |
+
ctx.fillStyle = "rgba(0, 0, 0, 0.08)";
|
| 811 |
+
ctx.fillRect(0, 0, w, h);
|
| 812 |
+
|
| 813 |
+
ctx.font = fontSize + "px VT323, monospace";
|
| 814 |
+
|
| 815 |
+
for (let i = 0; i < cols; i++) {
|
| 816 |
+
const x = i * fontSize;
|
| 817 |
+
const y = drops[i];
|
| 818 |
+
|
| 819 |
+
const ch = pickChar();
|
| 820 |
+
const c = COLORS[(i + Math.floor(y / fontSize)) % COLORS.length];
|
| 821 |
+
|
| 822 |
+
// glow
|
| 823 |
+
ctx.shadowColor = c;
|
| 824 |
+
ctx.shadowBlur = 10;
|
| 825 |
+
|
| 826 |
+
ctx.fillStyle = c;
|
| 827 |
+
ctx.fillText(ch, x, y);
|
| 828 |
+
|
| 829 |
+
// hız (orta): 0.9–1.4 arası
|
| 830 |
+
drops[i] += fontSize * (0.9 + Math.random() * 0.5);
|
| 831 |
+
|
| 832 |
+
// reset
|
| 833 |
+
if (drops[i] > h + 50 && Math.random() > 0.985) {
|
| 834 |
+
drops[i] = -Math.random() * 300;
|
| 835 |
+
}
|
| 836 |
+
}
|
| 837 |
+
|
| 838 |
+
requestAnimationFrame(draw);
|
| 839 |
+
}
|
| 840 |
+
|
| 841 |
+
resize();
|
| 842 |
+
window.addEventListener("resize", resize, { passive: true });
|
| 843 |
+
draw();
|
| 844 |
+
})();
|
| 845 |
+
</script>
|
| 846 |
+
""")
|
| 847 |
|
| 848 |
gr.Markdown(HEADER_MD)
|
| 849 |
|