diff --git a/CHANGELOG.md b/CHANGELOG.md index cbfc141d3..2dd62cf63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,17 @@ Note that since we don't clearly distinguish between a public and private interf - Fix program not compiled for sync picking - Fix missing `gl.flush` for async picking (needed for Safari) - Add Residue Charge color scheme (#1722) +- Add dropdown indicator for mapped parameter definitions and adjust "more options" icon +- MolViewSpec extension + - Add `tryGetPrimitivesFromLoci` that makes it easier to access primitive element data from hover/click interactions +- Viewer app + - Move viewer extensions, options, and presets to a separate file + - Add `molstar.lib` export providing access to a wide range of functionality previously not available from the compiled bundle + - Add `Viewer.subscribe` method that keeps track of subscribed plugin events and disposes them together with the parent viewer + - Add `Viewer.structureInteractivity` that makes it easy to highlight/select elements on the loaded structure + - Add `viewportBackgroundColor` and `viewportFocusBehavior` options + - Add `mvs.html` example to showcase the new functionality combined with MolViewSpec + - Add dark and blue color theme support (import `theme/dark.css` or `theme/blue.css` instead of the default `molstar.css`) - Fix `flipSided` for meshes ## [v5.4.2] - 2025-12-07 diff --git a/docs/docs/plugin/instance.md b/docs/docs/plugin/instance.md index 650a42e59..26a47bb2f 100644 --- a/docs/docs/plugin/instance.md +++ b/docs/docs/plugin/instance.md @@ -15,10 +15,24 @@ There are 4 basic ways of instantiating the Mol* plugin. ## ``Viewer`` wrapper -- The most basic usage is to use the ``Viewer`` wrapper. This is best suited for use cases that do not require much custom behavior and are mostly about just displaying a structure. -- See ``Viewer`` class is defined in [src/apps/viewer/app.ts](https://github.com/molstar/molstar/blob/master/src/apps/viewer/app.ts) for available methods and options. +- The most basic usage is to use the ``Viewer`` wrapper. This is best suited for use cases that do not require custom behavior and are mostly about just displaying a structure. +- See ``Viewer`` class is defined in [src/apps/viewer/app.ts](https://github.com/molstar/molstar/blob/master/src/apps/viewer/app.ts) for available methods +- See [options.ts](https://github.com/molstar/molstar/blob/master/src/apps/viewer/options.ts) for available plugin options +- See [embedded.html](https://github.com/molstar/molstar/blob/master/src/apps/viewer/embedded.html) and [mvs.html](https://github.com/molstar/molstar/blob/master/src/apps/viewer/mvs.html) for example usage +- Importing `molstar.js` will expose `molstar.lib` namespace that allow accessing various functionality without a bundler such as WebPack or esbuild. See the `mvs` example above for basic usage. +- Alternative color themes can be used by importing `theme/dark.css` (or `light/blue`) instead of `molstar.css` -Example usage without using WebPack: +### molstar.js and molstar.css sources + +- Download `molstar` NPM package and use the files from `build/viewer` diractory +- Use `jsdelivr` CDN + - `` + - `` + - `@latest` can be replaced by a specific Mol* version, e.g., `@5.4.2` +- Clone & build the GitHub repository + - This option allows for quite straightforward extension customization, e.g., not including movie export, which reduces the bundle size by ~0.5MB + +### Example ```HTML + + +
+ +