| @@ -133,7 +133,7 @@ editor.onKey = function(evt) { | |||||
| editor.gridTimeOut = 0; | editor.gridTimeOut = 0; | ||||
| } | } | ||||
| if (evt.keyCode === 67) { | if (evt.keyCode === 67) { | ||||
| materials.curveProperties.splineDensity = materials.curveProperties.splineDensity == 10 ? 0 : 10; | |||||
| materials.curveProperties.splineDensity = materials.curveProperties.splineDensity == 10 ? 1 : 10; | |||||
| gui.render(); | gui.render(); | ||||
| } | } | ||||
| }; | }; | ||||
| @@ -25,6 +25,7 @@ materials.prepare = function() { | |||||
| materials.makeCurve = function(a, b) { | materials.makeCurve = function(a, b) { | ||||
| console.log("New curve, " + materials.curveProperties.splineDensity); | |||||
| var length = new THREE.Vector3().subVectors(a, b).length(); | var length = new THREE.Vector3().subVectors(a, b).length(); | ||||
| var bend = new THREE.Vector3(length / materials.curveProperties.curvature, length / materials.curveProperties.curvature, 0); | var bend = new THREE.Vector3(length / materials.curveProperties.curvature, length / materials.curveProperties.curvature, 0); | ||||
| var mid = new THREE.Vector3().add(a).add(b).multiplyScalar(0.5).add(bend); | var mid = new THREE.Vector3().add(a).add(b).multiplyScalar(0.5).add(bend); | ||||
| @@ -9,7 +9,8 @@ The state is initialized as a blank canvas without any qubits. | |||||
| - Click on a qubit to view its properties | - Click on a qubit to view its properties | ||||
| - Select a qubit, then <kbd>Shift</kbd>-click another node to act a CZ gate | - Select a qubit, then <kbd>Shift</kbd>-click another node to act a CZ gate | ||||
| - Press <kbd>Space</kbd> to rotate the grid | - Press <kbd>Space</kbd> to rotate the grid | ||||
| - Use the <kbd>Up</kbd> and <kbd>Down</kbd> arrow keys to move the grid normal to its plane. | |||||
| - Use the up and down arrow keys to move the grid normal to its plane | |||||
| - Press <kbd>C</kbd> to toggle curved edges | |||||
| Arbitrary 3D structures can be constructed by rotating the grid. | Arbitrary 3D structures can be constructed by rotating the grid. | ||||