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] 异步加载的图片配合 ClipPath 使用问题 #1325

Closed
xiaoiver opened this issue Mar 30, 2023 · 1 comment
Closed

[g] 异步加载的图片配合 ClipPath 使用问题 #1325

xiaoiver opened this issue Mar 30, 2023 · 1 comment
Assignees
Labels

Comments

@xiaoiver
Copy link
Contributor

xiaoiver commented Mar 30, 2023

S2 复现 DEMO:
https://codesandbox.io/s/cold-snow-xccxtv?file=/index.ts

@xiaoiver xiaoiver added the bug label Mar 30, 2023
@xiaoiver xiaoiver self-assigned this Mar 30, 2023
@xiaoiver
Copy link
Contributor Author

xiaoiver commented Jun 14, 2023

最小复现代码:

const image = new Image({
  style: {
    x: 200,
    y: 100,
    width: 200,
    height: 200,
    img: 'https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*N4ZMS7gHsUIAAAAAAAAAAABkARQnAQ',
    cursor: 'pointer',
    pointerEvents: 'pixels',
  },
});

const image2 = new Image({
  style: {
    x: 250,
    y: 150,
    width: 200,
    height: 200,
    img: 'https://gw.alipayobjects.com/mdn/rms_6ae20b/afts/img/A*N4ZMS7gHsUIAAAAAAAAAAABkARQnAQ',
    cursor: 'pointer',
    pointerEvents: 'pixels',
  },
});

可以看到第二个 Image 展示不全,g-canvas 脏矩阵擦除导致。换成 Rect 也没问题:

截屏2023-06-14 下午2 58 44

xiaoiver added a commit that referenced this issue Jun 15, 2023
* feat: support 'pixels' in pointer-events #1373

* fix: add to image cache when it loaded #1325

* fix: rename to non-transparent-pixel #1373

* feat: use vertex compression to reduce GPU memory using #1375

* Publish

 - @antv/g-canvas@1.9.48
 - @antv/g-canvaskit@0.8.45
 - @antv/g-gesture@0.0.83
 - @antv/g-lite@1.0.70
 - @antv/g-mobile-canvas@0.8.56
 - @antv/g-mobile-svg@0.8.60
 - @antv/g-mobile-webgl@0.7.74
 - @antv/g-plugin-3d@1.7.57
 - @antv/g-plugin-a11y@0.4.52
 - @antv/g-plugin-annotation@0.2.69
 - @antv/g-plugin-box2d@1.7.53
 - @antv/g-plugin-canvas-picker@1.8.51
 - @antv/g-plugin-canvas-renderer@1.7.60
 - @antv/g-plugin-canvaskit-renderer@1.1.54
 - @antv/g-plugin-control@1.7.54
 - @antv/g-plugin-device-renderer@1.7.70
 - @antv/g-plugin-dom-interaction@1.7.52
 - @antv/g-plugin-dragndrop@1.6.51
 - @antv/g-plugin-gpgpu@1.7.50
 - @antv/g-plugin-html-renderer@1.7.56
 - @antv/g-plugin-image-loader@1.1.54
 - @antv/g-plugin-matterjs@1.7.53
 - @antv/g-plugin-mobile-interaction@0.7.51
 - @antv/g-plugin-physx@1.7.54
 - @antv/g-plugin-rough-canvas-renderer@1.7.54
 - @antv/g-plugin-rough-svg-renderer@1.7.56
 - @antv/g-plugin-svg-renderer@1.8.60
 - @antv/g-plugin-webgl-device@1.7.54
 - @antv/g-plugin-webgpu-device@1.7.51
 - @antv/g-plugin-yoga@1.7.51
 - @antv/g-plugin-zdog-canvas-renderer@1.0.19
 - @antv/g-plugin-zdog-svg-renderer@1.0.18
 - @antv/g-shader-components@1.7.55
 - @antv/g-svg@1.8.60
 - @antv/g-webgl@1.7.74
 - @antv/g-webgpu@1.7.73
 - @antv/g@5.16.33
 - @antv/react-g@1.8.79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant