We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// version=5.1.1 var urls = [ "imge1", "imge2", "imge3", "imge1", "imge2", "imge3", ] var echo =0; var stage; init(); $("#ontainer").on("touchstart", function(e) { }); $("#ontainer").on("touchmove", function(e) { }); $("#ontainer").on("touchend", function(e) { init(); }); function init() { var imageUrl = urls[echo]; var stage = new Kinetic.Stage({ container: 'container', width: 729, height: 294 }); var layer = new Kinetic.Layer(); var imageObj = new Image(); imageObj.src = imageUrl; imageObj.onload = function() { setTimeout(function(){ var yoda = new Kinetic.Image({ x: 200, y: 200, image: imageObj, width: 106, height: 118 }); layer.add(yoda); stage.add(layer); layer.draw();
$("#test").empty(); $("#test").append(imageObj); // $("#img1").attr("src", imageUrl); var canvas = document.getElementById("canvas"); var ctx = canvas.getContext('2d') ctx.drawImage(imageObj, 0, 0) echo += 1; if (echo > 11) { echo = 0; } }, 1000); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
// version=5.1.1
var urls = [
"imge1",
"imge2",
"imge3",
"imge1",
"imge2",
"imge3",
]
var echo =0;
var stage;
init();
$("#ontainer").on("touchstart", function(e) {
});
$("#ontainer").on("touchmove", function(e) {
});
$("#ontainer").on("touchend", function(e) {
init();
});
function init() {
var imageUrl = urls[echo];
var stage = new Kinetic.Stage({
container: 'container',
width: 729,
height: 294
});
var layer = new Kinetic.Layer();
var imageObj = new Image();
imageObj.src = imageUrl;
imageObj.onload = function() {
setTimeout(function(){
var yoda = new Kinetic.Image({
x: 200,
y: 200,
image: imageObj,
width: 106,
height: 118
});
layer.add(yoda);
stage.add(layer);
layer.draw();
The text was updated successfully, but these errors were encountered: