From df42d10c3a20dfb00af4eafc8b117fcf8a248b50 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Fri, 14 Jun 2024 14:08:49 -0700 Subject: [PATCH] js: Expose new simplification options Note that this change doesn't rebuild the Wasm bundle; the options should just work once that is done. --- js/meshopt_simplifier.js | 2 ++ js/meshopt_simplifier.module.d.ts | 2 +- js/meshopt_simplifier.module.js | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/js/meshopt_simplifier.js b/js/meshopt_simplifier.js index 3daeb380..73590683 100644 --- a/js/meshopt_simplifier.js +++ b/js/meshopt_simplifier.js @@ -155,6 +155,8 @@ var MeshoptSimplifier = (function() { var simplifyOptions = { LockBorder: 1, + Sparse: 2, + ErrorAbsolute: 4, }; return { diff --git a/js/meshopt_simplifier.module.d.ts b/js/meshopt_simplifier.module.d.ts index 7e95ad83..b0131756 100644 --- a/js/meshopt_simplifier.module.d.ts +++ b/js/meshopt_simplifier.module.d.ts @@ -1,6 +1,6 @@ // This file is part of meshoptimizer library and is distributed under the terms of MIT License. // Copyright (C) 2016-2024, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com) -export type Flags = "LockBorder"; +export type Flags = "LockBorder" | "Sparse" | "ErrorAbsolute"; export const MeshoptSimplifier: { supported: boolean; diff --git a/js/meshopt_simplifier.module.js b/js/meshopt_simplifier.module.js index a4ff5f1f..5b540a4a 100644 --- a/js/meshopt_simplifier.module.js +++ b/js/meshopt_simplifier.module.js @@ -154,6 +154,8 @@ var MeshoptSimplifier = (function() { var simplifyOptions = { LockBorder: 1, + Sparse: 2, + ErrorAbsolute: 4, }; return {