I am trying to make an html canvas game.I currently have a blue player in the middle of the screen that shoots projectiles. when i have two projectiles shot at once, a polygon is drawn between them. this confuses me, I AM using context.clearRect. I have tried using context.clearRect twice and i have also trie…
Tag: html
Three.JS: Move 3D cube with accelerometer data over x an y-axis
Following my previous post I am developing a 3D model that moves based on input from accelerometer and gyroscope sensors. The 3D model is written with three.js, and the input data for rotation and translation are in JSON format. Currently the 3D cube moves in 3D space but I have two main problems: The 3D cube…
DOM change font color by using addEventListener
I am a beginner of JS and HTML. I encounter a problem with changing the font color by using addEventListener here is my part of HTML code here is my js code. the situation I encounter is when I click the color box, it pops up the Palette, and then you have to “click” again for choosing the color. …
Can’t get MiradorImageTools Plugin to work
I’m trying to get the MiradorImageTools plugin to work with mirador image viewer. I’m using a very basic html page to test: This gives me the following error: If I leave the plugin out, replacing the problematic line with the commented-out line above it, the whole thing works and I get mirador sho…
Clicking menu item doesn’t scroll down to section on page
the website http://guldcat.com has a template installed with a menu at the top. But I can’t get the link to load the appropriate section on the page.. Anyone has an idea what can be wrong? It uses smoothscroll.js If I click ‘team’ in the menu bar, nothing happens. It does not scroll to ̶…
Inserting text content using same class multiple times
I’m currently trying to insert text content that change depending of image validation using a single class for multiple divs. Any help is appreciate! HTML Right now using the next Javascript it’s inserting the text content but it only does it once per “.spanner” class, not in the rest.…
How to Link Css Externally In Virtual Studio Code
I am using VS code to make a website and it says Hello World! I am trying to use <link rel=’stylesheet type=’text/css’ href=’style.css’>. Except it is not linking correctly. In the css file I have h1{color:red;} but the h1 is not red. If I put the style tag inside the HTML …
Position child element directly under and justified right to the parent element
I am creating a dropdown menu component using React. I would like to know the CSS required to position the menu element directly under the “.menu-trigger” button, with its right border aligned to its parent’s (“.menu-container”), right border. I would like this CSS to be able to …
Class two time repeating in Jquery
Here is slideshow of three images, which is have fadeIn and fadeOut effect on every image, but when i add one new css animation effect fadeInLeft to middle image then it repeats two time, why ? But if i remove fadeInLeft class to middle image then all three image comes one by one correctly, i need to add fade…
Initializing my variable doesn’t works by first click, but by second click it works
if I enter an article number, for example 100100 and then click on the button, my array parent is empty, although it actually has to be overwritten by the method called. however, when I click the button a second time, the array is no longer empty. Why is that? I want my array to be overwritten after the first…