bestog

Members
  • Content Count

    14
  • Joined

  • Last visited

  1. bestog

    Problem with texture sampling mode

    @fenomas I don't see your example. How can i change the imageSmoothingEnabled in an textureTask?
  2. @royibernthal objects.js import {Color3, SceneLoader, StandardMaterial, Vector3} from 'babylonjs' import Material from './material' const {ImportMeshAsync} = SceneLoader const Objects = { loadMesh: async (scene, object) => { const result = await ImportMeshAsync('', URL + object.object_id + '/', 'mesh.babylon', scene) const meshes = result.meshes ... console.log('load-Material') await Material.loadMaterial(scene, object.set, meshes[0]) console.log('load finish') } } export default Objects materials.js import {StandardMaterial, Vector2, Vector3, Vector4, Color3, Texture} from 'babylonjs' const Material = { loadMaterial: async (scene, material, mesh) => { var mMaterial = StandardMaterial('material.' + material.id, scene) .... mesh.material = mMaterial } } export default Material
  3. Hello there, i would like to use the babylonjs package in my JS project. If I do this with my import statement, everything goes. I then call a function in another file and want to assign a new standard material to the object (I pass scene to the function). But now he tells me "this.getScene is not a function". Can it be because this package is not designed for webpack+js+module? Uncaught (in promise) TypeError: this.getScene is not a function
  4. @Celga The video must have the status "muted = true". I had that problem too. Should apparently improve the user experience on mobile devices, since not constantly running any videos in the background (with sound)
  5. Hello, I wanted to extend the class BABYLON.Mesh with some functions, but I have problems. I created a file that does the following (extend.js): import BABYLON from 'babylonjs' import Helper from './helper.js' const {roundFloat} = Helper class Mesh extends BABYLON.Mesh { constructor () { super() console.log('check') } getMeshBounding (axis, val) { const boundingInfo = this.getBoundingInfo() // Native Bounding Info const max = boundingInfo.boundingBox.maximumWorld const min = boundingInfo.boundingBox.minimumWorld if (axis) { const value = val === 'max' ? max : min return roundFloat(value[axis]) } else { return { max: {x: roundFloat(max.x), y: roundFloat(max.y), z: roundFloat(max.z)}, min: {x: roundFloat(min.x), y: roundFloat(min.y), z: roundFloat(min.z)} } } } } export default Mesh And in the file, I want to use it (loader.js / same directory): import Mesh from './extend.js' const Loader = { loadObject: (scene, pos) => { // Create a built-in "sphere" shape; its constructor takes 6 params: name, segment, diameter, scene, updatable, sideOrientation var sphere = Mesh.CreateSphere('sphere1', 16, 2, scene, false, Mesh.FRONTSIDE) .... } } export default Loader But apparently he doesn't do it, otherwise a console.log would come. I'm relatively new to the ES2015 and Vue. Don't be too hard.
  6. My problem was solved with touchAngularSensibility from UniversalCamera. Topic can be marked as solved. @Pryme8 thank you for your helpfulness.
  7. bestog

    Deprecation and Violation warnings on Chrome 63

    @Deltakosh The warning is in chrome 65, too. in the new babylon version (3.2) it's gone?
  8. Thank you, but the values have no visible impact. :-/
  9. Hello guys, I use the UniversalCamera in my project. On my mobile device it works really well and does what I want it to do, except for the left and right rotation. When I wipe up and down, the camera moves much faster than left and right. I have already tried the camera. angularSensibility, but it has no visible effect. for example, if I use the Gyro camera and press on the screen, I can control the camera very well and would like to have such a behaviour with the UniversalCamera. Did I miss something or is there a value I need to adjust? I would like to double the speed of mobile devices (the device differentiation is already taken over by my framework). Then it has a smooth user behavior. I look forward to your answers. :-)
  10. bestog

    VirtualJoysticksCamera issues

    I would like to join the cause with three small additions: Specify the colors of the joysticks in the constructor/setter (currently I do it via a timeout and dirty code - other solution?) Select joystick areas. I only want to trigger the joysticks in the lower 1/3 of the screen. Currently the joysticks are distorted when I adjust the size of the canvas - it's logical. Option to permanently display the joysticks Thanks @davrous for your great support :-)
  11. @Wingnut Thank you very much for the great contributions and the detailed playground. You handled my problem well. As I read it out, is that a general problem in the library? The camera wants to try to climb over it, but I don't want it to. Do you have to increase the gravity or adjust the ellipsoid to get a good approximation to the solution of the problem? Thank you for the quick help!
  12. Hello, I'm currently building a scene where a person walks through a room. There are several objects in the room. When I run and run against a large mesh, I collide and can't get through (it's wanted). When I walk towards a low (low height) mesh, I'm suddenly reset, probably to the old position. Camera position: [0.1.2, -2.25] Camera ellipsoid: [0.5,0.59,0.5] Scene gravity: [0, -9.81, 0] Bottom is at y = 0 How do I set the camera's collisionsbox correctly to run on the floor and not get the effect of low meshes? Thank you.
  13. I found a solution by myself. But, thank you =)
  14. Hello, this is my first post, but visit the forum for a while and am thrilled. :-) I'm currently working on a Babylon project and I'm using a CustomShader (ShaderMaterial) for the Meshes. Now I wanted to use mesh.dispose(); and mesh.material.dispose(); to remove the textures, but it does not work. Whenever I check the size with scene.textures.length, it becomes more and more. What helps?