-
20 February, 2025
-
2:02 am
-
Cyberpunk Crazy-Hot Scale
Cyberpunk Crazy-Hot Scale
Enter Name:
<label for="crazy">Select Crazy Level:</label>
<select id="crazy">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
<label for="hot">Select Hot Level:</label>
<select id="hot">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select>
<label for="image">Upload Image (Optional):</label>
<input type="file" id="image">
<label for="notes">Special Notes:</label>
<textarea id="notes" rows="4" cols="30"></textarea>
<button onclick="addToScale()">Update Scale</button>
<canvas id="scaleChart"></canvas>
</div>
<script>
let entries = [
{ name: "Susan Boyle", crazy: 1, hot: 1, notes: "Stable and low risk.", image: null },
{ name: "Angela Merkel", crazy: 2, hot: 2, notes: "Logical leader.", image: null },
{ name: "Martha Stewart", crazy: 3, hot: 3, notes: "Reliable and elegant.", image: null },
{ name: "Nyxie Morgan", crazy: 10, hot: 6, notes: "Cyberpunk seductress.", image: null }
];
function addToScale() {
const name = document.getElementById("name").value;
const crazy = parseInt(document.getElementById("crazy").value);
const hot = parseInt(document.getElementById("hot").value);
const notes = document.getElementById("notes").value;
const imageInput = document.getElementById("image").files[0];
const newEntry = { name, crazy, hot, notes, image: null };
if (imageInput) {
const reader = new FileReader();
reader.onload = function(event) {
newEntry.image = event.target.result;
entries.push(newEntry);
drawChart();
};
reader.readAsDataURL(imageInput);
} else {
entries.push(newEntry);
drawChart();
}
}
function drawChart() {
const canvas = document.getElementById("scaleChart");
const ctx = canvas.getContext("2d");
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = "#FFA500";
ctx.font = "16px Arial";
entries.forEach(entry => {
const x = entry.hot * 40;
const y = 400 - entry.crazy * 40;
ctx.fillText(entry.name, x, y);
if (entry.image) {
const img = new Image();
img.src = entry.image;
img.onload = function() {
ctx.drawImage(img, x - 15, y - 15, 30, 30);
};
}
});
}
window.onload = drawChart;
</script>