Socket
Socket
Sign inDemoInstall

webgl-obj-loader

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "webgl-obj-loader",
"version": "0.1.0",
"version": "0.1.1",
"description": "A simple OBJ model loader to help facilitate the learning of WebGL",

@@ -5,0 +5,0 @@ "main": "webgl-obj-loader.js",

@@ -183,12 +183,14 @@ (function (undefined) {

// vertex position
unpacked.verts.push(verts[(vertex[0] - 1) * 3 + 0]);
unpacked.verts.push(verts[(vertex[0] - 1) * 3 + 1]);
unpacked.verts.push(verts[(vertex[0] - 1) * 3 + 2]);
unpacked.verts.push(+verts[(vertex[0] - 1) * 3 + 0]);
unpacked.verts.push(+verts[(vertex[0] - 1) * 3 + 1]);
unpacked.verts.push(+verts[(vertex[0] - 1) * 3 + 2]);
// vertex textures
unpacked.textures.push(textures[(vertex[1] - 1) * 2 + 0]);
unpacked.textures.push(textures[(vertex[1] - 1) * 2 + 1]);
if (textures.length) {
unpacked.textures.push(+textures[(vertex[1] - 1) * 2 + 0]);
unpacked.textures.push(+textures[(vertex[1] - 1) * 2 + 1]);
}
// vertex normals
unpacked.norms.push(vertNormals[(vertex[2] - 1) * 3 + 0]);
unpacked.norms.push(vertNormals[(vertex[2] - 1) * 3 + 1]);
unpacked.norms.push(vertNormals[(vertex[2] - 1) * 3 + 2]);
unpacked.norms.push(+vertNormals[(vertex[2] - 1) * 3 + 0]);
unpacked.norms.push(+vertNormals[(vertex[2] - 1) * 3 + 1]);
unpacked.norms.push(+vertNormals[(vertex[2] - 1) * 3 + 2]);
// add the newly created vertex to the list of indices

@@ -195,0 +197,0 @@ unpacked.hashindices[elements[j]] = unpacked.index;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc