Skip to content

another bug in m3.js #391

Open
Open
@MaudDibb

Description

translation ended up giving me massively skewed projections when doing 2d transforms.

translate does:

1 0 0
0 1 0
tx ty 1

it needs to do:

1 0 tx
0 1 ty
0 0 1

function translation(tx, ty, dst) {
dst = dst || new MatType(9);

dst[0] = 1;
dst[1] = 0;
dst[2] = tx;
dst[3] = 0;
dst[4] = 1;
dst[5] = ty;
dst[6] = 0;
dst[7] = 0;
dst[8] = 1;

return dst;

}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions