<commit_before>package com.haxademic.core.math.easing;

import com.haxademic.core.app.P;

import processing.core.PVector;

public class DisplacementPoint3D {

	// ported from actionscript to javascript to java :)
	// https://codepen.io/cacheflowe/pen/domZpQ

	// position tracking
	protected PVector basePos;
	protected PVector curPos;
	protected PVector targetPos;
	protected PVector speed;
	protected PVector influencePos;

	// displacement amp & bounciness 
	protected float displaceRange = 40;
	protected float friction = 0.77f;
	protected float acceleration = .1f;
	protected float displaceAmp = 1;
	protected float influenceProximityRamp = 1;
	protected float resultDisplacedAmp = 0;

	public DisplacementPoint3D(float x, float y, float z) {
		this(x, y, z, 50, 0.77f, 0.1f);
	}
	
	public DisplacementPoint3D(float x, float y, float z, float displaceRange, float friction, float acceleration) {
		// base location
		basePos = new PVector(x, y, z);
		curPos = new PVector(x, y, z);
		targetPos = new PVector(x, y, z);
		speed = new PVector();
		influencePos = new PVector();
		
		// springiness
		this.displaceRange = displaceRange;
		this.friction = friction;
		this.acceleration = acceleration;
		this.influenceProximityRamp = 1;
	}
	
	public void basePos(float x, float y, float z) { basePos.set(x, y, z); }
	public PVector pos() { return curPos; }
	public PVector targetX() { return targetPos; }
	public float displaceRange() { return displaceRange; }
	public void displaceRange(float displaceRange) { this.displaceRange = displaceRange; }
	public float friction() { return friction; }
	public void friction(float friction) { this.friction = friction; }
	public float acceleration() { return acceleration; }<commit_msg>Update DisplacementPoint3D.java<commit_after>package com.haxademic.core.math.easing;

import com.haxademic.core.app.P;

import processing.core.PVector;

public class DisplacementPoint3D {

	// ported from actionscript to javascript to java :)
	// https://codepen.io/cacheflowe/pen/domZpQ

	// position tracking
	protected PVector basePos;
	protected PVector curPos;
	protected PVector targetPos;
	protected PVector speed;
	protected PVector influencePos;

	// displacement amp & bounciness 
	protected float displaceRange = 40;
	protected float friction = 0.77f;
	protected float acceleration = .1f;
	protected float displaceAmp = 1;
	protected float influenceProximityRamp = 1;
	protected float resultDisplacedAmp = 0;

	public DisplacementPoint3D(float x, float y, float z) {
		this(x, y, z, 50, 0.77f, 0.1f);
	}
	
	public DisplacementPoint3D(float x, float y, float z, float displaceRange, float friction, float acceleration) {
		// base location
		basePos = new PVector(x, y, z);
		curPos = new PVector(x, y, z);
		targetPos = new PVector(x, y, z);
		speed = new PVector();
		influencePos = new PVector();
		
		// springiness
		this.displaceRange = displaceRange;
		this.friction = friction;
		this.acceleration = acceleration;
		this.influenceProximityRamp = 1;
	}
	
	public void basePos(float x, float y, float z) { basePos.set(x, y, z); }
	public PVector pos() { return curPos; }
	public PVector targetPos() { return targetPos; }
	public float displaceRange() { return displaceRange; }
	public void displaceRange(float displaceRange) { this.displaceRange = displaceRange; }
	public float friction() { return friction; }
	public void friction(float friction) { this.friction = friction; }
	public float acceleration() { return acceleration; }
{'fraction_non_alphanumeric': 0.09925201380897583, 'fraction_numerical': 0.011795166858457998, 'mean_word_length': 4.45839874411303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5393908', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1095, 'n_words': 335}