You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// line 653 of gamejs.jsvarm=matrix.translate(matrix.identity(),rDest.left,rDest.top);m=matrix.multiply(m,src._matrix);this.context.transform(m[0],m[1],m[2],m[3],m[4],m[5]);
add an unecessary dependancy in code, and could be replaced by:
this.context.translate(rDest.left,rDest.top);
Every example seem to still work, but some unit test (not all of them) of rotation and scale seem to break, maybe some refactoring will be needed with transform.js.
Talking about matrix, if such module exists it should not be so coupled to the transformation matrix (add and multiply ,method only work with one dimension matrix with a definite number of arguments which just break reusability of the module), but moved where specific transform are made.
The text was updated successfully, but these errors were encountered:
regarding draw.js: it could probably be simplified to what you say but not on this.context but on the src context.. I would have to try. This was tricky code and some of the corner cases only show themselves when you do rotation & translation in one go (and there's probably no unit tests for these)
it's true that the matrix module only works for 2d transformations.. but then again that's what most gamejs games do :) maybe we could name it transform matrix or similar. or at least point that out in the docs.
The following code in draw.js
add an unecessary dependancy in code, and could be replaced by:
Every example seem to still work, but some unit test (not all of them) of rotation and scale seem to break, maybe some refactoring will be needed with transform.js.
Talking about matrix, if such module exists it should not be so coupled to the transformation matrix (add and multiply ,method only work with one dimension matrix with a definite number of arguments which just break reusability of the module), but moved where specific transform are made.
The text was updated successfully, but these errors were encountered: