Giter Club home page Giter Club logo

babylonjs-electron's People

Contributors

justinctlam avatar mikelortega avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

babylonjs-electron's Issues

Can't load a Obj file using the renderer.js

Hi Justin,

I hope you don't mind me asking. I found your repo and wanted to play around with it and load an Obj file from a local server on my network. The ground loads but the mesh will not. I have it in pastebin here but Im sure its not the file. https://pastebin.com/sR5Sh4ey
Screenshot from 2020-09-30 21-11-53


        // Our built-in 'sphere' shape. Params: name, subdivs, size, scene
        //const sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene);

        // Move the sphere upward 1/2 its height
        //sphere.position.y = 1;

        var loader = new BABYLON.AssetsManager(scene);

        var head = loader.addMeshTask("head", "", "http://192.168.1.54:8080/", "knight.obj");
        var meshThin;
        var meshFat;
        
        head.onSuccess = function() {
            meshThin = head.loadedMeshes[1];
            meshFat = head.loadedMeshes[0];
            console.log("No. of vertices for thin: "+meshThin.getTotalVertices());
            console.log("No. of vertices for fat: "+meshFat.getTotalVertices());
        }

        // Our built-in 'ground' shape. Params: name, width, depth, subdivs, scene
       const ground = BABYLON.Mesh.CreateGround("ground1", 6, 6, 2, scene);
    }

    initialize(canvas: HTMLCanvasElement) {
        const engine = new BABYLON.Engine(canvas, true);
        this.createScene(canvas, engine);

Using an example index.html file I am able to load the knight.obj without issue. Do you have an ideas as to what could be the cause?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.