How to use the textures.circles function in textures

To help you get started, we’ve selected a few textures examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ocopea / orcs / ui / ocopea-new-ui / src / js / components / AppAvailabilityZone / AppAvailabilityZone.jsx View on Github external
return projection;
        };

        delete projection.scale;
        delete projection.translate;
        delete projection.center;
        return projection.alpha(0);

    }

    var globe = {type: "Sphere"},
        land = topojson.feature(world, world.objects.land),
        countries = topojson.feature(world, world.objects.countries).features,
        boundary = topojson.mesh(world, world.objects.countries, function(a, b) { return a !== b; });

        var t = textures.circles().lighter().size(3).fill("#e1e1e1");

        g.call(t);

        //append countries path
        feature
            .data(countries)
            .enter()
                .append("path")
                .attr("d", path(land))
                .style("fill", t.url())
                .attr("stroke", "#e1e1e1");

    }
github finnfiddle / react-svg-textures / src / Circles.js View on Github external
generate() {
    const t = textures.circles();
    [
      'size',
      'strokeWidth',
      'stroke',
      'fill',
      'background',
      'id',
      'complement',
      'radius',
    ].forEach((key) => {
      if (this.props[key]) t[key](this.props[key]);
    });
    const selection = new Selection();
    t(selection);

    this.setState({
github govau / performance-dashboard / client / src / _dashboard-legacy / Helpers / createPatterns.js View on Github external
colors.forEach((c, i) => {
    let t;
    switch (i) {
      case 0:
        t = textures
          .lines()
          .thicker()
          .strokeWidth(1)
          .stroke(d3.rgb(c).brighter(0.6))
          .background(c);
        break;
      case 1:
        t = textures
          .circles()
          .fill(d3.rgb(c).brighter(0.6))
          .thicker()
          .background(c);
        break;
      case 2:
        t = textures
          .paths()
          .d('crosses')
          .stroke(d3.rgb(c).brighter(0.6))
          .background(c)
          .lighter()
          .thicker();
        break;
      case 3:
        t = textures
github govau / performance-dashboard / client / src / _dashboard-legacy / Helpers / createPatterns.js View on Github external
.thicker()
          .strokeWidth(1)
          .stroke(d3.rgb(c).brighter(0.6))
          .background(c);
        break;
      case 4:
        t = textures
          .lines()
          .strokeWidth(1)
          .thicker()
          .orientation('6/8')
          .stroke(d3.rgb(c).brighter(0.6))
          .background(c);
        break;
      default:
        t = textures
          .circles()
          .radius(3)
          .fill('transparent')
          .strokeWidth(1)
          .stroke(d3.rgb(c).brighter(0.6))
          .background(c);
        break;
    }

    svg.call(t);
    ts.push(t.url());
  });
  return ts;