import * as THREE from "../../../../libs/three.js/build/three.module.js"; export class Util { constructor() {} randomValue(min, max) { //return min + max * (Math.random() - 0.5) let p = Math.random() return min * p + max * (1-p) } randomVector3(min, max) { const rand3 = new THREE.Vector3(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5) return new THREE.Vector3().addVectors(min, new THREE.Vector3().multiplyVectors(max, rand3)) } } const util = new Util(); export { util };