• Content Count

  • Joined

  • Last visited

Everything posted by Koroldev

  1. Koroldev

    Particles dispose

    Hi! Have some problem, I create many particles systems in my game and very often delete them after first playing, but if I using the same texture in particle systems, then after first disposing of particle system the texture disposing too. And I should to cloning each one new texture, but it is bad for performance. How I can to create a particles systems with same texture but after disposing particles system do not dispose texture? Thanks!
  2. Koroldev

    Particles dispose

    It would be cool!
  3. Hi all, who know the babylon have the fucnctionality for setting a new rest pose for skleton? I mean, if we have a skeleton for the example with 20 frames and by default the rest pose it the first frame, but if I need to apply a frame of the animation as new rest pose, how I can do this from code? Thanks :)
  4. Koroldev

    new rest pos for Skeleton

    Okay, there I tried to get keys from the animation, that to get matrix from the key, but after this code nothing happens, the skeloton still have the rest pose var animation = scene.beginAnimation(skeleton, 0, 1); animation.stop(); for (var i = 0; i < skeleton.bones.length; i++) { var keys = animation.getAnimations()[i].getKeys(); skeleton.bones[i].updateMatrix(keys[350].value); }
  5. Koroldev

    new rest pos for Skeleton

    You are already the second, we collect signatures for signing the petition about set bones to any frame wihtout a blending
  6. Koroldev

    new rest pos for Skeleton

    I tried, but it is not exactly what I need. I need something like setFrame for a bone, but setFrame working only if an animaiton for a bone already played. If I clone new skeletone and use setFrame for each one bone for the skeleton and skeleton do not have playing animation, then setFrame does not works. How I can clone skeleton and at once in this frame before a render apply any frame for this skeleton, that the animation started from frame that I need, because the first animation alway started from rest pose and then rest pose blends with animation which we started. In short - need to start animation for new skeleton from needed frame without rest pose. Thanks!
  7. Koroldev

    canvas2D not loading shader file

    Hi, RaananW But now, how to use FNT fonts? Thanks
  8. Hi All. Maybe it seems strangely but how I can before use scale9 for sprite2D, scale this sprite without scale9 and after that applying to this sprite scale9? Why I need this? For optimization! I have canvas size 1280x720, then I am make the size for this canvas 640x360 and scale = 2 and for all sprite2D objects on this canvas I set scale = 0.5 and in results we have few resolution for canvas and good quality for all sprite2D objects. But some sprites uses scale9 and if I set scale 0.5 for this sprites, then this sprites at once uses scale9 but I need use just scale 0.5 and after that apply scale9. This is what I get if scale of canvas = 1 and the button scaleX = 1.5, scaleY = 1 (uses scale9) But what I get if scale canvas = 2 and button scaleX = 0.75, scaleY = 0.5 (uses scale9) Need to apply scale 0.5 as original scale and then apply for a new size of sprite the scale9 grid. How I can to do this? Thanks!
  9. Koroldev

    Material Color

    Hi all, I want to ask about StandartMaterial, if I add to material a ambientColor or a diffuseColor or a specularColor it means that this colors mix with material.texture colors in every frame, or just at once and then new colors saves somewhere in buffer. Need to know this for performance, if all colors mixes every frame I think this bad for performance and I will be find some other ways. Thanks : )
  10. Hello! In old version of Babylon the BitmapFontTexture looks good: But when I updated the babylon to preview version all my fonts looks very bad: And if I set to font opacity = 0.0, Ican still see font:
  11. Hi guys! I have small problem, If I dispose WorldSpaceCanvas2D, material from canvas stay on the scene Example http://www.babylonjs-playground.com/#JG2PA5, you need look in console, you can see after disposing canvas the material on scene "myCanvas_Material" How I can dispose this material? Thanks!
  12. Hi! How I can create paticleSystem with subPicture fromTextureAtlass? In past I used texture atlases for Sprite2D, but now I have many textures for my particles systems and I want combine all my textures in one big textures, but how I can get subTexture from my big atlas texture or it is imposible and atlases using only for Sprite2D? Thank for any information :)
  13. Koroldev

    ParticlesSystem from AtlasSubPicture

    I immediately thought about explosions with using the spheres like in old lowpoly games on sony playstaion1 or sega dreamcats, I will hold this idea to the future. In past I was going to do explosions with sprites, but now only SPS Oh, I did not know about profiling, I am just using console, Thank, now I will use profiling Yes, I making games for social networks, it is my basic pay That's why some changes I will make in updated version of my game maybe They will hear Okay, thanks, I got it, and now I will dicide what better for current situations in my game Most likely SPS it is good desicion, maximum counts of all particles emitted on scene at once it is 1-2k, as jerome said jerome, Thanks too! Very helpful info
  14. Koroldev

    ParticlesSystem from AtlasSubPicture

    Wingnut, thank you, cool idea One question about perfomance - it is the main thing for what I am doing this. What better for perfomace on your opinion, 10 textures each one it is single file and using it for ParticleSystem or one big texture atlass and using it for SolidParticleSystem? Because I want that game working on the weak laptops and I am trying to maximal optimize my game, Thank you so much for help!
  15. Koroldev

    covering Observable

    Hi all! My geme have a menu_1 with buttons, if you click some button, then over an old menu_1 creates a new menu_2 with new buttons, but buttons from menu_1 react for click even if it under of new menu_2. I mean, if my button have observable PointerUp and I am creates sprite over this button, then this button react for PointerUp anyway, even under sprite, how I can hide all Observable buttons under one big sprite, that it don't react for pointer, but when I am delete my big sprite, then buttons start react on poiter again? Thank
  16. Hello all, I am using BitmapFontTexture for creating text messages, in browser chrome and opera all works fine, but in firefox I got white screen and error message: I tried to finding something in internet but still don't solved this problem. Thank.
  17. Okay, it's helped, but if I am loading just texture - it is works, but if I am loading font, then no one error and nothing happening. I wrote in function onLoad console.log("font loaded") and nothing in console http://www.babylonjs-playground.com/#Q0M3CV#3
  18. I got error on http://www.babylonjs-playground.com/#Q0M3CV#2
  19. Where I can load my texture and font file, that I can load it in the playground?
  20. Koroldev

    Several BitmapFontTexture

    Thank! Good news, I thinked that I did something wrong and just unidted all font textures in one texture.
  21. Hi all, I tried to use several BitmapFontTexture, but I see all text have first font and second font haves some deformations var f1 = new BABYLON.BitmapFontTexture(scene, "fonts/bulletsNumbers32.fnt", "fonts/bulletsNumbers32_0.png", undefined, false, undefined, function() { new BABYLON.Text2D("123", { parent: canvas, id: "text1", bitmapFontTexture: f1, x:100, y: 100}); }); var f2 = new BABYLON.BitmapFontTexture(scene, "fonts/message.fnt", "fonts/message_0.png", undefined, false, undefined, function() { new BABYLON.Text2D("123", { parent: canvas, id: "text2", bitmapFontTexture: f2, x:100, y: 200}); }); If i load just one font separately then first font or second font looks ok. First font Second font
  22. Koroldev

    Rotate sprite axis Y

    Hello guys, I am using the sprite for a shot from a gun effect. How I can rotate Y axis of a sprite? I need somthing like on screenshot. My sprite: It screen I did in the photoshop to give an opportunity to understand what I need
  23. Hi everyone! And question again How I can attach the WorldSpaceCanvas2D to some mesh on my scene? Something like WorldSpaceCanvas2D.parent = myMesh. Or I need changing a canvas position and rotation in every frame? Then next question, how I can change the WorldSpaceCanvas2D position and rotation in worldSpace? Thank!
  24. Hi all! I made map with buildings and trees. The map using 15 textures 512x512. What better for performance? Using 15 textures 512x512? Or combine all map textures in one big texture 2048x2048? and what the max size of the texture babylon is supports? Thank!