Html Canvas random start position to move afterwards
up vote
1
down vote
favorite
I am currently learning JavaScript.
I want the random start position of the cube to go up and down. This will cause the cubes to jump up and down on the Y axis.
I want the cubes to move up and down
Picture
maybe like that:
Y = Y + speed;
if(Y <= 0) {
speed = -speed;
}
if(Y >= canvas.width) {
speed = -speed;
}
So that's my code:
window.onload = function() {
canvas = document.getElementById('gameCanvas');
canvasContext = canvas.getContext('2d');
draw();
}
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height, "#cc33ff");
for (var i=0; i <= 50; i++) {
var randX = Math.floor(Math.random() * 800);
X = randX;
var randY = Math.floor(Math.random() * 600);
Y = randY;
speed = 10;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
canvasContext.beginPath();
canvasContext.rect(X, Y, 20, 20);
canvasContext.fillStyle = randColor;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
javascript html canvas random
add a comment |
up vote
1
down vote
favorite
I am currently learning JavaScript.
I want the random start position of the cube to go up and down. This will cause the cubes to jump up and down on the Y axis.
I want the cubes to move up and down
Picture
maybe like that:
Y = Y + speed;
if(Y <= 0) {
speed = -speed;
}
if(Y >= canvas.width) {
speed = -speed;
}
So that's my code:
window.onload = function() {
canvas = document.getElementById('gameCanvas');
canvasContext = canvas.getContext('2d');
draw();
}
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height, "#cc33ff");
for (var i=0; i <= 50; i++) {
var randX = Math.floor(Math.random() * 800);
X = randX;
var randY = Math.floor(Math.random() * 600);
Y = randY;
speed = 10;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
canvasContext.beginPath();
canvasContext.rect(X, Y, 20, 20);
canvasContext.fillStyle = randColor;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
javascript html canvas random
What's the problem you're facing?
– rv7
Nov 7 at 18:20
I want the cubes to move up and down
– MorpheusCode
Nov 7 at 18:31
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am currently learning JavaScript.
I want the random start position of the cube to go up and down. This will cause the cubes to jump up and down on the Y axis.
I want the cubes to move up and down
Picture
maybe like that:
Y = Y + speed;
if(Y <= 0) {
speed = -speed;
}
if(Y >= canvas.width) {
speed = -speed;
}
So that's my code:
window.onload = function() {
canvas = document.getElementById('gameCanvas');
canvasContext = canvas.getContext('2d');
draw();
}
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height, "#cc33ff");
for (var i=0; i <= 50; i++) {
var randX = Math.floor(Math.random() * 800);
X = randX;
var randY = Math.floor(Math.random() * 600);
Y = randY;
speed = 10;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
canvasContext.beginPath();
canvasContext.rect(X, Y, 20, 20);
canvasContext.fillStyle = randColor;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
javascript html canvas random
I am currently learning JavaScript.
I want the random start position of the cube to go up and down. This will cause the cubes to jump up and down on the Y axis.
I want the cubes to move up and down
Picture
maybe like that:
Y = Y + speed;
if(Y <= 0) {
speed = -speed;
}
if(Y >= canvas.width) {
speed = -speed;
}
So that's my code:
window.onload = function() {
canvas = document.getElementById('gameCanvas');
canvasContext = canvas.getContext('2d');
draw();
}
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height, "#cc33ff");
for (var i=0; i <= 50; i++) {
var randX = Math.floor(Math.random() * 800);
X = randX;
var randY = Math.floor(Math.random() * 600);
Y = randY;
speed = 10;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
canvasContext.beginPath();
canvasContext.rect(X, Y, 20, 20);
canvasContext.fillStyle = randColor;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
javascript html canvas random
javascript html canvas random
edited Nov 7 at 18:31
asked Nov 7 at 18:17
MorpheusCode
114
114
What's the problem you're facing?
– rv7
Nov 7 at 18:20
I want the cubes to move up and down
– MorpheusCode
Nov 7 at 18:31
add a comment |
What's the problem you're facing?
– rv7
Nov 7 at 18:20
I want the cubes to move up and down
– MorpheusCode
Nov 7 at 18:31
What's the problem you're facing?
– rv7
Nov 7 at 18:20
What's the problem you're facing?
– rv7
Nov 7 at 18:20
I want the cubes to move up and down
– MorpheusCode
Nov 7 at 18:31
I want the cubes to move up and down
– MorpheusCode
Nov 7 at 18:31
add a comment |
3 Answers
3
active
oldest
votes
up vote
0
down vote
I think what you need to do is have an initialisation routine to determine the starting random position and then another to handle the up/down movement. What you have now is merely handling initialisation but not handling the next animation frame etc.
Can you edit the code so that it is correct?
– MorpheusCode
Nov 7 at 19:20
add a comment |
up vote
0
down vote
In this case you would need to save your squares in an array. You will also need a function to update the squares position. In my answer I'm using a function that updates all the squares and an other one that draws all the squares. A better solution would be to use the a function that draws or updates a single square, and to call that function for each square.
var cw,ch,w = 20;
var squares =
canvas = document.getElementById('gameCanvas');
// set the canvas width and height
cw = canvas.width = 800;
ch = canvas.height = 600;
canvasContext = canvas.getContext('2d');
for (var i=0; i <= 50; i++) {
// make a new square object
var sq = {}
var randX = Math.floor(Math.random() * (cw - w));
sq.X = randX;
var randY = Math.floor(Math.random() * (ch - w));
sq.Y = randY;
sq.speed = 1;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
sq.color = randColor;
// push the new square object into the squares array
squares.push(sq);
}
function Draw() {
// to animate the squares you will need to use the requestAnimationFrame method
window.requestAnimationFrame(Draw);
canvasContext.clearRect(0,0,cw,ch);
draw();
update();
}
Draw();
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height);
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
canvasContext.beginPath();
canvasContext.rect(sq.X, sq.Y, w, w);
canvasContext.fillStyle =sq.color;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
function update(){
// a function to update the squares position with every frame.
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
if(sq.Y >= ch - w || sq.Y <= 0){sq.speed *= -1;}
sq.Y += sq.speed;
}
}<canvas id="gameCanvas"></canvas>
Update all draw all is actually netter than update single draw single, easier for browser to optimize, but you'll want to make it smarter by conposing the less pathes as possible (i.e when consecutive rects share the same color, don't call beginPath, nor fill nor stroke). Also, what is closePath doing here?
– Kaiido
Nov 8 at 0:31
add a comment |
up vote
0
down vote
It doesnt't work on my Computer but on JsFidlle:

