当前位置:网站首页>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;ÿ
边栏推荐
- stm32Cubemx(8):RTC和RTC唤醒中断
- 【acwing】528. cheese
- Unity find the coordinates of a point on the circle
- Thinking of 2022 American College Students' mathematical modeling competition
- Unity sends messages and blocks indecent words
- C4D simple cloth (version above R21)
- China needle coke industry development research and investment value report (2022 Edition)
- Autocad-- dynamic zoom
- MySQL audit log archiving
- 775 Div.1 C. Tyler and strings combinatorial mathematics
猜你喜欢
Introduction to JVM principle and process
Establish cloth effect in 10 seconds
2022 thinking of mathematical modeling a problem of American college students / analysis of 2022 American competition a problem
AutoCAD - lengthening
AutoCAD - Center zoom
2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
Redis 排查大 key 的4种方法,优化必备
AutoCAD - stretching
AutoCAD - isometric annotation
Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?
随机推荐
Common database statements in unity
The first topic of ape Anthropology
AutoCAD - isometric annotation
Basic knowledge points of dictionary
775 Div.1 C. Tyler and strings combinatorial mathematics
3dsmax scanning function point connection drawing connection line
[LeetCode] 整数反转【7】
Redis 排查大 key 的4种方法,优化必备
【Leetcode】1352. Product of the last K numbers
Cocos2dx Lua registers the touch event and detects whether the click coordinates are within the specified area
PR first time
中国金刚烷行业研究与投资预测报告(2022版)
Dotween usage records ----- appendinterval, appendcallback
Use assimp library to read MTL file data
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
China as resin Market Research and investment forecast report (2022 Edition)
Database under unity
中国艾草行业研究与投资前景预测报告(2022版)
AutoCAD - continuous annotation
Séparation et combinaison de la construction du système qualité