fateriddle

Members
  • Content Count

    29
  • Joined

  • Last visited

About fateriddle

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. The result is fantastic, but I'm afraid the code is too complicated(and long) for me to understand how do you do it. Could you please explain a little bit about the core concept to achieve this? Thank you. @Gijs Also, I find that the scene inside outer box is just a ground, is it possible to have a skybox inside the transparent outer box?
  2. I was using videoDome to presenting 360 video. The first time loading on Mac took only sometime, but on my iphone 8, it took forever to load, even after loading it lags so much, doesn't even respond to gestures. Is it normal? Or did I do something wrong? How would you usually optimize scene with video assets?
  3. Haha, I'm not native speaker, thought ppl meant people... my bad. Thank you for your humor Just dive in this whole new area, always wonder what experienced developer use, regarding to assets. Btw, a random question, can you trigger something in the middle of an animation? Like if at the end, there's a callback onAnimationEnd. But say if I want to do something when an animation plays to frame 120, how do I do it? @Dad72
  4. What do ppl usually use? .babylon file? @brianzinn Thank you! I didn't know you could use let model = scene.getMeshByName("__root__"); to get the model. 1. Now I want some animation for the whole model (usually consist of more than one mesh), but I couldn't do it, can you help to check this sandbox: https://codesandbox.io/s/91n29pnqko ? 2. Also, I'm wondering if you load more than one assets into the scene, you can't use let model = scene.getMeshByName("__root__"); every time right?
  5. @Tomek @ssaket Thank both of you! While you were at it, the sword is shiny in sketchfab page https://sketchfab.com/models/b91d50762282401cacbdbf8e563f8a4c, but when I load it to the scene, it looks so dark and ugly... How do I usually fix this kind of problem? Should I just guess what the environment light maybe? And also do you usually download assets from sketchfab, or just build your own?
  6. It is pretty weird I've never be able to load and present .gltf assets in webpack setup. Using simple html + js, I can do as tutorial to pull it off like in this demo https://codesandbox.io/s/xlox878mwp But if I'm using a React.js template (basically any webpack setup), there's always erro: the asset can't be find / unexpected token in JSON. Like in this one https://codesandbox.io/s/8l2xlq27x0 Why, and how to solve it? Big thanks!
  7. new Ray(origin: Vector3, direction: Vector3, length?: number): Ray is how you create a ray. Basically I want to draw a ray from camera to the center point of the screen, and cast that ray to see if it hits any mesh. Origin is the position of the camera, but I've got no idea how to calculate direction, since center of the screen is a (x,y) not a (x,y,z)...
  8. fateriddle

    Can swipe gesture be caught?

    Thanks, really cool demo. But it feels like not exactly what I want... 1. About the aim, I kinda think of a normal shooting game, where there's an aim drawing on the center of the screen. So whenever you press a key, if anything in the babylon 3d world is on the aim, it will be shoot down. So it is not a mouse moving onto the target thing (so not onPointerOverTrigger)... what I find confused is that aim is not the pointer, so I don't know what api to use. Edit: I find raycaster maybe what I what to use, but still have no idea how to create a ray from camera to the (x,y) point on device screen... 2. And I'm a bit confused, is the second playground demo showing similar pointer trigger, or is it about ball spinning? @NasimiAsl
  9. How to load a videoDome without showing it right away? I kinda need to load the video for videoDome first while playing along with other scene, then at the end of a sequence of animation, videoDome will show gradually (alpha from 0 to 1) I looked around the api but couldn't find anything, is this possible to do in Babylon.js?
  10. 1. Want to build a ball with texture, and if shown on phone, you can touch and swipe the ball, ball will spin according to your swipe direction. Is it possible on Babylonjs? 2. Also if I draw an aim (a cross) in center of the screen, is it possible to know if the aim "hits" any mesh? I know pointer can do that by looking into pickInfo.hit, but is it possible for a fix point on the screen (knowing its clientX and Y) which is not the pointer?
  11. 1. I notice every ball has a "long tail" behind it, is this a concern? 2. About coding style and performance: say the whole scene consist of 3 stages. Is it better to add 3 onBeforeRenderObservable, each doing exclusive the animation on its stage; or is it better having one gigantic onBeforeRenderObservable and putting all the code in there? 3. With the help of deltaTime and a timer, I find onBeforeRenderObservable can cover all the cases of animation, do we still need beginAnimation? What in your working experience is the case?
  12. Thank you! I've got questions: 1. How reusability works in your description? I thought reusing means you create and recycle 1 or maybe 5 meshes. But in this case, we create them all upfront, how's that gonna benefit perf? 2. If there aren't max number for meshes(they spawn infinitely), but I'll disable all those who get closer enough or hit the camera. How to code in this case?
  13. Big thanks! This works just fine for me. Another question, how do you spawn those meshes once every second? Every example I find, meshes all exist at the very beginning.
  14. Thanks, @JohnK btw, should I create all the mesh needed and set the unused ones to invisible till later, or should I create things out on the fly? How do I do it in later case? It seems to me that I can only animate properties, so I can't just meshBuilder a mesh at the end of an animation?
  15. How to create a mesh that's always approaching closer to your camera? I've got a universalCamera that you can move around using arrow keys, I kinda what enemies(meshes) spawn around the camera position, and always move towards camera, how do I do that?