添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
失望的鸵鸟  ·  Altium Designer 21 ...·  12 月前    · 
近视的豆浆  ·  java 数组过滤_java ...·  1 年前    · 
骑白马的黑框眼镜  ·  Error in event ...·  1 年前    · 

this looks like a clone of line2, which is part of three and you don’t need an extra library for that

import { Line2 } from 'three/examples/jsm/lines/Line2'

threes thick line implementation has a few features missing, i think attenuation for instance, in that case you would normally use meshline by thespite which is maintained here: GitHub - pmndrs/meshline: 🪱 Mesh replacement for THREE.Line

  • const THREE = window.THREE
  • ? window.THREE // Prefer consumption from global THREE, if exists
  • ShaderLib,
  • ShaderMaterial,
  • UniformsLib,
  • UniformsUtils,
  • Vector2
  • Edit fiddle - JSFiddle - Code Playground

    I’m trying to replace the line with Line2 to be able to update the line with the mouse position.
    I saw the three.meshLine package. But this meshline is a meshGeometry so that I can’t integrate into my previous code which is line.

    Yes, I checked the same file as you.
    There is a problem with the window variable.

    https://threejs.org/examples/?q=fat#webgl_lines_fat
    I checked this example first. I still can’t be able to implement the three/addons to my website.