2D Quadratic Bezier Curves in threejs

When it comes to curves in threejs there is the base Curve class, and then there are a number of both 3D as well as 2D curve classes that extend this base curve class. In this post I will be writing about one of the 2D built in options for curves which is the Quadratic Bezier Curve class. This is a kind of curve in which I can give a start point, end point, and a single control point each of which are instances of the Vector2 class. It can be used by itself, or in combination with other options to create a curve path that will then be used in a number of situations in which I need a 2d path.

Read More

Git Push command

The git push sub command is how to go about updating a remote with local changes. Of course in order to do this to begin with one will need to set up a remote repository to begin with. So with that said there is also knowing at least a thing or two about the git remote command as a way to find out if any remotes are set up to begin with, and if need be to add one.

I also wrote a blog post on the git pull command which does seem to be more or less the counter part of the git pull command, or at least one of them anyway. I say that because there is also the git fetch command as well is a litter different. However in any case there is pulling down changes from a remote, and thus updating the local git folder, and then there is pushing local changes to the remote.

Read More

Level Of Detail Objects in threejs

The Level Of Detail LOD Object in threejs is an Object3d class based object that can be composed of a collection of mesh objects where each mesh object is a differing degree of detail for the same LOD Object. It is then possible to set a camera distance for each of these mesh objects that are added to the LOD object so that as an object moves away from the camera the level of detail will go down. Therefore the use of LOD objects is one way to help go about reduce the volume of work that needs to be done when rendering a frame, therefore helping to improve Frame Rate.

Read More

Git Pull sub command

The git pull subcommand is something that I find myself using just about every day. I use it so often that I typically set up aliases when using a Linux system so that I can just type a single few letters and even possible a single letter in the bash prompt in the current git folder I am working with. Even though I use this sub command every day it would seem that there are still a few things that I would like to learn more about with pull. That is because there is the typical day to day use of it that are this point is more or less brainless, but then the not so often use case where I need to stop and do some research. In other words typically I just call git pull, and fast forward a local copy of a repository to the latest branch, everything goes smoothly, and then I start working on the next commit for the current branch. However some times there are some local changes that I have failed to commit, and that of course results in a problem.

Read More

The set draw range method of the buffer geometry class in threejs

In the buffer geometry class of threejs there is a set draw range method that will change the state of the draw range object of a buffer geometry index. This can be done by calling the method and then passing a start argument along with a count after that. The numbers given should be terms of vertices, or indices depending if the geometry is indexed or non indexed. With that said there is not just calling this method and passing some values but also being aware of some other aspects of a buffer geometry object. Mainly the position attribute, and also the index if it has one.

This will then just be a quick blog post on this set draw range method as well as a few other buffer geometry related topics while I am at it.

Read More