Jump to content

Panda.js 1.6.0 released


enpu
 Share

Recommended Posts

Release notes:

https://github.com/ekelokorpi/panda.js/releases/tag/1.6.0

 

Examples:

 

1. Camera

this.camera = new game.Camera();this.camera.addTo(this.levelContainer);this.camera.acceleration = 1.5;this.camera.minX = this.camera.minY = 0;this.camera.maxX = Math.max(0, this.level.width - game.system.width);this.camera.maxY = Math.max(0, this.level.height - game.system.height);this.camera.offset.x = game.system.width / 2 - 400;this.camera.setPosition(this.player.sprite.position.x, this.player.sprite.position.y);this.camera.follow(this.player.sprite);

2. iOS8 detection

 

You can now detect iOS8 with:

game.device.iOS8

3. ignoreModules

 

All engine modules are now loaded from core by default. If you do not want to include module in your game,

then you can use ignoreModules:

pandaConfig = {    ignoreModules: [        'engine.physics',        'engine.keyboard'    ]};

You should ignore all modules, that you don't use in your game. This will reduce your game size.

 

3. scaleToFit

 

Use scaleToFit to scale canvas into full window size on desktop:

 

Without scaleToFit:

post-88-0-44854900-1402567609.png

 

With scaleToFit:

post-88-0-75478800-1402567620.png

 

4. Loader dynamic mode

 

Now you can use loader to load assets without changing scene.

 

Example:

http://www.pandajs.net/snippets/9adc8186791129fc59c4.html

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...