import * as utils from "../../utils/index";
export class BlockSnapComponent extends utils.ActorComponent {
    onComponentAdded() {
        const rot = this.actor.getRotation();
        rot.y = Math.round(rot.y / this.options.angle) * this.options.angle;
        this.actor.teleport(this.actor.location.add({ x: 0, y: 0.2, z: 0 }).center(), { rotation: rot });
    }
}
