builder
builder copied to clipboard
Stage basic config
Fixed Map size
- width: 480
- height: 360
The map size is both
- size of map
- size of window
for spx. The concept "window" (or "camera") will not be exposed to the users of Go+ Builder.
Mode
Modes spx supports currently:
repeat: no scale & repeat if image size smaller than map [OK]fill: scale image to fit map [OK]fillRatio: scale image (with initial ratio), to cover the map [Seems not OK]fillCut: ? [Seems not OK]
Modes that Go+ Builder provides the users:
- Tile: The image will not be scaled, it may be tiled (repeated) to fill the stage if smaller than stage (
repeatfor spx) - Scale: The image will be proportionally scaled to ensure it covers the stage; some parts of the image may be cropped (
fillRatiofor spx)
P.S. in both modes, the image's position is centered.
References
- Scratch: fixed map (& window) size (480x360). Background images larger than map-size will be scaled with initial ratio, to be contained by the map, the position & size can not be further adjusted
- KittenN: several fixed map (& window) sizes (900x560, 560x900). Background images' position & size can be adjusted freely.
Note: we need to implement backdrop-mode in StageViewer, too.
补充下这里的文案
En:
* Tile Mode: The image will be tiled (repeated) to fill the stage
* Scale Mode: The image will be proportionally scaled to ensure it covers the stage; some parts of the image may be cropped
Zh:
* 平铺模式:图片会平铺(重复)以填满舞台
* 缩放模式:图片会被按比例缩放,以确保刚好覆盖舞台;图片的某些部分可能会被裁减
另外右侧切换组件中的文案也应当对应使用 Tile / Scale
https://github.com/goplus/builder/pull/552/files#r1625474768
补充个问题,就不单独建 issue 了
#552