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

fromJSON

该函数用于将JSON格式的模糊集转换为RightSCurveFuzzySet对象。

语法

RightSCurveFuzzySet.fromJSON(jsonSet)

参数

  • jsonSet:一个JSON对象,包含RightSCurveFuzzySet的数据。

返回值

返回一个RightSCurveFuzzySet对象,该对象包含由JSON对象提供的数据。

示例

const jsonSet = {
  "setName": "Right SCurve Example",
  "setMin": 0,
  "setMax": 10,
  "a": 3,
  "c": 7
};

const set = RightSCurveFuzzySet.fromJSON(jsonSet);

JSON格式

JSON对象需要具备以下属性:

  • setName:模糊集名称。
  • setMin:模糊集最小值。
  • setMax:模糊集最大值。
  • a:右S曲线的控制点。
  • c:控制区间右端点。
{
  "setName": "Example Set",
  "setMin": 0,
  "setMax": 100,
  "a": 30,
  "c": 60
}