enpu

Members
  • Content Count

    1688
  • Joined

  • Last visited

  • Days Won

    39

Everything posted by enpu

  1. Yeah i'm still here! Just been a bit busy lately, but i am working on Panda 2!
  2. I have now added new "FBXexample" scene to the example project of Three.js plugin. It shows you how to load one FBX model and play animation on it. It does have embedded texture.
  3. Looks like there is something that is unsupported in your FBX. Do you have any other FBX that you can try? If you are exporting the FBX file from another software, can you try different settings? I have tried few different FBX files and all loading fine.
  4. You can paste the code inside any module that you use in your project.
  5. You can add any Three.js loader from here: https://github.com/mrdoob/three.js/tree/dev/examples/js/loaders Just copy and paste the code into your project. Makes really no sense to add everything to the plugin, would make it really big.
  6. Sure. Can you send your FBX so i can take a look?
  7. @ftguy2018 I have just updated Three.js plugin to version 1.6.0 That issue should be fixed now. Thanks!
  8. Ah i see. I have added now support for frame names, instead of frame indexes in the array, you can now use frame names (or even mix indexes and names in same array): game.module( 'game.main' ) .body(function() { game.addAsset('player.atlas'); game.createScene('Main', { init: function() { var player = new game.Animation('player.atlas'); player.addAnim('run', ['run-01.png', 'run-02.png']); player.play('run'); player.addTo(this.stage); } }); }); Just update to latest develop version.
  9. Yeah auto-update only checks for latest master version.
  10. There is actually three different ways to use addAnim function. 1. Use frame indexes addAnim('run', [3, 4, 5, 6, 7]); 2. Define start frame index and number of frames addAnim('run', 3, 5); // Animation starts from frame index 3 and contains 5 frames 3. Use frames that start with specific name addAnim('run', 'anim_run'); // Uses all frames that start with name anim_run Third is handy if you name your frames properly, like anim_run01.png anim_run02.png anim_run03.png This way if you add more frames to your anim, they will be automatically used.
  11. There are some rendering issues with TilingSprite and cached containers in 2.12.0 version. Try to update to current develop version, they should be already fixed there.
  12. Thanks! This should be now fixed in develop version.
  13. Could you send me the project so i can take a look?
  14. Hi! Thanks for the info. Try to update engine to latest dev version, should be fixed there.
  15. It should give you the file and line number in the end of the error message, like this: Open dev tools and console to see more info about the error, like this:
  16. Can you tell the filename and line number of the error too. That would help a lot. You should see that in the JavaScript console. Thanks!
  17. Hi @Twiggy I did take a quick look at your code and spotted one issue. this.body.collide = this.collide.bind(this); You are binding your body collide function to new collide function in your Player class, but you have not created that function. You should create it, like this: game.createClass('Player', { init: function() { this.sprite = new game.Sprite('square.png'); this.sprite.anchorCenter(); this.body = new game.Body(); this.body.position.x = game.width / 2; this.body.position.y = game.height - 100; //possible collision groups this.body.collideAgainst = [1,2]; this.body.velocityLimit.y = 1150; var shape = new game.Rectangle(); shape.width = this.sprite.width; shape.height = this.sprite.height; this.body.addShape(shape); this.body.addTo(game.scene.world); this.body.collide = this.collide.bind(this); }, collide: function(body) { // Body collides with another body } });
  18. I have added new paused property to Timer class, which is true if the timer is paused.
  19. enpu

    hiresRatio question

    No exactly sure what you mean. That code is used to detect if the engine should use hires assets or not (if hires mode is enabled). game.System.scale is used to enable scaling, which just scales the canvas element to fit the window size.
  20. @Stephan Thanks for the info! This should be now fixed in Spine plugin 1.3.4
  21. You can do this by setting the default scene background color to null: game.config = { scene: { backgroundColor: null } }; Note that the default loader (which is also a scene) has it's own default background color defined too. So if you want the default loader to have transparent background too (if you are not using your own loader), then you need to set that to null too: game.config = { scene: { backgroundColor: null }, loader: { backgroundColor: null } };
  22. enpu

    hiresRatio question

    Hi @Stephan Sorry for the late reply. HiRes mode is used only when you want to use multi-resolution assets (the name HiRes mode is actually a bit misleading, should be something like multiresAssets). Multi-resolution assets mean that you would have multiple versions of each asset that you use in your game. For example: player.png player@2x.png player@4x.png hiresRatio is a value that is used to detect which of those assets should the game engine use. For example if your project's base resolution is 200x200 and you have set HiRes mode to 4 with ratio of 2, that would mean that the window size (where the game is running) would have to be at least 2 times bigger than the base resolution (200x200 base resolution, so it has to be 400x400) for the engine to start using @2x asset files. For @4x assets, the window size would have to be at least 2 times bigger than the resolution used for @2x assets (which in this case would be 800x800). So this has really nothing to do with scaling. If you just want to scale the canvas to fit any screen resolution (scaling just scales the size of the pixels in the canvas, doesn't actually change the amount of pixels in the canvas), then using game.System.scale property is enough. If you also want to resize the canvas, so that it fills the whole screen no matter what aspect ratio the screen is, then you should use game.System.resize property together with the scaling. Does that make sense?
  23. Sure. game.config = { mediaFolder: 'media' };
  24. Hi @nagyv So you want to get the color of a single pixel in the canvas?