I have arranged several plane meshes in a uniform manner along an elliptical curve.
During the animation loop, I am moving them along the ellipse curve using curve.getPointAt
with time delta and applying the matrix.
Additionally, I am attempting to incorporate scroll functionality by adding wheelY delta to the existing orbit of the planes.
However, when I add these delta values, it causes jittery movement and returning back to the original position, which is not ideal.
Any assistance on how to achieve this would be greatly appreciated!
// JavaScript code here
var renderer = new THREE.WebGLRenderer({ canvas: document.getElementById("canvas"), antialias: true });
renderer.setClearColor(0xffffff);
// use device aspect ratio //
renderer.setPixelRatio(window.devicePixelRatio);
// set size of canvas within window
renderer.setSize(window.innerWidth, window.innerHeight);
// Rest of the JavaScript code...
/* CSS code here */
html ,body {
overflow:hidden;
}
<!-- External script included -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<canvas id="canvas"></canvas>