[Papervision3D] Main PV3D light accessible to child objects?
pajhonka at yahoo.com
Wed Oct 13 12:57:59 PDT 2010
To access a light in the document class, one has to set the light to a static
public variable like so:
static public var light:PointLight3D;
Then, from the subclass of an object within your scene, you can call it like
in this format: DocumentClass.light
For example, if your class extended the Sphere class and you wanted to use a
shaded material that used a light in the document class (in this example,
named Main.as), you'd reference it like this:
mat = new GouraudMaterial(Main.light, 0xFFFFFF, 0x000000);
super(mat, 40, 8, 8);
View this message in context: http://papervision3d.758870.n4.nabble.com/Main-PV3D-light-accessible-to-child-objects-tp2967075p2994352.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D