Skip to content

YY.getSpriteMaterial(imgUrl)

  • 获取 Billboard 的材质工具
  • 参数
    • {String|HTMLCanvasElement} imgUrl 图片地址或者 canvas 对象
  • 返回值: THREE. SpriteMaterial
js
const canvas = YY.drawText(name, {
  fontSize: 35,
  color: "yellow",
  imageSize: 64,
  image: "./textures/companyTag(1).png",
});
return YY.getSpriteMaterial(canvas);

This document is generated by vitepress and Edit by deyihu