Помощь описание уроки команды функций движка CanvasSimply - javascript canvas help description lessons commands sample examples tutorials function on the CanvasSimply engine
create_canvas get_canvasX get_canvasY get_canvasW get_canvasH smoothScreen loadImage drawImage drawAnimImage getFrameAnim setFrameAnim getXImage getYImage getWidthImage getHeightImage grayscaleImage contrastImage blurImage horizontImage verticalImage rotateImage sizeImage hideImage showImage alphaImage groundImage getPixel setDebug getPixelImage collisionRect collisionPixelImage collisionHandle position_camera getPosXCam getPosYCam drawText point circle line lineDash rect flip distancePixel distanceImage loadSound soundRepeat soundVolume playSound soundPause soundStop soundResume progressBar event win getMouse keyboard
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CanvasSimply - Begin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://gitplayertv.ru/canvas/keys.js"></script>
<script src="https://gitplayertv.ru/canvas/func_canvas.js"></script>
<link rel="stylesheet" href="https://gitplayertv.ru/canvas/main.css" />
</head>
<body></body>
<script>
var x=20,y=100;
create_canvas();
var hero=loadImage("https://gitplayertv.ru/canvas/sprite/ship.png");
//Эта часть update обязательна, цикл для обновления 60 кадров в секунду
var update=function(){
if(keyD){x=x+12;}
if(keyS){y=y+12;}
if(keyA){x=x-12;}
if(keyW){y=y-12;}
drawImage(hero, x, y);
setDebug("Нажмите ASDW", "#fff");
flip();
}
</script>
</html>