You can find good web development with a great graphics on Ksenia Kondrashova codepen account.
See this example named: CodePen Home WebGL Flower Pattern (Voronoi diagram GLSL):
2D, 3D, game, games, online game, game development, game engine, programming, OpenGL, Open AI, math, graphics, design, graphic, graphics, game development, game engine, programming, web development, web art, web graphic, arts, tutorial, tutorials,
1 MODE 1:VDU 19,0,4,0,0,0:VDU 19,1,6,0,0,0
2 COLOUR 1
3 PRINT:PRINT " **** COMODORE 64 BASIC V2 ****"
4 PRINT:PRINT " 64K RAM SYSTEM 38911 BASIC BYTES FREE"
5 PRINT:PRINT "READY."
/*--based on https://openprocessing.org/sketch/396851--*/
var nbranchs = 73;
function setup() {
createCanvas(640, 400);
background(0, 0, 128);
noFill();
stroke(128);
noLoop();
}
function draw() {
tree(100, 200, 150, 350);
}
function mousePressed() {
background(0, 0, 128);
redraw();
}
function branch(x, y, dx, dy) {
var sign = random(dx+1.0)/(abs(dx)+5.0);
for (var i = 0; i <= x; i += 3) {
var idx = i/x;
var xi = bezierPoint(x, x + dx/2, x + dx, x + dx, idx);
var yi = bezierPoint(y, y, y + dy, y + dy, idx);
line(xi, yi, xi + sign*random(8), yi + random(18));
}
}
function tree(left, right, top, bottom) {
for (var idx = 0; idx < nbranchs; idx += 1) {
// choose a random y position
var y = random(bottom, top);
// choose a random x position inside of a triangle
var dx = map(y, bottom, top, 0.0, (right-left)/2.0);
var x = random(left + dx, right - dx);
var x1 = random(left + dx, right - dx);
// choose the size of the branch according to the position on the tree
var w = map (x, left, right, random(-25) -25, random(25)+25) + 1;
var h = map (y, bottom, top, 5 +random(20), 5);
var w1 = map (x, left, right, random(-35), random(35)) + 3;
var h1 = map (y, bottom, top, random(10), random(10));
// randonize the size
var dw = random(-10, 5);
var dh = random (-5, 5);
var dw1 = random(-5, 1);
var dh1 = random (-1, 1);
// create the new branch
branch(x1, y, w1 + dw1, h1 + dh1);
stroke(random(0),random(128),random(15));
branch(x1, y, w1 + dw1, h1 + dh1);
stroke(random(25),random(255),random(50));
branch(x, y, w + dw, h + dh);
}
}
// this size of line to paint each pixel from screen
const float size = 0.01;
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = fragCoord/iResolution.xy;
// resize uv
uv = uv * 2.0;
// translate normalized pixel coordinates uv from [0,1] to [-1, 1] with
uv = (uv - 1.0);
// get uv.x aspect ratio
uv.x *= iResolution.x / iResolution.y;
// get simple sine
//float t = sin(uv.x);
// get sine * 3 with same size uv will zoom the sine graphic
// see also https://en.wikipedia.org/wiki/Sine_wave
float t = sin(uv.x * 3.0);
// select domain area of sine and drwa yellow color
// else put an blue color on rest
if (uv.y >= t - size && uv.y <= t + size) {
// draw sine
fragColor = vec4(1.0,1.0,0.0,1.0);
} else {
// draw background
fragColor = vec4(0.0,0.0,1.0,1.0);
}
}
The result of this shader is this:using UnityEngine;
public abstract class PlayerBaseState
{
public abstract void EnterState(PlayerController_FSM player);
public abstract void Update(PlayerController_FSM player);
public abstract void OnCollisionEnter(PlayerController_FSM player);
}
Create a new C# script named PlayerIdleState.
The script needs to be changed into this source code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerIdleState : PlayerBaseState
{
}
Select the PlayerIdleState and use these keys: Cmd or Ctrl and . (the point key) .using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerIdleState : PlayerBaseState
{
public override void EnterState(PlayerController_FSM player)
{
throw new System.NotImplementedException();
}
public override bool Equals(object obj)
{
return base.Equals(obj);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
public override void OnCollisionEnter(PlayerController_FSM player)
{
throw new System.NotImplementedException();
}
public override string ToString()
{
return base.ToString();
}
public override void Update(PlayerController_FSM player)
{
throw new System.NotImplementedException();
}
}