Popular Content

Showing content with the highest reputation on 03/05/2018 in all areas

  1. 3 points
    The Leftover

    Illuminated City

    This is wobbling to market. Crime analysis tools: prototypes built on open data. The "strive" was for great presentation fast, slicing a lot of data in many useful ways. I started with SVG - and still use it for conventional charts. A lot of the data is presented on a map. In January, I elected to dispense with Google Maps and put the whole thing on a Babylon Canvas. I already felt late so it has been an intense period. Images are below and you can use it at https://sanfrancisco.ca.illuminated.city, https://chicago.il.illuminated.city and https://boston.ma.illuminated.city. The 3d part is called "geo-location". (You may need to sit and the landing page for a few counts before trying to navigate.) Thank you all for making Babylon. It has changed my life. Also, a shout out to JohnK for suggesting SPS, which have served me well. Comments, suggestions, conversation all welcome. Notes: ~ I applied scene.pick to allow the user to enumerate details of crimes in a specific area. ~ Chicago is mammoth, with about 400K crime records and a bazillion hexagons, but it still works Image 1: Assault and Battery in San Francisco for the past three years. Image 2: Theft from motor vehicle. Color indicates increase/decrease; elevation indicates current level
  2. 2 points

    Path animation and mesh position

    @MarianG- I tried several conditions similar to this, but didn't get it right. Thank you very much for taking the time to answer and to update the PG. Between you and @JohnK, you helped add a key component to the project which was as frustrating as I've yet encountered. I missed the logic needed to execute this, and I wish you lived closer to San Diego, as I'd definitely buy you and John a beer - or two. Thank you again for your help. Cheers, DB
  3. 1 point

    Blender Exporter Version 5.6

    Blender exporter was updated. Here is commit message:
  4. 1 point

    Kristal Quest

    Marooned! You must collect crystals to power your spaceship while avoiding hostile life forms. https://samme.github.io/kristal-quest/ https://github.com/samme/kristal-quest
  5. 1 point
    textureFormat is a read-only parameter after the texture was created. You can create a raw texture of type BABYLON.Engine.TEXTUREFORMAT_LUMINANCE using BABYLON.RawTexture.CreateLuminanceTexture(...) would that be helpful?
  6. 1 point
    Right handed system is not only about scaling the x axis. it is a lot more than that. Otherwise all frameworks would simply support it no, it is not the desirable behavior. If yous meshes are well prepared, it shouldn't happen. If you want to reproduce a right-handed playground and show that it works/doesn't work, it would be great.
  7. 1 point

    Solid color tint

    Hi Guys, I was wondering if it's possible to render a texture with a solid color? I would need this in order to build a masking sprite. Im planning on using a solid black white mask and for this reason would like to be able to draw a sprite with just black or just white to a canvas. I looked at the tint class, but this doesnt force all pixels in a texture to be a color. Thanks in advance! Erik
  8. 1 point

    Solid color tint

    Alternative: https://github.com/gameofbombs/pixi-heaven can tint whole sprite in one color. It can even invert it: https://gameofbombs.github.io/examples-heaven/#/basics/basic.js Also if you need to mask with a sprite, you can use its "maskSprite" property. If you want even better mask, with your behaviour, modify https://github.com/gameofbombs/pixi-heaven/blob/master/src/twotint/sprites/SpriteMaskedRenderer.ts and rebuild the plugin. Note: pixi-spine is required by this plugin.
  9. 1 point

    Dithered tileset. How to interlace them?

    Both suggestions mean modifying the tilesheet? I cannot have tiles of different sizes, the tilemap engine requires nxn tiles in all the tilesheet. At least that's what i understand (been using phaser3 for a day). Another thing i'm thinking is just to make a custom RenderTexture or Bitmap as i used to do. Is there a way to convert a bitmap to tilemap so i can use its methods? Thanks!
  10. 1 point

    [WIP] Jewel Matching Game

    Try this tutorial and see if it helps. https://github.com/medicationforall/JewelGame/blob/master/tutorial.md You may be running into the same problem that Kaffesumpen was hitting where clip-path was not supported by your browser. If your game looks different than what's in the tutorial please let me know. On an aside my tooltips may just be poorly written. What particular part of the game is giving you issues? I can take guesses, but if you have specific examples that would help. Awesome Glad it worked.
  11. 1 point
    Play Cool Math

    Math Tower of Hanoi

    Based on this classic puzzle, we created a game called Math Tower of Hanoi. The game contains of 18 levels - from simple ones to complex ones. The smallest disk has number 1 on it, the next disk is larger and has number 2 and so on up to the largest disk that has number 8, accordingly. The main goal of this game is to move the disks so that the amount of the digits on all the disks in the bars would match the target. The fewer steps you make during the game, the more points you will get for the puzzle. You are allowed to move only one disk at a time. You cannot put a larger disk on a smaller one. You will get other math tasks between the levels. Play and improve your skills in mental counting. Online Version Android Version iOS Version
  12. 1 point

    Math Tower of Hanoi

    Nice game!
  13. 1 point

    [SOLVED] Get Pixel color

    Hiya arbrakan, welcome to the forum. Sorry for the slow replies. https://www.babylonjs-playground.com/#742772#15 Watch console while mousing-over canvas colors. Those are red, green, blue, and transparency numbers for pixel under pointer. Still incorrect, somehow. (I am using FF 52 which COULD be incompatible with WebGL version 2... canvas things.) Move up/down over blue box. In my browser, area near top of blue box... has NO blue value. hmm. Problem. Perhaps we are close to success, though. (maybe) I used example from https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/readPixels I am no expert. Perhaps others will help... soon. Stay tuned.
  14. 1 point

    Pre-import of meshes into memory

    I do not know which exporter you use. For Blender you can indicate to load the mesh already disabled. This the same as @Wingnut's post, but no code as it is stored directly into the JSON file.
  15. 1 point

    Pre-import of meshes into memory

    Hi Kurhlaa. https://www.babylonjs-playground.com/#199WQ0#7 When you use scene.beforeRender or scene.beforeCameraRender (see lines 63-67) to loop thru all mesh and setEnabled(false), I don't think the mesh get rendered at all. So you are doing no back-walking that way, right? I'm not sure that this is correct, but it makes sense, and I think I saw Deltakosh answer a similar question in a similar way. Perhaps others will comment soon.
  16. 1 point

    Path animation and mesh position

    Something like this ? https://www.babylonjs-playground.com/#72C7CT#3
  17. 1 point
    Thanks all! I just added hold position (H key) and stop (S key).
  18. 1 point
    Thx a LOT ! I guess there are many cases I should have used copyFrom(), then I am lucky I never had bugs before ^^ How wonder how much having unnecessary Vector3 impact performances ? My guess is that's really negligible but maybe I'm wrong ? Anyway I'm glad I can have a a more clean script thanks to you ! I LOVE so much BABYLON.js and the community !
  19. 1 point

    Changes for Blender exporters

    @V!nc3r, 5.6 is commited. I did not touch materials. With Blender 2.80, I have the feeling materials are going to need a lot of changes. Not going to do it twice. Use the other exporter if PBR is needed, or code it on the BJS side.
  20. 1 point
    Reuse the code and just pass what's different as a parameter. Better yet, make a class for the popups, write the open and close methods for it, then work with instances of that class.
  21. 1 point
    @Balamurugan Sounds like you have a specific question about a specific part of your game, sounds like it deserves a thread of its own. Try putting in a new thread what the exact problem is, what you've tried and what went wrong with what you tried.
  22. 1 point

    Dissolve Shaded

    You can wait for someone like @finscn, or go and do it yourself.
  23. 1 point

    3D Text in Babylonjs using Vectorize-text

    I have just build 3D Text meshes in Babylonjs with the help of Vectorize-text. Please visit website http://grid.vn/3dtext to play and see the source code. ... but the 3D Text meshes still not correct at the holes, some one can help please???
  24. 1 point

    3D Text in Babylonjs using Vectorize-text

    It is to do with the the order (clockwise or counter-clockwise) the points making the holes are put into the array. Currently the way they are ordered (probably the same way as the outer edges) means that the normals polygonBuilder creates are pointed towards the inside of the letters rather than away from them. Simplest way to correct is to reverse the hole array for (var j = 1; j < letter.length; j++) { var hole = []; for (var k = 0; k < letter[j].length; k++) { hole[k] = new BABYLON.Vector2(scale * letter[j][k][1], scale * letter[j][k][0]); } hole.reverse(); // ADD THIS HERE polyBuilder.addHole(hole); } A depth option would be good.
  25. 1 point

    How to create a spin wheel game?

    Hi all i'm totally new to phaser so far my work is like the following: var game; // the spinning wheel var wheel; // can the wheel spin? var canSpin; // number of slices (prizes) placed in the wheel var slices = 12; // prize names, starting from 12 o'clock going clockwise var slicePrizes = ["$20", "$50", "$10", "$500", "$5", "$50", "$20", "$50", "$10", "$500", "$5", "$50"]; // the prize you are about to win var prize; // text field where to show the prize var prizeText; window.onload = function() { // creation of the game game = new Phaser.Game(600, 600, Phaser.AUTO, ""); // adding "PlayGame" state game.state.add("PlayGame",playGame); // launching "PlayGame" state game.state.start("PlayGame"); } // PLAYGAME STATE var playGame = function(game) {}; playGame.prototype = { // function to be executed once the state preloads preload: function() { // preloading graphic assets game.load.image("wheel", "wheel.png"); game.load.image("dot", "oie_transparent (1).png"); game.load.image("arrow", "arrow.png"); }, // funtion to be executed when the state is created create: function() { game.physics.startSystem(Phaser.Physics.ARCADE); game.stage.backgroundColor = "#880044"; wheel = game.add.sprite(game.width / 2, game.width / 2, "wheel"); wheel.anchor.set(0.5); arrow = game.add.sprite(game.width / 2.5, 70, 'arrow'); arrow.scale.setTo(0.4, 0.3); game.physics.arcade.enable(arrow); arrow.anchor.set(0.5); arrow.enableBody = true; dots = game.add.group(); dots.enableBody = true; dots.physicsBodyType = Phaser.Physics.ARCADE; for (var i = 0; i < slices; i++) { var x = Math.cos(i / slices * Math.PI * 2) * 225, y = Math.sin(i / slices * Math.PI * 2) * 225; var dot = wheel.addChild(dots.create(x, y, "dot")); dot.anchor.set(0.5); dot.body.immovable = true; } // adding the text field prizeText = game.add.text(game.world.centerX, 578, ""); // setting text field registration point in its center prizeText.anchor.set(0.5); // aligning the text to center prizeText.align = "center"; // the game has just started = we can spin the wheel canSpin = true; // waiting for your input, then calling "spin" function game.input.onDown.add(this.spin, this); }, // function to spin the wheel spin() { // can we spin the wheel? if (canSpin) { // resetting text field prizeText.text = ""; // the wheel will spin round from 2 to 4 times. This is just coreography var rounds = game.rnd.between(3, 5); // then will rotate by a random number from 0 to 360 degrees. This is the actual spin var degrees = game.rnd.between(0, 360); // before the wheel ends spinning, we already know the prize according to "degrees" rotation and the number of slices prize = slices - 1 - Math.floor(degrees / (360 / slices)); // now the wheel cannot spin because it's already spinning canSpin = false; // animation tweeen for the spin: duration 12s, will rotate by (360 * rounds + degrees) degrees // the quadratic easing will simulate friction var spinTween = game.add.tween(wheel).to( { angle: 360 * rounds + degrees }, 12000, Phaser.Easing.Quadratic.Out, true); // once the tween is completed, call winPrize function spinTween.onComplete.add(this.winPrize, this); } }, // function to assign the prize winPrize() { // now we can spin the wheel again canSpin = true; // writing the prize you just won prizeText.text = slicePrizes[prize]; }, update: function() { game.physics.arcade.collide(arrow, dots); } } can anyone provide me some guidance for what to do next and what have i done wrong? The result i would like to achieve is similar to https://www.youtube.com/watch?v=Gm9kftOieYI . So basically the arrow animation and controllable output/result. the attachment is the full project. please help wheel.7z