- 博客(100)
- 资源 (8)
- 收藏
- 关注
原创 processing 使用PGraphicsPDF 把图片生成PDF
import processing.pdf.*;PGraphicsPDF pdf;int totalPages = 5;int currentPage = 1;PImage p1;PImage[] imgs = new PImage[totalPages];void setup() { //size(2479, 3507); size(1200, 1698); pdf = (PGraphicsPDF)beginRecord(PDF, "mags1200.pdf"); .
2020-11-18 11:34:34
548
原创 Processing长时间播放高清视频出现NullPointerException 错误的解决方法
在processing开发中需要长时间播放视频时,经常会出现NullPointerException错误,可以使用PImage获取Movie中的每一帧图像的方式来替代直接在draw中直接使用Movie播放视频,代码如下:import processing.video.*;Movie movie;PImage movieImage;void setup() { size(800,
2018-01-03 12:35:30
1677
转载 wampServer3.1.0_x64 局域网ip访问配置
来自:http://blog.youkuaiyun.com/inroll/article/details/78304735 非常感谢!!找到C:\wamp64\bin\apache\apache2.4.27\conf\httpd.conf 打开 在其中添加以下代码即可 Options FollowSymLinks AllowOverride All
2017-12-19 17:10:50
2740
3
转载 AS3库
来自:http://blog.youkuaiyun.com/merryken/article/details/7787183/ 非常感谢Here is a round up of some of the most popular ActionScript 3.0 (AS3) libraries out there to use.Let me know if I have missed an
2017-06-27 14:54:48
2128
原创 wampserver2.5局域网IP访问配置
1、打开文件 \wamp\bin\apache\apache2.4.9\conf\httpd.conf2、在278行处找到(也可全文搜索)# onlineoffline tag - don't remove Require local将此处修改如下# onlineoffline tag - don't remove# Require local
2017-04-17 15:12:05
2039
原创 Kinect V2 + TouchDesigner Test Code Clip
def frameStart(frame): x=op('chopto2')[1,0] op('table1')[1,1]=x op('table1')[2,1]=x y=op('chopto2')[1,1] op('table1')[1,2]=y op('table1')[2,2]=y z=op('chopto2')[1,2] op('table1')[1,3]=z
2017-04-11 15:10:23
3017
原创 微信小程序-贪吃蛇关键代码
首先说明一下,微信小程序是不能发布游戏的。关键代码一:手指按下,滑动,弹起,确定蛇头转的方向,代码如下//获取手指按下坐标touchStart:function(e){ startX = e.touches[0].x; startY = e.touches[0].y;},//获取手指移动坐标touchMove:function(e){ moveX = e.touches[0]
2017-01-13 10:46:14
6209
2
原创 微信小程序-访问豆瓣电影api400错误
今天听去年九月份的小程序教程,豆瓣api哪里的请求头是这样header:{‘Content-Type’: ‘application/json’},软件升级后要改为header:{‘Content-Type’: ‘json’},不然就报400错
2017-01-13 10:39:03
2565
原创 控制unity对象下所有子物体的显示状态
Renderer[] rendererComponents = GetComponentsInChildren(true); Collider[] colliderComponents = GetComponentsInChildren(true); // Enable rendering: foreach (Rendere
2016-10-21 10:23:24
4487
原创 Vuforia 在多次AR场景与非AR场景之间切换时可能会出现黑屏的解决方法
在unity 5.3.4中using UnityEngine;using System.Collections;using UnityEngine.SceneManagement;using Vuforia;public class ClearBlackScript : MonoBehaviour { public void loadStartPage() {
2016-10-21 09:45:01
3258
1
原创 Unity3D 射线法获取被点击对象的名称
void Update() { if (Input.GetMouseButton(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hitInfo; if(Physics.Rayc
2016-10-18 23:04:38
8688
原创 Arduino Yun 通过 Post 提交数据
#include #include #include #include #include #include #include #include #include IPAddress server(10,0,0,9);YunClient client;String parametri =""; //String of POST parameters v
2016-09-29 09:51:50
3883
原创 Unity3D多物体碰撞关键代码
void Update () { for(int i=0; i<images.Length-1; i++) { Image img0 = images[i]; for(int j=i+1; j<images.Length; j++) { Image img1 = images[j]; float dx = img1.GetComponent().position.x
2016-09-21 17:08:57
4295
原创 JavaScript获取屏幕宽高详解
JavaScript获取屏幕宽高详解 document.getElementById("id01").innerHTML="网页可见区域宽: document.body.clie
2016-08-19 09:59:05
653
原创 AS3 搜索输入框获取焦点代码
/******************* 搜索框 ***************************/tipsTxt.visible = true; //提示文本txt.text = "";txt.addEventListener(FocusEvent.FOCUS_IN,inFunc);txt.addEventListener(FocusEvent.FOCUS_OUT,outF
2016-08-10 15:47:16
1489
原创 Kinect V2 多关节捕捉应用中break 与 continue的妙用
using UnityEngine;using System.Collections;using UnityEngine.UI;public class UseKinectPosTwoPeople : MonoBehaviour { public bool[] bools = new bool[32]; public Text numTxt; public Im
2016-08-10 14:30:09
1851
原创 利用millis()实现Arduino定时器功能
int isRed = 0; unsigned long endtime = 0;void setup() { pinMode(7,INPUT);} void loop(){ if(digitalRead(7)==LOW){ isRed = 1; //响应红外设备 //do something... }else{ //移动开的时
2016-08-05 12:42:18
22168
1
原创 Unity3D 改变对象下所有子对象的组件属性
//获取对象下所有子对象的Transform Transform[] allChildrenTransform = GameObject.Find("falali").GetComponentsInChildren(); foreach(Transform child in allChildrenTransform) { //
2016-07-22 12:17:12
5967
原创 微信网页授权接口代码示例
OAuth2.0网页授权演示 点击这里回调页面<?phpif (isset($_GET['code'])){ // echo $_GET['code']; //通过code换取token $code = $_GET['code']; $url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=wx3b
2016-07-19 16:49:37
6210
原创 Arduino 通过串口传值给Processing 显示
Arduino端代码:int red=255; //创建变量,储存需要发送的数据int green = 2;int blue = 3;void setup(){ Serial.begin(9600);//定义数据传输率为9600比特}void loop(){ Serial.print(red); Serial.print(","); Serial.print(g
2016-06-22 22:24:04
10466
4
原创 ThinkPHP 实现新闻后台数据上移、下移功能
public function moveup(){ //获取上一条新闻信息 $m = M('News'); $dataOri = $m->where('orderid='.$_GET['orderid'])->select(); $map['orderid'] = array('lt',$_GET['orderid']); $data = $m->where($
2016-06-11 23:45:10
1812
原创 微信接口API之长链接转短链接代码示例
<?phpheader("Content-Type: text/html; charset=utf-8");$longurl;if(isset($_POST['longurl'])){ $longurl = $_POST['longurl'];}else{ die("没有post值进来");}//echo $longurl;$id = "你的AppID";$secret =
2016-06-10 11:15:55
14415
原创 H5调用百度地图时改变标签文本样式的方法
var label = new BMap.Label(markers[index].title,{offset: new BMap.Size(25,5)}); label.setStyle({ //backgroundColor:"rgba(255,255,255,0)", fontSize:"16px", border:"none" });
2016-06-08 00:06:11
4141
原创 Kinect 2.0 默认姿势的中文意思
RaiseRightHand/RaiseLeftHand 抬起左右手高于肩膀一秒Psi 举起双手高于肩膀一秒Tpose T姿势Stop 右手放下,左手缓慢贴住身侧(腰以下)或者左右调换Wave 挥手 左右都行SwipeLeft 右手挥向左侧SwipeRight 与上面相反SwipeUp/SwipeDown 左右都行 上下翻动ZoomOut 一开始左右手合并放在前面,
2016-06-02 22:58:12
3860
原创 swfkit打包swf文件步骤(图文教程)
常用的swf打包工具有flashpacker以及swfkit ,两者各有优势flashpacker方便快捷,简单易用,缺点就是不支持mp4 flv等视频文件打包swfkit 则都支持,它的缺点就是电脑必须按照flashplayer,且打包起来稍显复杂。以下图文说明swfkit打包过程1、设置output details,如图2、设置应用信息infomation
2016-05-21 10:44:51
5095
3
原创 is not on any development teams in Xcode7.2 问题解决
问题:is not on any development teams 如图解决方法:1、在苹果开发者账号后台里面的 Certificates 栏目里面 把证书下载安装(下载下来的文件后缀是.cer)2、在Accounts里面把apple ID删除,再重新即可,期间可能需要重启xcode
2016-05-20 23:43:47
4456
原创 Missing iOS Distribution signing identity问题解决
问题:证书过期或者不正确,如下图解决办法:1、打开钥匙串2、把“登录” 与 “ 系统 ” 里面的过期证书全部删掉,如图3、接下来就需要更新AppleWWDRCA证书https://developer.apple.com/certificationauthority/AppleWWDRCA.cer下载最新AppleWWDRCA证书,双击安装
2016-05-20 23:31:17
447
原创 window.onresize根据不同浏览器宽度实时调用不同的代码
关键在 window.onresize = function(){}获取浏览器宽度 document.body.clientWidth;
2016-05-10 11:52:42
3528
原创 页面引入jQuery mobile 底部出现loading字样
引入jQuery mobile 时,pc端底部会出现loading字样去除的方法:.ui-loader-default{ display:none}.ui-mobile-viewport{ border:none;}.ui-page {padding: 0; margin: 0; outline: 0} 在样式表里面加入这样就可以了,因为jquery.mobile.js会自己向网页加入
2016-05-10 11:38:21
5482
3
原创 js根据不一样的移动设备调整到相应的页面
感谢 http://www.cnblogs.com/babycool/p/3583114.html。function browserRedirect() { var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIph
2016-04-21 15:21:47
974
原创 Kinect for Unity V2 代码示例(三) 手势控制
using UnityEngine;using System.Collections;using System;using UnityEngine.UI;public class GestureControlTest : MonoBehaviour,KinectGestures.GestureListenerInterface { private Text text;
2016-04-19 09:11:46
6174
3
原创 Kinect for Unity V2 代码示例(二)
using UnityEngine;using System.Collections;using UnityEngine.UI;public class UseOverKinectManager : MonoBehaviour { public RawImage kinectImg; public Canvas canvas; public Image right
2016-04-19 09:09:49
5290
原创 Kinect for Unity V2 代码示例(一)
using UnityEngine;using System.Collections;using UnityEngine.UI;public class UseKinectManager : MonoBehaviour { public RawImage kinectImg; // Use this for initialization void Start () {
2016-04-19 09:08:31
6176
原创 Unity 碰撞检测,触发检测,方向键控制物体移动
以下代码主要来自siki老师的 Roll A Ball 游戏,在此基础上添加一些注释,以备后用。using UnityEngine;using System.Collections;using UnityEngine.UI;public class Player : MonoBehaviour { private Rigidbody rd; public int fo
2016-04-13 18:10:06
4326
原创 Unity 控制摄像机跟随运动物体
把以下代码绑定到摄像机using UnityEngine;using System.Collections;public class FollowTarget : MonoBehaviour { public Transform playerTransform; //把运动物体拖放到此处 private Vector3 offset; // Use this fo
2016-04-13 11:28:18
14004
原创 Unity 控制物体绕x,y,z 轴旋转
把以下代码绑定到要旋转的物体,具体要围绕x,y,z 哪个轴旋转就改相应的值即可。using UnityEngine;using System.Collections;public class PickUp : MonoBehaviour { // Use this for initialization void Start () { } // Update is cal
2016-04-13 11:20:22
24474
原创 Arduino 连接 Processing 通过 Firmata(for MAC)
来源:https://chennywublog.wordpress.com/2013/11/11/ardunio-processing-firmata-for-mac/ 非常感谢arduino 与 processing 可以通过Firmata协议连接,然使用在MAC机时需要有一个地方特别注意。先把Firmata 代码烧录进arduino板,然后使用processing测试以下代码i
2016-03-31 20:59:52
2857
原创 Unity3D 零碎知识点集合 (持续更新)
1、拆分字符串string strReceiveUDP = "0.1,0.2,0.3";string[] arr = strReceiveUDP.Split(","[0]);arr[0] = "0.1";arr[1] = "0.2";arr[2] = "0.3";2、字符串转浮点型 string to float string str = "0.2";flo
2016-03-23 10:49:03
677
原创 Unity3D 获取与设置对象Transform组件下的position,rotation
//获取对象Transform组件下的positionfloat xx;float yy;float zz;xx = GameObject.Find("objName").GetComponent().position.x;yy = GameObject.Find("objName").GetComponent().position.y;zz = GameObject.Find("ob
2016-03-23 10:28:34
26038
原创 Processing UDP 服务端 客户端 程序代码
服务端代码:import hypermedia.net.*;UDP udp; void setup() { udp = new UDP( this, 6000 ); udp.listen( true );}void draw() {;}void receive( byte[] data, String ip, int port ) { data = subset(data
2016-03-21 15:20:06
2200
22
仿ipod图片展示(含源码)
2010-09-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人