-
Notifications
You must be signed in to change notification settings - Fork 5
Entity
Oğuz Eroğlu edited this page Jun 20, 2020
·
6 revisions
Entity is the basis of Kompute objects. When inserted into a world, entities are consiered as box-shaped obstacles. Note that each steerable is a specific type of an entity.
// create a World
var world = new Kompute.World(100, 200, 300, 10);
// create an Entity
// Entity is located at (10, 10, 10)
var entityCenterPosition = new Kompute.Vector3D(10, 10, 10);
// A 5x5x5 cube
var entitySize = new Kompute.Vector3D(5, 5, 5);
// This entity has ID: "entity1"
var entity = new Kompute.Entity("entity1", entityCenterPosition, entitySize);
// insert the Entity into the World
world.insertEntity(entity);
// to update the position of the entity
var newPosition = new Kompute.Vector3D(10, 30, 10);
entity.setPosition(newPosition);
// to update the size of the entity
var newSize = new Kompute.Vector3D(10, 10, 10);
entity.setSize(newSize);
// to remove the entity
world.removeEntity(entity);- Core
- Path
-
Steering Behaviors
- AlignBehavior
- ArriveBehavior
- AvoidBehavior
- BlendedSteeringBehavior
- CohesionBehavior
- EvadeBehavior
- FleeBehavior
- HideBehavior
- JumpBehavior
- LookWhereYouAreGoingBehavior
- PathFollowingBehavior
- PrioritySteeringBehavior
- PursueBehavior
- RandomPathBehavior
- RandomWaypointBehavior
- SeekBehavior
- SeparationBehavior
- Wander2DBehavior
- Wander3DBehavior
- Math
- Extra