Overview
In this lab, you will continue to extend Photoshop using JavaScript. In addition, you will extend Illustrator in much the same manner as you have been with Photoshop.
Procedures
- Extend Photoshop
- Walk through this example with the instructor.
- Open New document and fill the layer with a color
- If there's not a document open, open one.
- Set the rulerUnits to PIXELS
- Add a new document
- Add an artLayer to the document
- Detect whether the active layer is the background layer
- Create a reference to the activeDocument selection
- Create a new SolidColor
- Fill the selection with the color
- Set variables to null
- If the active layer is the background layer, write out an alert
- Extend Illustrator
- Walk through this example with the instructor.
- Create a new swatch, draw a shape, fill it using the swatch
- Add a new document
- Create a new CMYKColor
- Create a new swatch
- name the swatch
- store the color in the swatch
- Create a new star path
- set the fill and color to use the swatch
- Extend Illustrator
- Walk through this example with the instructor.
- Make trees
- Add a new document - store it as docRef
- Create a reference to the activeDocument pathItems - piRef
- for loop (50 or so loops should work)
- Add a new pathItem - store it as pathRef
- Copy this code for a tree and paste it next
- Use Math.random() to randomly change the position of the tree
- Use Math.random() to randomly scale the tree
- Use Math.random() to create a random color for the tree
- Use Math.random() to randomly set the opacity of the tree
- On your own
- Create a script to accomplish the following in Photoshop:
- Create a new layer
- fill the layer with a color
- Create a new text layer above the other
- add a drop shadow to the text
- Merge all layers
- Apply a blur
- Turn in all scripts.
Grading
First 3 scripts |
5 pts |
Your own script |
10 pts |
Commenting of Code |
5 pts |
|
|
Total |
20 pts |
|