Jump to content

fateriddle

Members
  • Content Count

    63
  • Joined

  • Last visited

Everything posted by fateriddle

  1. Do you recommend .babylon over .gltf ? I noticed the callback function in SceneLoader.ImportMesh function (newMeshes, particleSystems, skeletons) {} While in SceneLoader.append function (scene) { } 1. I tried to use Sceneloader.ImportMesh in my codesandbox example, it showed a blank screen. But if I use SceneLoader.append, it is not gonna give me the newMeshes as arguments, so I can't use Scene.beginAnimation because I don't know the target of my animation. 2. Also I imaging the asset I load consists of several meshes, say if I what to do scale animation (of them all of co
  2. Thanks for the answer. Sometimes it is just a quick question followed by some back and forth, and discord do help because of its format. Right now I kinda have 10-20 questions, and I don't know how ppl here will feel if I spam them all out and occupy the whole front page. Also the longer waiting in forum is a thing. I don't necessary think discord will be an overlay to this fantastic forum, they serve different purposes. As user, I throw / answer quick questions in discord, and sometimes just read ppl there talking about new trends or how they do things, which helps a lot. But a
  3. Btw, it'll be really helpful that Babylon.js can have a discord channel. Other popular frontend frameworks all have their big discord servers.
  4. I read the picking collision part of the document, https://doc.babylonjs.com/babylon101/picking_collisions And //When click event is raised window.addEventListener("click", function () { // We try to pick an object var pickResult = scene.pick(scene.pointerX, scene.pointerY); }), Is really helpful. But if I import a new asset ( gltf ) into my scene, it is more than likely the object consists of 20-40 meshes, then how do I know if I hit the object, even if the pickResult.hit === true?
  5. It seems all the example I can find is in one file, I understand how to use wepack with babylon.js, but still don't see how you properly scale when your project gets bigger. Like if you build an actual game with babylon.js, how will you split everything into different modules and be organized?
  6. Here's the demo https://codesandbox.io/s/zl6vxmlw8m I load the gltf file, and then find in a github issue to stop the animation when loaded. But now I want to play the animation, say, when I click a button / at certain time. How do I do that? (couldn't find in documentation the part of how to work with a loaded modal. Don't know how to even get the modal instance)
  7. Yes, if I use a plain html + js + assets, it works, but then I bundle them using a webpack setup, the assets can't be found.
  8. Or maybe, can I load 6 texture face using a different api? Like actually loading those 6 image url, that too can solve the problem.
  9. const path = require('path') module.exports = { mode: 'development', entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js', }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: 'babel-loader', }, }, ], }, } I'm using webpack with a basic setup. Now I'm trying to build a skybox skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture( './textures/skybox/box', scene ) Then I get the 404 error for all the files it
  10. How to build a box that's transparent to the outside world, but also hiding what's inside? I tried material.alpha = 0, box becomes transparent, but also whatever inside the box is revealed. Basically, I'm trying to build a AR portal, which to my understanding is a skybox inside of a transparentbox, with a hole as the door. You can only peek inside through the door, so I need everything else be hidden, but can't get it done.
  11. To build a skybox, we need 6 images for 6 sides of the box. In babylonjs, the code is skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("textures/skybox", scene); which will load textures/skybox_px.jpg, textures/skybox_py.jpg, and so on. But in React, or create-react-app, we can only import an image using syntax like: import image1 from './textures/skybox_px.jpg So is there a way to do the skybox demo using react?
  12. I'm working on a web AR project, where I've got the freedom to choose whichever 3d engine I like, and I like babylonjs. The only concern right now is the minified gzip bundle of babylonjs is around 454 kb, which is too big. https://bundlephobia.com/result?p=babylonjs@3.3.0-rc.3Not gonna use every single functionality of babylonjs, so my question is: is there a way around it, if I'm only gonna use partial of babylonjs? if I'm installing the npm package and import only the part I need, like import { AbstractMesh } from "babylonjs"; import { AdvancedDynamicTexture, Rectangle,
×
×
  • Create New...