Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[g-webgl]在相机镜头缩放到60下,Line/path/多边形边框lineWidth设置比1小时,宽度未变,但是元素颜色变透明了 #1667

Open
1 task
shanyaobaxinxin opened this issue Apr 20, 2024 · 3 comments
Assignees

Comments

@shanyaobaxinxin
Copy link

shanyaobaxinxin commented Apr 20, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

期望可以设置比1小数值如0.05,0.1时线宽度能变小

What does the proposed API look like?

期望可以设置比1小数值如0.05,0.1时线宽度能变小

image

@shanyaobaxinxin shanyaobaxinxin changed the title [g-webgl]Line/path/多边形边框lineWidth设置比1小宽度未变,但是元素颜色变透明了 [g-webgl]在相机镜头缩放到60下,Line/path/多边形边框lineWidth设置比1小时,宽度未变,但是元素颜色变透明了 Apr 20, 2024
@xiaoiver
Copy link
Contributor

xiaoiver commented May 24, 2024

您好,方便提供复现例子么?

我在这里简单尝试了一下:
https://codesandbox.io/p/sandbox/shi-yong-g-hui-zhi-path-forked-kxv5cc?file=%2Findex.js%3A17%2C15

设置线宽小于 1,缩放等级 0.5 这样:

const line = new Line({
  style: {
    x1: 250,
    y1: 0,
    x2: 300,
    y2: 200,
    stroke: "black",
    lineWidth: 0.1, // 小于 1
  },
});
canvas.appendChild(line);

const camera = canvas.getCamera();
camera.setZoom(0.5);

@shanyaobaxinxin
Copy link
Author

您好,方便提供复现例子么?

我在这里简单尝试了一下: https://codesandbox.io/p/sandbox/shi-yong-g-hui-zhi-path-forked-kxv5cc?file=%2Findex.js%3A17%2C15

设置线宽小于 1,缩放等级 0.5 这样:

const line = new Line({
  style: {
    x1: 250,
    y1: 0,
    x2: 300,
    y2: 200,
    stroke: "black",
    lineWidth: 0.1, // 小于 1
  },
});
canvas.appendChild(line);

const camera = canvas.getCamera();
camera.setZoom(0.5);

demo.zip
你好复现文件同失真问题一起附上了

@shanyaobaxinxin
Copy link
Author

您好,方便提供复现例子么?

我在这里简单尝试了一下: https://codesandbox.io/p/sandbox/shi-yong-g-hui-zhi-path-forked-kxv5cc?file=%2Findex.js%3A17%2C15

设置线宽小于 1,缩放等级 0.5 这样:

const line = new Line({
  style: {
    x1: 250,
    y1: 0,
    x2: 300,
    y2: 200,
    stroke: "black",
    lineWidth: 0.1, // 小于 1
  },
});
canvas.appendChild(line);

const camera = canvas.getCamera();
camera.setZoom(0.5);

你好这是在线示例:https://codesandbox.io/p/sandbox/snowy-cdn-n56w4d?file=%2Fsrc%2Fdemo.ts%3A20%2C1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants