<commit_before>"use strict"

function Drug_effect (config) {

	this.config = config;
	this.drug_lvl_max = 5;
	this.increase_duration = 2;
	this.decrease_duration = 16;
	this.post_process = new BABYLON.PostProcess("drug", "./shaders/drug", ["resolution", "time", "drug_lvl"], null, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, window.engine, true);

	this.reset();

	this.post_process.onApply = this.update.bind(this);
}

Drug_effect.prototype.reset = function () {
	
	this.drug_lvl = 0;
	this.target_drug_lvl = 0;
	this.drug_ratio = 0;
	this.time = 0;
}

Drug_effect.prototype.add = function () {
	if (this.target_drug_lvl < this.config.drug.drug_lvl_max) {
		this.target_drug_lvl = Math.max( this.target_drug_lvl + 1, parseInt(this.drug_lvl + 1.5) );
	}
}

Drug_effect.prototype.update = function (effect) {<commit_msg>drug small improvement<commit_after>"use strict"

function Drug_effect (config) {

	this.config = config;
	this.drug_lvl_max = 5;
	this.increase_duration = 2;
	this.decrease_duration = 16;
	this.post_process = new BABYLON.PostProcess("drug", "./shaders/drug", ["resolution", "time", "drug_lvl"], null, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, window.engine, true);

	this.reset();

	this.post_process.onApply = this.update.bind(this);
}

Drug_effect.prototype.reset = function () {
	
	this.drug_lvl = 0;
	this.target_drug_lvl = 0;
	this.drug_ratio = 0;
	this.time = 0;
}

Drug_effect.prototype.add = function () {
	if (this.target_drug_lvl < this.config.drug.drug_lvl_max) {
		this.target_drug_lvl = Math.min( this.config.drug.drug_lvl_max, Math.max( this.target_drug_lvl + 1, parseInt(this.drug_lvl + 1.5) ) );
	}
}

Drug_effect.prototype.update = function (effect) {
{'fraction_non_alphanumeric': 0.14782096584216725, 'fraction_numerical': 0.014134275618374558, 'mean_word_length': 4.818493150684931, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5957975', 'n_tokens_mistral': 728, 'n_tokens_neox': 656, 'n_words': 110}