Skip to main content
n
11d ago

webgl API error: renderer.translate is not a function

Hi, first came across this error trying the webgl2-advanced package for the first time but then saw this also happens with the latest webgl-advanced and webgl-advanced-single 2.21.3 too. However, canvas-advanced-single 2.21.3 works fine.

I updated this online example to show the issue. If you uncomment the renderer.translate line it fails.



Any fix or workaround appreciated - not feasible to use the webgl API to draw multiple instances inside a large canvas without it and super keen to start working w the new renderer!

FYI Someone had already posted an issue on github here: https://github.com/rive-app/rive-runtime/issues/6

2 replies
n
6d ago

I'm seeing the same issue. Thanks for pointing this out. I'll get the right person to look at it and we'll respond in the GitHub issue.

n
6d ago

just a note that a workaround is:

```
const mat = new riveInst.Mat2D();
mat.tx = vec.x; // translation X
mat.ty = vec.y; // translation Y
renderer.transform(mat);
```