Giter Club home page Giter Club logo

elementari's Introduction

Logo
Elementari

Tests GH Pages pre-commit.ci status Open in StackBlitz

elementari is a toolkit for building interactive web UIs for materials science: periodic tables, 3d crystal structures (and molecules, though needs some improvements!), Bohr atoms, nuclei, heatmaps, scatter plots. It's under active development and not yet ready for production use but we appreciate any feedback from beta testers! ๐Ÿ™

Screenshot of landing page

๐Ÿ“ฆ โ€‰ Heatmap

This screenshot demonstrates the periodicity of elemental properties (i.e. why it's called periodic table). In this case, you're seeing recurring bumps and valleys in the first ionization energy as a function of atomic number.

Screenshot of periodic table heatmap

โš›๏ธ โ€‰ 3D Structure Viewer

3D Structure Viewer

โš›๏ธ โ€‰ Element Details Pages

The details page for gold.

2022-08-26-element-detail-page-screen-recording.mp4

๐Ÿ”จ โ€‰ Installation

npm install --dev elementari

๐Ÿ“™ โ€‰ Usage

Import the PeriodicTable component and pass it some heatmap values:

<script>
  import PeriodicTable from 'elementari'

  const heatmap_values = { H: 10, He: 4, Li: 8, Fe: 3, O: 24 }
</script>

<PeriodicTable {heatmap_values} />

๐ŸŽฌ โ€‰ Events

PeriodicTable.svelte forwards the following events from each ElementTile:

  1. click
  2. mouseenter
  3. mouseleave
  4. keyup
  5. keydown

Each event is a Svelte dispatch event with the following detail payload:

detail: {
  element: ChemicalElement
  active: boolean // whether the event target tile is currently active
  dom_event: Event // the DOM event that triggered the Svelte dispatch
}

See DispatchPayload and PeriodicTableEvents in src/lib/index.ts

๐Ÿงช โ€‰ Coverage

Statements Branches Lines
Statements Branches Lines

๐Ÿ™ โ€‰ Acknowledgements

This project would not have been possible as a one-person side project without many fine open-source projects. ๐Ÿ™ To name just a few:

3D graphics 2D graphics Docs Bundler Testing
three.js d3 mdsvex vite playwright
threlte sharp rehype sveltekit vitest

elementari's People

Contributors

janosh avatar pre-commit-ci[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.