Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 19 in printed book and digital formats -- plus a one-year subscription (beginning with 20.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Recent issues

Article Preview


Buy Now

Issue 19.6 ('Memorable Passwords')
Instant purchase and download via GumRoad!

FEATURE

Rotating Christmas Tree

Using the MBS Plugins to create an animated 3D Christmas tree

Issue: 19.6 (November/December 2021)
Author: Stefanie Juchmes
Author Bio: Stefanie studied computer science at the university in Bonn. She came in touch with Xojo due to the work of her brother-in-law and got a junior developer position in early 2019 at Monkeybread Software.
Article Description: No description available.
Article Length (in bytes): 11,724
Starting Page Number: 45
Article Number: 19606
Resource File(s):

Download Icon project19606.zip Updated: 2021-10-31 22:33:26

Related Link(s): None

Excerpt of article text...

It's Christmas time! This time I want to show you how you can animate your own turn-around Christmas tree in Xojo. We then also want to decorate the tree.

We will use the functions from the MBS Xojo SceneKit Plugin. Before we start, first we need to think about what our tree should look like. For the sake of simplicity, we will limit this example to the basic SceneKit figures from which we want to build the tree. We have spheres, plates, boxes, truncated cones, capsules, cylinders, tubes, and pyramids to build the tree from (see Figure 1).

The tree is made of fir greenery and a trunk. The trunk is simply a cylinder. On top of it we have two truncated cones and a whole cone on top. On the tree hang Christmas baubles (spheres) and on the top is a star consisting of a sphere and six pyramids that form the prongs of the star.

Before we can see anything in our project we have to position the SCNControlMBS on our window. We then additionally create the properties MyScene as SCNSceneMBS and MyView as SCNViewMBS. We write our code in the Open event of the control. There we first assign the values to the properties:

MyView = Me.View

...End of Excerpt. Please purchase the magazine to read the full article.