Skip to content
Snippets Groups Projects
Commit ec3cae81 authored by Alexander Rose's avatar Alexander Rose
Browse files

fixed normal dir in normal calculation

parent 44b8f5c1
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ export namespace Mesh {
Vec3.fromArray(y, v, b);
Vec3.fromArray(z, v, c);
Vec3.sub(d1, z, y);
Vec3.sub(d2, y, x);
Vec3.sub(d2, x, y);
Vec3.cross(n, d1, d2);
normals[a] += n[0]; normals[a + 1] += n[1]; normals[a + 2] += n[2];
......
......@@ -32,8 +32,6 @@ async function createGaussianSurfaceMesh(ctx: RuntimeContext, unit: Unit, struct
export const DefaultGaussianSurfaceProps = {
...DefaultUnitsMeshProps,
...DefaultGaussianDensityProps,
flipSided: true, // TODO should not be required
}
export type GaussianSurfaceProps = typeof DefaultGaussianSurfaceProps
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment