SDF-2D - v0.8.0
    Preparing search index...
    • Creates a drawable inverted tunnel class with a shared color.

      Providing a noiseTexture in graphics/rendering/settings/runtime-settings!RuntimeSettings.textures is required for this drawable. A noise texture can be generated with graphics/rendering/renderer/noise-renderer!renderNoise.

      Parameters

      Returns typeof InvertedTunnelBase

      A class with constructor new InvertedTunnel(from: vec2, to: vec2, fromRadius: number, toRadius: number). from and to are endpoint positions in world coordinates; fromRadius and toRadius are the radii at those endpoints in world units. Pass the class's static descriptor to compile!compile, then pass instances to graphics/rendering/renderer/renderer!Renderer.addDrawable.

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

      const InvertedTunnel = InvertedTunnelFactory([1, 0.5, 0]);
      const tunnel = new InvertedTunnel([100, 100], [200, 140], 30, 20);