Skip to content

Instantly share code, notes, and snippets.

@dinarname
dinarname / pong.pde
Last active June 9, 2020 20:54
Учебный пример для игры Pong
// игра Pong
// читайте step by step guide — https://bit.ly/pong-lesson
void setup() {
size(640, 480);
}
int x = 50, y = 50; // переменные для хранения координат шарика
int vx = 3, vy = 3; // скорость по оси X и оси Y
int dir = -1; // direction — переменная для изменения направления
@dinarname
dinarname / 1stSketch.pde
Last active May 20, 2020 09:30
домашнее задание ко второму занятию
// Привет, Софа!
// Задание:
// Нарисовать смайлик / человечка / дома с ипользованием функция для рисования
// эллипса, прямоугольника, заливки.
// ellipse(кордX, коордY, ширина, высота);
// rect(кордX, коордY, ширина, высота);
// fill(код цвета в HEX);
// презентация с урока
// https://docs.google.com/presentation/d/1PQ64LBoao8lFBGfVGYeEeVr3Hras97icY_3g-XFFMZA/edit?usp=sharing
//presscentre
<audio controls="controls">
<source src="https://rustrn.radioca.st/streams/128kbps" type="audio/mpeg">
</audio>
//tennis talks
<audio controls="controls">
<source src="https://entrn.radioca.st/streams/128kbps" type="audio/mpeg">
</audio>
<div class="video_block left__type-1 abs">
<a href="https://www.youtube.com/watch?v=Byt2RNj9vKs" data-fancybox class="db rL h100 cover" style="background-image: url(img/gallery/video1.jpg);"></a>
</div>
<div class="img_block right__type-1 abs">
<a href="img/gallery/photo2.jpg" data-fancybox="images" class="db rL h100 cover" style="background-image: url(img/gallery/photo2.jpg);"></a>
</div>
<div class="img_block center__type-1 abs active">
<a href="img/gallery/photo3.jpg" data-fancybox="images" class="db rL h100 cover" style="background-image: url(img/gallery/photo3.jpg);"></a>
</div>
<div class="img_block left__type-2 abs">
@dinarname
dinarname / coloredCirles.pde
Created July 26, 2019 12:07
example for Machu Pichu, July 26
void setup() {
fullScreen();
background(255, 255, 255);
}
float x, y, d, r, g, b;
void draw() {
x = random(0, width);
y = random(0, height);
const yes = () => {
if (userAnswer === 'yes') {
console.log('Correct!');
} else {
console.log(`' ${userAnswer} ' is wrong answer ;(. Correct answer was ' yes '.`);
console.log(`Let's try again, ${name}!`);
break;
}
};
import readlineSync from 'readline-sync';
const getToKnow = () => {
const name = readlineSync.question('May I have your name? ');
console.log(`Hi, ${name}!`);
return name;
};
const evenNumberGame = () => {
@dinarname
dinarname / pong.pde
Created February 27, 2019 18:01
pong
int x, y;
int yDirection;
int xDirection;
int counter;
void setup() {
size(300, 400);
x = 100;
y = 10;
yDirection = 3;
@dinarname
dinarname / pony.html
Last active January 24, 2019 12:49
html example
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Базовые возможности HTML</title>
<link href="https://fonts.googleapis.com/css?family=PT+Serif" rel="stylesheet">
<style type="text/css">
*{
margin: 0 auto;
padding: 0 auto;
@dinarname
dinarname / Примеры сайтов
Created January 17, 2019 12:45
Примеры сайтов
Портфолио
http://unlikely.studio/
https://toyfight.co - портфолио
http://seanhalpin.io/ - портфолио
https://www.bolden.nl/ - агентство портфолио
https://fabianirsara.com/ - портфолио персональный сайт
Продукты