-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0029fab
commit 26743c1
Showing
16 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-1.28 KB
(98%)
tests/e2e/gui.spec.js-snapshots/Animation-frame-0-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.08 KB
(98%)
tests/e2e/gui.spec.js-snapshots/Animation-frame-0-move-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.15 KB
(110%)
tests/e2e/gui.spec.js-snapshots/Animation-frame-0-redo-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.61 KB
(110%)
tests/e2e/gui.spec.js-snapshots/Animation-frame-0-undo-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.78 KB
(110%)
tests/e2e/gui.spec.js-snapshots/Animation-frame-10-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.38 KB
(110%)
tests/e2e/gui.spec.js-snapshots/Animation-frame-10-move-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.79 KB
(110%)
tests/e2e/gui.spec.js-snapshots/Animation-frame-10-redo-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.79 KB
(110%)
tests/e2e/gui.spec.js-snapshots/Animation-frame-10-undo-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-454 Bytes
(97%)
tests/e2e/gui.spec.js-snapshots/Bond-frame-0-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.04 KB
(100%)
tests/e2e/gui.spec.js-snapshots/Ops-add-atom-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-540 Bytes
(97%)
tests/e2e/gui.spec.js-snapshots/Ops-invert-selection-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-649 Bytes
(97%)
tests/e2e/gui.spec.js-snapshots/Ops-replace-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3.07 KB
(120%)
tests/e2e/gui.spec.js-snapshots/Ops-translate-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>WEAS Test</title> | ||
</head> | ||
<body> | ||
<div id="viewer" style="position: relative; width: 600px; height: 400px"></div> | ||
|
||
<script type="module"> | ||
import * as weas from "../../dist/weas.mjs"; | ||
|
||
async function fetchFile(filename) { | ||
const response = await fetch(`../../demo/datas/${filename}`); | ||
if (!response.ok) { | ||
throw new Error(`Failed to load file for structure: ${filename}`); | ||
} | ||
return await response.text(); | ||
} | ||
|
||
let domElement = document.getElementById("viewer"); | ||
|
||
const guiConfig = { | ||
legend: { | ||
enabled: true, | ||
position: "bottom-right", // Options: 'top-right', 'top-left', 'bottom-right', 'bottom-left' | ||
}, | ||
}; | ||
// read atoms from file | ||
const filename = "c2h6so.xyz"; | ||
fetchFile(filename).then((fileContent) => { | ||
const atoms = weas.parseXYZ(fileContent); | ||
let editor = new weas.WEAS({ domElement, guiConfig }); | ||
editor.avr.atoms = atoms; | ||
editor.avr.modelStyle = 1; | ||
editor.avr.selectedAtomsIndices = [2, 4, 6, 7]; | ||
editor.avr.modelStyle = 4; | ||
editor.avr.selectedAtomsIndices = [3, 5, 8, 9]; | ||
editor.avr.modelStyle = 3; | ||
editor.avr.selectedAtomsIndices = []; | ||
editor.avr.bondManager.init(); | ||
editor.avr.drawModels(); | ||
editor.render(); | ||
window.editor = editor; | ||
}); | ||
</script> | ||
</body> | ||
</html> |