mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 18:27:58 +08:00
45 lines
991 B
HTML
45 lines
991 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>KonvaJS Blur Comparison Sandbox</title>
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1.0, user-scalable=1.0, minimum-scale=1.0, maximum-scale=1.0"
|
|
/>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 20px;
|
|
font-family: Arial, sans-serif;
|
|
background: #f0f0f0;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="container"></div>
|
|
<script type="module">
|
|
import Konva from '../src/index.ts';
|
|
|
|
const stage = new Konva.Stage({
|
|
container: 'container',
|
|
width: window.innerWidth,
|
|
height: window.innerHeight,
|
|
});
|
|
|
|
const layer = new Konva.Layer();
|
|
stage.add(layer);
|
|
|
|
const circle = new Konva.Circle({
|
|
x: stage.width() / 2,
|
|
y: stage.height() / 2,
|
|
radius: 100,
|
|
fill: 'red',
|
|
draggable: true,
|
|
});
|
|
layer.add(circle);
|
|
</script>
|
|
</body>
|
|
</html>
|