Popular Content

Showing content with the highest reputation on 06/08/2018 in all areas

  1. 3 points

    Problems with pivot and rotation

    Hi @ichbinrob as a simple minded man here is a simplified PG with simple code simply using TransformNode instead of setPivot. May not be exactly what you want but could give you some ideas or another approach. http://www.babylonjs-playground.com/#RIUM9U
  2. 2 points

    Tilemap & File Pack Project Template

    I've created a template to illustrate the concept of levels generated from dynamically loaded tilemaps from a single level scene. Phaser 3 Tilemap & File Pack Project Template Demo Questions and feedback are welcome!
  3. 2 points

    Blender Exporter Total Frames

    Check your log file. I get 3 actions for your armature: processing begun of skeleton: Armature, id: 0 processing begun of bone: root, index: 0 processing begun of bone: foot_ik.L, index: 1 . . . processing begun of bone: Leg_R.001, index: 86 processing action AMN_GAME01: in[0 - 1], out[0 - 1] processing action ANM_GAME: in[0 - 630], out[10 - 640] processing action CameraAction.001: in[0 - 1], out[650 - 651] When you are exporting multiple actions, you need to start them as animation ranges. Looks like you only wish to export the current action. In that case, select 'Only Currently Assigned Actions' in the Exporter Setting Panel on the Scene Properties tab.
  4. 1 point

    New GUI control: The Grid

    Hey guys!!! I'm glad to announce the availability of a new container for GUI: The grid Doc here: http://doc.babylonjs.com/how_to/gui#grid With this new tool, it's gonna be easier than ever to build complex UI
  5. 1 point

    Car Light Physics Engine

    Hi people, I'm currently investigating about some car games (car races in towns or on circuits or on mountain roads, etc). I know BJS can work great with some nice physics engine like Cannon, Oimo or Energy but I like to have lighter and more dedicated stuff when possible. That's why I took a look at this nice library : https://github.com/spacejack/carphysics2d There's a live demo here : http://www.spacejack.ca/projects/carphysics2d/ Use up and down arrow to push the gas throttle or the brake, the left and right arrow to steer the wheels and the space bar to pull the e-brake... drifting is so fun. Well, this is a light 2D library dedicated only to the car physics : you know, all the stuff about mass transfert on the wheel axis, acceleration, frictions, tire gripping, etc, etc. It's really light : the commented and un-compressed part of the code about the physics themselves is about 100 LOC only. So I just had a quick try to adjust it to work with a BJS example. This is not a real port, not even an adaptation in some BJS-esque style, just a plug to make it work with some 3D objects instead of 2D ones. Of course, I had to add some tiny logic to have 4 wheels rotating according to the current car speed. Here's a first quick and dirty proto : http://jerome.bousquie.fr/BJS/test/carSim1.html The car front is blue, the back is red. Up and Down arrow to speed up or to brake. Space bar to pull the e-brake. Just click once in the canvas before because the keyboard controls of the ArcRotateCamera have been disabled in order to be used as car controls instead. Note : the car can't drive backwards 😉 This could be proted, refactored in the BJS way and optimized then (added to my todo list).
  6. 1 point

    Name of Current Scene

    @Ninjadoodle There is way to get name of current scene (game.scene.constructor._name), but since that is a bit tricky way i added new sceneName property to System game.system.sceneName
  7. 1 point

    LODs and CSG

    1. I think that would be the more performant option 2. You can get activeLOD at any time with meshLOD = mesh.getLOD(this.activeCamera);
  8. 1 point

    Tutorial Talk

    Merge is in progress..should be good in a few minutes
  9. 1 point

    Apple deprecates openGL

    When this was announced the other night I tried frantically googling things thinking the sky was falling. What I've learned from it (which may or may not be correct, correct me if I'm wrong): Each browser has it's own translation layer which translates things differently on OSX. On PC as davrious stated above, https://github.com/google/angle does all translation, down to directX. - It looks like on OSX angle is aiming to be translating over to vulkan which will fill the gap once deprecated. I haven't figured out what mozilla or safari are using (possibly forked version of angle for firefox: https://github.com/mozilla/angle), and maybe something already translating to metal for safari? Also the thing that I've still not been able to figure out concretely, webgl (on all non desktop devices) is based on OpenGL ES. which is completely separate from opengl. Some people are saying opengl ES support is NOT being deprecated, and won't be affected. (So basically, even though apple is saying we are deprecating opengl from iOS, it won't affect webgl to any degree on phone/ipad). So the good news is, as far as I can tell, the sky isn't falling, or at least not entirely.
  10. 1 point
    Instantiate several renderers instead. Application is a mashup class that you have to rewrite if you have different set of components: https://github.com/pixijs/pixi.js/blob/dev/src/core/Application.js This article is correct in everything except "interactionManager", its actually embedded into renderer: https://github.com/pixijs/pixi.js/wiki/v5-Custom-Application-GameLoop
  11. 1 point

    Blender Exporter Total Frames

    I think we have to ping @JCPalmer :)
  12. 1 point

    More examples for PG

    Hey team! Did you see that ?
  13. 1 point

    Blender Exporter Total Frames

    Nothing on this, yet, huh? Sorry, R. Have you discovered anything new?
  14. 1 point

    Hide a sprite

    Sure, how about this? https://github.com/BabylonJS/Babylon.js/pull/4456/
  15. 1 point
    @RaananW Thanks! I confirmed that it works correctly with the latest version of the library. http://jsdo.it/cx20/IVHj
  16. 1 point

    New GUI control: The Grid

    Example of a complex UI based on grids: https://www.babylonjs-playground.com/#WZZDNR#7
  17. 1 point


    As you can see on the issue, it is "in progress" Some demos for you: Scale http://playground.babylonjs.com/#7KX2R8#54 Axis drag http://playground.babylonjs.com/#7KX2R8#45 Rotation http://playground.babylonjs.com/#7KX2R8#53 Gumball/manager http://playground.babylonjs.com/#7KX2R8#61
  18. 1 point

    Tap Tap Plane

    It's just an flappy bird copy !
  19. 1 point
    The best way is to set the animation in the preload Scene as @rich mentioned. This way we are not creating the animation every time the scene load. Please note that we need to create the animation inside the create function inside Preload and not inside preload function
  20. 1 point

    Marking questions as solved

    gif of how to get the red solved ribbon to appear.
  21. 1 point

    Babylon Toolkit Status

    Status Update: This is my first little demo of my Frame By Frame Animation State Machine. That Supports Animation Blending (Both Blending Speed And Final Composition) Note the Play Blend button with play a Walk Forward animation with a 50% blend of the Left Strafe Walk ... Giving a Diagonal Walk Forward result Clear your browser cache and take a look: http://mackey.cloud/games/tester/
  22. 1 point
    Hi all, I created PlayGround how to display the ViewCube in the upper right hand corner. ViewCube provides visual feedback about the current viewpoint of the scene. Just for fun
  23. 1 point

    Show FPS

    Here's an updated fiddle, showing that a combination of game.time.advancedTiming = true; and game.debug.text(game.time.fps, x, y, color) will successfully display the FPS. https://jsfiddle.net/bjrnw06c/2/
  24. 1 point

    Draw Solid Rectangle

    1.) Draw var drawnObject;var width = 100 // example;var height = 100 // example;var bmd = game.add.bitmapData(width, height); bmd.ctx.beginPath();bmd.ctx.rect(0, 0, width, height);bmd.ctx.fillStyle = '#ffffff';bmd.ctx.fill();drawnObject = game.add.sprite(game.world.centerX, game.world.centerY, bmd);drawnObject.anchor.setTo(0.5, 0.5);
  25. 1 point

    clickable area

    Define your regions as rectangles and test if a point (your mouse or finger(s) ) is inside that region. //define you regionvar topLeftQuarter = new Phaser.Rectangle(0,0,game.width/2,game.height/2)//listen for pointersgame.input.onDown.add(handlePointerDown)//handle a touch/clickhandlePointerDown = function(pointer){ //this is the test, contains test for a point belonging to a rect definition var inside = topLeftQuarter.contains(pointer.x,pointer.y) //do whatever with the result console.log('pointer is inside region top left quarter', inside)} Have fun!