Discuss Scratch

sea_horizon
Scratcher
8 posts

How to make 3D

在scratch 上实现3D比较困难,因为scratch 是一种2D引擎,它是通过放置标签工作的。下面是实现3D的三种方法。
克隆
它是通过克隆来表现厚度的。这是一个例子:
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))&#160;:: 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))&#160;:: custom
change [i v] by (30)
end
change [j v] by (30)
end

define Line (X1&#160;:: custom-arg) (Y1&#160;:: custom-arg) (Z1&#160;:: custom-arg) (X2&#160;:: custom-arg) (Y2&#160;:: custom-arg) (Z2&#160;:: custom-arg)
go to (X1&#160;:: custom-arg) (Y1&#160;:: custom-arg) (Z1&#160;:: custom-arg)&#160;:: custom
pen down
go to (X2&#160;:: custom-arg) (Y2&#160;:: custom-arg) (Z2&#160;:: custom-arg)&#160;:: custom
pen up

when green flag clicked
set pen color to [#632d99]
set pen size to (5)
forever
Loop&#160;:: 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

@SuperSean12
forum translator
among us player
meme lover (not animation memess)
sea_horizon
Scratcher
8 posts

How to make 3D

SuperSean12 wrote:

Scratch is more difficult to implement than 3D. Scratch is 2D, so it works by placing 3D.
Large and small depth of use sensing
YES
wbwl123abc
Scratcher
5 posts

How to make 3D

我想问那个scroll x + 480*0 为啥么要乘0?
sea_horizon
Scratcher
8 posts

How to make 3D

wbwl123abc wrote:

我想问那个scroll x + 480*0 为啥么要乘0?
……
1328__--5
Scratcher
100+ posts

How to make 3D

3d引擎

大家好,是1328__–5,scratch爱好者。我于2020.4.30成为了scracher!
代表作:台球|人机井字棋|☁AI弹球☁|☁小灰跑酷☁|炫彩涂鸦跳跃|3D~
工作室:Come on!|T-X创意社区|· Pen Art Palace ·|……
创新团队(CXT):CXT工作室|CXT论坛。欢迎加入CXT!
创玩:创玩在中国|创玩向国际
常见问题、提问区:https://scratch.mit.edu/discuss/topic/428588/
minecraft-303
Scratcher
42 posts

How to make 3D

zan

没啥?看看我的作品
https://scratch.mit.edu/projects/384547475/ !
ruochenfu
Scratcher
76 posts

How to make 3D

我的3d教程第一课
就一个公式

我还有pen的引擎在我的主页里

Powered by DjangoBB