// Copyright (c) 2026 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT // Player: dynamic capsule body, moved relative to the camera by PLAYER's // own update callback (see entityplayer.c). class Player { constructor() { this.entity = new Entity(); this.position = this.entity.add(POSITION); this.position.setLocalPosition(0.0, 2.0, 0.0); this.physics = this.entity.add(PHYSICS); this.physics.setShape(PHYSICS_SHAPE_CAPSULE, 0.5, 0.5); this.renderable = this.entity.add(RENDERABLE); this.renderable.setMesh(0, MESH_CAPSULE); this.renderable.setColor(0, 0, 255, 255); this.entity.add(PLAYER); } } module.exports = Player;