Skip to content

Instantly share code, notes, and snippets.

View prayerslayer's full-sized avatar
💭
/o\

Nikolaus Piccolotto prayerslayer

💭
/o\
View GitHub Profile
@prayerslayer
prayerslayer / CorrelationMapExample.vue
Last active March 17, 2021 16:52
Vega as Vue (v2) Component
<template>
<Vega :signals="['inputVarsInMap']" :spec="spec" :values="correlations" />
</template>
<script lang="ts">
import { StoreState } from "@/types/store";
import { melt } from "@/util/matrix";
import { Component, Vue } from "vue-property-decorator";
import Vega from "@/components/Vega.vue";
import spec from "./spec.json";
const w = 400,
h = 400;
const cardWidth = 40,
cardAspectRatio = 64 / 89,
cardHeight = cardWidth / cardAspectRatio;
let trajectories = [];
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));