Leaderboard


Popular Content

Showing content with the highest reputation on 12/27/2017 in all areas

  1. 2 points
    Very cool indeed! Playing with flat-shaded meshes and spotLights it's what I'm actually trying to do. Here's a tree (I used a tube to make the trunk and a dodecahedron to make the leaves). The more I know, the more I love you, BabylonJs
  2. 1 point
    satguru

    BabylonJS CharacterController

    A 3rd person character controller for BabylonJS source : https://github.com/ssatguru/BabylonJS-CharacterController docs: https://ssatguru.github.io/BabylonJS-CharacterController/ demo : https://ssatguru.github.io/BabylonJS-CharacterController/demo/ git download: https://github.com/ssatguru/BabylonJS-CharacterController/releases npm: https://www.npmjs.com/package/babylonjs-charactercontroller Originally developed as part of my Vishva project
  3. 1 point
    enpu

    Panda 2 Release notes

    @HeadClot Panda Remote has now been released on Xbox One, here is short preview video: https://www.youtube.com/watch?v=nFBChUZpkdM&feature=youtu.be There is also Tiled plugin that supports isometric tile maps: https://www.panda2.io/plugins
  4. 1 point
    Threedy

    Networking and 3D physics engines

    Thank you Deltakosh. That is actually a good idea. I haven't tried Emscripten versions yet (e.g. AmmoJS). I shall do this when I have time in the next few days! Thanks
  5. 1 point
    Deltakosh

    Networking and 3D physics engines

    Best intro ever We do not support directly physics engine but we offer integration. Regarding these engines performance I'm not sure how to help. Perhaps using Emscripten versions? With webassembly or asm.js, it could be faster. Regarding your question about client code hijacking, I tend to agree with you, the best way to protect your code is to not share it So server side is a good option
  6. 1 point
    I get that we're shooting in the dark without it, that's why I've tried to be as detailed as I could with the profiling so hopefully someone would see something that would lead me to the issue. -- Unfortunately, can't produce a live repro atm due to app being wrapped with electron, and even then I still have a rails/node server separate that need to be run for it to work, so it's not possible atm. That's a good idea on the .max file, I tried looking through the commits on github but wasn't easy to see what all changed between versions. I'll give that a shot
  7. 1 point
    Lanktor

    SceneLoader

    Hello All! What a great community! Thank you so much for all of your suggestions. I have viewed some of the examples and read a lot of the documentation. I have also installed Blender and am working my way through a very nice beginner tutorial that is provided by Blender Guru. Sounds like he is from Massachusetts. Once I get through the tutorial I am going to make a very simple scene and export it using the Babylon.js plugin. This will probably take a few days but it is really worth the effort. I am learning a so much and between the documentation for Babylon.js and Blender I can see a great deal of potential! It's wonderful finally having the time to work on a project as if it is my job! Thanks again for all of the suggestions and help. I am sure I will be back with more questions. Regards, Richard
  8. 1 point
    @ivan.popelyshev Thanks! I'm not having much luck as I am struggling to understand both why such clipping is necessary (Does PIXI bleed textures internally or something to overcome some webgl issues?), as well as where the (0.5, 0.5, w-0.5, h-0.5) / (w,h) comes from. I also can't find any documentation on the texture transform that the sprite mask example uses, and how that factors in here.
  9. 1 point
    Hi Deltakosh That will probably save a lot of thinking! I have been going down the PolygonMeshBuilder route as this was making flat sides by default? I have hacked together this https://www.babylonjs-playground.com/#PTTMVI#21 With a bit of trial and error which seems to let you move one of the original vertex numbers and it modifies the other end of the extrusion. I need this for resizing the glass that goes between my beams but your method above will work for changing the length of the beams. Thanks!
  10. 1 point
    Deltakosh

    Cylinder between two points

    ExtrudeShape can't add flat sides automatically as this is an expensive process But you can use shaders to do the work for you https://www.babylonjs-playground.com/#165IV6#166 By removing the normals you will force the shaders to compute them and it will do it in flat mode
  11. 1 point
    Beautiful!! I love the fact you can turn lights on
  12. 1 point
    tips4design

    Best Typescript/Phaser IDE?

    Currently Visual Studio Code is the best IDE for TypeScript by far (it's made by Microsoft, so is Typescript so it comes with default Typescript support). This is a no brainer, go with VSCode and you won't regret it. Get it here: https://code.visualstudio.com/
  13. 1 point
    Cool! Lighting is interesting, when using flat-shading. Flat-shade a medium-subdivided sphere, and perhaps color it. With the right combination of directional lights (perhaps 2-4), each slightly different .intensity, you can make each 2-face "facet" on the sphere... be a different color from any other facet. I'd start with 2 directional lights. Although positioning a directionalLight is often not necessary, let's do it anyway. When not using a ground-plane, set first directional light at position oh... -20, -20, -20. Then call its handy light.setDirectionToTarget(sphere.position). Light.intensity = 0.8, perhaps. Set second directional light at position 20, 20, 20, and call light.setDirectionToTarget(sphere.position). Light.intensity = 1.2; How's the many-faceted sphere, look? Is every square... a different color from any other? Stupid stuff like this... fascinates simple minds like mine. Perhaps try it with spotLights. A command like... spotlight.setDirectionToTarget(orbitingAroundMySceneMesh.position) is pretty fun... when put inside the render loop (using registerBeforeRender). It reminds me of old wartime ground-based search lights... following warplanes... tracking them across the sky. See our playground lighting demo... for sin/cos orbit-a-mesh techniques. Sorry, Wingnut rattling-on, aimlessly. Hey, I got the snowblowing done... here at my slummy 4-plex! Hurray. It's only 0 degrees out there, and breezy. brrrr. I dressed in "full spacesuit". Not much snow, though, so street-plow snowbanks were small and fast. My snowblower was a bit bitchy... but performed well (I had to coax it into forward gear, after a reversing, sometimes. Stuff was stiff). DONE! Coffee and doughnuts time! Party!
  14. 1 point
    Wingnut

    How to make in-game switch?

    Hiya splash and everyone. Hairy Krishmas! https://www.babylonjs-playground.com/#SSXJEN#2 There's one way of many. Lines 44-47 establish a "sensor" plane... glued to the box. (later invisible, likely) Lines 63-68 check that the sensor-plane is in-view of the camera, and 2 units or less away-from camera. If all that is satisfied, 'e' keypress will work. I tried it using the box itself and not a 'sensor', but that allows 'e' presses from the OTHER sides of the box. The sensor worked better. Others might have better ideas, so stay tuned. PS-aside: Does anyone else see the playground app... do a screen-scroll... when camera/keyboard down-arrow is used? White "bar" appears on bottom of PG screen, removed by pressing up-arrow? (Wingnut using Firefox). It's been happening for a few months now, and it sure is annoying when using freecams, eh? Maybe I'm the only one that sees it. Something in the CSS needs overflow: none;, or something.
  15. 1 point
    I didn't think that would be my solution.. only because I thought gravity was really -9.81 so I would have to double that, that seemed a bit weird so I didn't think that was the FINAL solution to problem that would go into my toolkit for everyone to use. about the 200 bodies... I was really creating and destroying to see HOW MUCH IT COULD HANDLE (and version 3.1 alpha was pretty smooth). And I was also testing my DISPOSE CHAIN making sure everything got disposed when using my manager.safeDestroy method... if 200 bodies are still registered then something in cannon is NOT UNREGISTERING on disposal... I will have to look at that... Is there a way to manually "UNREGISTER" a physics body, if so I will put that in object disposal code... I was really gonna clean up the asteroid and enemy ships and RECYCLE from pre-created asteroids or dynamically create up to a certain number then start recycling... Something like that. But if you say to simply DOUBLE all the velocity values (still a little concerned about having to double gravity which should be 9.81) but I will give that shot Thanks for the help
  16. 1 point
    Flake

    Pausing and Resuming main loop unintuitive

    tl;dr Pause, sleep, resume and wake make for a confusing api initially. Also a master pause (logic and audio) would be handy ( I might have missed this though.) After a longish break of game dev I wanted to take a look at Phaser 3. Loving it so far, (Phaser has come such a long way) but I find the pausing/resuming the entire game(logic, animation, sounds) a little confusing. I'm making a master Pause/Play switch. After game.loop.pause() didn't have the desired effect I've switched to game.loop.sleep and awake(). But I'm unsure if this is the intended use for them. Looking forward to the release of this bad boy, continue doing awesome work. Cheers
  17. 1 point
    Deltakosh

    Babylon.js 3.1 is available!!!

    Dear beloved community, I'm thrilled to announce that Babylon.js v3.1 is available. For this special occasion, we created a cool announcement video: I will blog on dev.windows.com later today but I wanted to share with you beforehand The list of features is (as always) really great and we can all be really proud of such an achievement! We also shipped several WebVR demos: And do not miss our hero demos: Congrats team!!!
  18. 1 point
    lagauche

    Webmidi or OSC + Babylonjs?

    Thank you! I'm going to take you up on your help offer. Please get ready for some very basic questions heading your way in the future : ) Open sound control is much more ideal considering your concerns yes, but it's tougher to setup, not to mention it's not native in any browser. If I can find a way to work with OSC instead (even if i'm restricted to a local web server), I will! Despite people trying to retire midi for a long time, it's just omnipresent as far as support goes and of course every music application can send it, which opens up a lot of possibilities for me to incorporate any music applications. Also, it's very easy for any non-technical person to plug in a usb midi controller, open Chrome and have everything working. I'm not interested in developing for the general public right now, but you never know. I loath the idea of sweeping a filter with 0-127 steps. I would just never do it : ) But maybe for visuals, I can make it work. Fingers crossed.
  19. 1 point
    Hello, Evaluating Web Audio API, for 3D sound, mixed HowlerJS with BJS without realizing: Oh, Babylon.Sound ... ? Whylookathat, lots of sound! : ) Thanks to answer below, with links. I will head that way. Related question is around WebAudio API AudioContext and -> compressors, oscillators, reverb, etc. with JS! +1. That should all be available through the AudioContext in Web Audio API... if there is an example. If not. I'll dig down, figure it out, and put it here.... : ) Applying 3D Sound with BABYLON.Sound. : ) Cheers.
  20. 1 point
    Hello All, I am working on a multiplayer action role playing game and I am using Phaser on the client because I just love this framework. Here is a link to the project on GitHub: https://github.com/crisu83/dungeon-game/tree/feature/phaser-server I have been experimenting quite a lot with running Phaser in headless mode on the server and I managed to get it to run with a few hacks. I am not sure that it is a good idea to run Phaser on the server, but I am looking into this because I would prefer to have an authoritative server that runs on the same code base as my clients. Here is what I did in order to get Phaser running on the server: First I installed the latest stable version of Phaser through NPM by running the following command: npm install http://github.com/photonstorm/phaser/tarball/v2.0.5After that I installed the dependencies for Node Canvas, instructions for that can be found in the project wiki on GitHub: https://github.com/LearnBoost/node-canvas/wiki Next I installed node-canvas and jsdom through NPM. These modules are required in order to "fake" the document, window, canvas and image objects that Phaser depends on that all are available in all browsers, but not on Node.js. npm install jsdomnpm install node-canvasThen I wrote this wrapped module for Phaser: https://gist.github.com/crisu83/5857c4a638e57308be4f I know that this is a ugly hack, but it at least lets me run Phaser on the server. Here is what the server currently outputs: I am now wondering if I should attempt to make changes to Phaser itself to not rely on the document, window, canvas, image when running in headless mode and create a pull-request for the changes. I am sure it will not be easy to remove all those dependencies, if even possible. Does anyone know if Richard has any plans for this? Does this even make sense to run Phaser on the server? Please share your ideas and feel free to use my code for your own projects. Thank you for reading.
  21. 1 point
    gryff

    Web Audio Use with BJS

    @meteoritool; Yeah I run across that. Apple likes to do it their way. @aWeirdo : Well I used to use howler.js which I gather automatically falls back to HTML5 audio tags if Web Audio is not supported. But I just felt I'm using BJS, I should used its sound code. Ty for the example code.- always helps this coder dummy @JCPalmer : Jeff, I tried it with and without .ogg files too - same issues. And of course, I'm well aware of your efforts with your own format. Be nice to have more on that . (Is that what gryff is always saying to JCP? ) Anyway thank you all for the suggestions and thoughts, and being the stubborn sort, I went ahead and published my efforts anyway: The Man From Babylon thread in Demos and Projects forum. cheers, gryff
  22. 1 point
    JCPalmer

    Web Audio Use with BJS

    I think that web page you reference is in-complete in that it does not does not even mention which browsers handle which types of sound files. That may be part of your results (check your console when it does not work). Might actually be below file type, in the codec chosen. BABYLON.Sound does take an array of sound file names now, I believe. Does mean you need convert your files to other formats to take advantage of, though. I am integrating sound tightly with animation, and also in need of voice recordings. I added voice recording / saving to my code base. Knowing that my recordings would need to be in multiple formats, I decided to fire all formats and make my own. I added saving to embedded Javascript or Typescript. The code needed to decode is minimal, and means the sound can be put in a script tag. This means you know it will be ready to play immediately. Not good for streaming, so reply on a different format for that. Am thinking about a slightly lossey change, so I am also saving everything in .WAV too. Can read external files of any type the browser supports & re-save in a more compact manner later. Here is what a .TS file looks like (base 64 data shortened): public MySound(scene: BABYLON.Scene) : BABYLON.Sound { var toBuf = function(base64){ var bStr = window.atob(base64); var len = bStr.length; var ret = new Float32Array(len / 2); var b1, b2, asShort, isNeg; for(var i = 0, j = 0; i < len; i += 2, j++){ b1 = bStr.charCodeAt(i); b2 = bStr.charCodeAt(i + 1); isNeg = b1 >> 7 === 1; b1 = b1 & 0x7F; asShort = 256 * b1 + b2; if (isNeg) asShort -= 0x8000; ret[j] = asShort / 0x7FFF; } return ret; } var context = BABYLON.Engine.audioEngine.audioContext; var audioBuffer = context.createBuffer(1, 13517, 44100); audioBuffer.getChannelData(0).set(toBuf("AzADDQK0AkQCjAMTAqoB0QGsAi...==") ); var snd = new BABYLON.Sound("MySound", null, scene); snd.setAudioBuffer(audioBuffer); return snd; }
  23. 1 point
    Thanks for the prompt reply. I am really looking forward to working with Babylon.js!
  24. 1 point
    tberend

    How to move a text object in phaser ?

    function create () { mytext = game.add.text(10, 500, 'text', { font: "16px Arial", fill: "#FFFF00" }) } function update() { mytext.position.y = mytext.position.y-1; // up 1 pixel }
  25. 1 point
    Yes you can put groups into groups into groups as far down as you want to. Handily Sprites can also have things added to them using sprite.addChild(text) - like so: var sprite = game.add.sprite(0, 0, 'button');var text = game.add.text(0, 0, "Some text", {font: "16px Arial", fill: "#ffffff"});sprite.addChild(text);// now text will be positioned relative to the sprite, and will move around with it like a group - except with sprites you can still use physics