自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(109)
  • 资源 (34)
  • 收藏
  • 关注

原创 象棋相关

控制台打印棋盘:代码如下:var util = require('util');str = "\ 1 2 3 4 5 6 7 8 9\n\ %s━━%s━━%s━━%s━━%s━━%s━━%s━━%s━━%s \n \┃ │ │ │ ╲ │ ╱ │ │ │ ┃ \n \%s──%s──%s──%s──%s──%s──%s──%s──%s \n \┃ │ │ │ ╱ │ ╲ │ │ │ ┃ \n \%

2020-11-09 12:51:34 262 1

原创 Anki笔记相关

Anki是一个非常不错的记忆卡片工具,但是编辑界面比较简陋。1. 这里将使用TinyMCE的粘贴功能,来获取word等工具编辑的文本,然后再转化成html,贴到anki中。<!DOCTYPE html><html><head><script src='https://cdn.tiny.cloud/1/no-api-key/tinymce/4.9.10-80/tinymce.min.js'> tinymce.init({ selec.

2020-05-23 16:24:17 328

原创 RStudio实验

参考:https://ocw.mit.edu/courses/mathematics/18-05-introduction-to-probability-and-statistics-spring-2014/readings/r-tut1b.html# Goal: estimate the probability of getting a sum# of 7 when rolling tw...

2020-01-24 22:22:27 920

原创 【Unity】技巧集合3

1. Node.js读取Excel文本相关https://www.npmjs.com/package/read-excel-file2. 血条位置更新:相关参考:RectTransformUtility// 更新血条位置void LateUpdate() { var sPos = RectTransformUtility.WorldToScreenPoint(Camera...

2019-02-10 19:10:35 469

原创 Unity Steering

Unity相关的Steering技术:https://github.com/antonpantev/unity-movement-aihttps://github.com/ricardojmendez/UnitySteer/tree/v3.0.0

2019-01-23 16:18:51 782

原创 【Shader】Signed Distance Fields

关键词:distance Field  realtime, SDF: Signed Distance FieldA simple and efficient method is presented which allows improved rendering of glyphs composed of curved and linear elements. A distance field ...

2019-01-22 10:56:19 2952

原创 Unity高效计算相关

Compute Shader:https://docs.unity3d.com/Manual/class-ComputeShader.htmlhttp://www.emersonshaffer.com/blog/2016/5/11/unity3d-compute-shader-introduction-tutorialhttp://kylehalladay.com/blog/tutorial/...

2019-01-12 14:04:59 352

原创 【Shader】各种Shader效果的合集

1.The Fresnel Effect参考:https://www.dorian-iten.com/fresnel/实用的shader:Shader "HeroShader/Character" { Properties { _Tint ("Tint", Color) = (1, 1, 1, 0.2) // a通道用来控制halfLambert的参数,用来提亮...

2018-12-21 17:50:49 4169 1

原创 【Shader】2D阴影

2D阴影using UnityEngine;public class Shadow2D : MonoBehaviour { public Material matShadow; public Texture texture; private RenderTexture targetRT; void Start() { targetRT = ...

2018-11-19 13:28:41 1119

原创 一个Unity的WebGL的资源更新逻辑

直接贴代码了// md5 function!function (n) { "use strict"; function t(n, t) { var r = (65535 &amp; n) + (65535 &amp; t); return (n &gt;&gt; 16) + (t &gt;&gt; 16) + (r &gt;&gt; 16) &lt;&lt; 16 | 65535 &amp..

2018-09-07 16:23:20 1187

原创 WebGL改造笔记

这段时间需要把原有的一个老项目改造成WebGL版本,遇到了一些困难,这里将记录改造的一些情况。用Node.js来管理游戏内容var express = require('express');var app = express();app.get('/', function (req, res) { res.send('Hello World!');});app.use(ex...

2018-04-09 09:06:59 2692

原创 苹果证书系统理解

在IOS开发的过程中,很多情况下会和证书打交道。比如需要在xcode上进行调试开发,需要做APNs功能(或者在FCM上配置推送)等。所以,理解证书体系是很重要的。这里将对证书的原理做一个解释,以供参考。待续...参考文章:https://www.jianshu.com/p/1cf327b3d05c...

2018-03-29 14:29:02 700

原创 一个有趣的Unity多线程练习例子

这里将记录一些C#线程相关的信息,将持续更新,最总将形成一个工具类,方便在Unity中使用。一些Tips:1)Monitor VS. MutexDifference between mutex and monitor.The biggest difference between the two is the scope: a mutex's scope is system-w...

2018-02-09 15:26:16 3312

原创 安卓编译环境设置

android { compileSdkVersion 23 buildToolsVersion "27.0.2" defaultConfig { applicationId "com.ucool.heroesarena" minSdkVersion 16 targetSdkVersion 19 ndk {...

2018-01-26 14:40:58 1431

原创 Node.js脚本集锦

运行命令行(TODO,日志输出需要改进)const proc = require('child_process');var x = function(cmd, showCmd) { console.log('>> ' + cmd); return new Promise((resolve, reject) => { var p = pr...

2018-01-16 18:28:54 1046

原创 Golang技巧合集

https://channel9.msdn.com/Blogs/MVP-VisualStudio-Dev/Get-Started-with-Visual-Studio-Code-and-Golang

2017-11-20 11:48:35 712

原创 Python技巧

1. python中struct和union的代码 (参考 Does Python has bitField?)#!/usr/bin/env pythonimport ctypesc_uint8 = ctypes.c_uint8class Flags_bits(ctypes.Structure): _fields_ = [ ("logout", c_

2017-11-14 23:53:03 2607

原创 Unity中状态机模式的简单封装

游戏中的逻辑少不了用状态机。但是面对复杂的状态(比如战斗角色控制,复杂的UI状态控制等),用状态机模式是最合适不过的了。结合C#的特点,我对状态机模式进行了简化。完善的fsm:public abstract class FSM&lt;T&gt; : MonoBehaviour { static System.Action FuncVoid = () =&gt; {}; p...

2017-09-19 00:51:48 1209

原创 【OpenGL】OpenGL中的Buffer的巧妙使用

这篇文章,将记录OpenGL中的Buffer的巧妙使用。参考:https://docs.unity3d.com/Manual/SL-Stencil.htmlhttps://alastaira.wordpress.com/2014/12/27/using-the-stencil-buffer-in-unity-free/

2017-02-22 14:07:56 3934 3

原创 手工使用Protobuf-net工具来序列化对象

如果用C#中Runtime的序列化方式,体积太大,因为序列化了好多类型信息。这个时候用protobuf是最好的选择。在Unity中,可以使用Protobuf-net。 下面是手工写proto的例子:[ProtoContract]public class Student { public Student() { } // 缺省构造函数一定要有,否则不能调用Deserialize

2017-02-16 19:39:01 4921

原创 Unity中协程的使用+自定义

2017-01-16 23:26:27 2288 1

原创 【Unity】新的UI系统技巧2

1. 定制一个刻度条相关的控件,如下:基本原理是继承Graphic类,并重写OnPopulateMesh函数,用到一些基本的OpenGL画矩形的算法。比较有参考的是制作控件的习惯和编辑器的使用,从而使工程模块化,提供工作效率。代码如下:using UnityEngine;using UnityEngine.UI;using System.Collections;using ...

2016-07-26 09:33:25 1518

原创 为C#添加位域特性

最近项目中由于要对数据进行压缩,所以产生了为C#添加类似C++中的位域的特性;网上已经有些内容了,但是感觉还不是很好用,所有自己写了一个,分享出来。

2016-07-02 23:44:59 5231

原创 【OpenGL】Dota2 Shader分析(1)

最近在总结OpenGL知识,想到了以前搜索到Dota2相关的文章:《Dota2-Character Shader Masks Guide》,而且dota2的模型在网上也可以下载到,所以非常值得用来作为光照相关知识的总结。我用Ogre模型做实验

2016-05-24 21:25:37 7611 1

原创 【OpenGL】透视和ZBuffer

除了Graphic Pipeline外,ZBuffer是我最想介绍的部分了,因为有一些很酷实现都依赖于此(比如Shadow、Field Of View、SSOA)。先提出问题吧:是什么环节下的产物,有什么特性,可以用在哪些地方。为了具有说服力,我们以公式推导的形式给出结论。公式推导利用了中学的知识“相似三角形法则”,虽然有些繁琐但并不复杂。另外,文章的组织流程大致是沿着Graphic Pipeline的顺序进行的,其中剖析了一个正方形面片的显示过程。这个过程大致为:点->三角形->光栅化->透视矩阵->属性

2016-03-11 23:59:45 14899 4

原创 【OpenGL】Shader实例分析(十)- 钻石效果

好久没有写文章了,赶紧补几篇。最近研究了一个玻璃折射的效果(用在砖石上),虽然没有达到最满意的效果,还是先分享出来,待以后有更好的想法再补充。先看效果吧:这里面有两个效果,左边是unity的免费插件Gem Shader,右边的是我自己实现的,我将分别介绍这两个效果的实现方法。一、知识补充:两个shader都使用了CubeMap...Shader "FX/Diamond"

2016-03-01 21:34:06 15568 2

原创 【Unity】技巧集合2

转发,请保持地址:http://blog.csdn.net/stalendp/article/details/46707079相关的文章:【Unity】技巧集合1. 调试相关 Debug.DrawRay(transform.position, newDir, Color.red); void OnDrawGizmos() { UnityEditor.Han...

2015-07-01 10:12:10 11030

原创 【Matlab】关于Matlab的一些代码片段

这篇文章收集关于Matlab的一些代码片段,以便查阅:function [] = myFunc(n) t = 0:0.001:2; y = myFunc0(t, n); figure; plot(t, y);end% 方波function [ y ] = myFunc0( t, n )rt = 0;for k = 0:n rt = rt +

2015-04-06 19:29:34 2211

原创 【Unity】新的UI系统技巧

从Unity4.6开始,集成了新的UI系统。这篇文章将记录新的UI系统的一些使用技巧,内容将不断增加~~~1)给人物加血条效果把要挂载的父节点的RectTransform中的锚点设置位buttonLeft。并获得当前的Canvas中的CanvasScaler,计算出缩放因子(比如下面是按照y来进行缩放的)  CanvasScaler scaler = GetCo...

2015-01-11 23:46:39 10029 1

原创 【OpenGL】Shader实例分析(九)- AngryBots中的主角受伤特效

AngryBots是Unity官方的一个非常棒的例子,很有研究价值。好久之前就研究过,由于例子的内容丰富,一时间不知道从哪入手写文章分析。这一段时间研究shader技术比较多一些,就从shader的这一方面开始吧。首先分析其中的一个屏幕特效:当主角受到攻击时会出现的全屏效果(postEffect),效果如下

2014-11-07 01:03:59 21254 3

原创 【OpenGL】Shader实例分析(八)- 彩色光圈

研究了一个彩色光圈效果,感觉挺不错的,分享给大家,效果如下:

2014-11-01 23:56:15 13590 4

原创 用Qt编写Maya插件

先贴个代码,待会解释。import maya.cmds as cmdsfrom maya import OpenMayauiFile = """ Dialog 0 0 400 300 Dialog 90 40 161 41

2014-10-31 01:31:30 5179

原创 【OpenGL】Shader实例分析(七)- 雪花飘落效果

研究了一个雪花飘落效果,感觉挺不错的,分享给大家

2014-10-30 18:48:43 23861 4

原创 PyMel技术集锦

这篇文章记录一些在maya中的编程技巧。

2014-10-27 22:14:18 5953

原创 用python编写maya插件

1. python的安装地址: http://pydev.org/updates

2014-09-28 20:34:44 10134

原创 【cocos2dx开发技巧10】cocosStudio的集成以及c++11的新特性

很长时间没有碰cocos2dx了,最近又用起来了,花了好几个小时重新熟悉了一下,发现很多新的特性值得用来写文章。好吧,先从最常用的开始。最近用windows,使用cocosStudio,就从这个开始吧,顺带介绍一下工程的创建,以及c++11的特性。以前开发使用cocosBuilder开发界面(相关集成见这篇文章)。准备工作1)准备NDK、andrdoid-SDK,VisualStudio等

2014-08-28 00:29:25 17181 1

原创 【OpenGL】Shader实例分析(六)- 卡牌特效

本文将介绍怎么通过alpha通道来隐藏信息,并实现卡牌特效;本文的核心是,利用图片的alpha通道来隐藏信息,达到节省资源的效果

2014-06-15 15:44:30 16626 9

原创 【OpenGL】Shader实例分析(五)- 边缘检测

这片文章将介绍基于法线的边缘检测方法

2014-04-08 00:02:02 20336 2

原创 【OpenGL】Shader实例分析(四)- 照片闪光,圆角和遮罩

在游戏中,当战斗结束后,对一些获取的宝贝需要进行闪光处理。这篇文章介绍一个进行闪光处理的shader,运行效果如下:  下面是shader的实现:Shader "stalendp/imageShine" { Properties { _image ("image", 2D) = "white" {} _percent ("_percent", Range(-5, 5))

2014-04-01 11:08:00 16488 7

原创 【OpenGL】Shader实例分析(三)- 等待标识

写了个等待标识,不过效率估计不是很高。结果如下:Shader "stalendp/waitIcons" { CGINCLUDE #include "UnityCG.cginc" #pragma target 3.0 struct v2f

2014-03-31 18:42:40 6500 1

AdapterView

一个AdapterView工具,仿照Android里面的AdapterView,用于Unity中

2016-12-01

OpenGL Superbible 7th code for visual studio 2015

《OpenGL Superbible 7th 》的代码,可以在VS2015中运行

2016-03-31

OpenGL Samples

整理的一些OpenGL书籍中的例子,做了一个windows下的编译环境,制作成了bat的形式,以便在notepad++下可以编译。 这些代码取之于两本书籍:《OpenGL Superbible 5th》, 《OpenGL Programming Guide》

2016-03-30

Dota2 Shader for Unity

Dota2 Shader的Unity实现 。 最近在总结OpenGL知识,想到了以前搜索到Dota2相关的文章:《Dota2-Character Shader Masks Guide》,而且dota2的模型在网上也可以下载到,所以非常值得用来作为光照相关知识的总结。 参考博文: http://blog.csdn.net/stalendp/article/details/50953869

2016-03-22

Shader教程讲义ppt

以前做的一个讲座,里面包含了ppt,参考书,一个例子程序。

2016-02-04

Matlab中的雅黑mono字体

Matlab中的字体,雅黑 mono 字体

2016-02-03

字体描边技术Signed Distance Fields

字体描边技术相关论文, valve的相关论文,关键词:Signed Distance Fields

2015-01-18

Java设计模式(含代码)

非常好的介绍设计模式的书籍,虽然是用Java来解释设计模式的,其实语言对于设计模式并不是很重要。这本书写的非常不错,结合本书的代码,很容易理解。

2015-01-02

Real-Time Rendering 3rd

一本非常好的介绍Real-Time Rendering原理的书籍

2014-11-10

Shaders for Game Programmers and Artists

《Shaders for Game Programmers and Artists》是一本非常全面介绍Shader的技术,非常值得一读。该分享中还包含了本书的例子。

2014-11-10

Shadertoy Effects

Shadertoy上收集的效果,用于学习。

2014-11-02

unity shader effect

unity shader effect收集了一些shadertoy的特效,放到unity中,以供学习

2014-10-31

Maya Python For Games and Film(Adam Mechtley)

一本运用Python语言的非常好的Maya开发技术书籍

2014-10-29

Mathematics for 3D Game Programming and Computer Graphics

一本非常ok的介绍OpenGL中数学知识的书籍。

2014-07-23

flappyBird

一款很火的小游戏flappybird的unity山寨版本。仅供学习之用,请勿商业化。具体代码实现原理请参考作者博文: http://blog.csdn.net/stalendp 作者: stalendp

2014-02-11

小工具DeTexturepacker

用texturepacker打包了素材,不小心把原来的素材丢掉了;或则打开了别人的pkg,想用里面的素材做一些练习。针对这些场景,我写了个小工具分享给大家。 请参考博文: http://blog.csdn.net/stalendp/article/details/17652681

2013-12-29

OpenGL 4.0 Shading Language Cookbook

一本不错的OpenGL书籍,有详细的原理解析,可以结合 <<Opengl Superbible 5th edition>>一起学习,效果更佳

2013-08-31

Cocos2dx例子-复杂动画(基于CocosBuilder)

这个例子是基于cocos2dx,利用cocosBuilder制作的例子。这个例子改造自spriter的官方例子(spriter的官方为http://www.brashmonkey.com/spriter.htm)。 详细请参考博文:[cocos2dx开发技巧4]工具CocosBuilder的使用--复杂动画:http://blog.csdn.net/stalendp/article/details/8760957

2013-04-05

Cocos2d for iPhone Cookbook

Cocos2d for iPhone is a robust but simple to use 2D game framework for iPhone. It is fast, flexible, free, and App Store approved. More than 2500 App Store games already use it, including many best-selling games. Do you want to take your Cocos2d game development skills to the next level and become more professional in Cocos2d game design?

2013-02-11

Learn cocos2D Game Development with iOS 5

Did you ever imagine yourself writing a computer game and being able to make money selling it? With Apple’s iTunes App Store and the accompanying mobile devices iPhone, iPod touch, and iPad, it’s now easier than ever. Of course, that doesn’t mean it’s easy— there’s still a lot to learn about game development and programming games. But you are reading this book, so I believe you’ve already made up your mind to take this journey. And you’ve chosen one of the most interesting game engines to work with: cocos2d for iOS.

2013-02-10

Android NDK Beginner's Guide

非常好的一本介绍JNI的书籍,其中关于环境的配置写得很详细,比较容易上手,也有原理性的解释。难得的好书,每个知识都用非常好的例子来诠释,图文并茂,可以当作博客来看。 Discover the native side of Android and inject the power of C/C++ in your applications.

2013-01-16

OpenGL Shading Language 3rd edition

一本不错的介绍OpenGL Shader的书籍。 This book is an amazing measure of how far and how fast interactive shad- ing has advanced. Not too many years ago, procedural shading was some- thing done only in offline production rendering, creating some of the great results we all know from the movies, but were not anywhere close to inter- active. Then a few research projects appeared, allowing a slightly modified but largely intact type of procedural shading to run in real time. Finally, in a rush, widely accessible commercial systems started to support shading. Today, we’ve come to the point where a real-time shading language devel- oped by a cross-vendor group of OpenGL participants has achieved official designation as an OpenGL Architecture Review Board approved extension. This book, written by one of those most responsible for spearheading the development and acceptance of the OpenGL shading language, is your guide to that language and the extensions to OpenGL that let you use it.

2012-12-25

Beginning Android Games(美)Mario.Zechner

一本非常不错的Android游戏入门书籍,浅显易懂,并且有深度。书中详细描述了2D到3D的三个不同的精典游戏,并且还有很多的其它有用的代码片段。其中的代码应该是游戏引擎libgdx中的。 我阅读了这本书后,写出了我android的第一个款游戏,附上地址:https://play.google.com/store/apps/details?id=stalendp.game.llk

2012-12-05

java多线程设计模式详解

java 多线程设计模式, 一个很不错的学习java多线程的书,并配有源代码。是学习java多线程的很好的参考书,易懂且有深度。

2012-11-08

Android界面-标题和按钮定制

android例子程序,请参考博文:http://blog.csdn.net/stalendp/article/details/8087882

2012-10-19

Rich.Client.Platform的源代码

rcp 例子 《Addison.Wesley.Eclipse.Rich.Client.Platform.Designing.Coding.and.Packaging.Java.Applications.Oct.2005.chm》的源代码

2011-07-04

EclipseLink 测试出错程序

EclipseLink 测试出错程序, 此程序是正对Glassfish V3.1的EclipseLink的,目前发现V3.1中的PessimisticLock出现问题

2011-05-27

ruby参考书--ProgrammingRuby

第一本ruby参考书的分享,这个是安装1.8.7的ruby full版的时候的自带的参考书

2011-04-20

高性能Java编程AdvancedJavaProgramming

As an experienced developer on the JavaTM platform, you undoubtedly know how fast moving and comprehensive the platform is. Its many application programming interfaces (APIs) provide a wealth of functionality for all aspects of application and system-level programming. Real-world developers never use one or two APIs to solve a problem, but bring together key functionality spanning a number of APIs. Knowing which APIs you need, which parts of which APIs you need, and how the APIs work together to create the best solution can be a daunting task.

2011-01-06

数据库Oracle资料

第1章 数据库基础......................................................................................................................................1 1.1 基本概念...........................................................................................................................................1 1.1.1 数据.........................................................................................................................................1 1.1.2 数据库.....................................................................................................................................1 1.1.3 数据库管理系统......................................................................................................................1 1.1.4 数据库系统..............................................................................................................................1 1.2 关系数据库.......................................................................................................................................1 1.2.1 关系模型...............................................................................................................................

2011-01-06

Inside the Java Virtual Machine

属于Java进阶篇,压缩包中有中文版、英文版都有,可以对照着读

2011-01-01

JXTA in a Nutshell

JXTA (Juxtapose) is an open source peer-to-peer protocol specification begun by Sun Microsystems in 2001. The JXTA protocols are defined as a set of XML messages which allow any device connected to a network to exchange messages and collaborate independently of the underlying network topology.

2010-05-25

JUnit 4.8.1

这个是JUnit测试工具,其中包含源码,官方网为:http://www.junit.org/

2010-03-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除