cobe icon indicating copy to clipboard operation
cobe copied to clipboard

Transparent base color

Open luisjakon opened this issue 2 years ago • 3 comments

Hello, is it possible to set a transparency level for the base color? Many thnxs!

luisjakon avatar Mar 21 '22 15:03 luisjakon

This is currently not supported, but PRs are welcome!

shuding avatar Mar 23 '22 21:03 shuding

@shuding, i want to change the baseColor but why it's not working? It's getting wrong color for some times.

`import createGlobe from "https://cdn.skypack.dev/cobe";

  let phi = 0;
  let canvas = document.getElementById("cobe");

  const globe = createGlobe(canvas, {
    devicePixelRatio: 1,
    width: 500,
    height: 500,
    phi: 0,
    theta: 0,
    dark: 0,
    diffuse: 1,
    scale: 1,
    mapSamples: 16000,
    mapBrightness: 12,
    baseColor: ["0", "170", "255"],
    markerColor: ["0", "170", "255"],
    glowColor: [1, 1, 1],
    backgroundColor: [255, 255, 255],
    opacity: 1,
    offset: [0, 0],
    markers: [],
    onRender: (state) => {
      // Called on every animation frame.
      // `state` will be an empty object, return updated params.
      state.phi = phi;
      phi += 0.01;
    },
  });`
  
Screenshot 2024-02-06 at 3 18 18 PM

is there problem with my codes?

bdtanbir avatar Feb 06 '24 09:02 bdtanbir