Category Archives: HTML 5

WebSocket – First steps – part 001.

I do not think that is so sought after. Most people prefer products WebRTC.
Also on good reason of using WebRTC instead of Websocket is latency of streaming.
Is the protocol for two-way communication with a remote host.
The WebSocket interface and defines a full-duplex communication channel and operates through a single socket over the Web. The WebSocket detects the presence of a proxy server.
The next step is to automatically sets up a tunnel to pass through the proxy.
The tunnel is established by issuing an HTTP CONNECT statement to the proxy server.
Let’s see one simple example:

It is one simple open, close and sending message with websocket and javascript show events.
The most important part is to define the websocket:

The next steps is to use it with default javascript event system and window show message.

Posted in All, HTML 5, javascript. Tagged with , , , , , .

Mandelbrot with three.js .

The Mandelbrot set is the set of complex numbers c for which the function f c ( z ) = z 2 + c {\displaystyle f_{c}(z)=z^{2}+c} {\displaystyle f_{c}(z)=z^{2}+c} does not diverge when iterated from z = 0 {\displaystyle z=0} z=0, i.e., for which the sequence f c ( 0 ) {\displaystyle f_{c}(0)} {\displaystyle f_{c}(0)}, f c ( f c ( 0 ) ) {\displaystyle f_{c}(f_{c}(0))} {\displaystyle f_{c}(f_{c}(0))}, etc., remains bounded in absolute value.wikipedia.org

You need to download the three.js – java script from threejs webpage.
The source code is simple. Come with default HTML5 page and javascripts.
One part of this will make vertex-shader and fragment shader, both is 2D shader type.
You need the canvas tag with id=”canv”.
The last part of source code is make to put all into one image processing by shaders.

Posted in All, HTML 5, javascript, Programming, WebGL, Windows 10. Tagged with , , , , , , , , .

WebRTC – First steps – part 001.

The official website tells us:
WebRTC is a free, open project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
First I will come with one simple example into this tutorial.
Will make one webcam into webpage.
Make one index.html file and add this source code:
Continue reading

Posted in All, HTML 5, javascript, Programming, web. Tagged with , , , , , , , .

Simple radial background.

This is the most simple example with HTML5. The result is one radial effect background blue.
I add some text with style color white over this background.
You can start with one default HTML5 and add the style of body tag.
First create one file and named my_test.html. Then you can add this source code:
<!DOCTYPE html>
<html>
<head>
<meta charset=”UTF-8″>
<title>Title of the document</title>
<style type=”text/css”>
*{
margin:0;
padding:0;
}

html,body{
width:100%;
height:100%;
}
body{
overflow:hidden;
background:radial-gradient(#4777B0 0%,#201D31  100%);
}</style>
</head>
<body>
<p style=’color:white’>free-tutorials.org – some text over background!</p>
</body>
</html>

Posted in All, HTML 5, web. Tagged with , , , , .

Simple button shadow with css and webkit filter.

If you like it this simple shadow text with css with webkit filter then today I will show you how to make one simple shadow button.
Is a basic html5 with css style and show with class button.
<!DOCTYPE html>
<html>
<head>
<style>
.button{
color: #555;
text-shadow: 0px 1px 0px #fff;
display:block; padding: 5px;
text-decoration:none;text-align: center;
font-size: 14px;
font-weight: bold;
border: 1px solid #888;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;

background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(194,194,195)),
color-stop(0.8, rgb(200,200,200)),
color-stop(1, rgb(250,250,250))
);

background-image: -moz-linear-gradient(
center bottom,
rgb(194,194,195) 0%,
rgb(200,200,200) 80%,
rgb(250,250,250) 100%
);
}
.button:hover{
box-shadow: 0px 0px 20px #30ff00;
-moz-box-shadow: 0px 0px 20px #30ff00;
-webkit-box-shadow: 0px 0px 20px #30ff00;
}
</style>
<meta charset=”UTF-8″>
<title>shadow button</title>
</head>

<body>
<p><a href=”” class=”button”>Shadow buttton effect</a></p>
</body>

</html>



shadow button

Shadow buttton effect

Posted in All, HTML 5, web. Tagged with , , .