Hermet Park
Hermet Park
> So, will it be a problem if I perform tvg::Initializer::init, tvg::Initializer::term, and font load and unload in the mian thread, and only the drawing operation is performed in a...
Could u please share the sample code you made for this?
see also: - https://eliemichel.github.io/LearnWebGPU/getting-started/hello-webgpu.html - https://github.com/gfx-rs/wgpu-native/tree/trunk/examples/capture - https://github.com/thorvg/thorvg/wiki/WebGPU-Raster-Engine-Development
``` { WGPUSurfaceDescriptorFromCanvasHTMLSelector fromCanvasHTMLSelector; fromCanvasHTMLSelector.chain.next = NULL; fromCanvasHTMLSelector.chain.sType = WGPUSType_SurfaceDescriptorFromCanvasHTMLSelector; fromCanvasHTMLSelector.selector = "canvas"; WGPUSurfaceDescriptor surfaceDescriptor; surfaceDescriptor.nextInChain = &fromCanvasHTMLSelector.chain; surfaceDescriptor.label = NULL; return wgpuInstanceCreateSurface(instance, &surfaceDescriptor); } ```
@tinyjin Could you please confirm whether overlaying other elements on the WGPU canvas is working properly? i.e)  @SergeyLebedkin Please double-check that the current WGPU canvas doesn't work properly with...
@SergeyLebedkin Yes but, it doesn't look like it on web. @tinyjin the masking sample the above, the background color should be white, doesn't it? Could you please confirm this?
@tinyjin Hello, the fix looks went into the emscripten core main, could you please check & try with this change in emscripten locally? https://github.com/emscripten-core/emscripten/pull/22494
Tossed the issue to the ThorVG web project. => https://github.com/thorvg/thorvg.web/pull/49
@theashraf It looks like invalid JSON data (the whole text shouldn't be quoted). Could you please use this? ``` {"v":"5.5.1","ip":0,"op":60.0,"fr":30.0,"w":300.0,"h":300.0,"nm":"C","assets":[],"layers":[{"ind":1,"ty":4,"nm":"S","sr":1.0,"ks":{"o":{"a":0,"k":100.0},"r":{"a":0,"k":0},"p":{"a":0,"k":[159.5,252.0,0]},"a":{"a":0,"k":[0.5,104.0,0]},"s":{"a":0,"k":[100.0,100.0,100.0]}},"shapes":[{"ty":"gr","nm":"E","bm":0,"it":[{"ty":"el","nm":"E","d":1,"p":{"a":0,"k":[0,0]},"s":{"a":0,"k":[45.0,45.0]}},{"ty":"fl","nm":"F","bm":0,"c":{"a":0,"k":[1.0,0,0,1.0]},"o":{"a":0,"k":100.0},"r":1},{"ty":"tr","o":{"a":0,"k":100.0},"r":{"a":0,"k":0},"p":{"a":0,"k":[0.5,104.0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100.0,100.0]},"nm":"T","sk":{"a":0,"k":0},"sa":{"a":0,"k":0}}]},{"ty":"rp","nm":"R","c":{"a":0,"k":8.0},"o":{"a":0,"k":-17.0},"m":1.0,"tr":{"ty":"tr","nm":"T","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[-5.0,5.0]},"s":{"a":0,"k":[100.0,100.0]},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[45.0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30.0,"s":[0]},{"t":60.0,"s":[-45.0]}]},"so":{"a":0,"k":25.0},"eo":{"a":0,"k":100.0}}}],"ip":0,"op":60.0,"st":0}],"markers":[]} ```
@theashraf then it should work. I confirmed it works on thorvg-viewer.