Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOF-7354: show labels with atomic symbols when present #152

Merged
merged 25 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d738651
SOF-7354: show labels with atomic symbols when present
pranabdas May 6, 2024
911c30d
SOF-7354: chore ==> remove unused import and lint fix
pranabdas May 6, 2024
64533a3
SOF-7354: chore ==> bump github workflow actions
pranabdas May 6, 2024
217fbae
SOF-7354: update atomName in tests
pranabdas May 8, 2024
00792e8
SOF-7354: bump esse and made
pranabdas May 8, 2024
00311f4
SOF-7354: update macos screenshot asset
pranabdas May 9, 2024
a507f56
SOF-7354: remove duplicate centos screenshots
pranabdas May 9, 2024
7eaaadd
SOF-7354: set slightly different color for atoms with labels
pranabdas May 9, 2024
d165223
SOF-7354: add missing screenshot for ubuntu snapshot test
pranabdas May 9, 2024
481cb88
SOF-7354: add snapshot test for colors of atoms with labels
pranabdas May 9, 2024
7080394
SOF-7354: chore ==> fix linter error
pranabdas May 9, 2024
a9229f6
SOF-7354: fix screenshot filename
pranabdas May 9, 2024
f99fc5e
SOF-7354: remove obsolete docker-compose version line
pranabdas May 10, 2024
fe6be12
SOF-7354: chore ==> reference for THREE.Color.lerp
pranabdas May 12, 2024
54c61e5
SOF-7354: update visually similar snapshots for ubuntu
pranabdas May 12, 2024
519fa0b
SOF-7354: set glow to atoms with labels instead of changing colors
pranabdas May 14, 2024
d1e0b62
SOF-7354: set lower glow intensity
pranabdas May 14, 2024
75e04b6
SOF-7354: try different glow intensity
pranabdas May 14, 2024
9231964
SOF-7354: try different saturation and intensity
pranabdas May 14, 2024
f6caf64
SOF-7354: more experiment with colors
pranabdas May 14, 2024
144e039
SOF-7354: more experiment with colors x2
pranabdas May 14, 2024
173af7c
SOF-7354: more experiment with colors x3
pranabdas May 14, 2024
46672f5
SOF-7354: more experiment with colors x4
pranabdas May 14, 2024
1d15176
SOF-7354: fix object cloning by storing additional data in userData
pranabdas May 15, 2024
9e33e3e
SOF-7354: store apply glow logic in separate function in utils
pranabdas May 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ jobs:

steps:
- name: Checkout this repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true

- name: Checkout actions repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: Exabyte-io/actions
token: ${{ secrets.BOT_GITHUB_TOKEN }}
path: actions

- name: Login to GitHub Container registry
uses: docker/login-action@v1
uses: docker/login-action@v3
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -60,12 +60,12 @@ jobs:

steps:
- name: Checkout this repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true

- name: Checkout actions repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: Exabyte-io/actions
token: ${{ secrets.BOT_GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/SquareIconButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import IconButton, { IconButtonProps } from "@mui/material/IconButton";
import Tooltip, { TooltipProps } from "@mui/material/Tooltip";
import React, { useState } from "react";
import React from "react";
import _ from "underscore";

interface SquareIconButtonProps extends IconButtonProps {
Expand Down
2 changes: 2 additions & 0 deletions src/mixins/atoms.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@ export const AtomsMixin = (superclass) =>
createAtomsGroup(basis, atomRadiiScale) {
const atomsGroup = new THREE.Group();
atomsGroup.name = ATOM_GROUP_NAME;
const { elementsWithLabelsArray } = basis;
basis.coordinates.forEach((atomicCoordinate, atomicIndex) => {
const element = basis.getElementByIndex(atomicIndex);
const sphereMesh = this.getSphereMeshObject({
...this._getDefaultSettingsForElement(element, atomRadiiScale),
coordinate: atomicCoordinate.value,
});
sphereMesh.name = `${element}-${atomicIndex}`;
sphereMesh.nameWithLabel = `${elementsWithLabelsArray[atomicIndex]}`;
atomsGroup.add(sphereMesh);
});
return atomsGroup;
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/bonds.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Made } from "@mat3ra/made";
import {
filterBondsDataByElementsAndOrder,
getElementsBondsData,
} from "@exabyte-io/periodic-table.js";
import { Made } from "@mat3ra/made";
import createKDTree from "static-kdtree";
import * as THREE from "three";

Expand Down
2 changes: 1 addition & 1 deletion src/mixins/labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const LabelsMixin = (superclass) =>

group.children.forEach((atom) => {
if (atom instanceof THREE.Mesh) {
const text = atom.name.split("-")[0];
const text = atom.nameWithLabel;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see if we can add a tests as well

const position = new THREE.Vector3().setFromMatrixPosition(
atom.matrixWorld,
);
Expand Down
Loading