[英]KineticJS with cache: How does it work?
您可以使用stage.toDataURL
创建舞台的URL或图像
var myStage;
// have KineticJS convert the stage to a URL
stage.toDataURL({
callback:imageDone
});
// callback after the URL has been created
// here we just make an image of the URL
function imageDone(stageDataURL){
myStage=new Image();
myStage.onload=function(){
// your stage is now an image (myStage);
}
myStage.src=stageDataURL;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.