justinctlam / babylonjs-electron Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
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
// 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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.