import {element, type ElementAttributes} from '@lume/element' import {Element3D, type Element3DAttributes} from '../core/Element3D.js' import {autoDefineElements} from '../LumeConfig.js' import type {ElementWithBehaviors} from '../behaviors/ElementWithBehaviors.js' import type {FbxModelBehavior, FbxModelBehaviorAttributes} from '../behaviors/index.js' export type FbxModelAttributes = Element3DAttributes | FbxModelBehaviorAttributes /** * @element lume-fbx-model * @class FbxModel - * * Defines the `` element, short for ``, for loading 3D models in the FBX format (`.fbx` * files). * * See [`FbxModelBehavior`](../behaviors/mesh-behaviors/models/FbxModelBehavior) * for attributes/properties available on this element. * * HTML Example: * * ```html * * * * * ``` * * JavaScript Example: * * ```js * const scene = new Scene * scene.webgl = true * document.body.append(scene) * const model = new FbxModel * model.src = 'path/to/model.fbx' * model.on('MODEL_LOAD', () => console.log('loaded')) * scene.add(model) * ``` */ export @element('lume-fbx-model', autoDefineElements) class FbxModel extends Element3D { override initialBehaviors = {model: 'fbx'} } export interface FbxModel extends ElementWithBehaviors {} declare module 'solid-js' { namespace JSX { interface IntrinsicElements { 'lume-fbx-model': ElementAttributes } } } declare global { interface HTMLElementTagNameMap { 'lume-fbx-model': FbxModel } }