CodingTrain / CodingTrain/Suggestion-Box
javascript into html
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 570
- Fork
- 85
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I am trying to create a javascript game because it can somehow link to html. So far I tried making the canvas in java script pop up but i only saw a white screen. I just started learning html and atm I want all my code to be in java and just use html to place it on the webpage.
here my html:
`
Space Invaders
`
i'm trying to link this page to my js
here my js
`function setup(){
createCanvas(400,400);
}
function draw(){
background(0);
}`
i'm wanting a 400 by 400 screen to appear on the web page with the background in the square being 0. Can someone tell me why this not working?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia riproducendo gli snippet HTML e JavaScript forniti, usando l’entry point spaceInvaders.js indicato e le funzioni setup e draw. Controlla come la pagina carica lo script e come viene creato il canvas, quindi verifica che nella pagina web compaia un canvas di 400 per 400 con valore di sfondo 0.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- html, javascript
- Ambito
- frontend, web-dev
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100