{"action":"created","issue":{"url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/969","repository_url":"https://api.github.com/repos/Gamua/Starling-Framework","labels_url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/969/labels{/name}","comments_url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/969/comments","events_url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/969/events","html_url":"https://github.com/Gamua/Starling-Framework/issues/969","id":233422207,"number":969,"title":"Sprite3D.isFlat() calculation does not take transformationMatrix3D adjustments into consideration","user":{"login":"Snky","id":7985031,"avatar_url":"https://avatars3.githubusercontent.com/u/7985031?v=3","gravatar_id":"","url":"https://api.github.com/users/Snky","html_url":"https://github.com/Snky","followers_url":"https://api.github.com/users/Snky/followers","following_url":"https://api.github.com/users/Snky/following{/other_user}","gists_url":"https://api.github.com/users/Snky/gists{/gist_id}","starred_url":"https://api.github.com/users/Snky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snky/subscriptions","organizations_url":"https://api.github.com/users/Snky/orgs","repos_url":"https://api.github.com/users/Snky/repos","events_url":"https://api.github.com/users/Snky/events{/privacy}","received_events_url":"https://api.github.com/users/Snky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-06-04T09:23:55Z","updated_at":"2017-06-05T08:01:20Z","closed_at":null,"body":"    ..container = new Sprite3D();\r\n    _containerTransformationMatrix3DHelper = ..container.transformationMatrix3D.clone();\r\n    _containerTransformationMatrix3DHelper.(prepend/append)Rotation(rX, Vector3D.X_AXIS);\r\n    _containerTransformationMatrix3DHelper.(prepend/append)Rotation(rY, Vector3D.Y_AXIS);\r\n    _containerTransformationMatrix3DHelper.(prepend/append)Rotation(rZ, Vector3D.Z_AXIS);\r\n    ..container.transformationMatrix3D.copyFrom(_containerTransformationMatrix3DHelper);\r\n\r\n    trace(..container.is3D, ..container.isFlat); //true, true\r\n\r\nThe isFlat function should compensate for these adjustments. Which would make the trace result: true, false\r\n"},"comment":{"url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/comments/306127759","html_url":"https://github.com/Gamua/Starling-Framework/issues/969#issuecomment-306127759","issue_url":"https://api.github.com/repos/Gamua/Starling-Framework/issues/969","id":306127759,"user":{"login":"b005t3r","id":757150,"avatar_url":"https://avatars0.githubusercontent.com/u/757150?v=3","gravatar_id":"","url":"https://api.github.com/users/b005t3r","html_url":"https://github.com/b005t3r","followers_url":"https://api.github.com/users/b005t3r/followers","following_url":"https://api.github.com/users/b005t3r/following{/other_user}","gists_url":"https://api.github.com/users/b005t3r/gists{/gist_id}","starred_url":"https://api.github.com/users/b005t3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b005t3r/subscriptions","organizations_url":"https://api.github.com/users/b005t3r/orgs","repos_url":"https://api.github.com/users/b005t3r/repos","events_url":"https://api.github.com/users/b005t3r/events{/privacy}","received_events_url":"https://api.github.com/users/b005t3r/received_events","type":"User","site_admin":false},"created_at":"2017-06-05T08:01:20Z","updated_at":"2017-06-05T08:01:20Z","body":"But does it make sense to add anything like that? 3D matrix is a product of the 2D matrix and additional properties, modifying it like that is simply making a hack in my opinion. I think the simplest thing to do for Snky would be to override ```isFlat``` in a subclass and make it always return ```false```.\r\n\r\nThe best way would be to create a setter for ```transformationMatrix3D``` and once it's called extract all rotations from it, BUT it's not always possible for 3D transformations (https://www.opengl.org/discussion_boards/showthread.php/159215-Is-it-possible-to-extract-rotation-translation-scale-given-a-matrix), so this is not an option either.\r\n\r\nSo, my vote goes to: create a subclass and override ```isFlat```. Alternatively creating something like a setter or another property which would turn off ```isFlat```'s logic would work as well, but I think this would just create a backdoor for a more hacky approach to the framework, so I'd still rather go with the subclassing approach.\r\n\r\nBTW, @Snky, if you don't want to use the build-in properties, maybe it's because of the same think I discussed with Daniel a couple of days ago: #954 (read through the whole thing) and what you need is a new set of properties which change the Sprite's appearance. If so, what we agreed on in that issue's comments is exactly the thing you need (it'll require subclassing as well)."}}
{"actor":{"display_login":"b005t3r"}}