Discuss Scratch
- Discussion Forums
- » 中文
- » How to make 3D
- sea_horizon
- Scratcher
8 posts
How to make 3D
在scratch 上实现3D比较困难,因为scratch 是一种2D引擎,它是通过放置标签工作的。下面是实现3D的三种方法。
克隆
它是通过克隆来表现厚度的。这是一个例子:
https://scratch.mit.edu/projects/402362281
利用大小进行深度感知
画笔
克隆
它是通过克隆来表现厚度的。这是一个例子:
https://scratch.mit.edu/projects/402362281
利用大小进行深度感知
when green flag clicked
set [scroll z v] to [60]
set [scroll y v] to [0]
set [scroll x v] to [-30]
forever
set size to (scroll z)%
set x to (scroll x)
set y to (scroll y)
if <key [up arrow v] pressed?> then
change [scroll z v] by ((size) / (45))
change [scroll x v] by ((x position) / (55))
end
if <key [down arrow v] pressed?> then
change [scroll z v] by ((size) / (-45))
change [scroll x v] by ((x position) / (-55))
end
if <key [left arrow v] pressed?> then
change [scroll x v] by ((size) / (55))
end
if <key [right arrow v] pressed?>then
change [scroll x v] by ((size) / (-55))
end
if <<(scroll z) = [20] >or< (scroll z) = [217] >>then
hide
else
show
end
画笔
define Loop
clear
set [i v] to [0]
repeat (12)
set [j v] to [90]
repeat (6)
Line ((([cos v] of (i)) * (100)) * ([cos v] of (j))) (([sin v] of (j)) * (100)) (((([sin v] of (i)) * (100)) * ([cos v] of (j))) + (5000)) ((([cos v] of (i)) * (100)) * ([cos v] of ((j) + (30)))) (([sin v] of ((j) + (30))) * (100)) (((([sin v] of (i)) * (100)) * ([cos v] of ((j) + (30)))) + (5000)) :: custom
change [j v] by (30)
end
change [i v] by (30)
end
set [j v] to [120]
repeat (5)
set [i v] to [0]
repeat (12)
Line ((([cos v] of (i)) * (100)) * ([cos v] of (j))) (([sin v] of (j)) * (100)) (((([sin v] of (i)) * (100)) * ([cos v] of (j))) + (5000)) ((([cos v] of ((i) + (30))) * (100)) * ([cos v] of (j))) (([sin v] of (j)) * (100)) (((([sin v] of ((i) + (30))) * (100)) * ([cos v] of (j))) + (5000)) :: custom
change [i v] by (30)
end
change [j v] by (30)
end
define Line (X1 :: custom-arg) (Y1 :: custom-arg) (Z1 :: custom-arg) (X2 :: custom-arg) (Y2 :: custom-arg) (Z2 :: custom-arg)
go to (X1 :: custom-arg) (Y1 :: custom-arg) (Z1 :: custom-arg) :: custom
pen down
go to (X2 :: custom-arg) (Y2 :: custom-arg) (Z2 :: custom-arg) :: custom
pen up
when green flag clicked
set pen color to [#632d99]
set pen size to (5)
forever
Loop :: custom
end
Last edited by sea_horizon (June 6, 2020 11:51:15)
- SuperSean12
- Scratcher
500+ posts
How to make 3D
Scratch is more difficult to implement than 3D. Scratch is 2D, so it works by placing 3D.
Large and small depth of use sensing
Large and small depth of use sensing
@SuperSean12
forum translator
among us player
meme lover (not animation memess)
forum translator
among us player
meme lover (not animation memess)
- sea_horizon
- Scratcher
8 posts
How to make 3D
YES Scratch is more difficult to implement than 3D. Scratch is 2D, so it works by placing 3D.
Large and small depth of use sensing
- Discussion Forums
- » 中文
- » How to make 3D