Dynamic To-Do List Web App
About this app
A colorful and responsive To-Do List web app to help you organize your tasks, prioritize goals, and enhance productivity.
CinePaint Prototype - Unified Conceptual Code CinePaint Prototype Load Brushes Add Layer Apply Effects
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>CinePaint Prototype - Unified Conceptual Code</title>
<meta name="description" content="CinePaint is a prototype for a painting application with advanced brush definitions, layered canvas, and shader-based rendering for artistic effects.">
<meta name="keywords" content="CinePaint, Painting App, Brushes, Canvas, Layer Management, Shader, OpenGL">
<style>
body {
background-color: #f0f0f0;
color: #333333;
font-family: 'Roboto', sans-serif;
}
#main-container {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 20px;
}
h1 {
color: #4a90e2;
}
#canvas {
border: 2px solid #4a90e2;
background-color: white;
width: 1000px;
height: 600px;
cursor: crosshair;
}
.btn {
margin: 5px;
padding: 10px 20px;
border-radius: 5px;
border: none;
color: white;
background: linear-gradient(270deg, #ff9d00, #ff5e02);
transition: background-color 0.3s;
}
.btn:hover {
background: linear-gradient(270deg, #ff5e02, #ff9d00);
}
</style>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
</head>
<body>
<div id="main-container">
<h1>CinePaint Prototype</h1>
<canvas id="canvas"></canvas>
<button class="btn" onclick="loadBrushes()">Load Brushes</button>
<button class="btn" onclick="addLayer()">Add Layer</button>
<button class="btn" onclick="applyShaderEffects()">Apply Effects</button>
</div>
<script type="text/javascript">
let layers = [{name: "Background", opacity: 1}, {name: "Layer 1", opacity: 1}];
let activeBrush = {name: "WatercolorSoft", type: "watercolor", size: 10, opacity: 1};
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
let isDrawing = false;
let lastX = 0;
let lastY = 0;
canvas.addEventListener("mousedown", (e) => {
isDrawing = true;
lastX = e.offsetX;
lastY = e.offsetY;
draw(e.offsetX, e.offsetY);
});
canvas.addEventListener("mousemove", (e) => {
if(isDrawing) {
draw(e.offsetX, e.offsetY);
lastX = e.offsetX;
lastY = e.offsetY;
}
});
canvas.addEventListener("mouseup", () => isDrawing = false);
canvas.addEventListener("mouseout", () => isDrawing = false);
function draw(x, y) {
ctx.strokeStyle = activeBrush.type === "watercolor" ? `rgba(255, 165, 0, ${activeBrush.opacity})` : '#000000';
ctx.lineWidth = activeBrush.size;
ctx.beginPath();
ctx.moveTo(lastX, lastY);
ctx.lineTo(x, y);
ctx.stroke();
ctx.closePath();
}
function loadBrushes() {
// Load brushes from resource
alert("Brushes loaded. Active brush: " + activeBrush.name);
}
function addLayer() {
const layerName = `Layer ${layers.length + 1}`;
layers.push({name: layerName, opacity: 1});
alert(`Added layer: ${layerName}`);
}
function applyShaderEffects() {
// Simulate applying shader effects
alert("Applying cinematic effects to canvas!");
}
</script>
</body>
</html>
NEW APPS
These are apps made by the community!