Skip to content

粒子形状

particles.shape 定义如何绘制粒子。

示例

ts
particles: {
  shape: {
    type: ["circle", "square"],
  },
}
  • type:一个形状或一系列形状。
  • 常用值:circlesquaretrianglepolygonimageemojitext

带选项

ts
particles: {
  shape: {
    type: "polygon",
    options: {
      polygon: {
        sides: 6,
      },
    },
  },
}

来源参考