Created
April 16, 2010 04:34
-
-
Save lamberta/368010 to your computer and use it in GitHub Desktop.
pv3d materials sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<instance_material symbol="lambert1SG" target="#myShaderName"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create material list | |
var matList:MaterialsList = new MaterialsList(); | |
//convert to a bitmap | |
var textureBitmap:Bitmap = new myTexture() as Bitmap; | |
//now swap our bitmap material into the shader name that we found in the collada | |
matList.addMaterial(new BitmapMaterial(textureBitmap.bitmapData), "lambert1SG"); | |
//once you have your collada loaded then apply the material list | |
model.materials = matList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
viewport.getChildLayer(model.getChildByName("floor", true)); | |
var wordLayer:ViewportLayer = viewport.getChildLayer(model.getChildByName("words", true)); | |
wordLayer.alpha = 0.8; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment