Pages

Se afișează postările cu eticheta web development. Afișați toate postările
Se afișează postările cu eticheta web development. Afișați toate postările

joi, 21 noiembrie 2019

Shadertoy: The flag of Romania - 002.

This is another step about learning shaders.
The old example can be updated with this source code.
I commented on the source code to see step by step how this working.
One way to understand how this working to the final result is to going back on the shader structures that generate output to the basic elements of the shader.
If we apply this case to solve the problem then from the display a color like a vec4 color for fragColor adding a sin function to wave the result, and so on.
Right, this code can be optimized in many ways depending on the result.
// learning process area step by step 
// the gl_FragColor is a vec4 type of float values in the range 0 to 1.
// because the values are from 0 to 1  this can used in many ways with for domain and range
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    // Normalized pixel coordinates (from 0 to 1)
    vec2 uv = fragCoord/iResolution.xy;
    // define a vec2 and uv can be divide to create waves 
    // use this to see the difference 
    // vec2 valul = vec2(0.01,1.0);
    vec2 valul = vec2(0.5,1.0);
    // define a vec2 this vector will be the vector of shadow
    vec2 unghi_valul = vec2(0.5,1.0);
    // this float will speed the animation with iTime
    float viteza = 3.0;
    // with the dot we can calculate the dot product of two vectors and result can be a shadow
    // the result of unghi can be changed when change the vectors and vectors math rules
    float unghi = dot(uv/valul, unghi_valul) - iTime * viteza;
    // the output can be used with sin to create a shadow wave
    // fill the screen with red
    fragColor = vec4(1,0,0,0) * sin(unghi);
    // fill the 2/3 of size with yellow color
    if(uv.x<(1.0/1.5))
    fragColor = vec4(1,1,0,0)  * sin(unghi);
    // fill the last 1/3 with the blue color 
    if(uv.x<1.0/3.0)
    fragColor = vec4(0,0,1,0)  * sin(unghi);
}
The result of this source code:

miercuri, 20 noiembrie 2019

Shadertoy: The flag of Romania - 001.

