当前位置:网站首页>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;ÿ
边栏推荐
- 2020-10-27
- Unity enables mobile phone vibration
- 質量體系建設之路的分分合合
- Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation
- Download the details and sequence of the original data access from the ENA database in EBI
- AutoCAD - continuous annotation
- Detailed explanation of the ranking of the best universities
- django连接数据库报错,这是什么原因
- 2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
- Unity find the coordinates of a point on the circle
猜你喜欢
Rip notes [rip three timers, the role of horizontal segmentation, rip automatic summary, and the role of network]
2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
Is $20billion a little less? Cisco is interested in Splunk?
UE4/UE5 虚幻引擎,材质篇(三),不同距离的材质优化
Flutter tips: various fancy nesting of listview and pageview
Unity get component
【acwing】837. Number of connected block points
669. Prune binary search tree ●●
2021 higher education social cup mathematical modeling national tournament ABCD questions - problem solving ideas - Mathematical Modeling
AutoCAD - set layer
随机推荐
【Leetcode】1352. 最后 K 个数的乘积
C4D simple cloth (version above R21)
Out and ref functions of unity
This article is good
Unity find the coordinates of a point on the circle
Research and forecast report on China's solution polymerized styrene butadiene rubber (SSBR) industry (2022 Edition)
Redis 排查大 key 的4种方法,优化必备
django连接数据库报错,这是什么原因
C # perspective following
質量體系建設之路的分分合合
Minor spanning tree
The first topic of ape Anthropology
An article takes you to thoroughly understand descriptors
AutoCAD - set layer
UE4/UE5 虚幻引擎,材质篇,纹理,Compression and Memory压缩和内存
UE 虚幻引擎,项目结构
AutoCAD - window zoom
stm32Cubemx(8):RTC和RTC唤醒中断
2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
The difference between heap and stack