[Papervision3D] Changing segments number dynamically
xero
xero.nu at gmail.com
Fri Jan 18 10:30:08 PST 2008
then make sure your material
has its own variable that is accessable
from that function that changes the plane.
so in your constructor:
make the material.
make the plane.
when you change the plane:
remake plane
use the same material object.
once the material is created, you
should be able to use it over and
over again w/o recreating it.
____ ___
\ \/ /___________ ____
.\ // __ \_ __ \/ _ \
./ \ ___/| | \( <_> )
/___/\ \___ >__|---\____/
| \_/ \/ |
| xero harrison |
| x at xero.nu |
| http://xero.nu |
| http://fontvir.us |
| http://xero.owns.us |
`---------------------'
> ---------- Forwarded message ----------
> From: "Đani Stojanov" <dani at see-design.com>
> To: papervision3d at osflash.org
> Date: Fri, 18 Jan 2008 19:16:11 +0100
> Subject: Re: [Papervision3D] Changing segments number dynamically
> thanks, but it's just that my Plane uses external file for texturing so I
> dunno if it will be seamless, but I'll definitely test it later on...
> it's a pretty good idea :)
>
> 2008/1/18 xero < xero.nu at gmail.com>:
>
> > im not sure if thats exactly possible.
> > but i have done this by recreating the object...
> >
> > //constructor
> >
> > plane:Plane = new Plane(mat, w, h, 4, 4);
> > scene.addChild(plane);
> >
> > //later in onClick or something.
> >
> > scene.removeChild(plane);
> > plane = new Plane(mat, w, h, 8, 8);
> > scene.addChild(plane);
> >
> > //////////////////////////////////////////////////////////////
> >
> > basically, you replace your plane w/ a new
> > one. but by using the same variable it's
> > almost seamless
> >
> > g'luck
> > ____ ___
> > \ \/ /___________ ____
> > .\ // __ \_ __ \/ _ \
> > ./ \ ___/| | \( <_> )
> > /___/\ \___ >__|---\____/
> > | \_/ \/ |
> > | xero harrison |
> > | x at xero.nu |
> > | http://xero.nu |
> > | http://fontvir.us |
> > | http://xero.owns.us |
> > `---------------------'
> >
> >
> > > ---------- Forwarded message ----------
> > > From: "Đani Stojanov" < dani at see-design.com>
> > > To: papervision3d at osflash.org
> > > Date: Fri, 18 Jan 2008 17:14:53 +0100
> > > Subject: [Papervision3D] Changing segments number dynamically
> > > Hi all,
> > >
> > > I need to change a number of segments (segmentsH ans segmentsW)
> > > dynamically on a Plane and i applied the proper code but nothing happens...
> > > I also tried to change "segments" property on Cube but no success
> > > there either...
> > >
> > > Anyone have any experience with this...?
> > >
> > > Using GreatWhite branch...
> > >
> > > Also, a while back I ran into a topic and demo of some guy where he
> > > was changing segments based on mouse position on a plane surface etc...
> > > If anybody has a link, I'd appreciate it...
> > >
> > > Đani
> > >
> >
> > _______________________________________________
> > Papervision3D mailing list
> > Papervision3D at osflash.org
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080118/6f558d14/attachment.html
More information about the Papervision3D
mailing list