Npm 一个内置StencilJS web组件的框架

Npm 一个内置StencilJS web组件的框架,npm,web-component,aframe,stenciljs,Npm,Web Component,Aframe,Stenciljs,对不起,我提出了一个愚蠢的问题 我想使用a-frame创建一些web组件。 例如: <html dir="ltr" lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> <title>

对不起,我提出了一个愚蠢的问题

我想使用a-frame创建一些web组件。 例如:

<html dir="ltr" lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0">
  <title>Stencil Component Starter</title>
  <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
  <script type="module" src="/build/iseeve3d.esm.js"></script>
  <script nomodule src="/build/iseeve3d.js"></script>

</head>
<body>
  <a-scene>
    <my-component />
  </a-scene>
</body>
</html>

模板元件起动器
在各组成部分中,我有:


@Component({
  tag: 'my-component',
  styleUrl: 'my-component.css',
  shadow: true
})
export class MyComponent {
  render() {
    return (
    <Host>
        <a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
        <a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
        <a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
        <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
        <a-sky color="#ECECEC"></a-sky>
    </Host>);
  }
}

@组成部分({
标记:“我的组件”,
styleUrl:'my component.css',
影子:对
})
导出类MyComponent{
render(){
返回(
);
}
}
但它不起作用。发生了什么? 我也尝试过包含一个框架npm库,但似乎不可能使用像使用npm库这样的组件

请帮帮我。
谢谢

“A-Frame基于HTML和DOM之上,使用多边形填充自定义元素。”(来自)。。。可能会干扰模具?或者,您可能只需要将其全部封装在
?因为我的想法是创建一个组件,例如,通过后端调用将大量盒子分组以获得盒子的数量,或者动态更改环境或加载音乐、视频等。我不知道这是否是最好的方法,因为我们可以将a-frame与javascript结合使用,但也许这种方法是不可能实现的(我对这些库没有太多经验)。感谢您的时间,您运气好吗?“A-Frame基于HTML和DOM之上,使用多边形填充自定义元素。”(来自)。。。可能会干扰模具?或者,您可能只需要将其全部封装在
?因为我的想法是创建一个组件,例如,通过后端调用将大量盒子分组以获得盒子的数量,或者动态更改环境或加载音乐、视频等。我不知道这是否是最好的方法,因为我们可以将a-frame与javascript结合使用,但也许这种方法是不可能实现的(我对这些库没有太多经验)。谢谢你的时间,运气好吗?