/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
src/utils/utils.ts
21 строка
713 B
Zyie
fix: earcut export (#11464)
05 июн 2025, 20:10
Не верифицирован
05 июн 2025, 20:10
cf7753d
Код
Авторство
О чём код?
import earcutModule from 'earcut'; /** * A high performance event emitter * @see {@link https://github.com/primus/eventemitter3} * @class EventEmitter * @category utils */ export { default as EventEmitter } from 'eventemitter3'; /** * A polygon triangulation library * @see {@link https://github.com/mapbox/earcut} * @param {number[]} vertices - A flat array of vertex coordinates * @param {number[]} [holes] - An array of hole indices * @param {number} [dimensions=2] - The number of coordinates per vertex in the input array * @returns {number[]} Triangulated polygon * @category utils * @advanced */ export const earcut = ((earcutModule as any).default || earcutModule) as typeof earcutModule;