Skip to content

About

Simple Crystal Viewer

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

CrystalView

GitHub Build Status npm version License: MIT

Crystal structure visualization library for the browser. Renders 3D molecular and crystal structures on an HTML5 canvas.

CrystalView

Installation

npm install @chemistry/crystalview

Usage

import { Mol3DView } from '@chemistry/crystalview';
import '@chemistry/crystalview/crystalview.css';

const container = document.getElementById('viewer')!;

const viewer = new Mol3DView({ bgcolor: '#2b303b' });
viewer.append(container);
viewer.onInit();
viewer.load(structureData);

Tech Stack

  • TypeScript 5.9, ES2024 target, ESM
  • Vitest for testing, 70%+ coverage
  • ESLint 10 (flat config) + Prettier
  • Native tsc build (no bundler)
  • Node.js 22+

Commands

Command Description
npm run build Build the library
npm run test Run unit tests
npm run lint Run ESLint
npm run format:check Check Prettier formatting
npm run type-check Run TypeScript type checking
npm run verify Full verification (type-check + lint + format + test + build)

Showcase App

A Vite-based demo is available in showcase/:

cd showcase
npm install
npm run dev

Release

gh workflow run prepare-release.yml -R chemistry/crystalview

This opens a chore(release) PR with auto-merge armed. When PR Validation is green it merges, and release.yml publishes to npm (OIDC trusted publishing), tags v<version> and creates a GitHub Release.

License

This project is licensed under the MIT license, Copyright (c) 2026 Volodymyr Vreshch. For more information see LICENSE.

About

Simple Crystal Viewer

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages