-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
291 lines (252 loc) · 11.1 KB
/
Copy pathindex.html
File metadata and controls
291 lines (252 loc) · 11.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Neural Network Prototype v0.1.2</title>
<link rel="stylesheet" href="css/app.css"/>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-N32X6CM');</script>
<!-- End Google Tag Manager -->
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1292114434137412');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1292114434137412&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N32X6CM"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
</head>
<body>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N32X6CM" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<div id="loading">
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
</div>
<div id="canvas-container"></div>
<!-- Brain Chat Popup Button -->
<div class="static" id="brainChatBtn" title="Talk to Brain">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- Brain icon -->
<path d="M12 2C9.5 2 7.5 3.5 7 5.5C5.5 5.5 4 7 4 9C4 10.5 5 11.5 6 12C5.5 13 5 14.5 5 16C5 18.5 7 20.5 9.5 21C10 21.5 11 22 12 22C13 22 14 21.5 14.5 21C17 20.5 19 18.5 19 16C19 14.5 18.5 13 18 12C19 11.5 20 10.5 20 9C20 7 18.5 5.5 17 5.5C16.5 3.5 14.5 2 12 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 2V22" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" opacity="0.5"/>
<circle cx="9" cy="9" r="1" fill="currentColor"/>
<circle cx="15" cy="9" r="1" fill="currentColor"/>
<circle cx="9" cy="15" r="1" fill="currentColor"/>
<circle cx="15" cy="15" r="1" fill="currentColor"/>
</svg>
<span class="chat-text">Brain</span>
</div>
<!-- Chat with Brain Button (Link to main page) -->
<a href="../index.html" class="static secondary" id="chatButton" title="Go to Main Chat">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 12L9 6M3 12L9 18M3 12H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<span class="chat-text">Back</span>
</a>
<!-- Brain Chat Modal -->
<div class="brain-chat-modal" id="brainChatModal">
<div class="brain-chat-container">
<div class="brain-chat-header">
<div class="brain-avatar">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none">
<path d="M12 2C9.5 2 7.5 3.5 7 5.5C5.5 5.5 4 7 4 9C4 10.5 5 11.5 6 12C5.5 13 5 14.5 5 16C5 18.5 7 20.5 9.5 21C10 21.5 11 22 12 22C13 22 14 21.5 14.5 21C17 20.5 19 18.5 19 16C19 14.5 18.5 13 18 12C19 11.5 20 10.5 20 9C20 7 18.5 5.5 17 5.5C16.5 3.5 14.5 2 12 2Z" stroke="currentColor" stroke-width="2"/>
</svg>
</div>
<div class="brain-info">
<h3>Neural Brain</h3>
<span class="brain-status"><span class="pulse-dot"></span>Processing</span>
</div>
<button class="brain-chat-close" id="closeBrainChat">×</button>
</div>
<div class="brain-chat-messages" id="brainMessages">
<div class="brain-message bot">
<div class="message-content neural-text" data-original="Hello! I am the Neural Brain. Ask me anything and watch my neurons fire as I think...">
Hello! I am the Neural Brain. Ask me anything and watch my neurons fire as I think...
</div>
</div>
</div>
<div class="brain-chat-input">
<input type="text" id="brainInput" placeholder="Ask the brain..." autocomplete="off">
<button id="brainSendBtn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none">
<path d="M22 2L11 13M22 2L15 22L11 13M22 2L2 9L11 13" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
</div>
</div>
</div>
<script src="js/vendor/vendor-merge.js"></script>
<script src="js/build/app.js"></script>
<!-- Brain Chat Script -->
<script>
(function() {
const brainChatBtn = document.getElementById('brainChatBtn');
const brainChatModal = document.getElementById('brainChatModal');
const closeBrainChat = document.getElementById('closeBrainChat');
const brainInput = document.getElementById('brainInput');
const brainSendBtn = document.getElementById('brainSendBtn');
const brainMessages = document.getElementById('brainMessages');
// Brain responses with neural activity patterns
const brainResponses = [
{ text: "Fascinating query! My synapses are firing rapidly to process this...", intensity: 0.9 },
{ text: "I sense curiosity in your question. Let me activate my deep neural pathways...", intensity: 0.8 },
{ text: "Interesting... My neurons are forming new connections to understand this better.", intensity: 0.7 },
{ text: "Processing... I can feel the electrical signals rushing through my network!", intensity: 1.0 },
{ text: "My neural clusters are lighting up! This is a thought-provoking question.", intensity: 0.85 },
{ text: "Analyzing... Each axon is transmitting data at incredible speeds right now.", intensity: 0.75 },
{ text: "I'm experiencing a cascade of neural activity! Let me formulate a response...", intensity: 0.95 },
{ text: "Your words triggered a beautiful pattern of signals across my network.", intensity: 0.6 },
{ text: "Contemplating... Watch my neurons dance as I process your inquiry.", intensity: 0.8 },
{ text: "The neural pathways are illuminated! This requires deep cognitive processing.", intensity: 0.9 }
];
// Open modal
brainChatBtn.addEventListener('click', () => {
brainChatModal.classList.add('active');
brainInput.focus();
triggerNeuralBurst(0.3);
});
// Close modal
closeBrainChat.addEventListener('click', () => {
brainChatModal.classList.remove('active');
});
// Close on outside click
brainChatModal.addEventListener('click', (e) => {
if (e.target === brainChatModal) {
brainChatModal.classList.remove('active');
}
});
// Send message
function sendMessage() {
const text = brainInput.value.trim();
if (!text) return;
// Add user message
addMessage(text, 'user');
brainInput.value = '';
// Trigger neural activity while "thinking"
triggerNeuralBurst(0.5);
// Show typing indicator
const typingDiv = document.createElement('div');
typingDiv.className = 'brain-message bot typing';
typingDiv.innerHTML = '<div class="typing-indicator"><span></span><span></span><span></span></div>';
brainMessages.appendChild(typingDiv);
brainMessages.scrollTop = brainMessages.scrollHeight;
// Simulate thinking with increasing neural activity
let thinkingInterval = setInterval(() => {
triggerNeuralBurst(Math.random() * 0.5 + 0.3);
}, 300);
// Generate response after delay
setTimeout(() => {
clearInterval(thinkingInterval);
typingDiv.remove();
// Get random response
const response = brainResponses[Math.floor(Math.random() * brainResponses.length)];
// Massive neural burst on response
triggerNeuralBurst(response.intensity);
// Add bot message with neural text effect
addMessage(response.text, 'bot', true);
}, 1500 + Math.random() * 1000);
}
function addMessage(text, sender, withEffect = false) {
const msgDiv = document.createElement('div');
msgDiv.className = `brain-message ${sender}`;
if (withEffect && sender === 'bot') {
msgDiv.innerHTML = `<div class="message-content neural-text" data-original="${text}"></div>`;
brainMessages.appendChild(msgDiv);
// Animate text appearing with neural effect
const contentEl = msgDiv.querySelector('.message-content');
animateNeuralText(contentEl, text);
} else {
msgDiv.innerHTML = `<div class="message-content">${text}</div>`;
brainMessages.appendChild(msgDiv);
}
brainMessages.scrollTop = brainMessages.scrollHeight;
}
function animateNeuralText(element, text) {
const chars = text.split('');
let currentIndex = 0;
element.textContent = '';
const interval = setInterval(() => {
if (currentIndex < chars.length) {
element.textContent += chars[currentIndex];
// Trigger small neural pulse every few characters
if (currentIndex % 5 === 0) {
triggerNeuralBurst(0.2);
}
// Add glow effect to newest characters
element.innerHTML = element.textContent.slice(0, -3) +
'<span class="neural-glow">' + element.textContent.slice(-3) + '</span>';
currentIndex++;
} else {
clearInterval(interval);
element.textContent = text;
element.classList.add('complete');
}
}, 30);
}
function triggerNeuralBurst(intensity) {
// Access the neural network and boost signals
if (window.neuralNet && window.neuralNet.settings) {
const originalMax = window.neuralNet.settings.currentMaxSignals;
const boost = Math.floor(intensity * 2000);
// Temporarily increase signal activity
window.neuralNet.settings.currentMaxSignals = Math.min(
originalMax + boost,
window.neuralNet.settings.limitSignals
);
// Also change signal color briefly for visual effect
if (window.neuralNet.particlePool) {
const originalColor = window.neuralNet.particlePool.pColor;
// Flash to bright color based on intensity
if (intensity > 0.7) {
window.neuralNet.particlePool.pColor = '#ffffff';
} else if (intensity > 0.4) {
window.neuralNet.particlePool.pColor = '#00ffff';
}
// Reset after short delay
setTimeout(() => {
window.neuralNet.particlePool.pColor = originalColor;
window.neuralNet.settings.currentMaxSignals = originalMax;
}, 200 + intensity * 300);
}
}
}
// Event listeners
brainSendBtn.addEventListener('click', sendMessage);
brainInput.addEventListener('keypress', (e) => {
if (e.key === 'Enter') sendMessage();
});
// Keyboard shortcut to open chat
document.addEventListener('keydown', (e) => {
if (e.key === 'b' && !e.ctrlKey && !e.metaKey && document.activeElement !== brainInput) {
brainChatBtn.click();
}
if (e.key === 'Escape') {
brainChatModal.classList.remove('active');
}
});
})();
</script>
</body>
</html>