Ok thank you very much. I'll try this and tell you how it works ! maybe tomorrow...
On 17 nov, 16:57, Peter Kapelyan <[email protected]> wrote: > Hi, > My french is not as good as your english, so no worries. :) > You can create the bitmap, the same way you mentioned above. > > While your object tweens, it can create the new bitmap and apply it as the > new material. When the transition stops, you also stop creating these new > bitmaps. The only thing you have to do, is get your objects size (w/h/d), > since you know which size you are tweening your object to, you can just > create the same sized bitmap each frame. > This would be the easiest way I can imagine. However there may be many other > ways, another option may be to change the UV of the object, but then there > might be more code and calculations involved. > -Peter > > > > On Tue, Nov 17, 2009 at 10:43 AM, macsim <[email protected]> wrote: > > Yes, it' s that i want to do. I've tried with the > > TransformBitmapMaterial by changing scaleX and scaleY from my Material > > at the same time I change it from my Obj > > > ex: if myObj.scaleX = 0.5 >>> myMaterial.scaleX = 2; > > > "you may need to create a new bitmap, and new material each time you > > update the size" > > Not a good way because I'm using tween transition to realize this > > effect > > > I think there is another solution maybe by using a mask like this : > > > addChild(container); // width : 100 height : 100 > > > var square = new Sprite(); > > square.graphics.beginFill(0xFF0000); > > square.graphics.drawRect(0, 0, 100, 100); > > > container.mask = square; > > > if square.graphics.drawRect(0, 0, 0, 0) then nothing is visible. > > > How can I do this inside Away3D ?? > > > Relay sorry for my bad english !!! > > > On 17 nov, 16:06, Peter Kapelyan <[email protected]> wrote: > > > I see, you may be trying to keep the bitmap material size the same, while > > > scaling the object. If so, you can try using TransformBitmapMaterial, > > with > > > no repeat and using some calculation along with the above code. > > > However, since you might need to keep the resolution of the bitmap the > > same > > > size of the object, you may need to create a new bitmap, and new > > material, > > > with a new resolution, each time you update the size of your object. > > > > -Pete > > > > On Tue, Nov 17, 2009 at 9:21 AM, Peter Kapelyan <[email protected]> > > wrote: > > > > Hello, > > > > This example will show you how to resize an Away3D object to 100 > > > > width/height/depth > > > > >http://away3d.com/examples.php?example=390 > > > > > -Peter > > > > > On Tue, Nov 17, 2009 at 7:54 AM, macsim <[email protected]> > > wrote: > > > > >> Hello Everybody, > > > > >> Sorry for my bad english. > > > > >> I'm searching for two days ago a method to keep material size when > > > >> scaling or resizing a plane. > > > > >> I've found it's possible with projectionVector, but I don't think it's > > > >> a good idea for a plane. > > > > >> Can you help me ? > > > > > -- > > > > ___________________ > > > > > Actionscript 3.0 Flash 3D Graphics Engine > > > > > HTTP://AWAY3D.COM > > > > -- > > > ___________________ > > > > Actionscript 3.0 Flash 3D Graphics Engine > > > > HTTP://AWAY3D.COM > > -- > ___________________ > > Actionscript 3.0 Flash 3D Graphics Engine > > HTTP://AWAY3D.COM
