38 lines
930 B
JavaScript
38 lines
930 B
JavaScript
(() => {
|
|
const create = () => {
|
|
const defaultMessageConfig = {
|
|
durationMs: 4200,
|
|
position: { xPercent: 50, yPercent: 10 },
|
|
text: null,
|
|
colors: null,
|
|
};
|
|
|
|
const config = {
|
|
gravity: 1,
|
|
spawnIntervalMs: 520,
|
|
autoSpawn: true,
|
|
minChain: 3,
|
|
palette: ["#ff595e", "#ffca3a", "#8ac926", "#1982c4", "#6a4c93"],
|
|
ballRadius: 18,
|
|
ballShape: "circle",
|
|
link: {
|
|
stiffness: 0.85,
|
|
lengthScale: 1.05, // max stretch factor; slack below this
|
|
damping: 0.08,
|
|
lineWidth: 3,
|
|
rope: true,
|
|
renderType: "line",
|
|
maxLengthMultiplier: 3.1,
|
|
},
|
|
messages: { ...defaultMessageConfig },
|
|
};
|
|
|
|
return {
|
|
defaultMessageConfig: { ...defaultMessageConfig },
|
|
config: { ...config, link: { ...config.link }, messages: { ...config.messages } },
|
|
};
|
|
};
|
|
|
|
window.PhysilinksConfig = { create };
|
|
})();
|