Popular Content

Showing content with the highest reputation on 07/17/18 in all areas

  1. 4 points
    easy http://www.babylonjs-playground.com/#H5TZ2P
  2. 3 points

    Performance Optimization tips.

    Hi @aFalcon visibility = 0 will just not render mesh, but will do matrix calculations (position, rotation e.c), but if you set enabled false, it will not perform these calculations, so enabled false should be more performant.
  3. 2 points

    Scene Watcher Plugin

    https://github.com/samme/phaser-plugin-scene-watcher Shows scene order, status, and size of update/display lists. Also logs scene events (if enabled).
  4. 2 points
    Great Idea. I made rays from bounding box corners to camera's position. Something like this: var boundingInfo = activeObject.getBoundingInfo().boundingBox.vectorsWorld; for (var i = 0; i < boundingInfo.length; i++) { var ray = pickingRays[i];//pre defined rays for reuse ray.origin = boundingInfo[i]; scene.activeCamera.position.subtractToRef(ray.origin, ray.direction); ray.direction.normalize(); ray.length = BABYLON.Vector3.Distance(scene.activeCamera.position, ray.origin); for (var j = 0; j < scene.activeCamera._activeMeshes.length; j++) { var mesh = scene.activeCamera._activeMeshes.data[j]; if (ray.intersectsMesh(mesh, true).hit) { mesh.visibility = 0.5; } } } I never knew there was a multiPick, its there as scene.multiPick and scene.multiPickWithRay. This helped in other areas. So double thanks for the bonus 😉 The above solution works just right, but I would love to see if there were a better/efficient solution.
  5. 2 points
  6. 1 point
    SOFTGAMES is looking for an experienced Game Developer - JavaScript / HTML5 who is goal-orientated and a strong team player. Join a team of super experienced people to build great games for Messengers that will entertain tens of millions of people around the world every month. You design, architect, test and implement game features into our live games. Further you'll work on upcoming Messenger Games from the scratch until global release and during post-launch. You will collaborate with producers, game artists and with other HTML5 Game Developers to share learning and best practices. You are passionate, ship robust and high-performance code, and act as a fount of knowledge when it comes to game development. As part of a small, high experienced and dynamic team you will enjoy a creative, challenging and collaborative environment. Your role… Develop HTML5 games for Facebook Messenger to expand our portfolio, with Pixi.js Maintain and optimize game features Write robust code to be used by millions of users Work on schedule, set clear goals Independently create complete solutions from scratch Share knowledge and help colleagues Your profile… Great passion for game programming 3+ years of professional software engineering experience Deep knowledge of: Pixi.js JavaScript / HTML5 As a plus: Phaser, TypeScript, Webpack, Reactjs, Node.js Shipped at least 2 mobile/social title, preferably on multiple platforms Ability to quickly get up to speed with existing code Deliver high-quality and well-structured code Open-minded and keen to learn Check out Cookie Crush on Facebook Messenger. Can you build this game? We offer… A spirited, inspiring, international and enthusiastic team The best and brightest company in producing and distributing Messenger Games The chance to craft games for millions of monthly gamers Valuable insights into global expansion, start-up scene and entrepreneurship Flexible working-hours and flat company hierarchy Inspiring company breakfasts, epic team events Perks: fresh fruits, cold drinks, tee, coffee, discounted local transport ticket, health package, lunch vouchers, maternity leave etc. About SOFTGAMES… Based in Berlin, the creative capital of Europe, SOFTGAMES together with its ROFL brand is the leading developer of games for Facebook Messenger and the developer behind popular titles like Cookie Crush, Solitaire Story, Candy Rain or Fish Story. Further SOFTGAMES is operating the world’s largest platform for HTML5 games distribution and monetization outside the Messengers. We’re delivering fun to tens of millions of players every month across 6 continents on the device of their choosing. Our vision is to help users to instantly discover and engage with games they like, while helping brands to reach their target audiences. Have we caught your interest? Then we look forward to your detailed application here: https://softgames.recruitee.com/o/game-developer-javascript-html5
  7. 1 point
    The Leftover

    Web Assembly

    I should not being doing this . . . but I have been experimenting with Web Assembly. With so many hexagons and so many crime incidents, Illuminated City has come computationally intensive tasks. My question is, have y'all tried to use it for some functions (e.g. ComputeNormals)? Did it perform well? Did it seem worthwhile?
  8. 1 point

    Blender > .babylon Vertex Groups

    Hello, For anyone that may be interested, I have been messing with mesh.py to get it to export Vertex Groups along with their associated indices and have attached it. I think @adam and @ozRocker have both asked about this and I'd definitely make good use of it. I'd be grateful if you could let me know if this works for you or not, please. It currently adds them under the 'meshes' as 'vertexGroups' Massive disclaimer: I am not good with Python! Thank you Problem: it duplicates indices. mesh.py
  9. 1 point
    Hello, I'm looking for a highly experienced Game Developer/Designer to generate assets from large psd's using Texture Packer for Phaser - Sprite sheets and JSON. There may also be some 3D renders and animations required. 1 game initially with others to follow. These are Casino Table Games. Prefer UK, Western Europe. Must have fluent english and a positive attitude. Thank you.
  10. 1 point
    I will be happy to merge the fix if you want to do a PR
  11. 1 point
    You only need to make sure that your inspector version is aligned with your babylon.js version (which seems not to be the case :))
  12. 1 point

    Blender > .babylon Vertex Groups

    PG illustrating use of this: http://www.babylonjs-playground.com/#0MSI9S#1
  13. 1 point

    Switching to a different screen

    @Deltakosh Thanks it works great!
  14. 1 point

    [SOLVED] Atlas UV issue

    Hi and welcome to the forum.
  15. 1 point

    Babylon Toolkit Getting Started Video

    GLTF is for my next generation underlying toolkit library called Canvas Tools that the Babylon Toolkit will use to produce GLTF scene file with EXTRA Unity Meta Data. This not ready yet. Still working on that. The current toolkit produces native Babylon json file. also I use my new Canvas Tools to import glTF into unity ... until I get my new tools out ... you could use Sketchfab or Khronos... my tools are ports of the Khronos UnityGLTF projects with a bunch of my tools added 👌
  16. 1 point

    Switching to a different screen

    Blur being leaving the screen? and focus being coming back to the screen... I assume. Thanks DeltaKosh I will try it out!
  17. 1 point
    Tried using TRIANGLESTRIP on a box, but doesn't look that great, maybe I'm missing something, please have a look here: https://www.babylonjs-playground.com/#8774X1
  18. 1 point

    Switching to a different screen

    Hello you can register with window events: window.addEventListener("blur", this._onBlur); window.addEventListener("focus", this._onFocus);
  19. 1 point

    [SOLVED] Atlas UV issue

    this should be the size of a texel: 1/width and 1/height
  20. 1 point

    The Trouble with Tweening [solved]

    @Wolfsbane I have just added new reverse method to Tween class. It has boolean parameter, which if you set to true, will force the tween to start if it's not playing (not started or already ended). Here is example usage: game.createScene('Main', { init: function() { this.sprite = new game.Sprite('panda.png'); this.sprite.anchorCenter(); this.sprite.center(this.stage); this.sprite.addTo(this.stage); this.sprite.interactive = true; this.sprite.mouseover = this.tweenIn.bind(this); this.sprite.mouseout = this.tweenOut.bind(this); }, tweenIn: function() { if (this.tween) this.tween.reverse(true); else { this.tween = game.Tween.add(this.sprite.scale, { x: 2, y: 2 }, 2000).start(); } }, tweenOut: function() { this.tween.reverse(true); } }); This will tween the sprite scale to 200% if you move your mouse over it, and then scale it back to 100% as soon as you move your mouse out of it, by reversing the tween.
  21. 1 point
    I agree that this should be the same result as resizing the height where all the scene is expanding or shrinking.
  22. 1 point

    Webgl PIXI plugin Sprite do not tint

    This is now fixed in PixiJS plugin 1.2.3 https://www.panda2.io/plugins#pixi
  23. 1 point

    Performance Optimization tips.

    Hersir has right. setEnabled(false) no longer makes the mesh on the scene, but visibility=0 just makes the mesh invisible but still rendered as if it were visible somehow.
  24. 1 point

    Spine plugin

    Spine plugin 1.3.3 now supports clipping! Download: https://www.panda2.io/plugins#spine
  25. 1 point

    Performance Optimization tips.

    I would be very surprised if visibility = 0 has higher performance. There are too many checks (ie: that break a for loop on mesh.isEnabled()) for disabled that are before visibility checks... Interested to see any statistics.
  26. 1 point
    I'm currently using VSCode. Definitely my editor of choice for anything web-dev. It is well supported and has a lot of cool features (like an integrated terminal, live-code sharing, etc.) The only downside when using it for phaser is that there aren't currently any phaser extensions that support code snippets, documentation previews, or text-suggestions.
  27. 1 point

    BitmapText anchor y is inaccurate

    What tool did you use for your font? Open your .fnt or .xml file. Make sure that lineHeight is equal to size. Example: <info face="Font" size="64" bold="0" italic="0" charset="" unicode="" stretchH="100" smooth="1" aa="1" padding="2,2,2,2" spacing="0,0" outline="0"/> <common lineHeight="64" base="55" scaleW="2048" scaleH="512" pages="1" packed="0"/>
  28. 1 point

    Babylonjs consumes too much memory

    Yes, ask all users to have the latest graphics card and a latest-generation I7 processor. 100 000 mailles is really huge. I do not even know how to add so many objects to a scene, it must be a sacred work to achieve. Very very long. I do not even imagine how many images there are to load. To add 1000 meshes already on a scene is already enormous provided to have instances to create otherwise the FPS are really low and the users will not really be able to benefit from your game and will leave after 2 minutes of use.
  29. 1 point
    This is far from a perfect solution, but to get this started. 1. See if the mesh that could be hidden is in the camera frustrum, if needed: var frustumPlanes = BABYLON.Frustum.GetPlanes(camera.getTransformMatrix()); mesh.isInFrustum(frustumPlanes) 2. If your mesh is in the frustrum, then get the mesh bounding box or loop through all the mesh vertices and cast rays at each of the vertices with multiPick using something like lookAt() to get the normal to that vertex? This is the part that would kind of work, but surely has a lot of room for improvement. I am interested to hear how this is done properly. It's flawed, because it could still miss meshes. I can see multiple edge cases where that solution wouldn't work.
  30. 1 point
    I only know that in the font format letters have offsets, and anchor ignores it.
  31. 1 point
    The Leftover

    Web Assembly

    Gentlemen, thank you for the links. Let me some opinions base on three days of work. I started writing in straight WAT. Because I have a genetic defect that causes me to do things the hard way. However, it has caused me to learn a lot of things. WebAssembly is at the "MVP" stage as they call it. One can only create a module with functions below that - two levels. One can create a list of which functions may be exported. The MVP status shows: I couldn't figure out how to make a module-global variable that was mutable; so I did a work-around. One can share a typed array between JS and WA. In WA, it is called "memory" but there may only be one of them. I redesigned things a bit so all processing was applied against one array. This could put a crimp in my style. Is it possible the "C" converter bypasses these functionality bottlenecks? It seems a little unlikely; I think wat is the textual representation of wasm and they go hand-in-hand. They do appear to be beavering away at this much as we are here. The integration makes it *NOT* an all or nothing kind of thing. When the module is built, it can receive JS functions, notably console.log. So I can log things to the console. I could make other JS calls if I wanted. Exported functions are just a function. You can call it from JS. (If you print them it says "native code", which gave me a kick.) In light of this, I am pushing forward with creating limited functions for the three or four places where Illuminated City sits for more than a second. It requires some re-organization but I have the substantial advantage of being the only author. I can also write these functions in JS. That part is really neat; the array is one array and looks the same whether the manipulation was done by JS or WA. This will be helpful for testing.
  32. 1 point

    About IBL Baker

    FYI I just added an issue to get the IBL Baker doc' updated, hoping that derkreature is still active on github (last commit in May, so probably)
  33. 1 point
    It should work. Give me more details. Whats happening in the console?
  34. 1 point

    Web Assembly

    The answer might come (before the end of year, I hope) from AssemblyScript : https://github.com/AssemblyScript/assemblyscript that allows to compile a subset of TypeScript directly to WebAssembly, aka WASM, or to Javascript. Check out this online tool : https://webassembly.studio/ Knowing that BJS is already coded in TypeScript, the effort to port some parts of the code to the AssemblyScript required subset would probably be worth a try instead of rewritting thousands of lines in C/C++ just in order to compile them to WASM. A subset of TypeScript is just some legal TS... this just means that AssemblyScript can't understand all TypeScript, but just a subpart of it because the compiling process imposes some explicit definitions. Example : whereas TS can understand the statement "var a = 10" or "var a:number = 10", AssemblyScript needs to know if the variable a is an integer, a float and what memory size to use : i16, i32, f32, f64 before compiling. The same thing we would have to do if the same part of code were ported to C actually. Well, if you already contribute to BJS in TS, or if you simply code in TS on your side, you don't really need to learn more to start to code with AssemblyScript in order to get your first working WASM. Never tried so far though 😄
  35. 1 point

    Shouldn't the GUI block the pointer?

    Come to think of it, no they shouldn't because some, like text labels, can be used in the scene itself and need to ignore the mouse. Forget that I asked
  36. 1 point

    [SOLVED] polygroups?

    Not quite sure what you are after, but you could write your own custom mesh merge as well, if you want the meshes together and your own grouping. https://doc.babylonjs.com/how_to/how_to_merge_meshes#use-your-own-merge-function
  37. 1 point
    ValueCondition checks value on a specific propery. This should work: obj3.onoff = 0; var obj1 = scene.getMeshByName("Knob");var obj2 = scene.getMeshByName("Curtains");var obj3 = scene.getMeshByName("Fire");var obj4 = scene.getMeshByName("Solid");var audio = new BABYLON.Sound("Fire", "Fire.wav", scene, null, { loop: true, autoplay: false }); var COND1 = new BABYLON.ValueCondition(obj3.actionManager, obj3, "onoff", 0, BABYLON.ValueCondition.IsEqual); obj3.actionManager = new BABYLON.ActionManager(scene);obj3.actionManager.registerAction( new BABYLON.CombineAction(BABYLON.ActionManager.OnPickTrigger, [ new BABYLON.PlayAnimationAction(BABYLON.ActionManager.NothingTrigger, obj1, 0, 360, 0), new BABYLON.PlayAnimationAction(BABYLON.ActionManager.NothingTrigger, obj2, 0, 360, 0), new BABYLON.PlayAnimationAction(BABYLON.ActionManager.NothingTrigger, obj4, 0, 360, 0), new BABYLON.PlaySoundAction(BABYLON.ActionManager.NothingTrigger, audio), new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.NothingTrigger, function () { obj3.onoff = 1; console.log(onoff);}) ], COND1) ).then(new BABYLON.StopSoundAction(BABYLON.ActionManager.OnPickTrigger, audio));