Gerente

Members
  • Content Count

    96
  • Joined

  • Last visited


Reputation Activity

  1. Like
    Gerente got a reaction from ivan.popelyshev in Fog of War   
    Hello, anyone has any example about a fog of war around a specific point?
    thanks.
  2. Like
    Gerente reacted to Exca in Pixi.js Showcase   
    Made a game during EduGameJam2018 (educational game jam held during ITK conference in Finland).

    Goal is to combine ions to compounds by controlling an ion collector by tilting the phone.

    Play online at http://bit.ly/ion_in_a_jar

    Gameplay video:
     
  3. Thanks
    Gerente reacted to botmaster in pixijs, how to distribute it?   
    Here it is: 
     
  4. Like
    Gerente got a reaction from ivan.popelyshev in Virtual Container   
    Ok, I did a simple Dock function without having to modify too much code, any comment would be appreciated.
    https://jsfiddle.net/pq2y39rf/2/
    Basically it does add some properties to Container/Graphic and inheritors
    Container.defaultWidth : define the width of the container no matter the content
    Container.defaultHeigth : define the height of the container no matter the content
    Container.dock : PIXI.ObservablePoint that will be used to position the current element based on the defaultWidth and defaultHeight of the parent
    Container.margin: [top,right,bottom,left] margin applied to the position.
     
     
  5. Like
    Gerente got a reaction from ivan.popelyshev in Refresh efficiency of the shape   
    seems like he need to lower the FPS of the render engine to avoid consuming unnecessary "rendering" process
  6. Like
    Gerente got a reaction from ivan.popelyshev in Virtual Container   
    Container and DisplayObject do not have their own size, its depends of its children, so If you add a Child and use anchor  property and others properties related with size it will not work.
    What would be the best practice to do a simple layout like HEAD, BODY and FOOT? where I can define and limit the size of each "area" and all their children?
    I thinking in create a new class that inherit Container and overwrite the width and height properties to be static but I'm not sure it will be considered in the anchor logic.
    Any advice?, here an example how it does not work https://jsfiddle.net/fyt7zhvm/1/
  7. Thanks
    Gerente reacted to ivan.popelyshev in Best way to make the camera follow a sprite?   
    No, PIXI doesnt have camera functions.
    That's the best substitution:
    var app = new PIXI.Application(...) world.position.set(app.screen.width/2, app.screen.height/2); world.scale.set(whatever you want) world.rotation = some_rotation world.pivot.copy(sprite.position); The idea is that you PIN "sprite.position" which is relative to the stage, to global center of the screen. That's how position+pivot combination works.
  8. Thanks
    Gerente got a reaction from bviale in How to limit Camera's Zoom and change it's Direction ?   
    1) I want to disable or limit the zoom on the camera (the one you have when using wheel up/down) how do I do that ?
     
    camera.lowerRadiusLimit = camera.upperRadiusLimit = camera.radius = 1; 2) also, how do I invert the direction that the camera moves when I drag the mouse on screen ?
    var camera = new BABYLON.ArcRotateCamera("Camera", 1 , Math.PI / 2, 1, BABYLON.Vector3.Zero(), scene); camera.attachControl(canvas, true); camera.fov = 90;//Invert rotation of the camera by dragging the mousecamera.angularSensibility = -5000;
  9. Like
    Gerente reacted to iiceman in Double Camera (Minimap)   
    I see. I went trough the source code a bit and found this:
    scene.cameraToUseForPointers Seems to work  http://www.babylonjs-playground.com/#10VU59#1
  10. Like
    Gerente reacted to RaananW in Change Cursor on Mouse over   
    http://www.babylonjs-playground.com/#21YCLG#2
    There must be some better way of doing it, but hey - I love those little hacks :-)
    The scene itself is changing the pointer, and there is no way internally to change this function. So registering an after-render function is a safe way to solve it.
  11. Like
    Gerente got a reaction from Wingnut in Idea to Improve the Documentation   
    I Still thinking that use google engine as a short term/easy to do solution while you develope a bigger documentation system it's a good option. 
     
    Anyway, I'll continue searching code, with my text editor, in the 40MB text file.
     
    Here is the link again for new people:
     
    http://urbanproductions.com/wingy/babylon/misc/bjs_pg_db_12JUL15.zip
  12. Like
    Gerente reacted to jahow in Sphere Movement with Pivot Vector3.Zero   
    Hey!
     
    So I worked a bit on your code. Here is what I came up with: http://www.babylonjs-playground.com/#1282WV#1
     
    I did several things:
    made the camera a FreeCamera instead of an ArcRotateCamera (that couldn't be precisely placed in the center of the sphere) deaattached the camera controls, otherwise I had problem making this work properly added a bit of code to make the camera follow the sphere position with a delay the position of the mesh is now determined by unprojecting the mouse coordinates in 3D space, thus allowing us to know precisely where the ball needs to be. This is done with this code: var radius = 5;// mesh position is the mouse position projected back in 3D spacevar mesh_pos = BABYLON.Vector3.Unproject(mouse_position.clone(),camera.viewport.width, camera.viewport.height,BABYLON.Matrix.Identity(),camera.getViewMatrix(),camera.getProjectionMatrix());// mesh position is set at a constant radius from the sphere centermesh_pos.normalize().scaleInPlace(radius);currentMesh.position = mesh_pos;  
    I commented out the parts of your code that were not needed anymore. Hope this is clear enough & helpful to you!
  13. Like
    Gerente reacted to dsman in How to get ArcRotateCamera work with touch enabled mobile devices   
    I think this thread should be deleted. It was so silly. 
     
    I had included hand.js file. But the order was incorrect. It was after babylon.js file.  I never paid attention to it until you pointed out about dependency. 

    Now it works perfectly.  
  14. Like
    Gerente reacted to gryff in 360 Panoramic Picture viewer   
    Gerente; given your Android specs I'm not sure why it is not running. I've attached an image below of your panorama scene running on a Samsung S3 phone that I mentioned above. It originally had 4.0.4 (Ice cream sandwich) and did not run webGL - but it was updated a couple of weeks ago (Android and Chrome) and runs BJS stuff nicely.
     
     
    Same reason I moved to BJS just over a year ago. And even though Unity is developing a webGL exporter, I'm not sure of how dedicated they are to perfecting it. But going back again to my VRML days - there always seemed to be browser compatibility issues. Netscape always seemed the most stable and IE the most unstable. As time passes, I think these kinds of webGL issues will disappear - but right now you can end up tearing out all your hair 
     
    Sorry, I can not be more help.
     
    cheers, gryff

  15. Like
    Gerente reacted to Wingnut in 360 Panoramic Picture viewer   
    Hi!  (thanks for the likes, homies)
     
    Interesting vertices solve for the image flip, but you can do that same thing with...
     
    material.diffuseTexture.vAng = Math.PI;  (line 17)
     
    http://www.babylonjs-playground.com/#CFHUL#6 
     
    I don't know anything about the problems with mobile gear.  I'm strictly a desktop guy.  Others might have ideas... be patient.  Thanks for the detailed status report.  It looks like you've got BJS pretty much figured out.  Cool! 
  16. Like
    Gerente reacted to Wingnut in 360 Panoramic Picture viewer   
    Hi Gerente, welcome to the forum.... good to have you with us.
    I bet... if you added these 4 lines somewhere...
    material.diffuseTexture.wAng = -Math.PI/2; // <- the most important one for your bug. material.diffuseTexture.level = 1.5; // material.diffuseTexture.vOffset = -Math.PI/2; // left-right // material.diffuseTexture.uOffset = 0; // up-down Aw heck, I'll treat you to a fresh playground tonight, what the heck...  http://playground.babylonjs.com/#CFHUL#3
    Beautiful pano... thanks for sharing it with us!
    Main problem was line 19... it needed to be added.  w-angle.  wAng.  (giggle)  It is the rotation of the image around the z axis, which is the same as the w axis.  The other lines are just fun stuff to play-with.  If you use emissiveColor instead of diffuseColor, then you can remove your light from the scene and the sphere/image will produce its own light (if ya want to try that).   Level is like an image brightness knob. 
    Also, putting sphere1.rotation.y += .002;  inside your registerBeforeRender loop... might be fun.    Party on!
    PS:  Babylon.js also has a super-powerful and fun thing... called layers... and you can do scrolling backgrounds with them...
    http://playground.babylonjs.com/#1XQKP1#4  (Yeah, it's not really a panorama, but it still has many uses.  Pardon the image "seam", and folks might want to re-think the goofy image-spin-wired-to-arcRotateCamera.alpha thing in line 78.  Sim-u-sphere, heh)
  17. Like
    Gerente got a reaction from Wingnut in 360 Panoramic Picture viewer   
    Thank you Wingnut!! it works perfect in PC but do you have any idea why it does not work on an Iphone 6 (safari just stand in black screen) and Samsung Note III (chrome shows a white screen)?
     
     
    Since the image is being shown from inside the sphere I had to invert the texture. I created this code:
    var triangles = sphere1.getVerticesData(BABYLON.VertexBuffer.PositionKind);for(var i=0;i<triangles.length;i+=3){ var temp = triangles[i]; triangles[i] = triangles[i + 2]; triangles[i + 2] = temp;}sphere1.setVerticesData(BABYLON.VertexBuffer.PositionKind,triangles) Here is the result:
     
    http://www.babylonjs-playground.com/#CFHUL#5
     
     
    - How to block The wheel to avoid the zoom
    //just allow a small zoomcamera.lowerRadiusLimit = 0.1camera.upperRadiusLimit = camera.radius = 2 - How to make it work on mobiles ??
     
    Please help with this.
    Is not a phone issue because it does not work on iOS or android is not a browser issue, does not work on safari or chrome mobile (works on chrome for PC) is not a security issue of the server that host the images because it works on PC it could be the .jpg file?, it should not but I ask anyway,.