<commit_before>var FollowCamera = pc.createScript('followCamera');

FollowCamera.attributes.add('target', {
    type: 'entity',
    title: 'Target',
    description: 'The target entity to follow'
});
FollowCamera.attributes.add('cameraOffset', {
    type: 'vec3',
    default: [0, 5, -10],
    title: 'Camera Offset',
    description: 'The local space offset with respect to the target entity coordinate system'
});
FollowCamera.attributes.add('lerpAmount', {
    type: 'number',
    min: 0,
    max: 1,
    default: 0.99,
    title: 'Lerp Amount',
    description: 'The amount to lerp the camera towards its desired position every frame based on a 60fps frame rate. Lerping is frame rate independent though and will be correct for other frame rates.'
});

// initialize code called once per entity
FollowCamera.prototype.initialize = function () {
    this.targetPos = new pc.Vec3();
    this.matrix = new pc.Mat4();
    this.quat = new pc.Quat();
    this.vec = new pc.Vec3();

    if (this.target) {
        this.updateTargetPosition();
        this.currentPos = this.targetPos.clone();
    } else {
        this.currentPos = this.entity.getPosition().clone();
    }
};
<commit_msg>Updated description on follow camera script (#3703)<commit_after>var FollowCamera = pc.createScript('followCamera');

FollowCamera.attributes.add('target', {
    type: 'entity',
    title: 'Target',
    description: 'The target entity to follow'
});
FollowCamera.attributes.add('cameraOffset', {
    type: 'vec3',
    default: [0, 5, -10],
    title: 'Camera Offset',
    description: 'The local space offset with respect to the target entity coordinate system'
});
FollowCamera.attributes.add('lerpAmount', {
    type: 'number',
    min: 0,
    max: 1,
    default: 0.99,
    title: 'Lerp Amount',
    description: 'The amount to lerp the camera towards its desired position over time. The closer it is to 1, the faster the camera will move. Lerping is frame rate independent and will be correct for every frame rate.'
});

// initialize code called once per entity
FollowCamera.prototype.initialize = function () {
    this.targetPos = new pc.Vec3();
    this.matrix = new pc.Mat4();
    this.quat = new pc.Quat();
    this.vec = new pc.Vec3();

    if (this.target) {
        this.updateTargetPosition();
        this.currentPos = this.targetPos.clone();
    } else {
        this.currentPos = this.entity.getPosition().clone();
    }
};

{'fraction_non_alphanumeric': 0.12654575432811213, 'fraction_numerical': 0.013602638087386645, 'mean_word_length': 3.372972972972973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5372728', 'n_tokens_mistral': 727, 'n_tokens_neox': 697, 'n_words': 231}