Skip to content

Commit

Permalink
Merge pull request 36base#3 from ergo9ine/master
Browse files Browse the repository at this point in the history
이미지 저장,스테이지 주소값 버그 픽그 일부 제외 후 수정
  • Loading branch information
kjm1922 authored Sep 21, 2018
2 parents 811e96f + a6aeb93 commit 8d7fbff
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 30 deletions.
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,10 @@ MIT License Duplicate 에 의해 동일한 권한을 얻었습니다.[cullus](ht

## gf-spine-simulator

* 통합 미리보기 URL (중국어) https://gf.fws.tw/db/guns/simulator
* 통합 미리보기 URL (중국어) https://gf.fws.tw/db/guns/simulator/
* 수정된 변경본 URL (중국어) https://gf.fws.tw/gf-spine-simulator/
* 통합 미리보기 URL (한국어 번역) https://girlsfrontline.kr/db/simulator
* 커스텀 버전 URL (한국어) 을 다시 재 Fork 처리 했습니다. https://ergo9ine.github.io/gf-spine-simulator/


## 종속성 문제를 위해 bower 설치 필요

```
bower install
```
* 통합 미리보기 URL (한국어 번역) https://girlsfrontline.kr/db/simulator/
* 커스텀 버전 URL (한국어) https://ergo9ine.github.io/gf-spine-simulator/

## 통합기능

Expand Down Expand Up @@ -46,4 +39,4 @@ bower install

## License

MIT License
MIT License
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@
<script src="js/spine-data.js"></script>
<script src="js/game.js"></script>
</body>
</html>
</html>
28 changes: 10 additions & 18 deletions js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,7 @@ var gvHandler={
alert("복사되었으니 주소창에 붙여넣기 하세요!")
},
savePng:function(gameview){
if(confirm("이미지는 하단에 출력됩니다. 이미지를 마우스 오른쪽 버튼으로 클릭해 저장할 수 있습니다. 모바일은 이미지를 길게 눌러주세요.")){
// var renderTexture = new PIXI.RenderTexture(gameview.renderer, 1920, 1080);
// renderTexture.renderWebGL(gameview.stage);
// var canvas = renderTexture.getCanvas();
$('#saveImage').html().show();
}
download_png(gameview.renderer,gameview.stage,"screenshot");
}
};
function copyToClipboard(val){
Expand All @@ -470,15 +465,12 @@ function copyToClipboard(val){
document.execCommand('copy');
document.body.removeChild(t)
}
//game.setGameviewHandler(gvHandler);
//
//function download_sprite_as_png(renderer, sprite, fileName) {
// renderer.extract.canvas(sprite).toBlob(function(b){
// var a = document.createElement('a');
// document.body.append(a);
// a.download = fileName;
// a.href = URL.createObjectURL(b);
// a.click();
// a.remove();
// }, 'image/png');
//}
game.setGameviewHandler(gvHandler);
function download_png(renderer, sprite, fileName) {
renderer.extract.canvas(sprite).toBlob(function(b){
var a=document.createElement("a");
document.body.append(a);
a.download=fileName+".png",a.href=URL.createObjectURL(b);
;a.click(),a.remove()
},"image/png");
};

0 comments on commit 8d7fbff

Please sign in to comment.