alice-teacher Alice 3 - Changes to a model with code

Don Slater don at alice.org
Mon Nov 9 08:42:35 EST 2015


It depends on the model… Alice 2 models are built by combining a set of sub-parts (or objects) together to form the complete model. Because of this, each sub-part has its own set of properties that can be manipulated, without changing the properties of the other sub-parts. However, Alice 3 models are built around a single skeleton, using sets of joints. This allows for more realistic animation for the model, and also better supports an inheritance structure for teaching Java and object-oriented programming.

Therefore, it is not possible to change the color of the Mad Hatter’s hat, as it is not a separate object.

However, there are some models that have different forms, such as the YetiBaby.  In the gallery, the YetiBaby has three forms, the default form, one with a scarf, and another with a tutu.

If in your animation you wanted to put the scarf on the yeti, you would use the models setYetiBabyResource procedure. See the Attached screen shot.

Let me know if you have any questions.

All the best,
Don Slater

Alice Team
Carnegie Mellon University
Entertainment Technology Center
700 Technology Drive
Pittsburgh, PA 15219

Email: dslater at cmu.edu

I have learned this at least by my experiment: that if one advances confidently in the direction of his dreams, and endeavors to live the life he has imagined, he will meet with a success unexpected in common hours.
--- Henry David Thoreau

The true object of all human life is play. -- G.K. Chesterton




> On Nov 7, 2015, at 5:21 PM, Margaret Meijers via alice-teachers <alice-teachers at lists.andrew.cmu.edu> wrote:
> 
> Is it possible to use code to change a model's appearance as an animation runs?  eg could I code a different hat to appear on a model during an animation, and if so, how would I do it?  
> 
> Thanks
> Margaret
> 
> 
> 
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20151109/149a11b6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setResource.png
Type: image/png
Size: 134728 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20151109/149a11b6/attachment-0001.png>


More information about the alice-teachers mailing list