Skip to content
party.js logoparty.js logo

ReferenceParticlesInterface

SquareShape

Draws a particle as a square.

A square shape, centered at (0, 0), that can be stretched via an aspect ratio and rounded via a corner radius.

aspectRatiooptionalnumberdefault1

The ratio of width to height for the square. The longer side will be kept at length 1, so the shape always fills the box in one direction. For example, a value of 0.3 produces a tall, narrow strip.

cornerRadiusoptionalnumberdefault0

The radius of the corners, in shape units where the longer side is 1. This is expected to be non-negative, and will be clamped if it exceeds half of the width or height of the shape.

type"square"