normals

WebJar for normals

License

License

MIT
Categories

Categories

ORM Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

normals
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

normals
WebJar for normals
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mikolalysenko/normals

Download normals

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/normals/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>normals</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/normals/
implementation 'org.webjars.npm:normals:1.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/normals/
implementation ("org.webjars.npm:normals:1.1.0")
'org.webjars.npm:normals:jar:1.1.0'
<dependency org="org.webjars.npm" name="normals" rev="1.1.0">
  <artifact name="normals" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='normals', version='1.1.0')
)
libraryDependencies += "org.webjars.npm" % "normals" % "1.1.0"
[org.webjars.npm/normals "1.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

normals

Estimates normals for surface meshes.

Installation

Using npm:

npm install normals

Example

Here is how to compute the vertex and face normals for the Stanford bunny:

    var bunny = require("bunny");
    bunny.vertexNormals = require("normals").vertexNormals(bunny.cells, bunny.positions[,epsilon]);
    bunny.faceNormals = require("normals").faceNormals(bunny.cells, bunny.positions[,epsilon]);

require("normals").vertexNormals(cells, positions[,epsilon])

This estimates the vertex normals for an oriented mesh.

  • cells is an array of indexed vertex positions
  • positions is an array of vertex positions

Returns: An array of length = positions.length of the per-vertex normals.

require("normals").faceNormals(cells, positions[,epsilon])

This estimates the face normals for an oriented mesh.

  • cells is an array of indexed vertex positions
  • positions is an array of vertex positions

Returns: An array of length = cells.length of the per-face normals.

Credits

(c) 2013 Mikola Lysenko. BSD

Versions

Version
1.1.0