Skip to content

Commit

Permalink
Make old complexity plot work again
Browse files Browse the repository at this point in the history
  • Loading branch information
Akodiat committed Jul 9, 2021
1 parent b45ad01 commit 779d181
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 8 additions & 3 deletions doc/freq_vs_compl.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
view.addEventListener('mouseover', function (event, item) {
if(item && item.datum) {
console.log(item.datum.rule)
polycubeSystem.resetRule(parseHexRule(item.datum.rule))
system.resetRule(parseHexRule(item.datum.rule))
}
})
})
Expand All @@ -61,14 +61,19 @@
<script src="../js/controls/OrbitControls.js"></script>
<script src="../js/polycubeSystem.js"></script>
<script src="../js/view.js"></script>
<script>
<script src="../js/utils.js"></script>
<script src="../js/init.js"></script>
<script>
createPolycubeSystem();
</script>
<script>
var rotation = 0;
function rotateCamera() {
rotation += 0.005;
camera.position.y = Math.sin(rotation) * 10;
camera.position.x = Math.cos(rotation) * 10;
camera.updateProjectionMatrix();
camera.lookAt(polycubeSystem.centerOfMass);
camera.lookAt(system.centerOfMass);
//fitCamera();
render();
requestAnimationFrame(rotateCamera.bind(this));
Expand Down
8 changes: 7 additions & 1 deletion js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ function createPolycubeSystem() {
});});
}
let assemblyMode = getUrlParam("assemblyMode", 'seeded');
document.getElementById('assemblyMode').value = assemblyMode;

try {
document.getElementById('assemblyMode').value = assemblyMode;
} catch (error) {
; // Might not have an assembly mode DOM
}


nMaxCubes = parseInt(getUrlParam("nMaxCubes", 100));
maxCoord = parseInt(getUrlParam("maxCoord", 100));
Expand Down

0 comments on commit 779d181

Please sign in to comment.