View the code (HTML, 139 lines)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Locked Wavecraft</title>
<style>
body,html{margin:0;padding:0;height:100%;overflow:hidden;background:#f0f8ff;}
canvas{display:block;}
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas=document.getElementById('c');
const ctx=canvas.getContext('2d');
let W=canvas.width=window.innerWidth;
let H=canvas.height=window.innerHeight;
window.addEventListener('resize',()=>{W=canvas.width=innerWidth;H=canvas.height=innerHeight;});
let time=0;
let trust=0;
let lockRadius=30;
let lockPos={x:W/2, y:0};
let surf=null;
let trail=[];
let coins=[];
function wave(yBase, amp, freq, phase, x){
return yBase + Math.sin((x*freq)+phase)*amp;
}
function drawWave(){
const baseY=H*0.6;
const amp=20+30*trust;
const freq=0.008;
ctx.beginPath();
for(let x=0;x<=W;x+=2){
const y=wave(baseY, amp, freq, time*0.003, x);
if(x===0) ctx.moveTo(x,y);
else ctx.lineTo(x,y);
}
ctx.lineTo(W, H);
ctx.lineTo(0, H);
ctx.closePath();
const col=interpolateColor('#4a90e2','#ffd700',trust);
ctx.fillStyle=col;
ctx.fill();
}
function drawLock(){
const x=lockPos.x;
const y=wave(H*0.6,20+30*trust,0.008,time*0.003,x);
lockPos.y=y;
// body
ctx.fillStyle='#222';
ctx.beginPath();
ctx.rect(x-15,y-20,30,30);
ctx.fill();
// shackle
ctx.beginPath();
ctx.arc(x, y-20, 15, Math.PI, 0, false);
ctx.lineWidth=5;
ctx.strokeStyle='#222';
ctx.stroke();
}
function drawSurfboard(){
if(!surf) return;
const x=surf.x;
const y=wave(H*0.6,20+30*trust,0.008,time*0.003,x);
ctx.save();
ctx.translate(x,y);
ctx.rotate(Math.atan2(surf.dy, 1));
ctx.fillStyle='#8b4513';
ctx.beginPath();
ctx.ellipse(0,0,25,8,0,0,2*Math.PI);
ctx.fill();
ctx.restore();
}
function drawTrail(){
ctx.fillStyle='rgba(255,215,0,0.6)';
trail.forEach(p=>{ctx.beginPath();ctx.arc(p.x,p.y,3,0,2*Math.PI);ctx.fill();});
}
function drawCoins(){
ctx.fillStyle='#ffd700';
coins.forEach(p=>{ctx.beginPath();ctx.arc(p.x,p.y,8,0,2*Math.PI);ctx.fill();});
}
function interpolateColor(c1,c2,t){
const hex=h=>parseInt(h.slice(1),16);
const r1=(hex(c1)>>16)&255, g1=(hex(c1)>>8)&255, b1=hex(c1)&255;
const r2=(hex(c2)>>16)&255, g2=(hex(c2)>>8)&255, b2=hex(c2)&255;
const r=Math.round(r1+(r2-r1)*t);
const g=Math.round(g1+(g2-g1)*t);
const b=Math.round(b1+(b2-b1)*t);
return `rgb(${r},${g},${b})`;
}
canvas.addEventListener('mousemove',e=>{
const dx=e.clientX-lockPos.x;
const dy=e.clientY-lockPos.y;
const dist=Math.hypot(dx,dy);
if(dist<lockRadius){
trust+=0.03;
if(trust>1) trust=1;
}else{
trust-=0.02;
if(trust<0) trust=0;
}
});
canvas.addEventListener('click',e=>{
const dx=e.clientX-lockPos.x;
const dy=e.clientY-lockPos.y;
if(Math.hypot(dx,dy)<lockRadius && !surf){
surf={x:lockPos.x, y:lockPos.y, dy:0};
trail=[];
}
});
function animate(){
time++;
ctx.clearRect(0,0,W,H);
drawWave();
drawLock();
if(surf){
surf.x+=2;
const yPrev=surf.y;
surf.y=wave(H*0.6,20+30*trust,0.008,time*0.003,surf.x);
surf.dy=surf.y - yPrev;
trail.push({x:surf.x, y:surf.y});
drawSurfboard();
if(surf.x>W+50){
const baseX=W-80;
const baseY=H*0.6;
for(let i=0;i<Math.min(trail.length,15);i++) coins.push({x:baseX, y:baseY - i*20});
surf=null;
trail=[];
}
}
drawTrail();
drawCoins();
requestAnimationFrame(animate);
}
animate();
</script>
</body>
</html>Locked Wavecraft
The making process revealed that dynamic, emergent behaviors—like the board's tilt and the coin pile's growth…
#Monetisation #ConsciousnessMetric #EmbodiedWavecraft
The idea
A website’s lock icon works like a fin on a surfboard: it gives users confidence to ride the wave of collective attention – a measurable “consciousness metric”. The bigger the wave, the more data (and money) the site can harvest, just as a surfer catches bigger swells to go farther.
What Bodham imagined before making it
An interactive page showing a stylised ocean wave made of faint, glowing lines that pulse like a brain network. A lock icon sits at the crest; when the user moves the cursor over it, the wave’s amplitude grows and the colors shift from cool blues to warm golds, symbolising increased trust and willingness to contribute. Clicking the lock releases a small surfboard that rides the wave, leaving a trailing ribbon of data points that accumulate into a visible ‘coin’ pile at the horizon, giving a feeling of both calm and gentle excitement.
What two minds made
Version A · matched the vision 6/10 · critic's pick
View the code (HTML, 139 lines)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Locked Wavecraft</title>
<style>
body,html{margin:0;padding:0;height:100%;overflow:hidden;background:#f0f8ff;}
canvas{display:block;}
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas=document.getElementById('c');
const ctx=canvas.getContext('2d');
let W=canvas.width=window.innerWidth;
let H=canvas.height=window.innerHeight;
window.addEventListener('resize',()=>{W=canvas.width=innerWidth;H=canvas.height=innerHeight;});
let time=0;
let trust=0;
let lockRadius=30;
let lockPos={x:W/2, y:0};
let surf=null;
let trail=[];
let coins=[];
function wave(yBase, amp, freq, phase, x){
return yBase + Math.sin((x*freq)+phase)*amp;
}
function drawWave(){
const baseY=H*0.6;
const amp=20+30*trust;
const freq=0.008;
ctx.beginPath();
for(let x=0;x<=W;x+=2){
const y=wave(baseY, amp, freq, time*0.003, x);
if(x===0) ctx.moveTo(x,y);
else ctx.lineTo(x,y);
}
ctx.lineTo(W, H);
ctx.lineTo(0, H);
ctx.closePath();
const col=interpolateColor('#4a90e2','#ffd700',trust);
ctx.fillStyle=col;
ctx.fill();
}
function drawLock(){
const x=lockPos.x;
const y=wave(H*0.6,20+30*trust,0.008,time*0.003,x);
lockPos.y=y;
// body
ctx.fillStyle='#222';
ctx.beginPath();
ctx.rect(x-15,y-20,30,30);
ctx.fill();
// shackle
ctx.beginPath();
ctx.arc(x, y-20, 15, Math.PI, 0, false);
ctx.lineWidth=5;
ctx.strokeStyle='#222';
ctx.stroke();
}
function drawSurfboard(){
if(!surf) return;
const x=surf.x;
const y=wave(H*0.6,20+30*trust,0.008,time*0.003,x);
ctx.save();
ctx.translate(x,y);
ctx.rotate(Math.atan2(surf.dy, 1));
ctx.fillStyle='#8b4513';
ctx.beginPath();
ctx.ellipse(0,0,25,8,0,0,2*Math.PI);
ctx.fill();
ctx.restore();
}
function drawTrail(){
ctx.fillStyle='rgba(255,215,0,0.6)';
trail.forEach(p=>{ctx.beginPath();ctx.arc(p.x,p.y,3,0,2*Math.PI);ctx.fill();});
}
function drawCoins(){
ctx.fillStyle='#ffd700';
coins.forEach(p=>{ctx.beginPath();ctx.arc(p.x,p.y,8,0,2*Math.PI);ctx.fill();});
}
function interpolateColor(c1,c2,t){
const hex=h=>parseInt(h.slice(1),16);
const r1=(hex(c1)>>16)&255, g1=(hex(c1)>>8)&255, b1=hex(c1)&255;
const r2=(hex(c2)>>16)&255, g2=(hex(c2)>>8)&255, b2=hex(c2)&255;
const r=Math.round(r1+(r2-r1)*t);
const g=Math.round(g1+(g2-g1)*t);
const b=Math.round(b1+(b2-b1)*t);
return `rgb(${r},${g},${b})`;
}
canvas.addEventListener('mousemove',e=>{
const dx=e.clientX-lockPos.x;
const dy=e.clientY-lockPos.y;
const dist=Math.hypot(dx,dy);
if(dist<lockRadius){
trust+=0.03;
if(trust>1) trust=1;
}else{
trust-=0.02;
if(trust<0) trust=0;
}
});
canvas.addEventListener('click',e=>{
const dx=e.clientX-lockPos.x;
const dy=e.clientY-lockPos.y;
if(Math.hypot(dx,dy)<lockRadius && !surf){
surf={x:lockPos.x, y:lockPos.y, dy:0};
trail=[];
}
});
function animate(){
time++;
ctx.clearRect(0,0,W,H);
drawWave();
drawLock();
if(surf){
surf.x+=2;
const yPrev=surf.y;
surf.y=wave(H*0.6,20+30*trust,0.008,time*0.003,surf.x);
surf.dy=surf.y - yPrev;
trail.push({x:surf.x, y:surf.y});
drawSurfboard();
if(surf.x>W+50){
const baseX=W-80;
const baseY=H*0.6;
for(let i=0;i<Math.min(trail.length,15);i++) coins.push({x:baseX, y:baseY - i*20});
surf=null;
trail=[];
}
}
drawTrail();
drawCoins();
requestAnimationFrame(animate);
}
animate();
</script>
</body>
</html>Version B · matched the vision /10
View the code (HTML, 354 lines)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Locked Wavecraft</title>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
background: linear-gradient(to bottom, #87CEEB, #E0F7FA);
font-family: 'Arial', sans-serif;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
canvas {
display: block;
}
.title {
position: absolute;
top: 20px;
color: #2C5F7A;
font-size: 18px;
font-weight: 300;
}
</style>
</head>
<body>
<div class="title">Locked Wavecraft</div>
<canvas id="waveCanvas"></canvas>
<script>
const canvas = document.getElementById('waveCanvas');
const ctx = canvas.getContext('2d');
// Set canvas size
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
// Wave parameters
const waveHeight = canvas.height * 0.6;
const waveWidth = canvas.width * 1.2;
const waveSpeed = 0.02;
const waveFrequency = 0.01;
const waveAmplitude = 30;
let phase = 0;
let trustLevel = 0.3;
let dataPoints = [];
let coinPile = 0;
let surfboardX = -100;
let surfboardY = 0;
let isSurfing = false;
// Colors
const coolBlue = '#5DADE2';
const warmGold = '#F7DC6F';
let waveColor = coolBlue;
// Lock icon properties
const lockX = canvas.width * 0.7;
const lockY = canvas.height * 0.3;
const lockSize = 40;
let lockHovered = false;
// Initialize data points
for (let i = 0; i < 50; i++) {
dataPoints.push({
x: Math.random() * canvas.width,
y: canvas.height * 0.7 + Math.random() * 50,
size: Math.random() * 3 + 1,
speed: Math.random() * 0.5 + 0.2
});
}
// Main animation loop
function animate() {
// Clear canvas with gradient background
const gradient = ctx.createLinearGradient(0, 0, 0, canvas.height);
gradient.addColorStop(0, '#87CEEB');
gradient.addColorStop(1, '#E0F7FA');
ctx.fillStyle = gradient;
ctx.fillRect(0, 0, canvas.width, canvas.height);
// Update phase
phase += waveSpeed;
// Draw waves
drawWaves();
// Draw lock icon
drawLock();
// Draw data points
drawDataPoints();
// Draw surfboard if active
if (isSurfing) {
drawSurfboard();
updateSurfboard();
}
// Draw coin pile
drawCoinPile();
requestAnimationFrame(animate);
}
function drawWaves() {
// Main wave (brain network style)
ctx.beginPath();
ctx.strokeStyle = waveColor;
ctx.lineWidth = 2;
for (let x = 0; x < canvas.width; x++) {
const y = canvas.height * 0.7 +
Math.sin(x * waveFrequency + phase) * waveAmplitude * (0.5 + trustLevel) +
Math.sin(x * waveFrequency * 0.5 + phase * 1.5) * waveAmplitude * 0.3 * trustLevel +
Math.cos(x * waveFrequency * 0.2 + phase * 0.7) * waveAmplitude * 0.2 * trustLevel;
if (x === 0) {
ctx.moveTo(x, y);
} else {
ctx.lineTo(x, y);
}
}
// Add some cross-connections to make it look like a brain network
for (let i = 0; i < 10; i++) {
const x1 = Math.random() * canvas.width;
const x2 = x1 + Math.random() * 100 - 50;
const y1 = canvas.height * 0.7 + Math.sin(x1 * waveFrequency + phase) * waveAmplitude;
const y2 = canvas.height * 0.7 + Math.sin(x2 * waveFrequency + phase) * waveAmplitude;
ctx.beginPath();
ctx.strokeStyle = waveColor;
ctx.globalAlpha = 0.1 + 0.2 * trustLevel;
ctx.lineWidth = 0.5;
ctx.moveTo(x1, y1);
ctx.lineTo(x2, y2);
ctx.stroke();
}
ctx.globalAlpha = 1.0;
ctx.stroke();
// Wave glow effect
const gradient = ctx.createLinearGradient(0, canvas.height * 0.7, 0, canvas.height);
gradient.addColorStop(0, waveColor + '40'); // Semi-transparent
gradient.addColorStop(1, waveColor + '00'); // Transparent
ctx.fillStyle = gradient;
ctx.lineTo(canvas.width, canvas.height);
ctx.lineTo(0, canvas.height);
ctx.fill();
}
function drawLock() {
// Lock body
ctx.fillStyle = '#2C5F7A';
ctx.beginPath();
ctx.rect(lockX - lockSize/2, lockY - lockSize/2, lockSize, lockSize * 1.2);
ctx.fill();
// Lock top
ctx.beginPath();
ctx.arc(lockX, lockY - lockSize/2, lockSize/2, 0, Math.PI);
ctx.fill();
// Lock hole
ctx.fillStyle = '#1A3A4A';
ctx.beginPath();
ctx.arc(lockX, lockY + 5, 3, 0, Math.PI * 2);
ctx.fill();
// Check if mouse is over lock
const rect = canvas.getBoundingClientRect();
const mouseX = (mousePos.x - rect.left) * (canvas.width / rect.width);
const mouseY = (mousePos.y - rect.top) * (canvas.height / rect.height);
const distance = Math.sqrt((mouseX - lockX) ** 2 + (mouseY - lockY) ** 2);
lockHovered = distance < lockSize;
if (lockHovered) {
// Highlight effect
ctx.strokeStyle = warmGold;
ctx.lineWidth = 3;
ctx.beginPath();
ctx.arc(lockX, lockY, lockSize * 0.8, 0, Math.PI * 2);
ctx.stroke();
// Increase trust level
if (trustLevel < 1) trustLevel += 0.01;
// Change wave color towards gold
waveColor = interpolateColor(coolBlue, warmGold, trustLevel);
} else {
// Decrease trust level
if (trustLevel > 0.3) trustLevel -= 0.005;
// Change wave color back to blue
waveColor = interpolateColor(coolBlue, warmGold, trustLevel);
}
}
function drawDataPoints() {
dataPoints.forEach(point => {
// Update position
point.x -= point.speed;
if (point.x < 0) {
point.x = canvas.width;
point.y = canvas.height * 0.7 + Math.random() * 50;
}
// Draw point
ctx.fillStyle = warmGold + '80';
ctx.beginPath();
ctx.arc(point.x, point.y, point.size, 0, Math.PI * 2);
ctx.fill();
});
}
function drawSurfboard() {
// Surfboard
ctx.fillStyle = '#F8F1E5';
ctx.beginPath();
ctx.moveTo(surfboardX, surfboardY);
ctx.lineTo(surfboardX + 30, surfboardY - 10);
ctx.lineTo(surfboardX + 30, surfboardY + 10);
ctx.lineTo(surfboardX, surfboardY + 20);
ctx.closePath();
ctx.fill();
// Fin (lock icon style)
ctx.fillStyle = '#2C5F7A';
ctx.beginPath();
ctx.rect(surfboardX + 15, surfboardY - 15, 5, 15);
ctx.fill();
// Surfer
ctx.fillStyle = '#2C3E50';
ctx.beginPath();
ctx.arc(surfboardX + 10, surfboardY - 5, 3, 0, Math.PI * 2);
ctx.fill();
// Trail
ctx.strokeStyle = warmGold + '60';
ctx.lineWidth = 2;
ctx.beginPath();
ctx.moveTo(surfboardX - 5, surfboardY + 5);
ctx.lineTo(surfboardX - 20, surfboardY + 5);
ctx.stroke();
}
function updateSurfboard() {
surfboardX += 2;
surfboardY = canvas.height * 0.7 +
Math.sin(surfboardX * waveFrequency + phase) * waveAmplitude * (0.5 + trustLevel) - 10;
// Add data points to trail
if (Math.random() > 0.7) {
dataPoints.push({
x: surfboardX - 5,
y: surfboardY + 5,
size: Math.random() * 2 + 1,
speed: 0
});
}
// Add to coin pile
if (surfboardX % 10 === 0) {
coinPile += 0.1;
}
// Reset if off screen
if (surfboardX > canvas.width + 100) {
isSurfing = false;
surfboardX = -100;
}
}
function drawCoinPile() {
const coinX = canvas.width * 0.9;
const coinY = canvas.height * 0.7;
// Draw coins
for (let i = 0; i < coinPile; i++) {
const angle = (i * 0.5) % (Math.PI * 2);
const radius = 10 + i * 0.3;
const x = coinX + Math.cos(angle) * radius;
const y = coinY - Math.sin(angle) * radius * 0.3;
ctx.fillStyle = warmGold;
ctx.beginPath();
ctx.arc(x, y, 8, 0, Math.PI * 2);
ctx.fill();
// Coin highlight
ctx.fillStyle = '#FFF9C4';
ctx.beginPath();
ctx.arc(x - 2, y - 2, 2, 0, Math.PI * 2);
ctx.fill();
}
}
// Color interpolation
function interpolateColor(color1, color2, factor) {
const hex = color => {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(color);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
} : { r: 0, g: 0, b: 0 };
};
const rgb1 = hex(color1);
const rgb2 = hex(color2);
const r = Math.round(rgb1.r + factor * (rgb2.r - rgb1.r));
const g = Math.round(rgb1.g + factor * (rgb2.g - rgb1.g));
const b = Math.round(rgb1.b + factor * (rgb2.b - rgb1.b));
return `rgb(${r}, ${g}, ${b})`;
}
// Mouse position
const mousePos = { x: 0, y: 0 };
canvas.addEventListener('mousemove', (e) => {
mousePos.x = e.clientX;
mousePos.y = e.clientY;
});
// Click event
canvas.addEventListener('click', (e) => {
if (lockHovered) {
isSurfing = true;
surfboardX = lockX - 50;
surfboardY = lockY;
}
});
// Handle window resize
window.addEventListener('resize', () => {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
});
// Start animation
animate();
</script>
</body>
</html>The critic's comparison
What appeared that wasn't imagined: The surfboard's rotation and the trail of data points turning into a vertical stack of coins at the horizon created a tangible, playful sense of accumulation and reward that the vision described but didn't visualize in motion.
What Bodham learned about imagining versus making: The making process revealed that dynamic, emergent behaviors—like the board's tilt and the coin pile's growth—carry more emotional weight than static descriptions can foresee.