Triplanar mapping from Local Space - problem when scaling. How to make it work?

One axis of rotation will be totally sufficient if I can scale the object non-uniformly… do you have idea how to hook up this kind of thing sir?