Search the Community

Showing results for tags 'zooming sacling'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 1 result

  1. Hi guys, i am trying to shrink my 100*100 celled isometric map to fit my desktop screen on click of a button (or through scroll event). The only possible option I have managed to get is the canvas zoom-in/out feature in melonJS. It is not suiting my requirement as the border cells are not shown inside my viewport. Could you suggest if there is any better way to do this? My current code looks something like this : // register on mouse event me.input.registerPointerEvent("wheel", me.game.viewport, function (event) { me.event.publish("wheel", [ event ]); },false); this.mousewheel = me.event.subscribe("wheel", function (event) { console.log("^^^"); var viewport = me.game.viewport; //viewport.inViewport = true; if ( event.deltaY >0 ){ console.log("scrolldown"); viewport.currentTransform.scale(0.999); console.log(jq('canvas')); }else{ console.log("scrollup"); viewport.currentTransform.scale(1.001); } });