当前位置:网站首页>Three dimensional dice realize 3D cool rotation effect (with complete source code) (with animation code)
Three dimensional dice realize 3D cool rotation effect (with complete source code) (with animation code)
2022-07-05 04:57:00 【qq_ forty-six million thirty-four thousand nine hundred and for】
The whole idea : First, build the cube of the dice
1. First build the front and back surfaces (front and back), By positioning ( The son is the father ) Position the two boxes on the front of the cube , At this time, one side obscures the other , Add transform-style: preserve-3d; achieve 3d Stereoscopic effect , Put the front box along z The axis moves half the distance in the positive direction , Back box edge z The axis moves half the distance higher in the negative direction , The front and rear boxes are built , Collocation hover And transition to see the effect ;
2. Left and right boxes and steps 1 similar , However, the left and right boxes need to move left and right for half the distance , And need to bypass Z Shaft rotation ;
3. It is similar to the construction of left and right boxes , Need to go around X Shaft rotation , Need along Y Axis up and down
4. Add dice points on each side , stay front Noodles , to front New addition display: flex;(flex Layout ) justify-content: center;( The spindle is centered horizontally )align-items: center;( The side axis is centered ), The sub box is point, At this time in front In the middle of the face ;
5. stay back Noodles , Set the number of points to 2: to back add to flex Layout , Set up align-items: center;( The side axis is centered ),justify-content: space-evenly;( Elastic container 、 The gap between the elastic boxes is equal ), stay back Put two in point Just a box ;
6. stay left Face settings 3 spot :3 Each point can be divided into three boxes , to left add to flex Layout , The box above can be used justify-content: flex-end; Align the top right , Middle box centered justify-content: center;align-items: center;ÿ
边栏推荐
猜你喜欢

【acwing】837. Number of connected block points

Minor spanning tree

Solutions and answers for the 2021 Shenzhen cup

次小生成树

質量體系建設之路的分分合合

【acwing】240. food chain
![[groovy] closure (closure call is associated with call method | call () method is defined in interface | call () method is defined in class | code example)](/img/03/329adb314606f29c8a4cb2260e84c8.jpg)
[groovy] closure (closure call is associated with call method | call () method is defined in interface | call () method is defined in class | code example)

Create a pyGame window with a blue background

Use assimp library to read MTL file data

2022 thinking of Mathematical Modeling B problem of American college students / analysis of 2022 American competition B problem
随机推荐
AutoCAD - full screen display
Cocos create Jiugongge pictures
xss注入
669. Prune binary search tree ●●
Basic knowledge points of dictionary
Unity writes timetables (without UI)
MD5绕过
The difference between heap and stack
Basic knowledge points
2022 thinking of Mathematical Modeling B problem of American college students / analysis of 2022 American competition B problem
mysql审计日志归档
Unity sends messages and blocks indecent words
C # perspective following
Judge the position of the monster in the role under unity3d
PR first time
2021 huashubei mathematical modeling idea + reference + paper
Difference between singleton and factory pattern
数论函数及其求和 待更新
質量體系建設之路的分分合合
Sqlserver stored procedures pass array parameters