sure
This commit is contained in:
parent
33ba915e7b
commit
cd626be1e0
|
|
@ -87,6 +87,10 @@ rotation: from.x"
|
||||||
const gravitySlider = document.getElementById('gravityScale');
|
const gravitySlider = document.getElementById('gravityScale');
|
||||||
const gravityScaleValue = document.getElementById('gravityScaleValue');
|
const gravityScaleValue = document.getElementById('gravityScaleValue');
|
||||||
|
|
||||||
|
// Initialize gravity scale from slider's initial value
|
||||||
|
gravityScale = parseInt(gravitySlider.value);
|
||||||
|
gravityScaleValue.textContent = gravityScale;
|
||||||
|
|
||||||
gravitySlider.addEventListener('input', (e) => {
|
gravitySlider.addEventListener('input', (e) => {
|
||||||
gravityScale = parseInt(e.target.value);
|
gravityScale = parseInt(e.target.value);
|
||||||
gravityScaleValue.textContent = gravityScale;
|
gravityScaleValue.textContent = gravityScale;
|
||||||
|
|
@ -126,8 +130,8 @@ rotation: from.x"
|
||||||
Gizmos.vector(
|
Gizmos.vector(
|
||||||
center,
|
center,
|
||||||
{
|
{
|
||||||
x: center.x + gravity.x / 100,
|
x: center.x + gravity.x / 10,
|
||||||
y: center.y + gravity.y / 100,
|
y: center.y + gravity.y / 10,
|
||||||
},
|
},
|
||||||
{ color: 'grey', width: 3, size: 15 },
|
{ color: 'grey', width: 3, size: 15 },
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue