📚 Documentation + scripts from today's exploration
- ASSET_COUNT_STATUS_01_01_2026.md - asset tracking - CHARACTER_PRODUCTION_PLAN.md - character animation plan - CHARACTER_GENERATION_FINAL_PLAN.md - API alternatives research - COMFYUI_SETUP_TODAY.md - ComfyUI setup guide - TASKS_01_01_2026.md - consolidated task list - FULL_STORY_OVERVIEW.md - game narrative summary - preview_animations.html - animation preview gallery - Test scripts for API exploration (test_minimal.py, test_imagen.py) - Character generation scripts (generate_all_characters_complete.py, generate_characters_working.py) These were created during API troubleshooting and production planning.
This commit is contained in:
500
preview_animations.html
Normal file
500
preview_animations.html
Normal file
@@ -0,0 +1,500 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="sl">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>DolinaSmrti - Character Animation Preview</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
|
||||
color: #fff;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
padding: 40px 20px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 15px;
|
||||
margin-bottom: 40px;
|
||||
border: 2px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-size: 3em;
|
||||
margin-bottom: 10px;
|
||||
background: linear-gradient(45deg, #00ff88, #00ddff);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.header p {
|
||||
font-size: 1.2em;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.stats {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 30px;
|
||||
margin: 20px 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.stat-box {
|
||||
background: rgba(0, 255, 136, 0.1);
|
||||
padding: 15px 30px;
|
||||
border-radius: 10px;
|
||||
border: 2px solid rgba(0, 255, 136, 0.3);
|
||||
}
|
||||
|
||||
.stat-box .number {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
color: #00ff88;
|
||||
}
|
||||
|
||||
.stat-box .label {
|
||||
font-size: 0.9em;
|
||||
color: #aaa;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.controls {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 30px;
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 12px 24px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 1em;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: linear-gradient(45deg, #00ff88, #00ddff);
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #fff;
|
||||
border: 2px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.character-section {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
.character-header {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
padding: 20px 30px;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 20px;
|
||||
border-left: 5px solid;
|
||||
}
|
||||
|
||||
.character-header.kai {
|
||||
border-color: #00ff88;
|
||||
}
|
||||
|
||||
.character-header.ana {
|
||||
border-color: #ff00ff;
|
||||
}
|
||||
|
||||
.character-header.gronk {
|
||||
border-color: #00ddff;
|
||||
}
|
||||
|
||||
.character-header h2 {
|
||||
font-size: 2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.character-header .info {
|
||||
color: #aaa;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.animation-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.animation-card {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 12px;
|
||||
padding: 15px;
|
||||
border: 2px solid rgba(255, 255, 255, 0.1);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.animation-card:hover {
|
||||
transform: translateY(-5px);
|
||||
border-color: rgba(0, 255, 136, 0.5);
|
||||
box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
|
||||
}
|
||||
|
||||
.animation-card h3 {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
color: #00ff88;
|
||||
}
|
||||
|
||||
.frames-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
||||
gap: 10px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.frame-box {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border-radius: 8px;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.frame-box img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 5px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.frame-box img:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.frame-box .frame-label {
|
||||
font-size: 0.8em;
|
||||
color: #aaa;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.loading {
|
||||
text-align: center;
|
||||
padding: 40px;
|
||||
font-size: 1.5em;
|
||||
color: #00ff88;
|
||||
}
|
||||
|
||||
.loading::after {
|
||||
content: '...';
|
||||
animation: dots 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes dots {
|
||||
|
||||
0%,
|
||||
20% {
|
||||
content: '.';
|
||||
}
|
||||
|
||||
40% {
|
||||
content: '..';
|
||||
}
|
||||
|
||||
60%,
|
||||
100% {
|
||||
content: '...';
|
||||
}
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
z-index: 1000;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.modal.active {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
max-width: 90%;
|
||||
max-height: 90%;
|
||||
}
|
||||
|
||||
.modal-content img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.close-modal {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 40px;
|
||||
font-size: 3em;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
z-index: 1001;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="header">
|
||||
<h1>🎮 DolinaSmrti - Character Animations</h1>
|
||||
<p>Complete Animation Preview - Bloody Harvest</p>
|
||||
|
||||
<div class="stats">
|
||||
<div class="stat-box">
|
||||
<div class="number" id="total-animations">0</div>
|
||||
<div class="label">Animations</div>
|
||||
</div>
|
||||
<div class="stat-box">
|
||||
<div class="number" id="total-frames">0</div>
|
||||
<div class="label">Frames</div>
|
||||
</div>
|
||||
<div class="stat-box">
|
||||
<div class="number" id="total-files">0</div>
|
||||
<div class="label">Files</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
<button class="btn btn-primary" onclick="loadAllAnimations()">🔄 Refresh Gallery</button>
|
||||
<button class="btn btn-secondary" onclick="filterCharacter('all')">All Characters</button>
|
||||
<button class="btn btn-secondary" onclick="filterCharacter('kai')">Kai Only</button>
|
||||
<button class="btn btn-secondary" onclick="filterCharacter('ana')">Ana Only</button>
|
||||
<button class="btn btn-secondary" onclick="filterCharacter('gronk')">Gronk Only</button>
|
||||
<button class="btn btn-secondary" onclick="togglePreviewSize()">Toggle Size</button>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="loading">Loading animations</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="modal" onclick="closeModal()">
|
||||
<span class="close-modal">×</span>
|
||||
<div class="modal-content">
|
||||
<img id="modal-img" src="" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const CHARACTERS = {
|
||||
'kai': {
|
||||
name: 'Kai Marković',
|
||||
color: '#00ff88',
|
||||
desc: 'Zombie Whisperer - Age 17'
|
||||
},
|
||||
'ana': {
|
||||
name: 'Ana Marković',
|
||||
color: '#ff00ff',
|
||||
desc: 'Twin Sister - Scientist - Age 17'
|
||||
},
|
||||
'gronk': {
|
||||
name: 'Gronk',
|
||||
color: '#00ddff',
|
||||
desc: 'Zen Troll Companion'
|
||||
}
|
||||
};
|
||||
|
||||
let currentFilter = 'all';
|
||||
let previewSize = 'preview';
|
||||
|
||||
async function loadAllAnimations() {
|
||||
const content = document.getElementById('content');
|
||||
content.innerHTML = '<div class="loading">Loading animations</div>';
|
||||
|
||||
let totalAnimations = 0;
|
||||
let totalFrames = 0;
|
||||
let totalFiles = 0;
|
||||
|
||||
let html = '';
|
||||
|
||||
for (const [charKey, charData] of Object.entries(CHARACTERS)) {
|
||||
try {
|
||||
const response = await fetch(`../assets/slike/${charKey}/`);
|
||||
const text = await response.text();
|
||||
|
||||
// Parse directory listing for PNG files
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(text, 'text/html');
|
||||
const links = doc.querySelectorAll('a');
|
||||
|
||||
const animations = {};
|
||||
|
||||
// Group files by animation name
|
||||
links.forEach(link => {
|
||||
const filename = link.textContent;
|
||||
if (filename.includes('_preview_256x256.png')) {
|
||||
const match = filename.match(/(.+)_frame(\d+)_preview/);
|
||||
if (match) {
|
||||
const animName = match[1].replace(`${charKey}_`, '');
|
||||
const frameNum = parseInt(match[2]);
|
||||
|
||||
if (!animations[animName]) {
|
||||
animations[animName] = [];
|
||||
}
|
||||
animations[animName].push({
|
||||
frame: frameNum,
|
||||
preview: filename,
|
||||
original: filename.replace('_preview_256x256.png', '_1024x1024.png')
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Sort frames
|
||||
Object.keys(animations).forEach(animName => {
|
||||
animations[animName].sort((a, b) => a.frame - b.frame);
|
||||
});
|
||||
|
||||
totalAnimations += Object.keys(animations).length;
|
||||
|
||||
// Generate HTML for this character
|
||||
html += `
|
||||
<div class="character-section" data-character="${charKey}">
|
||||
<div class="character-header ${charKey}">
|
||||
<h2>${charData.name}</h2>
|
||||
<div class="info">${charData.desc} - ${Object.keys(animations).length} animations</div>
|
||||
</div>
|
||||
<div class="animation-grid">
|
||||
`;
|
||||
|
||||
Object.entries(animations).forEach(([animName, frames]) => {
|
||||
totalFrames += frames.length;
|
||||
totalFiles += frames.length * 2; // preview + original
|
||||
|
||||
html += `
|
||||
<div class="animation-card">
|
||||
<h3>${animName}</h3>
|
||||
<div class="frames-container">
|
||||
`;
|
||||
|
||||
frames.forEach(frame => {
|
||||
html += `
|
||||
<div class="frame-box">
|
||||
<img src="../assets/slike/${charKey}/${frame.preview}"
|
||||
alt="${animName} frame ${frame.frame}"
|
||||
onclick="openModal('../assets/slike/${charKey}/${frame.original}')">
|
||||
<div class="frame-label">Frame ${frame.frame}</div>
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
|
||||
html += `
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
|
||||
html += `
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
} catch (error) {
|
||||
console.error(`Error loading ${charKey}:`, error);
|
||||
}
|
||||
}
|
||||
|
||||
content.innerHTML = html || '<div class="loading">No animations found. Run generation script first!</div>';
|
||||
|
||||
// Update stats
|
||||
document.getElementById('total-animations').textContent = totalAnimations;
|
||||
document.getElementById('total-frames').textContent = totalFrames;
|
||||
document.getElementById('total-files').textContent = totalFiles;
|
||||
}
|
||||
|
||||
function filterCharacter(filter) {
|
||||
currentFilter = filter;
|
||||
const sections = document.querySelectorAll('.character-section');
|
||||
|
||||
sections.forEach(section => {
|
||||
if (filter === 'all' || section.dataset.character === filter) {
|
||||
section.style.display = 'block';
|
||||
} else {
|
||||
section.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function togglePreviewSize() {
|
||||
const images = document.querySelectorAll('.frame-box img');
|
||||
|
||||
if (previewSize === 'preview') {
|
||||
previewSize = 'large';
|
||||
images.forEach(img => {
|
||||
img.src = img.src.replace('_preview_256x256.png', '_1024x1024.png');
|
||||
});
|
||||
} else {
|
||||
previewSize = 'preview';
|
||||
images.forEach(img => {
|
||||
img.src = img.src.replace('_1024x1024.png', '_preview_256x256.png');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function openModal(imageSrc) {
|
||||
const modal = document.getElementById('modal');
|
||||
const modalImg = document.getElementById('modal-img');
|
||||
|
||||
modalImg.src = imageSrc;
|
||||
modal.classList.add('active');
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
const modal = document.getElementById('modal');
|
||||
modal.classList.remove('active');
|
||||
}
|
||||
|
||||
// Auto-load on page load
|
||||
window.addEventListener('load', () => {
|
||||
loadAllAnimations();
|
||||
|
||||
// Auto-refresh every 30 seconds during generation
|
||||
setInterval(() => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
loadAllAnimations();
|
||||
}
|
||||
}, 30000);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user