Today I make the flag of Romania.
About this flag you can read at Wikipedia.
The goal of this simple tutorial is to learn the link between iResolution and the fill areas.
First, you need to normalized pixel coordinates from 0 to 1.
The gl_FragColor is a vec4 type of float values in the range 0 to 1.
We can use this property by fill the areas of the screen.
The example can be changed to use the RGBA.
The source code is this:
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    // Normalized pixel coordinates (from 0 to 1)
    vec2 uv = fragCoord/iResolution.xy;
    // Output to screen
    // fill the screen with red
    fragColor = vec4(1,0,0,0);
    // fill the 2/3 of size with yellow color
    if(uv.x<(1.0/1.5))
    fragColor = vec4(1,1,0,0);
    // fill the last 1/3 with the blue color 
    if(uv.x<1 .0="" code="" fragcolor="vec4(0,0,1,0);">
This is the result of this shader:

vineri, 15 noiembrie 2019

The neon effect with javascript P5 JavaScript library.

The P5.js is a JavaScript library for creative coding.
You can use by adding this link on your HTML area using the script tag:
https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js
You can use it like any JavaScript library.
You have two functions: setup and a draw for setup and drawing.
function setup() {
  createCanvas(window.innerWidth, window.innerHeight);
}

function draw() {
  ellipse(50, 50, 80, 80);
}
Then you can fill these functions with any javascript code.
You can see a neon effect with two bezier functions.
The example uses the mouse movement to change the bezier lines.
You can see many examples created by me at codepen website.

miercuri, 6 noiembrie 2019

Shadertoy: Simple sky with shadertoy tool.

Today I create a simple sky with the online tool shadertoy.
I used Fedora 30 distro Linux and my old video card:
VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
This is the output:

miercuri, 18 septembrie 2019

CodePen: Include shadertoy example in the webpage.

This issue can be solve it easy.
You need to get the iframe share from you shadertoy example.
Then use my example HTML and CSS from my codepen example.
You can remove the javascript code from example.
This javascript code is used to show the formula of sphere. I used my shadertoy example named Ray Marching - 001.

joi, 8 august 2019

Ultimate CSS Gradient Editor online tool.

The Ultimate CSS Gradient Editor was created by Alex Sirota (iosart) for creating CSS source code for many known browsers.
The tool is easy to use, just select the gradient or create a new one.
Add all parameters for positions, colors or from an image and you see in the right side of the screen the preview and source code.
Added support for 4 new gradient formats:

  • IE 10+;
  • Newer Webkit;
  • Opera 11.10+;
  • W3C;

This online tool has good browser compatibility.
You can test this online tool at this webpage.

vineri, 19 iulie 2019

Social media image sizes in development.

A good approach to social media development is the study of international web sites and the way they are built.
Today I will present you a collection of information that will complete the design palette and the graphics: Social media image sizes.
Here's how these are shown in the following tables:

Cover photo/header image:
Social siteImage size
Twitter1500px x 500px
Facebook820px x 312px
Pinterest222px x 150px (Board Cover image)
LinkedIn1584px x 396px (Background or Cover image)
LinkedIn1536px x 768px (Business Cover image)
YouTubeDisplay varies by device; 2560px x 1440px on desktop
Tumblr3000px x 1055px
Medium1500px x 750px

The profile size:
Social siteImage size
Twitter profile picture size400px x 400px
Facebook profile picture size800px x 800px (recommended)
170px x 170px (display size)
Instagram profile picture size110px x 110px (min.)
Pinterest profile picture size165px X 165px
LinkedIn profile picture size400px x 400px
YouTube profile picture size800px x 800px**
Medium profile picture size60px x 60px (publication avatar)
72px x 600px (max.) (logo image)
Tumblr profile picture size128px x 128px

Shared image sizes:
Social siteImage size
900px x 450px
Facebook1200px x 630px
Instagram1080px x 1080px
Pinterest236px x scaled height (Expanded Pin)
LinkedIn1200px x 628px (Personal Profile)
LinkedIn1200px x 1200px (Company Page)
YouTube16:9 aspect ratio (Video); to qualify for HD: 3840px x 2160px
Medium1000px wide by any height
Tumblr540px x 810px

Shared link graphic sizes
Social siteImage size
Twitter800px x 320px
Facebook1200px x 630px
Instagram110px x 110px (Photo Thumbnails)
Pinterest735px x 1102px (Pin Preview); 600px x 600px (Board Display)
LinkedIn180px x 110px
YouTube1280px x 720px (Custom Video Thumbnail)
MediumWill pull story header or profile image

marți, 28 mai 2019

Using blotter.js with channels.

This javascript library comes with this intro:
A JavaScript API for drawing unconventional text effects on the web. Blotter.js requires Three.js and Underscore.js. If you're already including these files in your project, view the information on custom builds to get the file size significantly smaller.
See more here.
The HTML5 is simple with an empty div tag.
The CSS is just for design an is not affected by the script.
I used this:
https://cdnjs.cloudflare.com/ajax/libs/Blotter/0.1.0/blotter.min.js
https://cdnjs.cloudflare.com/ajax/libs/Blotter/0.1.0/materials/channelSplitMaterial.min.js
If you want a distortion effect you need to use this:
https://cdnjs.cloudflare.com/ajax/libs/Blotter/0.1.0/materials/channelSplitMaterial.min.js
The javascript takes the div tag and used it:
//
let text = new Blotter.Text("28:08:2019", {
  family : "sans-serif",
  size : 128,
  fill : "#000"
});

let material = new Blotter.ChannelSplitMaterial();
material.uniforms.uOffset.value = 0.05;
material.uniforms.uAnimateNoise.value = 1;


let blotter = new Blotter(material, {
  texts : text
});

let el = document.getElementById("blotter-channels");
let scope = blotter.forText(text);

scope.appendTo(el);
The result is this:
See the Pen blotter-channels by Cătălin George Feștilă (@catafest) on CodePen.

joi, 21 martie 2019

Lumina by goodboydigital.

Today I come with a web page with great graphics and a design to measure.
The web page is interactive and urges you to drive a firefly through the forest to collect light.
See the full project on the webpage.

vineri, 8 martie 2019

Heart shapes with Wolfram MathWorld.

I chose to present this resource today because it is March 8th.
There are a number of mathematical curves that produced heart shapes and you can find many tools on the web.
The author presents himself with a brief introduction:
Eric W. Weisstein began compiling scientific encyclopedias as a high school student nearly twenty years ago. Born in Bloomington, Indiana in 1969, Weisstein studied physics and astronomy at Cornell University and Caltech and received his Ph.D. from Caltech in 1996. In 1995, Weisstein took the vast collection of mathematical facts that he had been accumulating since his teenage years and began to deploy them on the early internet. These pioneering efforts at organizing and presenting online content helped define a paradigm that has subsequently been followed by other large-scale informational projects on the web.
The most important part of this resource is highlighted in a table of contents about mathematical issues:
  • Algebra
  • Applied Mathematics
  • Calculus and Analysis
  • Discrete Mathematics
  • Foundations of Mathematics
  • Geometry
  • History and Terminology
  • Number Theory
  • Probability and Statistics
  • Recreational Mathematics
  • Topology
The examples and details can be found here.
If you want to use the Wolfram Alpha syntax, there are formulas:
heart curve

joi, 17 ianuarie 2019

The David Li work.

This author of adultswim.com choir uses a neural network I trained on choral pieces to generate the harmonization for your melody.
Today I will show you a good painting tool idea created by the same author: David Li.
The twitter account can be found at david li twitter. You can follow the source code on GITHUB account of this author:

luni, 7 ianuarie 2019

Shadertoy: Flame 2D by catafest.

I create another shader using the shadertoy online tool.
This online tool helps users to understand the shaders theory.
All of the shaders theory is based on the math of graphics.
My example uses the basic shader for a 2D flame with minimal parameters to understand easier the math of this shader.
Let's see the source code:
// define iTime like Shader Inputs
#define time iTime
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    // Normalized pixel coordinates (from 0 to 1)
    // vec2 uv = fragCoord/iResolution.xy;
 // create center of position of flame by xy and sized
 vec2 pos = ( fragCoord.xy / iResolution.xy )*2.0-vec2(1.,1.);
    // create flame variation 
    if(pos.y>-3.0){
  // variation by time and set up to -3.0
        // the 0.1 and 30 parameters create the variation of flame 
        // with ths sin and fract functions
        pos.y += 0.1*fract(sin(30.0*time));
 }
    // select background to black
 vec3 color = vec3(0.0,0.0,0.0);
 // set scale of flame 
 float p =.001;
    // create shape of flame (output y)
 float y = pow(abs(pos.x),3.0)/(1.0*p)*1.0;
 // create the hight of flame 
 float flame_out = length(pos+vec2(pos.x,y))*sin(0.9);
 // fix colors flame by RGB 
 if(flame_out < 0.9){
        // color for RG (red green)
  color.rg += smoothstep(0.0,0.3,0.6-flame_out);
        // fix color of flame by G (green)
  color.g /=2.4;
 }
 color += pow(color.r,1.0);
 // output color
    fragColor = vec4(color,1.0);

}
The result can be found here.

