Popular Content

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

  1. 5 points

    Bezier Surface

    I was inspired by this topic to produce a bezier surface. The surface is not a mesh but a logical object that contains the data from which you can build the mesh using a ribbon. I restricted myself to a bicubic surface. Over the next weeks I will add some other methods and who know perhaps try to write a typescript version and PR it. This PG animates the surface by changing the control points, https://www.babylonjs-playground.com/#KT9EE7#1 In this PG you can move the control points (purple spheres) in the direction of the chosen axis. Click on a control to move the axes to that control, click on a cone to set the axis along which you move the control ( done by giving mesh behaviours a go) then drag the control https://www.babylonjs-playground.com/#KT9EE7#2 Work still in progress. have fun.
  2. 3 points

    The Wingnut Chronicles

    Yes, I agree with that. I did not even watch it was a first post from the user. I do not pay attention to that, the number of post of users does not interest me necessarily. But you have reasons, the first users must be welcomed so that he feels the urge to return. After I do not think I said something unpleasant, I was just direct, tactless as you say, but hey, me and the tact it is two, I'm not always very comfortable in communication with Others, but I never think of evil, just direct, because I do not like to beat around the bush. Have a good day.
  3. 2 points
  4. 2 points

    Bezier Surface

    Had a look and it seems to depend on viewing angle whether an axis works or not. I expect it has something to do with my incomplete understanding of using dragBehaviors After further reading and digesting what it said I have simplified the PG https://www.babylonjs-playground.com/#KT9EE7#3 NOTE: In new PG since no axis or plane is defined then ` Dragging will occur along the plane facing the camera `. Thank you for spurring me on to check again.
  5. 1 point

    exploring matrix multiplications

    I don't know, was confused the first time i used the matrix lib implemented inside Babylonjs. for no reason, i was my mistake. finally i got it. after a lot of fun. using Babylonjs camera as rotation matix: https://www.babylonjs-playground.com/#Y7Q181#13 with ( rough draft ) mouse movement using Babylonjs matrix lib: https://www.babylonjs-playground.com/#Y7Q181#16
  6. 1 point
    Pointer#button isn't actually the button that's currently down, it's the button associated with the last mouse event. Use mousePointer.middleButton.isDown instead. In the latest Phaser CE, debug.inputInfo(…) will show the three button states. https://codepen.io/samme/pen/gKqgbB
  7. 1 point

    Shrink wrapping

    i love GB https://www.babylonjs-playground.com/#CSZYEP#14 https://www.babylonjs-playground.com/#CSZYEP#15 https://www.babylonjs-playground.com/#CSZYEP#17
  8. 1 point

    The Wingnut Chronicles

    I'm fine, thank you for asking. I agree 100% 👍 All our life consists of a little basic things. But first reply to a new user is like "a good reception area in hotel". This is just my opinion. Guys we are here to help each other, but not to fight.
  9. 1 point

    Bezier Surface

    wonderful @JohnK ** move in z direction not worked for me
  10. 1 point

    Using typescript in playground

    https://github.com/BabylonJS/Babylon.js/pull/4706 PR is created actually it is so cool and so great idea thanks @kentpham88 class SceneBase { scene : any; constructor() { this.scene = new BABYLON.Scene(engine); } } class CameraBase { camera : any; constructor() { this.camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene); this.camera.setTarget(BABYLON.Vector3.Zero()); this.camera.attachControl(canvas, true); } } class SceneTheme { lights : any[]; constructor() { var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene); light.intensity = 0.7; this.lights = new Array(); this.lights.push(light); } } class Objects{ meshes : any[]; constructor(){ this.meshes = new Array(); var sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene); sphere.position.y = 1; this.meshes.push(sphere); var ground = BABYLON.Mesh.CreateGround("ground1", 6, 6, 2, scene); this.meshes.push(ground); } } class MainScene { constructor() { } CreateScene() { var scene = new SceneBase().scene; var camera = new CameraBase().camera; var theme = new SceneTheme(); var objGroup1 = new Objects(); return scene; } } one of best benefits is created usable class can import in main code with live online debug we never had it before this is like new generation life of babylonjs
  11. 1 point

    alphaIndex occurs depth problem.

    Actually pretty sure it's your sort function, needs to return a -ve number, +ve number, or 0, not true or false. https://www.babylonjs-playground.com/#BTU1J7#5 If you log out the position.z of each mesh after sorting the way it was you'll see that they're not in the correct order. It would be less work just using the pos.z - campos directly as the alpha index though, unless there is some other reason you need to sort them.
  12. 1 point
  13. 1 point
    I see the same behavior in the latest version of Phaser CE, as well as in the Phaser input example (https://phaser.io/examples/v2/input/mouse-buttons) in the latest versions of both Chrome and Firefox. Seems appropriate to file a bug for investigation ☺️ Here's more information on how to do so: https://github.com/photonstorm/phaser-ce/blob/master/.github/CONTRIBUTING.md#reporting-issues In the meantime, you can use the middle mouse button's onDown and onUp events to set a variable that tracks whether the button is down. Here's an example: https://codepen.io/giniwren/pen/LrwjYZ
  14. 1 point
    from this post 1. Download http://hugos.site/babylonjs.json and put it in your project folder 2. Get the atom plugin "atom-ternjs" 3. Make a file called ".tern-project" in your project folder and add this { "ecmaVersion": 6, "libs": ["babylonjs"] } 4. Restart atom and It should give you hints if you start writing BABYLON. I personally use this ".tern-project" file: { "ecmaVersion": 6, "libs": [ "browser", "babylonjs" ], "loadEagerly": [ "path/to/your/js/**/*.js" ], "dontLoad": [ "node_modules/**", "path/to/your/js/**/*.js" ], "plugins": { "modules": {}, "es_modules": {}, "node": {}, "doc_comment": { "fullDocs": true, "strong": true } } } because it enables autocompletion when babylonjs is imported like this: import { Scene, Vector3, Mesh } from "babylonjs";