{"id":15384649,"url":"https://github.com/amphiluke/learn-quantum-mechanics","last_synced_at":"2025-10-11T05:31:24.721Z","repository":{"id":146554611,"uuid":"70316658","full_name":"Amphiluke/learn-quantum-mechanics","owner":"Amphiluke","description":"Simple widgets for learning Quantum Mechanics","archived":true,"fork":false,"pushed_at":"2022-05-22T15:59:34.000Z","size":242,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T16:39:15.659Z","etag":null,"topics":["education","quantum-mechanics","widgets"],"latest_commit_sha":null,"homepage":"https://amphiluke.github.io/learn-quantum-mechanics/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Amphiluke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-08T08:30:19.000Z","updated_at":"2024-09-07T13:19:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"d588a3e4-bebd-4451-817c-256a0400adaa","html_url":"https://github.com/Amphiluke/learn-quantum-mechanics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Amphiluke/learn-quantum-mechanics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amphiluke%2Flearn-quantum-mechanics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amphiluke%2Flearn-quantum-mechanics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amphiluke%2Flearn-quantum-mechanics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amphiluke%2Flearn-quantum-mechanics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amphiluke","download_url":"https://codeload.github.com/Amphiluke/learn-quantum-mechanics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amphiluke%2Flearn-quantum-mechanics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006320,"owners_count":26084085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["education","quantum-mechanics","widgets"],"created_at":"2024-10-01T14:43:00.214Z","updated_at":"2025-10-11T05:31:24.715Z","avatar_url":"https://github.com/Amphiluke.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# learn-quantum-mechanics\n\nSimple interactive widgets for learning Quantum Mechanics.\n\n## List of widgets\n\n* [Infinite Potential Well](src/infinite-potential-well#infinite-potential-well)\n* [Quantum Harmonic Oscillator](src/harmonic-oscillator#quantum-harmonic-oscillator)\n* [Hydrogen Atom](src/hydrogen-atom#hydrogen-atom)\n* [Personalities](src/personalities#personalities)\n\n## Common usage notes\n\nPlease visit the [online widget constructor](https://amphiluke.github.io/learn-quantum-mechanics/) to get a widget code in a few clicks. If you want to write the code and configure the widget by yourself then please read the docs below.\n\nUse the following HTML to embed a widget into your website:\n\n```html\n\u003ciframe src=\"https://amphiluke.github.io/learn-quantum-mechanics/mb/%WIDGET_NAME%/en.html\" width=\"%WIDTH%\" height=\"%HEIGHT%\" scrolling=\"no\" frameborder=\"0\"\u003e\u003c/iframe\u003e\n```\n\n:warning: *Note:* the constants `%WIDGET_NAME%`, `%WIDTH%`, and `%HEIGHT%` are specific to each widget. Find the appropriate values for them in the individual documentation for each widget (see the [links above](#list-of-widgets)).\n\n### Browser compatibility\n\nThere are two builds of each widget: the first one is for modern browsers (mb) that *do* [support ECMAScript 2015](https://kangax.github.io/compat-table/es6/), and the other one is for legacy browsers (lb) that *don't*. Both kinds of builds provide the same functionality, but the build for modern browsers (mb) is believed to have better performance. However if you need support for IE then the build for legacy browsers (lb) is your choice. To use either of the two builds, just choose the appropriate widget URL:\n\n* `https://amphiluke.github.io/learn-quantum-mechanics/mb/%WIDGET_NAME%/en.html` for modern browsers;\n* `https://amphiluke.github.io/learn-quantum-mechanics/lb/%WIDGET_NAME%/en.html` for legacy browsers.\n\n### Widget localization\n\nCurrently, two localizations are supported: English (en) and Russian (ru). To embed a widget in either of the two localizations, just choose an appropriate name of the widget document (either `en.html` or `ru.html`):\n\n* `https://amphiluke.github.io/learn-quantum-mechanics/mb/%WIDGET_NAME%/en.html` a widget in English;\n* `https://amphiluke.github.io/learn-quantum-mechanics/mb/%WIDGET_NAME%/ru.html` a widget in Russian.\n\n### Widget customization\n\nMost widgets provide the opportunity to customize their appearance and/or behavior through specific optional GET parameters. Find out the details on the supported GET parameters in the [docs specific to each widget](#list-of-widgets).\n\n### Widget APIs\n\nMost widgets also provide you with a way to interact with them programmatically in runtime via a simple programming interface based on the cross-document messaging API. These widgets expose a few methods you may invoke as well as events you may subscribe to.\n\n#### Methods\n\nAll you need to invoke some of a widget's API methods is [posting a message](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) to the widget iframe window.\n\n```javascript\nlet widgetIframe = document.getElementById(\"widget-iframe-id\"); // widget iframe DOM element\nlet widgetWindow = widgetIframe.contentWindow;\nwidgetWindow.postMessage({\n    method: \"method_name\", // specify actual method name\n    args: [\"argument1\", \"argument2\"] // pass any arguments required by the method\n}, \"https://amphiluke.github.io\");\n```\n\nThe detailed info on the methods provided by a widget can be found in the [docs specific to that widget](#list-of-widgets).\n\n#### Events\n\nYou may subscribe to a widget events by adding the `message` event listener on the `window` object.\n\n```javascript\nwindow.addEventListener(\"message\", ({data, origin}) =\u003e {\n    if (origin === \"https://amphiluke.github.io\") {\n        // work with the `data` object ...\n        console.log(\"The event '%s' is triggered by the widget '%s'. Event data: %O\",\n            data.event, data.widget, data.data);\n    }\n}, false);\n```\n\nThe `data` object sent with any widget induced event has the following properties:\n\n* `widget` — a widget-specific string. Useful for determining which widget has triggered the event (if you have more than one widget on the page);\n* `event` — a string containing the event name;\n* `data` — event specific data.\n\nThe detailed info on the events triggered by a widget can be found in the [docs specific to that widget](#list-of-widgets).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famphiluke%2Flearn-quantum-mechanics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famphiluke%2Flearn-quantum-mechanics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famphiluke%2Flearn-quantum-mechanics/lists"}