actionscript 3 - From Rectangle into trapezoid -
How do I change reptangle in trichozoide with action script 3?
My Trapezoid 3D Rooms Has a floor, and I want to texturize it (bitmap tile).
_____________ | | | | | | _____ | | | / \ | | / Tripage \ | | / __________ \ |
It depends on how you represent "rectangle" in your program goes. Some options:
-
If your rectangle is vector, and you have access to anchor point:
---> O ------ o & lt; --- | | | | O ------ o
becomes:
o - o / o / o ------ o
Simply translate the two top points and summarize them for each other.
-
If that 'rectangle' is actually a
DisplayObject
, you will need to 'stitch' the same DisplayObject to create a new display. Examples of what you want with code. -
Another option is to use - which is using the above rendering method as the base.
-
It is a bit difficult, but this is an option. You can use the displacement map as described. The code is AS2, but it should be quite simple for "port".
edit
In the same way, I suggest that you see PaperVision 3D (see option 3) As you would like to move the camera around "room" it will take care of other walls too.
Comments
Post a Comment