Permalink
Browse files

trying to get shit to work

  • Loading branch information...
prowebber committed Apr 1, 2018
1 parent ed565c4 commit 5b0a6090c247968ca0b051134aef2b93aedc5ef7
Showing with 239 additions and 203 deletions.
  1. +13 −6 lib/app.js
  2. +226 −197 lib/custom.js
@@ -55,7 +55,7 @@ const linkedFGMethods = Object.assign(...[
'd3Force'
].map(p => ({ [p]: bindFG.linkMethod(p)})));
wikimap();
export default Kapsule({
props: {
@@ -298,11 +298,14 @@ export default Kapsule({
state.scene.add(new three.AmbientLight(0xbbbbbb));
state.scene.add(new three.DirectionalLight(0xffffff, 0.6));
(function animate() { // IIFE
v.state = state;
console.log("State is set");
v.wiki_ani = (function animate() { // IIFE
if (state.enablePointerInteraction) {
// Update tooltip and trigger onHover events
raycaster.linePrecision = state.linkHoverPrecision;
// console.log('memory leak');
console.log('memory leak');
// IIFE
if (state.onFrame) state.onFrame()
raycaster.setFromCamera(mousePos, state.camera);
@@ -340,8 +343,13 @@ export default Kapsule({
state.forceGraph.tickFrame();
state.tbControls.update();
state.renderer.render(state.scene, state.camera);
state.animationFrameRequestId = requestAnimationFrame(animate);
if(!v.freeze_graph){
state.animationFrameRequestId = requestAnimationFrame(animate);
}
})();
},
// setObjectQuaternion: function setObjectQuaternion() {
// var zee = new THREE.Vector3( 0, 0, 1 );
@@ -411,5 +419,4 @@ export default Kapsule({
state.navInfo.style.display = state.showNavInfo ? null : 'none';
}
});
wikimap();
});
Oops, something went wrong.

0 comments on commit 5b0a609

Please sign in to comment.