Great.

I enclose the patch. Hope it works ok, I had some character encoding issues.

As one can see, it's pretty dumb. Two sidenotes however :
* I've kept the global scaling variable, which means the sprite will
be scaled by scaling*xScaling and scaling*yScaling respectively. It's
not entirely satisfactory, but that insures that the previous
behaviour remains unchanged. The other option would be to turn scaling
into a property, and have it set both xScaling and yScaling.
* I've used xScaling and yScaling for the names, so as not to override
Object3D.scale(X|Y). However those properties (scaleX and scaleY)
seems to have no effect on a MovieClipSprite. Would it be better to
use them, or are they used for other purposes in that case.

I'd be glad to here from you on either of those issues.

-- 
Axelle

On Wed, Jan 13, 2010 at 3:27 PM, Peter Kapelyan <[email protected]> wrote:
> Away3D is open source, and we'd love any helpful additions, it seems your
> addition could come in very useful for some people.
> Thanks for contributing to the project!
> -Pete
> On Wed, Jan 13, 2010 at 4:29 AM, Axelle Ziegler <[email protected]>
> wrote:
>>
>> The patch is written, and seems to work ok on our project. Can I have
>> a feedback about whether there is a chance for it to be included in
>> the trunk, or whether it's a dumb idea ? (I've only been using Away3D
>> for a few weeks, I might very well be missing something).
>>
>> On Tue, Jan 12, 2010 at 3:24 PM, Axelle Ziegler
>> <[email protected]> wrote:
>> > I specifically need horizontal and no vertical scaling, to flip
>> > animations, wich is, unless I'm missing something, not possible with
>> > the current version of the code.
>> >  The patch I was suggesting was simply to separate scaling : Number in
>> > scaleX : Number and scaleY: Number, if there is no obvious
>> > inconvenience with doing that. I could of course write and test the
>> > patch before submitting it.
>> >
>> > On Tue, Jan 12, 2010 at 3:04 PM, Fabrice3D <[email protected]> wrote:
>> >> Why not use sprites/MovieclipSprite.as, with rescale:true and
>> >> scaling:Number ?
>> >> its designed to do this automatically...
>> >>
>> >> Fabrice
>> >>
>> >>
>> >>
>> >> On Jan 12, 2010, at 2:47 PM, Axelle wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> First of all thanks for the great work on Away3D :)
>> >>>
>> >>> I'm currently using MovieClipSprite to display 2D Characters inside a
>> >>> 3D Scene. Since these are actually elements of the scene I need them
>> >>> to be rescaled according to distance with the camera, but I also need
>> >>> to retain the scale from the movieclip, because some of them are
>> >>> flipped (to reduce the number of direction from animation).
>> >>>
>> >>> The working solution we are currently using is to have two movieClips
>> >>> embedded within one another, the inner one being flipped and the outer
>> >>> one being scaled by Away3D. It would be way simpler however to simply
>> >>> patch MovieClipSprite to have a "scaleX" and "scaleY" property instead
>> >>> of one "scaling" property. If I submitted such a patch, would there be
>> >>> any chance of it being merged into the trunk ? Are there any specific
>> >>> requirements to make a patch for the trunk ?
>> >>>
>> >>> Thanks in advance
>> >>>
>> >>> --
>> >>> Axelle Ziegler
>> >>
>> >>
>> >
>
>
>
> --
> ___________________
>
> Actionscript 3.0 Flash 3D Graphics Engine
>
> HTTP://AWAY3D.COM
>

Attachment: movieClipSpriteScaling.patch
Description: Binary data

Reply via email to