'use strict'; /* * Пилотная регистрация в LabRegistry (Фаза 0 контент-движка). * * Доказывает паритет: каталог/открытие/теория этих 3 симуляций идут через реестр. * Загружается ПОСЛЕДНИМ среди labs-скриптов, поэтому P_* (lab-glue.js), * THEORY (lab-init.js) и _openXxx (graph/quadratic/pendulum.js) уже определены. * preview задан функцией (ленивое вычисление в renderSims) — безопасно к порядку. * * В Фазе 1 регистрация переедет в сами sim-файлы, а этот файл будет удалён. */ (function () { if (!window.LabRegistry) return; var R = window.LabRegistry; R.register({ id: 'graph', cat: 'math', title: 'График функции', desc: 'Постройте и исследуйте графики функций', preview: function () { return (typeof P_GRAPH !== 'undefined') ? P_GRAPH : ''; }, theory: (typeof THEORY !== 'undefined') ? THEORY.graph : null, open: function () { _openGraph(); }, stop: function () { /* нет анимационного цикла */ }, destroy: function () { /* нет ресурсов для освобождения */ } }); R.register({ id: 'quadratic', cat: 'math', title: 'Квадратное уравнение', desc: 'Дискриминант, корни, теорема Виета', preview: function () { return (typeof P_QUADRATIC !== 'undefined') ? P_QUADRATIC : ''; }, theory: (typeof THEORY !== 'undefined') ? THEORY.quadratic : null, open: function () { _openQuadratic(); }, stop: function () { /* нет анимационного цикла */ }, destroy: function () { /* нет ресурсов для освобождения */ } }); R.register({ id: 'pendulum', cat: 'phys', title: 'Маятник', desc: 'Колебания, период, затухание', preview: function () { return (typeof P_PENDULUM !== 'undefined') ? P_PENDULUM : ''; }, theory: (typeof THEORY !== 'undefined') ? THEORY.pendulum : null, open: function () { _openPendulum(); }, stop: function () { if (typeof pendSim !== 'undefined' && pendSim && pendSim.stop) pendSim.stop(); }, destroy: function () { if (typeof pendSim !== 'undefined' && pendSim && pendSim.stop) pendSim.stop(); } }); })();