class CustomControlPanel extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
`;
feather.replace();
// Add slider value updates
this.shadowRoot.querySelectorAll('.slider').forEach(slider => {
slider.addEventListener('input', () => {
const valueId = slider.id.replace('-slider', '-value');
const valueElement = this.shadowRoot.getElementById(valueId);
if (valueElement) {
valueElement.textContent = slider.id.includes('rot')
? `${slider.value}°`
: slider.value;
}
});
});
}
}
customElements.define('custom-control-panel', CustomControlPanel);