- Experiments on 3D costumes
|Figure 1. Default 2D Costumes|
|Figure 2. 3D Costumes|
Currently, 3D costumes can be loaded from the Import menu like other 2D costumes, and I am forcing the filename of a 3D costume to be "3d-[shape].[extension]" to identify the shape of the 3D costume. For example, the filename of a 3D cylinder has to be "3d-cylinder.png".
As for the color, a (perhaps randomly chosen) color for the default arrow shaped icon is taken over. We can see the colors for 2D costumes used in Figure 1 are also used in 3D costumes in Figure 2.
We can interchangeably select regular 2D and 3D costumes for a single sprite without a problem. Scripts can be written as well for 3D-costumed sprites.
- GUI for 3D shapes
1) Each shape appears as an individual codelet:
2) The shapes are in a drop down from one codelet:
3) There is a list accessible from the file menu:
After a brief email discussion with the professor, Charles, and myself, we think it is the best if we have both option #1 for the Pen interface, and option #3 for the 3D costume selection interface.
- We cannot directly specify the diameter or length of 3D objects when rendering them using three.js because of the camera position. There may be a way to do it as discussed in this Q&A though.
- How to implement applications like VirtualWigwam ? To dynamically rotate a 3D space, we need to create a 3D stage that allows us to place multiple 3D objects in the same 3D space. That will introduce major design changes from the current C-snap. Perhaps, we should do the above option #1 and #3 on the existing 2D stage first and then implement a 3D stage as another mode ?