import html from 'solid-js/html'
import {element, attribute, numberAttribute, type ElementAttributes} from '@lume/element'
import {autoDefineElements} from '../LumeConfig.js'
import {Element3D, type Element3DAttributes} from '../core/Element3D.js'
export type FlickeringOrbsAttributes = Element3DAttributes | 'shadowBias' | 'intensity'
export
@element('flickering-orbs', autoDefineElements)
class FlickeringOrbs extends Element3D {
@numberAttribute shadowBias = 0
@numberAttribute intensity = 1.3
@numberAttribute flickerRange = 0.4
@attribute color: string | null = null
// prettier-ignore
override template = () => html`
this.flickerRange} intensity=${() => this.intensity} shadow-bias=${() => this.shadowBias} color=${() => this.color ?? "yellow"} position="500 0 0">
this.flickerRange} intensity=${() => this.intensity} shadow-bias=${() => this.shadowBias} color=${() => this.color ?? "deeppink"} position="-500 0 0">
this.flickerRange} intensity=${() => this.intensity} shadow-bias=${() => this.shadowBias} color=${() => this.color ?? "cyan"} position="0 0 500">
this.flickerRange} intensity=${() => this.intensity} shadow-bias=${() => this.shadowBias} color=${() => this.color ?? "limegreen"} position="0 0 -500">
this.flickerRange} intensity=${() => this.intensity} shadow-bias=${() => this.shadowBias} color=${() => this.color ?? "white"} position="0 -500 0">
this.flickerRange} intensity=${() => this.intensity} shadow-bias=${() => this.shadowBias} color=${() => this.color ?? "white"} position="0 250 0">
`
}
declare module 'solid-js' {
namespace JSX {
interface IntrinsicElements {
'flickering-orbs': ElementAttributes
}
}
}
declare global {
interface HTMLElementTagNameMap {
'flickering-orbs': FlickeringOrbs
}
}