b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

CocosBuilder用户手册中文版:7. Automatic Scaling and

电脑杂谈  发布时间:2016-05-22 06:00:40  来源:网络整理

你是否正在寻找关于cocosbuilder的内容?让我把最棒的东西奉献给你:

Automatic Scaling and Sprite Sheets

自动缩放和精灵表

cocosbuilder can manage your assets and automatically scale them for different devices and resolutions. It can even create and scale the sprite sheets for you.
cocosbuilder可以管理你的资产,并为不同的设备和分辨率自动缩放它们。他甚至为你创建和缩放精灵表。

Automatic Scaling

自动缩放

To have CocosBuilder automatically scale your assets, first set your design resolution in your “Publish Settings”. CocosBuilders reference scale is the original iPhone resolution (equals 1x). By default images will automacially be scaled down from a design resolution of 4x, or the iPad retina display. You can change this, but keep in mind that using a lower resolution can force cocosbuilder to scale up images, which will make them look bad on high resolution devices. In the publish settings you can also choose which resolutions you want to export your images and sprite sheets to.

为了使CocosBuilder自动缩放你的资产,首先设置“文件->发布设置”中设置你的设计分辨率,CocosBuilder参考的缩放是原始的iPhone分辨率(等于1倍)。默认的图像将会被从4倍的设计分辨率自动缩放, 或iPad视网膜显示屏。你可以对此进行修改,但是要记住,使用一个低分辨率可以强制cocosbuilder放大图像,这会使他们在高分辨率的设备上看起来很糟。 在“发布设置”中,还可以选择将要导出的你的图片和精灵表的分辨率。



CocosBuilder用户手册中文版:7. Automatic Scaling and




For the automatic scaling to work you will need to tell CocosBuilder that the images are in design resolution. You do this by putting the images in a sub-directory named *resources-auto*. Even though the resources are in the sub-directory, cocosbuilder will show them as being in it's original folder.

为了使自动缩放工作,你需要告诉CocosBuilder图像的设计分辨率。通过将图像放入到名为“resources-auto”的子目录来达到目的。虽然这些资源在子目录中,cocosbuilder将显示他们在原始的文件夹中。


CocosBuilder用户手册中文版:7. Automatic Scaling and




If you are not happy with the automatic scaling for some of the resources, it's always possible to override it. Simply create a directory next to the *resources-auto* directory and name it after the resolution you want to override. The images that you put in this directory will override any images in the *resources-auto* directory. E.g. to override images for iPhone retina devices, name the directory *resources-iphonehd*.

如果你对自动缩放某些资源并不满意,始终可以重写它。简单的创建一个目录在resources-auto目录旁边,并用你想要重写的分辨率命名它。在这个目录中的图像将会重写”resources-auto"目录中的任何图像。例如:为iPhone视网膜设备重写图像资源,就命名目录为“resources-iphonehd”


Smart Sprite Sheets

智能精灵表

cocosbuilder can quickly turn a directory of images into a sprite sheet. To do this, simply right click the directory in the *Project* view and select *Make Smart Sprite Sheet*. The directory should only contain images (and optionally sub-directories for different resolutions or automatic scaling as described above).

cocosbuilder可以快速的转换图像目录到一个精灵表,。要做这件事,简单的右键单机目录在项目(Project)视图中,并选择”制作智能精灵表“。这个目录需要只包含图像(还有像上面描述的,为不同分辨率或者自动缩放而准备的子目录)。



CocosBuilder用户手册中文版:7. Automatic Scaling and




The folder will turn pink and have a happy smiley face to indicate that it is a smart sprite sheet. To edit the properties of the sprite sheet, right click it again and select *Edit Smart Sprite Sheet…*. You can choose from a selection of output formats, compression and dithering. Dithering will only be used for lossy compression pvr formats. HTML 5 still doesn't support pvr textures, therefore PNG images will be exported for HTML 5 regardless of settings.


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/shenmilingyu/article-5850-1.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 马婷
      马婷

      物价高是因为中国国内税率过高跟央行印钞量过大的结果

    热点图片
    拼命载入中...