智慧水务管理系统 - 精河县供水工程综合管理平台

meshopt_simplifier.d.ts 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // This file is part of meshoptimizer library and is distributed under the terms of MIT License.
  2. // Copyright (C) 2016-2026, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
  3. export type Flags = 'LockBorder' | 'Sparse' | 'ErrorAbsolute' | 'Prune' | 'Regularize' | 'Permissive';
  4. export const MeshoptSimplifier: {
  5. supported: boolean;
  6. ready: Promise<void>;
  7. compactMesh: (indices: Uint32Array) => [Uint32Array, number];
  8. generatePositionRemap: (vertex_positions: Float32Array, vertex_positions_stride: number) => Uint32Array;
  9. simplify: (
  10. indices: Uint32Array,
  11. vertex_positions: Float32Array,
  12. vertex_positions_stride: number,
  13. target_index_count: number,
  14. target_error: number,
  15. flags?: Flags[]
  16. ) => [Uint32Array, number];
  17. simplifyWithAttributes: (
  18. indices: Uint32Array,
  19. vertex_positions: Float32Array,
  20. vertex_positions_stride: number,
  21. vertex_attributes: Float32Array,
  22. vertex_attributes_stride: number,
  23. attribute_weights: number[],
  24. vertex_lock: Uint8Array | null,
  25. target_index_count: number,
  26. target_error: number,
  27. flags?: Flags[]
  28. ) => [Uint32Array, number];
  29. simplifyWithUpdate: (
  30. indices: Uint32Array,
  31. vertex_positions: Float32Array,
  32. vertex_positions_stride: number,
  33. vertex_attributes: Float32Array,
  34. vertex_attributes_stride: number,
  35. attribute_weights: number[],
  36. vertex_lock: Uint8Array | null,
  37. target_index_count: number,
  38. target_error: number,
  39. flags?: Flags[]
  40. ) => [number, number];
  41. simplifySloppy: (
  42. indices: Uint32Array,
  43. vertex_positions: Float32Array,
  44. vertex_positions_stride: number,
  45. vertex_lock: Uint8Array | null,
  46. target_index_count: number,
  47. target_error: number
  48. ) => [Uint32Array, number];
  49. getScale: (vertex_positions: Float32Array, vertex_positions_stride: number) => number;
  50. simplifyPoints: (
  51. vertex_positions: Float32Array,
  52. vertex_positions_stride: number,
  53. target_vertex_count: number,
  54. vertex_colors?: Float32Array,
  55. vertex_colors_stride?: number,
  56. color_weight?: number
  57. ) => Uint32Array;
  58. simplifyPrune: (indices: Uint32Array, vertex_positions: Float32Array, vertex_positions_stride: number, target_error: number) => Uint32Array;
  59. };