diff options
| -rw-r--r-- | .idea/.gitignore | 2 | ||||
| -rw-r--r-- | .idea/Project-TechRPG.iml | 12 | ||||
| -rw-r--r-- | .idea/discord.xml | 9 | ||||
| -rw-r--r-- | .idea/misc.xml | 6 | ||||
| -rw-r--r-- | .idea/modules.xml | 8 | ||||
| -rw-r--r-- | .idea/vcs.xml | 6 | ||||
| -rw-r--r-- | img/mario_sprite.png | bin | 0 -> 587087 bytes | |||
| -rw-r--r-- | index.html | 13 | ||||
| -rw-r--r-- | js/sprite.js | 14 |
9 files changed, 70 insertions, 0 deletions
diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..5c98b42 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml
\ No newline at end of file diff --git a/.idea/Project-TechRPG.iml b/.idea/Project-TechRPG.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/Project-TechRPG.iml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="WEB_MODULE" version="4"> + <component name="NewModuleRootManager"> + <content url="file://$MODULE_DIR$"> + <excludeFolder url="file://$MODULE_DIR$/.tmp" /> + <excludeFolder url="file://$MODULE_DIR$/temp" /> + <excludeFolder url="file://$MODULE_DIR$/tmp" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module>
\ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 0000000..59b11d1 --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="DiscordProjectSettings"> + <option name="show" value="true" /> + </component> + <component name="ProjectNotificationSettings"> + <option name="askShowProject" value="false" /> + </component> +</project>
\ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="JavaScriptSettings"> + <option name="languageLevel" value="ES6" /> + </component> +</project>
\ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..d4c17ec --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/.idea/Project-TechRPG.iml" filepath="$PROJECT_DIR$/.idea/Project-TechRPG.iml" /> + </modules> + </component> +</project>
\ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="$PROJECT_DIR$" vcs="Git" /> + </component> +</project>
\ No newline at end of file diff --git a/img/mario_sprite.png b/img/mario_sprite.png Binary files differnew file mode 100644 index 0000000..583992a --- /dev/null +++ b/img/mario_sprite.png diff --git a/index.html b/index.html new file mode 100644 index 0000000..ce3e1b4 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width"> + <meta name="description" content="A working example of sprite animation."> + <title>Title</title> +</head> +<body> +<canvas></canvas> +<script src="js/sprite.js" type="text/javascript"></script> +</body> +</html>
\ No newline at end of file diff --git a/js/sprite.js b/js/sprite.js new file mode 100644 index 0000000..38b00fc --- /dev/null +++ b/js/sprite.js @@ -0,0 +1,14 @@ +var coinImage = new Image(); +coinImage.src = "images/coin-sprite-animation.png"; + +function sprite (options) { + + var that = {}; + + that.context = options.context; + that.width = options.width; + that.height = options.height; + that.image = options.image; + + return that; +}
\ No newline at end of file |
