Ver código fonte

Fixed a really mean bug in UI

master
Pete Shadbolt 7 anos atrás
pai
commit
d5ff4d0ae5
3 arquivos alterados com 4 adições e 2 exclusões
  1. +1
    -1
      static/scripts/editor.js
  2. +1
    -0
      static/scripts/materials.js
  3. +2
    -1
      templates/doc.md

+ 1
- 1
static/scripts/editor.js Ver arquivo

@@ -133,7 +133,7 @@ editor.onKey = function(evt) {
editor.gridTimeOut = 0;
}
if (evt.keyCode === 67) {
materials.curveProperties.splineDensity = materials.curveProperties.splineDensity == 10 ? 0 : 10;
materials.curveProperties.splineDensity = materials.curveProperties.splineDensity == 10 ? 1 : 10;
gui.render();
}
};


+ 1
- 0
static/scripts/materials.js Ver arquivo

@@ -25,6 +25,7 @@ materials.prepare = function() {


materials.makeCurve = function(a, b) {
console.log("New curve, " + materials.curveProperties.splineDensity);
var length = new THREE.Vector3().subVectors(a, b).length();
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);


+ 2
- 1
templates/doc.md Ver arquivo

@@ -9,7 +9,8 @@ The state is initialized as a blank canvas without any qubits.
- Click on a qubit to view its properties
- Select a qubit, then <kbd>Shift</kbd>-click another node to act a CZ gate
- 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.



Carregando…
Cancelar
Salvar