Blog
随便写点儿
Posts
New Home
从很久之前看到GitPages,就一直考虑搬家,今天终于实现了,花了整整一个周日,从 WordPress 完美迁移。
临时使用了默认的模板,发现还挺简洁,做了一下简单的自定义,增加了分类,最主要的是可以通过 markdown 来写了。
Mustang
突然喜欢上一款车,没有理由!
Mark Zuckerberg becomes the sixth-richest person on Earth
The Facebook Inc. founder saw his fortune rise $6.2 billion in trading Thursday after the world’s biggest social network delivered another quarter of record revenue. That gives the 31-year-old a net worth of $47.6 billion at 1:15 p.m. in New York, enough to surpass the $45.9 billion holdings of brothers Charles and David Koch, according […]
Unity 在IOS9 下字体残缺
升级到最新的Unity4.6.8之后,虽然Unity声称解决了字体问题,但是我们在项目中还是遇到了奇怪的问题,IOS9设备每次第一次运行时部分字体会残缺,但是在切换场景后字体恢复正常显示,IOS8的设备一切正常。
经过大量的测试后发现问题原来出在 Player Settings 中的 Graphics API选项上,之前选择了Open GL ES 2.0,修改为Automatic后问题解决。
Unity Text Effects
Gradient
using UnityEngine; using System.Collections; using System.Collections.Generic; using UnityEngine.UI; [AddComponentMenu("UI/Effects/Gradient")] public class Gradient : BaseVertexEffect { [SerializeField] private Color32 topColor = Color.white; [SerializeField] private Color32 bottomColor = Color.black; public override void ModifyVertices(List vertexList) { if (!IsActive()) { return; } int count = vertexList.Count; float bottomY = vertexList[0].position.y; float topY = vertexList[0].position.y; for (int i = 1; i < count; i++) { float y = vertexList[i].position.y; if (y > topY) { topY = y; } else if (y < bottomY) { bottomY = y; } } float uiElementHeight = topY - bottomY; for (int i = 0; i < count; i++) { UIVertex uiVertex = vertexList[i]; uiVertex.color = Color32.Lerp(bottomColor, topColor, (uiVertex.position.y - bottomY) / uiElementHeight); vertexList[i] = uiVertex; } } }
Overview of iOS Crash Reporting Tools
Believe it or not, developers are not perfect, and every once in a while you might have a (gasp!) bug in your app.
You will try your best to ship your apps with no bugs in them, but more often than not you realise afterwards that a bug has slipped through the net. Sometimes such bugs result in crashes, which no user likes to encounter.
Android: java.lang.IllegalArgumentException: No config chosen
Simulator:
gLSurfaceView.setEGLConfigChooser(8 , 8, 8, 8, 16, 0);
Device:
gLSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8);
Android 判断当前是否在模拟器中运行
//是否是模拟器。如果返回TRUE,则当前是模拟器,不是返回FALSE public static boolean isEmulator(Context context){ try{ TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String imei = tm.getDeviceId(); if (imei != null && imei.equals("000000000000000")){ return true; } return (Build.MODEL.equals("sdk")) || (Build.MODEL.equals("google_sdk")); }catch (Exception ioe) { } return false; }
Android SDK Manager 更新慢解决
1、如果是windows7,那么”开始 - 所有程序 - Android SDK Tools, 右键SDK Manager - 以管理员身份运行(A)” 2、在SDK Manager窗口中,Tools - Options, 打开Settings 1) 在Misc下选中Force https://…sources to be fetched using http://…(原来默认使用https,现在强制使用http) 3、打开hosts文件:Windows在C:\WINDOWS\system32\drivers\etc目录下,Linux/MAC用户打开/etc/hosts文件
sudo vi /etc/hosts
在文件末尾默认添加星号行内代码: ************** #Google主页 203.208.46.146 www.google.com 74.125.113.121 developer.android.com #更新的内容从以下地址下载 203.208.46.146 dl.google.com 203.208.46.146 dl-ssl.google.com
GLSL 内建函数
OpenGL ES着色语言为标量和向量操作定义了一套内建便利函数。有些内建函数可以用在多个类型的着色器中,有些是针对固定硬件的,所以这部分只能用在某个特定的着色器上。
内建函数基本上可以分为一下三类:
(1)它们使用一些简便的方式提供必要的硬件功能,如材质贴图。这些函数单独通过着色器是无法模拟出来的。
(2)它们展示了一些可以常简单的写入的繁琐操作(clamp, mix等),但是这些操作非常普遍,并且提供直接对硬件的支持。对于编译器来说,将表达式映射到复杂的装配线指令上是非常困难的。
(3)它们提供了对图形硬件的操作,并且在适当时候进行加速。三角函数就是一个很好的例子。
TabGroup for Alloy
Overview
This is a widget for the Appcelerator Alloy MVC framework which provides an iOS + Android TabGroup with enhanced customisation options.
The idea was to come up with something that could “just work” on both iOS and Android, and sit in the same position at the bottom of the screen for both, and wouldn’t require too much integration changes.
OpenShift还是不错的
本站就是基于 OpenShift 的 WordPress 搭建,哈哈
今天尝试在上面架设git服务器,比较顺利
下步再继续尝试更多新的东西
Goodbye Shanghai
再一次离开上海
Titanium Alloy 笔记
1.隐藏标题栏
普通窗口:
<Window title=”找游戏” navBarHidden=”true”>
TabView: <TabGroup navBarHidden=”true”>
apk 资源提取及 dex 文件反编
- 提取apk中的图片、XML配置、语言资源等文件
首先下载最新的 apktool
按照官方说明进行安装。
执行:
apktool d -f <name>.apk <target>
另外有一个图形化工具叫:Androidfby
2.dex文件反编
Emulator Error: Could not load OpenGLES emulation library: Could not load DLL!
··· Copy the file below from SDK\tools\lib to SDK\tools. ··· ··· libEGL_translator.dll libGLES_CM_translator.dll libGLES_V2_translator.dll libOpenglRender.dll ···
Start!
This is a new start.
subscribe via RSS