[Papervision3D] Adding 2 BitmapMaterial on a DiplayObject3D
Florian F.
pezf68 at gmail.com
Mon Apr 16 10:56:56 EDT 2007
Hi everybody,
I'm currently working on a Panorama game for a school project with some
friends.
We would like to add hot spots on each panorama and we thought about adding
an alpha bitmap to our Sphere.
Code looks like this :
_________________________
var cylinderTexture:Bitmap = new CylinderTexture() as Bitmap;
var alphaTexture:Bitmap = new AlphaTexture() as Bitmap;
var DaeMaterials:Object = new Object();
var bmpMaterial:BitmapMaterial = new BitmapMaterial(
cylinderTexture.bitmapData );
bmpMaterial.doubleSided = true;
DaeMaterials.mymaterial = bmpMaterial;
var Dae2Materials:Object = new Object();
var bmp2Material:BitmapMaterial = new BitmapMaterial(
alphaTexture.bitmapData );
bmp2Material.doubleSided = true;
Dae2Materials.mymaterial = bmp2Material;
rootNode.addCollada( "sphere.dae", new MaterialsList
(DaeMaterials) );
__________________________
This works fine but we are trying now to add the second bitmap with that
line :
rootNode.addCollada( "sphere.dae", new MaterialsList
([DaeMaterials,Dae2Materials]) );
which results in a compiler error : Cannot convert from Object at 48b1401 to
org.papervision3d.core.proto.MaterialObject3D
Any suggestion?
Thanks :)
--
Florian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070416/1a2ca292/attachment.htm
More information about the Papervision3D
mailing list