Watch

My first canvas and javascript post. I had to do some research on how to make this work. It wasn’t that hard. I already use a plugin to remove the p-tag wordpress inserts. jQuery is used on the site. The script itself is easy.

The first function setCanvas sets the size of the canvas element. There is no way to do this with css, as far as i know.

function setCanvas() {
	var viewportwidth;
	var viewportheight;

	if (typeof window.innerWidth != 'undefined') {
		viewportwidth = window.innerWidth,
		viewportheight = window.innerHeight
	}

	//set width and height to 80% of total width
	document.getElementById("can").width = viewportwidth - (.2 * viewportwidth);
	document.getElementById("can").height = viewportwidth - (.2 * viewportwidth);
}

The function drawPresent draws 2500 (50 * 50) squares on the canvas. For each square there is a random colour mixed with Math.round(Math.random() * 255). I added the 1 pixel to the width, because when testing this, i saw white lines between the squares.

function drawPresent() {
	var canvas = document.getElementById('can');
	var ctx = canvas.getContext('2d');

	var ctxwidth = canvas.width;
	var I_width = ctxwidth / 50;

	for(var i=0;i<50;i++){
		for(var j=0;j<50;j++){
			var x = j * I_width;
			var y = i * I_width;

			var rgb1 = Math.round(Math.random() * 255);
			var rgb2 = Math.round(Math.random() * 255);
			var rgb3 = Math.round(Math.random() * 255);
			ctx.fillStyle = 'rgb(' + rgb1 + ',' + rgb2 + ',' + rgb3 + ')';
			ctx.fillRect(x, y, I_width + 1, I_width + 1);
		}
	}
}

The following code implements these functions in a resize and a load handler. I did need to set the ready and resize functions inside a jQuery(function($)) function. I found this in the fifth part of this post 5 Tips For Using jQuery with WordPress.

jQuery(function ($) {

$(window).resize(function () {
	setCanvas();
	setInterval(drawPresent, 1000);
});

$(document).ready(function () {
	setCanvas();
	setInterval(drawPresent, 1000);
});

});

I did decide to not use the library CreateJS for the time being. I did use this in the final presents i made on lfs.nl. It is a way for people who are used to Flash to make canvas easier to implement. Since i last worked with Flash in 2006, i have forgotten so many things about it, that it felt like needing to learn Flash all over again. So i’d rather stick with jQuery for general things and get into Javascript itself to make presents.

I’m using a canvas tutorial from the Mozilla Developer Network to get the basics covered.

Read more…

Published on April 1, 2015 at 6:00 by

Paella

It was a drab, grey, stormy, dreary sunday. The windows were wet the entire day. Some bords on my little balcony fell over. I did very little. I watched some sunday morning tv. I listened to some music. I cooked paella.

This evening i watched Mr. and Mrs. Smith. I have seen it before. Some parts were entertaining. I did enjoy the fight!

I’ll leave you with the paella recipe. My apologies for the out of focus pictures. It’s a nice recipe, which you can adjust to your liking.

Bye bye!

Read more…

Published on March 30, 2015 at 6:00 by

Foundation

The face at the top of this post, is my usual face. I do wear glasses most of the time, but i do have daily lenses. As you see i do have not a bad skin for a 51 year old woman. A few wrinkles beneath the eyes, a few lines on the forehead. I do have slight red cheeks, which i don’t mind too much.

This post shows how i prepare my skin for a full make up. Which is something i hardly ever do. And i mean really that. But i did want to try it out myself. Usually, i use some of the foundation on my chin and cheeks. A bit of concealer and the powder to finish it. Both are quite new, so they haven’t been in my routine that long.

I did buy the Clarins Concealer a few months ago on recommendation of the pixiwoo girls. The Mac prep+prime finishing powder was recommended by multiple sources, Miss Lipgloss among them.

I am interested in getting a primer. I haven’t done any research yet. Maybe a smashbox one, i did read some good reviews on those. But developments are going fast. And i do not want to many silicones really, so i should read more about ingredients.

My foundation is nearly empty. So i do need to read more about these too! It’s a shame Nars isn’t sold here in the Netherlands, i’m really interested in the Sheer Glow Faundation. The Estee Lauder Double Wear seems pretty good too. But as i said, it’ll be quite a task to find the right one.

After i made all the photos for this post, i rushed to the bathroom and removed everything! I was happy to have my normal face back. I would only use this sort of make up for very rare occasions, not for daily life.

Read more…

Published on March 27, 2015 at 6:00 by

Busy busy busy

A day my mind simply races forward and nothing comes out of my hands. I do need to stop doing that!

I have so many things i could be doing right now. And i don’t do any of it.

I have a cat sitting beside me who wants to be petted.

I’ll just go and make a cup of tea and have a fruit cookie. I’ll pet the cat, watch a bit more tv and then go to bed.

Nothing of this shit tomorrow though! Work!

Published on March 26, 2015 at 6:00 by

A walk in Vlaardingen

This Monday i went to Vlaardingen, a small town near Rotterdam. The town where i was born and spend the first 21 years of my life. I do go there occasionally, to visit my sister who lives there. But that’s a quick hop in and out.

It does make me a bit sad walking in that familiar but strange town. So many things have changed. My old nursery school in the Emmastraat isn’t there anymore. My old lower school the J.P. van der Schaar school on the Wilhelminastraat isn’t there anymore either. The town centre is covered now. The park has changed with a lot less green. It still looks nice. It’s a typical small Dutch town with some old streets, some new streets. It’s just not my town.

This isn’t any news to me of course. Years ago i spend a little time in Vlaardingen. I even made a few presents, title and home. It’s all part of my history. Done and dealt with.

The walk lasted for an hour. Than i took the train back home.

Read more…

Published on March 24, 2015 at 6:00 by