AABB
AlignmentBehavior
ArriveBehavior
AStar
BFS
BoundingSphere
BVH
BVHNode
Cell
CellSpacePartitioning
CohesionBehavior
CompositeGoal
ConvexHull
Corridor
CostTable
DFS
Dijkstra
Edge
EntityManager
EvadeBehavior
EventDispatcher
Behavior
FollowPathBehavior
FuzzyAND
FuzzyCompositeTerm
FuzzyFAIRLY
FuzzyModule
FuzzyOR
FuzzyRule
FuzzySet
FuzzyTerm
FuzzyVariable
FuzzyVERY
GameEntity
Goal
GoalEvaluator
Graph
GraphUtils
HalfEdge
HeuristicPolicyDijkstra
HeuristicPolicyEuclid
HeuristicPolicyEuclidSquared
HeuristicPolicyManhattan
InterposeBehavior
LeftSCurveFuzzySet
LeftShoulderFuzzySet
LineSegment
Logger
MathUtils
Matrix3
Matrix4
MemoryRecord
MemorySystem
MeshGeometry
MessageDispatcher
MovingEntity
NavEdge
NavMesh
NavMeshLoader
NavNode
Node
NormalDistFuzzySet
OBB
ObstacleAvoidanceBehavior
OffsetPursuitBehavior
OnPathBehavior
Path
Plane
Polygon
Polyhedron
PriorityQueue
PursuitBehavior
Quaternion
Ray
RectangleTriggerRegion
Regular
RightSCurveFuzzySet
RightShoulderFuzzySet
SAT
SeekBehavior
SeparationBehavior
SingletonFuzzySet
Smoother
SphericalTriggerRegion
State
StateMachine
SteeringBehavior
SteeringManager
Task
TaskQueue
Telegram
Think
Time
TriangularFuzzySet
Trigger
TriggerRegion
Vector3
Vehicle
Version
WanderBehavior

uuid

概述

uuid是Yuka js库FuzzySet中使用的一种数据类型,它是一种通用唯一标识符(UUID),具有128位长的值。

用途

uuid主要用于标识实体或对象,通常在分布式系统或数据库中使用。

在FuzzySet中,uuid用于标识模糊集合(Fuzzy Set)中的元素,帮助实现元素的快速查找和匹配。

使用方法

使用FuzzySet中的uuid方法可以生成一个随机的uuid值,示例代码如下:

import { uuid } from 'fuzzyset';

console.log(uuid()); 
// 输出:e7e757f3-195f-4d90-b598-65141ef1dd11

也可以指定一个字符串作为namespace,生成一个基于该namespace的uuid值,示例代码如下:

import { uuid } from 'fuzzyset';

console.log(uuid('fuzzyset')); 
// 输出:f085c05e-6f4f-5f97-b3b3-ff2a6d74bf6f

参考资料