UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

18 lines (17 loc) 437 B
/** * * @param {Vector3|THREE.Vector3} source * @param {Vector3|THREE.Vector3} destination * @returns {boolean} */ export function copyToVector3(source, destination) { const x = source.x; const y = source.y; const z = source.z; if (destination.x !== x || destination.y !== y || destination.z !== z) { destination.set(x, y, z); return true; } else { return false; } }