Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gl-mesh3d

Package Overview
Dependencies
Maintainers
5
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gl-mesh3d - npm Package Compare versions

Comparing version 1.0.7 to 1.1.0

24

mesh.js
'use strict'
var DEFAULT_VERTEX_NORMALS_EPSILON = 1e-6; // may be too large if triangles are very small
var DEFAULT_FACE_NORMALS_EPSILON = 1e-6;
var createShader = require('gl-shader')

@@ -238,2 +241,17 @@ var createBuffer = require('gl-buffer')

}
if('ambient' in params) {
this.ambientLight = params.ambient
}
if('diffuse' in params) {
this.diffuseLight = params.diffuse
}
if('specular' in params) {
this.specularLight = params.specular
}
if('roughness' in params) {
this.roughness = params.roughness
}
if('fresnel' in params) {
this.fresnel = params.fresnel
}

@@ -282,7 +300,9 @@ if(params.texture) {

var cellNormals = params.cellNormals
var vertexNormalsEpsilon = params.vertexNormalsEpsilon === void(0) ? DEFAULT_VERTEX_NORMALS_EPSILON : params.vertexNormalsEpsilon
var faceNormalsEpsilon = params.faceNormalsEpsilon === void(0) ? DEFAULT_FACE_NORMALS_EPSILON : params.faceNormalsEpsilon
if(params.useFacetNormals && !cellNormals) {
cellNormals = normals.faceNormals(cells, positions)
cellNormals = normals.faceNormals(cells, positions, faceNormalsEpsilon)
}
if(!cellNormals && !vertexNormals) {
vertexNormals = normals.vertexNormals(cells, positions)
vertexNormals = normals.vertexNormals(cells, positions, vertexNormalsEpsilon)
}

@@ -289,0 +309,0 @@

4

package.json
{
"name": "gl-mesh3d",
"version": "1.0.7",
"version": "1.1.0",
"description": "3D mesh drawing",

@@ -20,3 +20,3 @@ "main": "mesh.js",

"ndarray": "^1.0.15",
"normals": "^1.0.0",
"normals": "^1.0.1",
"polytope-closest-point": "^1.0.0",

@@ -23,0 +23,0 @@ "simplicial-complex-contour": "^1.0.0",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc