<body> <divid="container"></div> <script> var stage = new Konva.Stage({ container: 'container', width: window.innerWidth, height: window.innerHeight, });
var layer = new Konva.Layer(); stage.add(layer);
// lets define a custom filter: var OpacityFilter = function(imageData){ // make all pixels opaque 100% var nPixels = imageData.data.length; for (var i = 3; i < nPixels; i += 4) { imageData.data[i] = 255; } };