Tag Archives: javascript
First step with ionic framework.
Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. This tutorial is based on Fedora 30 distro.
1 2 3 4 5 6 |
[root@desk mythcat]# dnf install nodejs Last metadata expiration check: 0:58:43 ago on Mon 12 Aug 2019 10:01:29 AM EEST. Package nodejs-1:10.16.0-3.fc30.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! |
Let’s see the version for npm and nodejs:
1 2 3 4 |
[mythcat@desk ~]$ npm --version 6.9.0 [mythcat@desk ~]$ node --version v10.16.0 |
Ionic Framework is the free, open source mobile UI toolkit for developing high-quality cross-platform apps for native iOS, Android, and the… Read More »
What is Transpilation?
JavaScript – The canvas sin code.
Today’s tutorial is about using canvas with the javascript script with the use of the mathematical sin function. This JavaScript code is simple to understand. Start with the HTML5 source code:
1 |
<canvas id="id_canvas"></canvas> |
Use this javascript code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
can=document.getElementById("id_canvas"); x=can.getContext("2d"); can.width=640; can.height=480; S=Math.sin; frames = 30; w2 = 640; update_draw=()=>{ for(x.fillRect(0,0,i=(w=w2),i);i--;){ x.clearRect(S(time_run),S(time_run)*w,w,1) } time_run+=1/frames requestAnimationFrame(update_draw) } time_run=0 update_draw() |
The definition of variables and function sin is easy to understand. The first fillRect will create the area… Read More »
JavaScript – Create timeline with vis.js .
This visualization library is a dynamic and browser-based library designed to handle large amounts of dynamic data and to enable manipulation of and interaction with the data. You can read more about this library on the official website. The example I share with you and my codepen account is about : First, you need to… Read More »