Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/12/18 in all areas

  1. ssaket

    Plane tangent to a sphere

    Hi there ! you can change the segment of the sphere to decided on number of planes. The solution uses facets normals- https://www.babylonjs-playground.com/#VDG184#7 Good day
    4 points
  2. Back to the Lamps on Babylon / Open Contest! forum thread, I've commited myself to write a tutorial about my lightmap workflow. Here the demo: And here the first published version of the tutorial... but in french, for now 😄 https://www.nothing-is-3d.com/article25/de-blender-vers-babylonjs I will soon make available an english version, don't worry. [edit] english version is out: https://www.nothing-is-3d.com/article27/from-blender-to-babylonjs
    2 points
  3. I'm doing a video tutorial series for Phaser 3 since the only alternatives are paid Zenva courses(which aren't bad but not many can afford). I'm aiming to do videos once a week and if you want to help out, I'll be on discord open to discuss the scripts and what to go over.
    1 point
  4. Hey guys, I've decided to use pixijs for my game. I've chosen it because I'm going to be making 2D boardgame and I like working with lower level codes instead of magic functions. My other option was phaser but it seems more magic and I want to be able to edit the frameworks I'm using. Anyhow I've ran across and played around with hexi(https://github.com/kittykatattack/hexi) and liked it. I'm also aware of the 3 other engines here: https://github.com/cursedcoder/awesome-pixijs I just wanted to make sure I'm not missing anything. Let me know what you think and which libraries I
    1 point
  5. Deltakosh

    Fog Density

    You cannot have your file in a separate folder unfortunately. But you can trick it to make it work: Just add some code that will first do an xhr to read all your files and store the results in the Effect store.
    1 point
  6. Of course pixi built-in interaction is not enough for serious cases like this. Your solution is good enough.
    1 point
  7. ssaket

    Pixel perfection

    Hey ! Welcome to the forum Try this - http://jsfiddle.net/zmatocef/ and here's the PG- https://playground.babylonjs.com/#M9XT7F#3 as you can see, if you use diag, the FOV for 0px offset still leaves some area(coz of sq root) which is because of the fact (basic maths) let's say you render size was 500*500; diag = Math.sqrt(500*500 + 500*500) => 500 * Math.sqrt(2); because of this (sqr 2)1.41 there's some region left in the view area. (same case happen with Three.js; you can try yourself! ) This is how the formula is derived -> tan(x) = height/ b
    1 point
  8. jerome

    Dynamic Terrain

    Little uncomplete demo of a bat flight simulator in a cave : http://jerome.bousquie.fr/BJS/test/cave.html 2 dynamic terrains, one inverted
    1 point
  9. That shader code was stolen from the amazing CYOS (create your own shader) editor... https://cyos.babylonjs.com/ Default shader for CYOS. Ain't fake-chrome PRETTY? I used the ZIP option in CYOS, to insert that shader code into a giant string, and bring it home. Then I took the shader-code string and inserted it into a playground... for use in the BJS ShadersStore-method of storing shader code (which is the same method that the zip from CYOS uses). I think there are about 3-4 other ways to store shader code. One, is within files. Another... within an HTML script element, and als
    1 point
  10. Groups in v3 don't work the same as in v2, they're not containers. If you call Group.setDepth it will (as the docs say) immediately set the depth value of each child. If it has no children, or a child is added after you call this (like in the code above), it won't make any difference.
    1 point
  11. pichou

    Plane tangent to a sphere

    Hi @ssaket, I needed to keep my latitude longitude approach but thanks to your suggestion, I managed to get the right formula: https://www.babylonjs-playground.com/#VDG184#9 Thanks, I didn't know about the alignWithNormal function but very useful! Cheerz
    1 point
  12. @Deltakosh, thanks a lot for the tip. Seperating the leaves from the stems and setting different material attributes has given me the best of two worlds.
    1 point
  13. http://doc.babylonjs.com/how_to/solid_particle_system#sps-visibility
    1 point
  14. Your Wingnut has now returned to an age-appropriate profile.
    1 point
  15. Wingnut thanks for caring (heart heart heart). (I am working on being more emotive.) This must have emerged with the new release. It also appears in the playground of record, https://www.babylonjs-playground.com/#PL752W#1 Some sandpaper outa do it. Back soon.
    1 point
  16. sprite.setData('anims', { down: 'alien:down' left: 'alien:left', right: 'alien:right', up: 'alien:up', });
    1 point
  17. function update () { if (this.body.embedded) { this.body.touching.none = false; } if (body.touching.none && !this.body.wasTouching.none) { // Collision just ended } }
    1 point
  18. kcoley

    glTF Validation Error

    @freetoplay @bghgary I just made an update to the 3ds Max Babylon exporter which now uses the KHR_lights_punctual extension and sets KHR_materials_unlit in extensionsUsed when exporting to glTF/glb
    1 point
  19. Server-side physics calculations are necessary for multiplayer games to prevent cheating. Network lag - yes, but that's on a different layer than physics calculations; partly solvable with methods like prediction and correcting of wrong predictions. But that doesn't depend on the framework's language, you can implement server-side in Javascript or even Assembler and still have issues with the network lag that's just another task. I'm not very experienced in game frameworks, but most tutorials I see talk about taking a javascript engine, add node.js plus some magic and run in on a server-
    1 point
  20. Received the book BabylonJs Essentials yesterday. Although some parts I already knew because I'm developing in BabylonJs already, no problem. There were still parts that I didn't know or didn't come about yet... so still useful. Plus the paperback book looks nice on my night cabinet. It's real 3D you know, real paper texture 🙂
    1 point
  21. QuintusHegie

    Quick poll

    I use https://preview.babylonjs.com/babylon.js but I'm still developing so production and testing is the same for me. 🙂 When I would decide to make a copy of the test of my game for real production/go live, then I'll probably stick to the most recent version at that time (so the code doesn't break on later updates).
    1 point
  22. I have to create the function like that, I add all the sums and at the end they must be equal or different. Maybe we can do it differently, but like that, it works. I put my function here in case it interests someone. isPoseMatrixEqual(mesh) { let poseMatrix = 0; let computeMatrix = 0; for(let i = 0; i < mesh.getPoseMatrix().m.length; i++) { poseMatrix += Math.abs(mesh.getPoseMatrix().m[i]); } for(let i = 0; i < mesh.computeWorldMatrix().m.length; i++) { computeMatrix += Math.abs(mesh.computeWorldMatrix().m[i]); } if(poseMatrix === comput
    1 point
  23. You would use the SceneManager findSceneComponent function to find ANY component class on the specified OWER GAME OBJECT So for Example if i want t o get a reference to the BABYLON.AnimationState component that is on an OWNER GAME OBJECT let animator:BABYLON.AnimationState = this.manager.findSceneComponent("BABYLON.AnimationState", this.ownerMesh); If you are trying to get a reference to a component from a script that is ALSO on the same OWNER GAME OBJECT let animator:BABYLON.AnimationState = this.getComponent("BABYLON.AnimationState"); So to get a reference to
    1 point
  24. Well we have a set of tools to help in this situation: https://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered#things-to-do-and-not-to-do Technically, you can separate the leaves and make them transparent with a predepth pass. This way you could get both: correct z-sorting (prepass) + good AA
    1 point
  25. JohnK

    SPS particles animation

    Jerome beat me to it. This one uses the box's horizontal position to determine the height fluctuation http://playground.babylonjs.com/indexStable.html#EFRPL2#5
    1 point
  26. jerome

    SPS particles animation

    http://playground.babylonjs.com/indexStable.html#EFRPL2#3
    1 point
  27. I had a little play around, and this is how I guess it works. Collisions are done in order of collisionGroup. Box1 is in collisionGroup 1, so it's collision executes first on collision (before collisionGroup2). Now: If in the first collide() function, you move the body back outside the collision, when it's now turn for collisionGroup 2 to look for collisions, it no longer exists anymore. Does that make sense? You can change Box1 to collitionGroup 3, and you'll see that it's now Box2's text that shows up as it's now the 'first collision' in order. To stop this: You can make
    1 point
  28. Sebavan

    GLTF Extras

    There is no direct access from the mesh, you could nevertheless acces it through the gltf data available in a callback I ll make a playground as soon as i reach back home.
    1 point
  29. I didn't get a chance to play around with code to look at this, so I can only give a few suggestions on a few things to try. I think these link should be helpful: (This one says that you need an html <input> tag to show the keybard. https://stackoverflow.com/questions/6837543/show-virtual-keyboard-on-mobile-phones-in-javascript (general html for showing/hiding getting input) https://stackoverflow.com/questions/21499402/how-to-use-a-textbox-with-html5-canvas-and-hide-it-when-not-needed And this link has the html5 markup for making the input a nu
    1 point
  30. https://github.com/jsfehler/phaser-ui-tools This is something I worked on a few months ago to refine my javascript knowledge and eventually my ES6 knowledge. It came about after I realized I kept needing some of the same things in my Phaser projects. It contains the following classes to make building a UI in Phaser easier: - TextSprite - TextButton - Column - Row - Viewport - Scrollbar - Valuebar - Quantitybar - Wheel3D For many projects, it may make more sense to build the UI in HTML and overlay it. I'm not making an argument for that one
    1 point
  31. Buttons have useHandCursor=true by default, that's why it shows on https://samme.github.io/phaser-examples-mirror/buttons/disable button on click.html.
    1 point
  32. rich

    Custom Builds?

    For anyone else coming to this, there is now a proper tutorial on how to do this. You can find it here.
    1 point
  33. Hi SoulBeaver, I encountered this error also a few weeks ago. The simple fix for me was to make sure that no tiles in Tiled used 'rotation'. Phaser doesn't seem to recognize rotation in Tiled. It's best to create a new rotated file and add it to the tile set.
    1 point
×
×
  • Create New...