JavaScript Objects
Short introduction to JavaScript objects and few examples showing how they can be used in the real project.
In this lecture we will discuss how JavaScript Objects can be used to structure and simplify your code. This will be a good introduction to discussing classes.
The Code
This is the code that you should copy and paste into the editor. You can also type it in yourself. The code is explained in the video.
const start = async () => {
function createText() {
return `${this.name} ${this.surname} born ${this.yearOfBirth}`;
}
const person1 = {
name: "Matas",
surname: "Johnson",
yearOfBirth: 1950,
height: 190,
createText
}
const person2 = {
name: "Steve",
surname: "Johnstone",
yearOfBirth: 1970,
height: 180,
createText
}
const person3 = {
name: "Danielle",
surname: "Goldsmith",
yearOfBirth: 1976,
height: 165,
createText
}
const persons = [person1, person2, person3];
const textOptions = new Bit.Advanced.Text3D.Text3DDto();
let index = 0;
for (const person of persons) {
textOptions.text = person.createText();
textOptions.height = person.height / 50;
textOptions.origin = [0, 0, index * 2];
const text = await bitbybit.advanced.text3d.create(textOptions);
bitbybit.draw.drawAnyAsync({
entity: text
});
index++;
}
}
start();Course Lectures
Navigate freely between lectures by clicking on them. Approximate time required: 171 minutes.

Hello World
10 minIn this lecture we will show how to create a very simple program that outputs Hello World in 3D letters.

Why TypeScript
11 minIn this lecture we will discuss why we chose TypeScript as our main programming language.

Some Inspiration
17 minBefore diving into details of programming in TypeScript lets first discuss what the possibilities are and go through some more advanced examples of 3D objects used in our website. Do not worry if they are not making too much sense now, they will later.

Variables And Vectors
17 minWe will begin our journey by discussing some of the basic concepts of programming. Understanding variables and vectors is crucial for creating parametric geometry.

Iterations And Loops
15 minIterating code in loops is one of the most important concepts in programming, lets learn how they work!

Functions And Solids
35 minCreating and using functions is such a life saver that you must learn it as soon as possible

JavaScript Objects
16 minShort introduction to JavaScript objects and few examples showing how they can be used in the real project.

Classes
50 minReal world objects and their behaviours often get represented by their classes. This concept is very important in programming and we will discuss it in this lecture.


