SDF-2D - v0.8.0
    Preparing search index...
    • Creates a drawable class of smoothly merging circles with a shared color.

      Parameters

      Returns typeof MetaCircleBase

      A class with constructor new MetaCircle(center: vec2, radius: number). center is the position in world coordinates; radius is in world units. Pass the class's static descriptor to compile!compile, then pass instances to graphics/rendering/renderer/renderer!Renderer.addDrawable.

      import { MetaCircleFactory } from 'sdf-2d';

      const MetaCircle = MetaCircleFactory([1, 0.5, 0], 32);
      const circle = new MetaCircle([160, 120], 30);