Make sure to avoid using three.js directly from threejs.org, as it may break with updates. It's best to use your own copy or a versioned CDN.
You should add the following code:
wireframe.geometry.attributes.position.needsUpdate = true;
Remember, changes made in three.js won't be visible until you render them. Adding an extra call to render will display your modifications.
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 10000);
var renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var geo = new THREE.EdgesGeometry(new THREE.BoxGeometry(500, 500, 500));
var mat = new THREE.LineBasicMaterial({
color: 0xffffff,
linewidth: 2
});
var wireframe = new THREE.LineSegments(geo, mat);
scene.add(wireframe);
wireframe.geometry.attributes.position.array[0] = 300;
wireframe.geometry.attributes.position.array[1] = 300;
wireframe.geometry.attributes.position.array[2] = 300;
camera.position.z = 1000;
renderer.render(scene, camera);
wireframe.geometry.attributes.position.array[0] = 0;
wireframe.geometry.attributes.position.array[1] = 0;
wireframe.geometry.attributes.position.array[2] = 0;
wireframe.geometry.attributes.position.needsUpdate = true;
renderer.render(scene, camera);
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="20544852454560100e1111120e11">[email protected]</a>/build/three.min.js"></script>
For more information, consider checking out these tutorials.