add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I think what you need to do is have an initialisation routine to determine the starting random position and then another to handle the up/down movement. What you have now is merely handling initialisation but not handling the next animation frame etc.
Can you edit the code so that it is correct?
– MorpheusCode
Nov 7 at 19:20
add a comment |
up vote
0
down vote
I think what you need to do is have an initialisation routine to determine the starting random position and then another to handle the up/down movement. What you have now is merely handling initialisation but not handling the next animation frame etc.
Can you edit the code so that it is correct?
– MorpheusCode
Nov 7 at 19:20
add a comment |
up vote
0
down vote
up vote
0
down vote
I think what you need to do is have an initialisation routine to determine the starting random position and then another to handle the up/down movement. What you have now is merely handling initialisation but not handling the next animation frame etc.
I think what you need to do is have an initialisation routine to determine the starting random position and then another to handle the up/down movement. What you have now is merely handling initialisation but not handling the next animation frame etc.
answered Nov 7 at 18:52
schlock
136129
136129
Can you edit the code so that it is correct?
– MorpheusCode
Nov 7 at 19:20
add a comment |
Can you edit the code so that it is correct?
– MorpheusCode
Nov 7 at 19:20
Can you edit the code so that it is correct?
– MorpheusCode
Nov 7 at 19:20
Can you edit the code so that it is correct?
– MorpheusCode
Nov 7 at 19:20
add a comment |
up vote
0
down vote
In this case you would need to save your squares in an array. You will also need a function to update the squares position. In my answer I'm using a function that updates all the squares and an other one that draws all the squares. A better solution would be to use the a function that draws or updates a single square, and to call that function for each square.
var cw,ch,w = 20;
var squares =
canvas = document.getElementById('gameCanvas');
// set the canvas width and height
cw = canvas.width = 800;
ch = canvas.height = 600;
canvasContext = canvas.getContext('2d');
for (var i=0; i <= 50; i++) {
// make a new square object
var sq = {}
var randX = Math.floor(Math.random() * (cw - w));
sq.X = randX;
var randY = Math.floor(Math.random() * (ch - w));
sq.Y = randY;
sq.speed = 1;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
sq.color = randColor;
// push the new square object into the squares array
squares.push(sq);
}
function Draw() {
// to animate the squares you will need to use the requestAnimationFrame method
window.requestAnimationFrame(Draw);
canvasContext.clearRect(0,0,cw,ch);
draw();
update();
}
Draw();
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height);
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
canvasContext.beginPath();
canvasContext.rect(sq.X, sq.Y, w, w);
canvasContext.fillStyle =sq.color;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
function update(){
// a function to update the squares position with every frame.
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
if(sq.Y >= ch - w || sq.Y <= 0){sq.speed *= -1;}
sq.Y += sq.speed;
}
}<canvas id="gameCanvas"></canvas>
Update all draw all is actually netter than update single draw single, easier for browser to optimize, but you'll want to make it smarter by conposing the less pathes as possible (i.e when consecutive rects share the same color, don't call beginPath, nor fill nor stroke). Also, what is closePath doing here?
– Kaiido
Nov 8 at 0:31
add a comment |
up vote
0
down vote
In this case you would need to save your squares in an array. You will also need a function to update the squares position. In my answer I'm using a function that updates all the squares and an other one that draws all the squares. A better solution would be to use the a function that draws or updates a single square, and to call that function for each square.
var cw,ch,w = 20;
var squares =
canvas = document.getElementById('gameCanvas');
// set the canvas width and height
cw = canvas.width = 800;
ch = canvas.height = 600;
canvasContext = canvas.getContext('2d');
for (var i=0; i <= 50; i++) {
// make a new square object
var sq = {}
var randX = Math.floor(Math.random() * (cw - w));
sq.X = randX;
var randY = Math.floor(Math.random() * (ch - w));
sq.Y = randY;
sq.speed = 1;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
sq.color = randColor;
// push the new square object into the squares array
squares.push(sq);
}
function Draw() {
// to animate the squares you will need to use the requestAnimationFrame method
window.requestAnimationFrame(Draw);
canvasContext.clearRect(0,0,cw,ch);
draw();
update();
}
Draw();
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height);
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
canvasContext.beginPath();
canvasContext.rect(sq.X, sq.Y, w, w);
canvasContext.fillStyle =sq.color;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
function update(){
// a function to update the squares position with every frame.
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
if(sq.Y >= ch - w || sq.Y <= 0){sq.speed *= -1;}
sq.Y += sq.speed;
}
}<canvas id="gameCanvas"></canvas>
Update all draw all is actually netter than update single draw single, easier for browser to optimize, but you'll want to make it smarter by conposing the less pathes as possible (i.e when consecutive rects share the same color, don't call beginPath, nor fill nor stroke). Also, what is closePath doing here?
– Kaiido
Nov 8 at 0:31
add a comment |
up vote
0
down vote
up vote
0
down vote
In this case you would need to save your squares in an array. You will also need a function to update the squares position. In my answer I'm using a function that updates all the squares and an other one that draws all the squares. A better solution would be to use the a function that draws or updates a single square, and to call that function for each square.
var cw,ch,w = 20;
var squares =
canvas = document.getElementById('gameCanvas');
// set the canvas width and height
cw = canvas.width = 800;
ch = canvas.height = 600;
canvasContext = canvas.getContext('2d');
for (var i=0; i <= 50; i++) {
// make a new square object
var sq = {}
var randX = Math.floor(Math.random() * (cw - w));
sq.X = randX;
var randY = Math.floor(Math.random() * (ch - w));
sq.Y = randY;
sq.speed = 1;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
sq.color = randColor;
// push the new square object into the squares array
squares.push(sq);
}
function Draw() {
// to animate the squares you will need to use the requestAnimationFrame method
window.requestAnimationFrame(Draw);
canvasContext.clearRect(0,0,cw,ch);
draw();
update();
}
Draw();
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height);
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
canvasContext.beginPath();
canvasContext.rect(sq.X, sq.Y, w, w);
canvasContext.fillStyle =sq.color;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
function update(){
// a function to update the squares position with every frame.
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
if(sq.Y >= ch - w || sq.Y <= 0){sq.speed *= -1;}
sq.Y += sq.speed;
}
}<canvas id="gameCanvas"></canvas>In this case you would need to save your squares in an array. You will also need a function to update the squares position. In my answer I'm using a function that updates all the squares and an other one that draws all the squares. A better solution would be to use the a function that draws or updates a single square, and to call that function for each square.
var cw,ch,w = 20;
var squares =
canvas = document.getElementById('gameCanvas');
// set the canvas width and height
cw = canvas.width = 800;
ch = canvas.height = 600;
canvasContext = canvas.getContext('2d');
for (var i=0; i <= 50; i++) {
// make a new square object
var sq = {}
var randX = Math.floor(Math.random() * (cw - w));
sq.X = randX;
var randY = Math.floor(Math.random() * (ch - w));
sq.Y = randY;
sq.speed = 1;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
sq.color = randColor;
// push the new square object into the squares array
squares.push(sq);
}
function Draw() {
// to animate the squares you will need to use the requestAnimationFrame method
window.requestAnimationFrame(Draw);
canvasContext.clearRect(0,0,cw,ch);
draw();
update();
}
Draw();
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height);
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
canvasContext.beginPath();
canvasContext.rect(sq.X, sq.Y, w, w);
canvasContext.fillStyle =sq.color;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
function update(){
// a function to update the squares position with every frame.
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
if(sq.Y >= ch - w || sq.Y <= 0){sq.speed *= -1;}
sq.Y += sq.speed;
}
}<canvas id="gameCanvas"></canvas>var cw,ch,w = 20;
var squares =
canvas = document.getElementById('gameCanvas');
// set the canvas width and height
cw = canvas.width = 800;
ch = canvas.height = 600;
canvasContext = canvas.getContext('2d');
for (var i=0; i <= 50; i++) {
// make a new square object
var sq = {}
var randX = Math.floor(Math.random() * (cw - w));
sq.X = randX;
var randY = Math.floor(Math.random() * (ch - w));
sq.Y = randY;
sq.speed = 1;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
sq.color = randColor;
// push the new square object into the squares array
squares.push(sq);
}
function Draw() {
// to animate the squares you will need to use the requestAnimationFrame method
window.requestAnimationFrame(Draw);
canvasContext.clearRect(0,0,cw,ch);
draw();
update();
}
Draw();
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height);
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
canvasContext.beginPath();
canvasContext.rect(sq.X, sq.Y, w, w);
canvasContext.fillStyle =sq.color;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
function update(){
// a function to update the squares position with every frame.
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
if(sq.Y >= ch - w || sq.Y <= 0){sq.speed *= -1;}
sq.Y += sq.speed;
}
}<canvas id="gameCanvas"></canvas>var cw,ch,w = 20;
var squares =
canvas = document.getElementById('gameCanvas');
// set the canvas width and height
cw = canvas.width = 800;
ch = canvas.height = 600;
canvasContext = canvas.getContext('2d');
for (var i=0; i <= 50; i++) {
// make a new square object
var sq = {}
var randX = Math.floor(Math.random() * (cw - w));
sq.X = randX;
var randY = Math.floor(Math.random() * (ch - w));
sq.Y = randY;
sq.speed = 1;
var colorArray = ['#2185C5', '#7ECEFD', '#FFF6E5', '#FF6666'];
var randColor = colorArray[Math.floor(Math.random() * colorArray.length)];
sq.color = randColor;
// push the new square object into the squares array
squares.push(sq);
}
function Draw() {
// to animate the squares you will need to use the requestAnimationFrame method
window.requestAnimationFrame(Draw);
canvasContext.clearRect(0,0,cw,ch);
draw();
update();
}
Draw();
function draw(){
canvasContext.fillStyle = "white";
canvasContext.fillRect(0,0,canvas.width,canvas.height);
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
canvasContext.beginPath();
canvasContext.rect(sq.X, sq.Y, w, w);
canvasContext.fillStyle =sq.color;
canvasContext.fill();
canvasContext.strokeStyle = "black";
canvasContext.stroke();
canvasContext.closePath();
}
}
function update(){
// a function to update the squares position with every frame.
for (var i=0; i < squares.length; i++) {
var sq = squares[i];
if(sq.Y >= ch - w || sq.Y <= 0){sq.speed *= -1;}
sq.Y += sq.speed;
}
}<canvas id="gameCanvas"></canvas>answered Nov 7 at 19:48
enxaneta
4,0471412
4,0471412
Update all draw all is actually netter than update single draw single, easier for browser to optimize, but you'll want to make it smarter by conposing the less pathes as possible (i.e when consecutive rects share the same color, don't call beginPath, nor fill nor stroke). Also, what is closePath doing here?
– Kaiido
Nov 8 at 0:31
add a comment |
Update all draw all is actually netter than update single draw single, easier for browser to optimize, but you'll want to make it smarter by conposing the less pathes as possible (i.e when consecutive rects share the same color, don't call beginPath, nor fill nor stroke). Also, what is closePath doing here?
– Kaiido
Nov 8 at 0:31
Update all draw all is actually netter than update single draw single, easier for browser to optimize, but you'll want to make it smarter by conposing the less pathes as possible (i.e when consecutive rects share the same color, don't call beginPath, nor fill nor stroke). Also, what is closePath doing here?
– Kaiido
Nov 8 at 0:31
Update all draw all is actually netter than update single draw single, easier for browser to optimize, but you'll want to make it smarter by conposing the less pathes as possible (i.e when consecutive rects share the same color, don't call beginPath, nor fill nor stroke). Also, what is closePath doing here?
– Kaiido
Nov 8 at 0:31
add a comment |
up vote
0
down vote
It doesnt't work on my Computer but on JsFidlle:

add a comment |
up vote
0
down vote
It doesnt't work on my Computer but on JsFidlle:

add a comment |
up vote
0
down vote
up vote
0
down vote
It doesnt't work on my Computer but on JsFidlle:

It doesnt't work on my Computer but on JsFidlle:

answered Nov 9 at 14:42
MorpheusCode
114
114
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53195444%2fhtml-canvas-random-start-position-to-move-afterwards%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What's the problem you're facing?
– rv7
Nov 7 at 18:20
I want the cubes to move up and down
– MorpheusCode
Nov 7 at 18:31