[g-webgl]在相机镜头缩放到60下,Line/path/多边形边框lineWidth设置比1小时,宽度未变,但是元素颜色变透明了
shanyaobaxinxin opened this issue · comments
- 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时线宽度能变小
您好,方便提供复现例子么?
我在这里简单尝试了一下:
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/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
你好复现文件同失真问题一起附上了
您好,方便提供复现例子么?
我在这里简单尝试了一下: 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