
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
obj-mtl-loader
Advanced tools
An obj file loader for WebGL, including .mtl loder
Using npm
npm install obj-mtl-loader
To run example, npm install, then run npm start, you should see the obj loader working on your http://localhost:3001/.
If you want to edit the example, make sure you run webpack after you make any changes or you can run webpack --progress --colors --watch as the watch mode for webpack.
only obj file
var ObjMtlLoader = require("obj-mtl-loader");
var objMtlLoader = new ObjMtlLoader();
objMtlLoader.load("./test/objfiles/bunny.obj", function(err, result) {
  if(err){
    /*Handle error here*/
  }
  var vertices = result.vertices;
  var faces = result.faces;
  var normals = result.normals;
});
with materials(.mtl)
var ObjMtlLoader = require("obj-mtl-loader");
var objMtlLoader = new ObjMtlLoader();
objMtlLoader.load("./test/objfiles/sponza/sponza.obj", "./test/objfiles/sponza/sponza.mtl", function(err, result) {
  if(err){
    /*Handle error here*/
  }
  var vertices = result.vertices;
  var faces = result.faces;
  var normals = result.normals;
  var textureCoords = result.textureCoords;
  var facesMaterialsIndex = result.facesMaterialsIndex;
  var materials = result.materials;
});
See more examples on examples folder
vertices: Double Array, each item is an array with 3 or 4 numbers
normals: Double Array, each item is an array with 3 numbers
textureCoords: Double Array, each item is an array with 2 or 3 numbers
faces: Objects inside Array, each Object is
facesMaterialsIndex(Optional): Objects inside Array, each object is
materials: Objects inside Array, each object is
MIT
FAQs
OBJ and MTL loader for WebGL
We found that obj-mtl-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.