Step 5 For conversion to black and white, add the code below before the code you’ve written in Step 4. This defines the red, green and blue variables.
To put those variables into an array, enter this code, which applies a filter to the scene, then transforms its colour by using the above matrix array.
Step 6 We’ll use blend modes to create the red and cyan to work with anaglyphic 3D glasses. These work just like Photoshop’s blending modes. Add this immediately after the code from Step 5 to tint the bitmap.
bmpScene.bitmapData.draw(scene, null, ctLeftRed,
On publishing, you’ll see that the output is tinted red. Now add this code after the above line, which will superimpose a second duplicate and tint it cyan:
bmpScene.bitmapData.draw(scene, null, ctRightCyan, BlendMode.ADD);
When you publish this, the output will be monochrome. This is because the left and right views are positioned on top of each other.