feat(procgen): 添加程序化生成工具包 (#331)
- 添加噪声函数 (Perlin, Simplex, Worley, FBM) - 添加种子随机数生成器 (SeededRandom) - 添加加权随机选择和洗牌工具 - 添加蓝图节点 (SampleNoise2D, SeededRandom, WeightedPick 等)
This commit is contained in:
17
packages/procgen/src/random/index.ts
Normal file
17
packages/procgen/src/random/index.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @zh 随机工具模块
|
||||
* @en Random Utilities Module
|
||||
*/
|
||||
|
||||
export { SeededRandom, createSeededRandom } from './SeededRandom';
|
||||
export { WeightedRandom, weightedPick, weightedPickFromMap, createWeightedRandom } from './WeightedRandom';
|
||||
export type { WeightedItem } from './WeightedRandom';
|
||||
export {
|
||||
shuffle,
|
||||
shuffleCopy,
|
||||
pickOne,
|
||||
sample,
|
||||
sampleWithReplacement,
|
||||
randomIntegers,
|
||||
weightedSample
|
||||
} from './Shuffle';
|
||||
Reference in New Issue
Block a user