大约有 1,210 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0066 秒)
Laya_社区(874) Laya2.0_文档(85) Laya3.0_api(61) Laya2.0_api(58) laya_api(55) Laya_示例(32) Laya2.0_示例(27) Laya3.0_文档(18)
...ort class ListDataSourceMediator { constructor() { } public setUp():void { var list: List = new List(); // 渲染的item list.itemRender = ListDataSourceItem; // 设置行列显示的item个数 list.repeatX = 1; list.repeatY = 4; // list居中显示 list.x = (Laya.stage.width - ListDataSourceItem.WI...
来源: Laya_社区 发布时间: 20180410
...创建渲染器时用matter自带的渲染没有问题 改用LayaRender.js var LayaRender =window.LayaRender; // LayaRender.js 就会报 var Composite = Matter.Composite --> Matter is not deifind 我这完全是按照论坛上的贴子引入 请问怎么回事 2018-08-01 添加评论 免费帖 --...
来源: Laya_社区 发布时间: 20180801
....create(this, onLoadComplete)); } private function onLoadComplete():void { var arr:Array = [];//创建一个数组,用于存贮列表的数据信息。 for (var i:int = 0; i < 20; i++) { arr.push({label: "item" + i}); } var list:List = new List();//创建一个 List 类的实例对象 list 。 ...
来源: Laya3.0_api 发布时间: 20231115
... this.container.vScrollBarSkin = ''; this.init(); } private init() { for (var i = 0; i < 10; i++) { var item = new Item(); item.pos(0, i * (item.height + 1)); this.container.addChild(item); } } } 3,加载资源,完成后再加载界面 import WebGL = Laya.WebGL; // 程序入口 class GameMai...
来源: Laya_社区 发布时间: 20180810
...SkinLoadComplete)); } private function onSkinLoadComplete(e:*=null):void { var texture:Texture=Loader.getRes("ui/image.png"); var sp:Sprite=new Sprite(); sp.graphics.drawTexture(texture); Laya.stage.addChild(sp); } 2017-06-03 0 1 分享 微博 QZONE 微信 xiaojun 赞同来自: 是这个 2017-06-03 ...
来源: Laya_社区 发布时间: 20170603
...内容相关的链接 提交 1 个回复 明天当男神 赞同来自: var TestScene = (function (_super) { function TestScene() { TestScene.super(this); } Laya.class(TestScene,"TestScene",_super); return TestScene; }(ui.TestViewUI)); 1.1创建好ui后,...
来源: Laya_社区 发布时间: 20180522
...k { required string uid = 1; required string token = 2; } js的代码: var proto = this.ProtoBuf.loadProtoFile("user_login.proto"); var Build = proto.build("user_login_pack"); var login = new Build(); login.uid = '100001'; login.token = "xxxxx"; var buffer = login.toArrayBuffer() this.socket.se...
来源: Laya_社区 发布时间: 20170921
...urce.Texture; import rain.core.StageReferance; public class Main { private var _view:Sprite; public function Main() { Config.isAntialias = true;//抗锯齿 //初始化引擎 Laya.init(1024, 768); //Stat.show(); Laya.stage.bgColor = "#ccc"; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.align...
来源: Laya_社区 发布时间: 20180319
... *设置容器的点击区域 */ __proto.setContentHitArea = function () { var content=this._content; var rect = new Laya.Sprite(); rect.graphics.drawRect(0, 0, this.contentWidth, this.contentHeight, "#000000"); content.hitArea = new Laya.HitArea(); content.hitArea.hit = rect.graphics; } 然后分...
来源: Laya_社区 发布时间: 20170610
...ap=1 问题描述:旋转之后只能看到游戏一部分 适配代码:var width:Number = Browser.width; var height:Number = Browser.height; if (width > height) { width = height; height = Browser.width; } /*if (width > height) { width = height; height = Browser.width; } if (width != 640) {...
来源: Laya_社区 发布时间: 20170828