vineri, 21 decembrie 2018

Create textures with Materialize.

The development team comes with this great tool named Materialize:
Materialize is a stand alone tool for creating materials for use in games from images. You can create an entire material from a single image or import the textures you have and generate the textures you need.
You can use this tool for:
What can this tool do?
  • Diffuse -> Height 
  • Diffuse -> Metallic
  • Diffuse -> Smoothness
  • Height -> Normal
  • Height + Diffuse -> Normal 
  • Normal -> Edge 
  • Normal -> Occlusion 
  • Normal + Height -> Occlusion 
  • Normal -> Height 
  • Seamlessly tile your textures. 
  • Save and load in a variety of formats. 
  • Automate many processes with clipboard commands in XML format.
You can find video tutorials created by Michael Voeller:

miercuri, 19 decembrie 2018

The best online font creator - calligraphr.

This website named calligraphr is an online tool for creating fonts.
The development team comes with these features:
  • Create your templates with much more comfort and options.
  • You don't need a scanner anymore. Just take a pic of your template with your mobile phone.
  • Draw different variants of each character, which are then used randomly to give your font a more authentic look.
  • Create your ligatures and add them to your font.
  • No need to start over again if you don't like a character.
  • Just edit it with our included tools.
  • Take all the time you need to work on your fonts.
  • They are stored on your browser and can be edited in more than one session.
You can use many templates (from default templates to any languages).
Use these steps:
  1. Create a template;
  2. Fill it out with your font;
  3. Use the result and upload it into fonts page;
The template can be download into PDF or archive of PNG files.
This is a default language font to create a template, see screenshot:

MAVO : Create webpages with HTML and CSS .

A start intro into MAVO can be found here.
The MAVO is a simple way to create good design and graphics for your website.
The development team tells us: What if I told you, that you can do these things (and more!), just with HTML and CSS? No programming code to write, no servers to manage.
A demo page shows us how good is this system, see here.

duminică, 9 decembrie 2018

Brackets - another editor for development.

This is a modern, open source text editor with a great design that understands web design and is named Brackets.
Is created with JavaScript and you can contribute and create your extensions.
The team development comes with this intro:
Brackets is a lightweight, yet powerful, modern text editor. We blend visual tools into the editor so you get the right amount of help when you want it without getting in the way of your creative process. You'll enjoy writing code in Brackets.
This editor can be found at the official webpage.
See this screenshot with this editor:

duminică, 16 septembrie 2018

The Figma App Design Workflow - online tool.

The development team come with this intro:
Figma is the first interface design tool based in the browser, making it easier for teams to create software.
The Figma pricing start with:
  • Basic - free for individuals 
  • Professional - $12*
  • Organization - $45*
You can start with your your email or google account, see first page:
The interface is simple and colors are great.
The official youtube channel come with many videos about this online tool.
You can find any references and tutorials on web.
The CharliMarieTV channel come with this title about Figma : Sketch vs Figma - Why I switched!

luni, 28 mai 2018

GDevelop - game programming tool .

A quick introduction to this online tool comes from the official website , see this:

GDevelop runs on Windows, macOS and most recent Linux distributions.
You can also try it online using Chrome, Firefox or another recent web browser. 
... 
GDevelop is an open-source project.

This is tool can be used on your desktop with most operating systems but also online.
I tested it and it's easy to use and come with default examples and sample.
The result can be used on web or like application.
For Android applications you need to install it on your desktop.

luni, 2 aprilie 2018

News : Online tool for CSS web development.

This is online tool named animista is a tool for web development and you can used to create source code for animation and CSS.
The tool come with beta version but works very well.
You can try this online tool here.

duminică, 1 aprilie 2018

The Construct game engine.

The Construct game engine is an HTML5-based 2D game editor features and improvements like: multi platform, event sheets, layout wiew, multi language, steamlined interface and more.
Is simple to use and has a good learning area.
You can try new Construct 3 or old Construct 2 version .
You can read more about this game engine at official webpage .
Here is a video tutorial from official youtube channel.