• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 283 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0040 秒)

191. 类似古文显示方式脚本,文字垂直显示,可以控制显示速度出现打字效果等 [ 58%]

... horizontalSpace: number = 5; private sprite: Laya.Sprite; constructor() { super(); this.sprite = new Laya.Sprite(); } drawText(x: number, y: number, w: number, h: number) { console.log(2222); var j = 0;//控制行列 var printNumber = 0;//当前输出字数 var fonts = this.fontSize + "px" + " " +t...

来源: Laya_社区 发布时间: 20191103

192. 最新版本绘制100x100个sprite ios不能显示 [ 57%]

...*/ function GameMap(){ this.MapRowNum = 100; this.MapColNum = 100; GameMap.super(this); this.init(); } Laya.class(GameMap, "GameMap", laya.display.Sprite); var _proto = GameMap.prototype; _proto.init = function(){ var boxSp = new laya.display.Sprite(); // boxSp.cacheAsBitmap = true; for(var i = 0; i...

来源: Laya_社区 发布时间: 20161008

193. 分享:图集资源做位图文本的工具类(知道fontclip组件的可以略过了,之前一直没注意到这个组件) [ 57%]

...resFix: string, width: number, align: string = "left",padding: number=0) { super(); this.width = width; this.resFix = resFix; this._align = align; this._padding = padding; } /** * 字间距 */ public set padding(v: number){ if(v === this._padding){return;} this._padding = v; if(this.text){ this.crea...

来源: Laya_社区 发布时间: 20180302

194. 关于位图字体的valign属性问题 [ 57%]

...taFont"; private var mBitmap:BitmapFont; public function GraphicCircle() { super(); Laya.init(550,400); mBitmap=new BitmapFont(); mBitmap.loadFont("date/data.fnt",new Handler(this,onLoadedFnt)); } private function onLoadedFnt():void { // TODO Auto Generated method stub Text.registerBitmapFont(mFontN...

来源: Laya_社区 发布时间: 20161116

195. 截屏无法实现 [ 57%]

...     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         getWindow().requestFeature(Window.FEATURE_NO_TITLE);         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,                 WindowManager.L...

来源: Laya_社区 发布时间: 20170423

196. 分享水波一个shader [ 56%]

...donly Time:number = Shader3D.propertyNameToID("u_Time");  constructor() { super();  var vs:string = ` attribute vec4 a_Position; attribute vec2 a_Textcoord; attribute vec3 a_Normal; uniform mat4 u_WorldMat; uniform mat4 u_MvpMatrix;   varying vec2 v_textcoord; varying vec3 v_normal; varying vec4 ...

来源: Laya_社区 发布时间: 20190923

197. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 56%]

... arr2:Array = ; private var pop:TestDialogUI; public function TestView() { super(); _path.pivot(0,0); _path.pos(a.x,a.y); this.addChild(_path); _path.rotation = Math.atan2(b.y - a.y, b.x - a.x) / Math.PI * 180; _path2.rotation = Math.atan2(b.y - a.y+300, b.x - a.x) / Math.PI * 180; _path2.pos(a.x,a....

来源: Laya_社区 发布时间: 20171129

198. Morn下List组件如何给每一条列表添加Click事件,是需要for吗? [ 56%]

...r; public class ListView extends ListViewUI { public function ListView() { super(); var arr:Array=[]; for(var i:int=0;i<95;i++) { arr.push({icon:i,label:"Index"+i}); } boxList.array=arr; boxList.mouseHandler=new Handler(listRender); } private function listRender(e:MouseEvent,index:int):void { // ...

来源: Laya_社区 发布时间: 20151224

199. 这种进度条怎么实现? [ 56%]

...eSprite: Sprite = new Sprite() public startY: number = -90 constructor() { super() this._init() } private _init() { this.cacheAs = "bitmap" this.size(this.DEF_SIZE,this.DEF_SIZE) this.pos(200,200) this.cacheAs = "bitmap" this.graphics.drawPie(this.DEF_SIZE >> 1, this.DEF_SIZE >> 1, this....

来源: Laya_社区 发布时间: 20180123

200. 继承自Laya.BaseMaterial并且自定义Shader的的自定义材质如何设置透明渲染 [ 55%]

...public static _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propertyNameToID("u_MainTex"); CMat._mainCol = Laya.Shader3D.propertyNameToID("u_MainCol"); CMat.initShader(); this.inited = true; } this.setShaderName("CMatShader"); ...

来源: Laya_社区 发布时间: 20190814