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

cellsY

简介

cellsY 是 Yuka js 库中 CellSpacePartitioning 类的一个属性,表示在纵向上所包含的单元格数量。

语法

partition.cellsY

类型

  • 数字(Number)

默认值

  • 10

描述

cellsY 属性表示用于分割空间的单元格数量,用于优化游戏中的空间搜索算法,例如碰撞检测等。对于大型的游戏场景,该数值可以根据需要进行调整以获得更好的性能。

该属性的值可以通过以下方式进行设置:

const partition = new YUKA.CellSpacePartitioning(10,10,100,100,10);
partition.cellsY = 15;

注意事项

  • 如果要修改 cellsY 的值,最好在创建实例化对象后立即进行设置,以确保正确性。
  • 修改 cellsY 的值可能会影响游戏性能,应根据具体情况谨慎调整。