Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/317.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Svelthree-如何向场景添加边和线?_Javascript_Three.js_Svelte - Fatal编程技术网

Javascript Svelthree-如何向场景添加边和线?

Javascript Svelthree-如何向场景添加边和线?,javascript,three.js,svelte,Javascript,Three.js,Svelte,我正在尝试使用Svelthree向对象添加边 我知道如何使用网格将几何体添加到场景中,但如何在几何体的边缘添加线 这是来自官方REPL(): 我已经回答了你关于 简短版本: 目前没有可用的“线”组件,但有了可用的网格和场景实例,您基本上可以执行任何您想要的样式 <Scene {sti} let:scene id="scene1" props={{ background: 0xedf2f7 }}> <PerspectiveCamera {scene} i

我正在尝试使用Svelthree向对象添加边

我知道如何使用网格将几何体添加到场景中,但如何在几何体的边缘添加线

这是来自官方REPL():


我已经回答了你关于

简短版本:

目前没有可用的“线”组件,但有了可用的网格和场景实例,您基本上可以执行任何您想要的样式

 <Scene {sti} let:scene id="scene1" props={{ background: 0xedf2f7 }}>

<PerspectiveCamera {scene} id="cam1" pos={[0, 0, 3]} lookAt={[0, 0, 0]} />
<AmbientLight {scene} intensity={1.25} />
<DirectionalLight {scene} pos={[3, 3, 3]} />

<Mesh
  {scene}
  geometry={cubeGeometry}
  material={cubeMaterial}
  mat={{ roughness: 0.5, metalness: 0.5, color: 0xff3e00 }}
  pos={[0, 0, 0]}
  rot={[0.5, 0.6, 0]}
  scale={[1, 1, 1]} />