Files
Physilinks/src/config.js

51 lines
1.1 KiB
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,
clearAnimation: {
type: "pop",
durationMs: 320,
startScale: 1,
endScale: 1.8,
startOpacity: 0.95,
endOpacity: 0,
sizeScale: 1,
},
},
messages: { ...defaultMessageConfig },
};
return {
defaultMessageConfig: { ...defaultMessageConfig },
config: {
...config,
link: { ...config.link },
messages: { ...config.messages },
},
};
};
window.PhysilinksConfig = { create };
})();