Light Probes in Threejs

When threejs version r104 was introduced a new light probe feature was added to the core of the library. At the time that I started this post there was not much in terms of documentation at the threejs website, but there is an official example in the github repository as well as another assets of interest that are helpful for gaining a sense as to how to go about using these features. So I played around with the light probe in threejs, and as such I should take a moment to write a quick post on the subject of light probes.

Read More

vue watch option in vuejs

Today I started playing around with the vue watch option that can be used to define some callbacks that fire when a property in the vue data object changes. Watchers can be defined in a number of ways in vuejs, they can just be function expressions, strings that refer to methods in the vue method option, or objects that can have a number of options along with a handler.

There are some situations now and then where I need to set up a watcher, so it would seem like a good idea to write a post in which I cover at least some of the basics when it comes to the watch option in vuejs.

Read More

vue error handlers

In todays post I will be writing about some quick examples that have to do with vue error handers. A main global error handler can be set at the global config object of the Vue global, however these kinds of errors can only catch rendering errors, so there is a need to also use plain old native javaScript as a way to catch errors in general also. So this post will be on handling Errors in vuejs, but I think I should also touch base on the subject in general with native javaScript also while I am at it. So this post will be on error handing in general with it comes to making a client side javaScript project not just with vuejs alone.

Read More

vue before create lifecycle hook

The vue before create lifecycle hook is the first of many hooks that fire throughout the lifecycle of a vuejs instance. It is in this hook that I would go about doing anything that I might want to happen before the data object is created in for a vuejs instance, and it is also the very first hook that fires in the lifecycle process of a vuejs class instance. After the before create hook there is the create hook, then the mounted hook, along with a few others such as the update hook.

Read More

vue mounted lifecycle hook

The vue mounted lifecycle hook is a way to define some logic that will run when a vue instance is mounted to a mount point in html with the vue el option or the $mount method. At this time the template or render function of the vue instance has been rendered at least once and the html that is the result of the vue instance can not be accessed by way of vuejs features such as the $el vue instance property.

The vue mounted hook is one of several such hooks when working with vue class instances. This is then a hook that is fired after the create hook, and before additional hooks that will fire at end of life states for the vue instance. So then the mount hook strikes me as a decent hook to place code that I want to fire once, and at a state when both the data object, and the template are there to work with.

So then in this post I will be going over a few quick examples of the mounted hook in vuejs, and in the proces of doing so I will also be touching base on a few other realted topics as well when it comes to hooks in general.

Read More