Skip to content

Instantly share code, notes, and snippets.

View alenthomas's full-sized avatar
🏠
Working from home

Alen Thomas alenthomas

🏠
Working from home
View GitHub Profile
import React, { Component } from 'react';
import 'intersection-observer'; // optional polyfill
import Observer from '@researchgate/react-intersection-observer';
import ReactResizeDetector from 'react-resize-detector';
import './styles.scss';
let data = ['1', '2', '3', '4', '5', '6', '7', '8', '9'];
let heights = [184,58,96,144,68,98,150,200,240];
@keyframes scroll {
0% { transform: translateY(0%); }
100% { transform: translateY(-200%); }
}
.parent {
overflow: hidden;
position: relative;
}
.one {
position: absolute;
@alenthomas
alenthomas / customCheckbox.css
Created August 7, 2019 06:15
Custom css styling for input type checkbox
input[type='checkbox'] {
outline: none !important;
padding: 0;
margin: 4px 0 0;
line-height: normal;
border: none;
-webkit-appearance: none;
appearance: none;
cursor: pointer;
}
@alenthomas
alenthomas / delaunayCalculation.js
Last active November 9, 2020 10:47
delaunay point calculation
const calculateDelaunayPoints = (data, width, height, n) => {
// Initialize the variables
const pointsInput = new Float64Array(n * 2);
const centroid = new Float64Array(n * 2);
const stippling = new Float64Array(n);
// Initialize the pointsInput using rejection sampling.
for (let i = 0; i < n; ++i) {
for (let j = 0; j < 30; ++j) {