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

大约有 169 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0046 秒)

51. 3D模型加载出错 [ 82%]

...加载出错   //添加自定义模型         //this.box = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1, 1, 1)));         Laya.Sprite3D.load("res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh",Laya.Handler.create(null, function(sp){         //Laya.Sprite...

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

52. List组件拖动浏览时item会出现重叠的现象 [ 82%]

...lBar.elasticBackTime = 200; list.scrollBar.elasticDistance = 5; Laya.stage.addChild(list); // 设置数据项为对应图片的路径 var data: Array<string> = []; for (var i: number = 0; i < 2; ++i) { data.push("img_common_pinzhi0.png"); data.push("img_common_pinzhi1.png"); data.push("img_...

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

53. Tree属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 82%]

...ree.width) / 2; tree.y = (Laya.stage.height - tree.height) / 2; Laya.stage.addChild(tree); } } } import Box = Laya.Box; import Clip = Laya.Clip; // 此类对应的json对象: // {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12", "height": "24", "name": "selectBox", "skin": "u...

来源: Laya2.0_文档 发布时间: 20210714

54. 2D物理-桥 [ 82%]

...sX = 250, startPosY = 450; let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody(); groundBody.type = "static"; ground.addComponentIntance(groundBody); let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider.points = "50,600,1050,600...

来源: Laya2.0_示例 发布时间: 20251130

55. 绘图graphics中的鼠标事件 [ 82%]

...台上添加了好几个节点,用于存放绘图,结构是 this.box.addChild(this.data); Laya.stage.addChild(this.box) 其中鼠标事件MOUSE_DOWN点击需要获取的是this.data的内容 this.data是由一块画布,几个点构成,我用循环函数创建几个点,并且设置名称p...

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

56. 2D物理-仿生机器人 [ 82%]

...istener(); } Construct() { let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let rigidbody = new Laya.RigidBody(); rigidbody.type = "static"; ground.addComponentIntance(rigidbody); let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider.points = "50,200,50,570,1050...

来源: Laya2.0_示例 发布时间: 20251130

57. 自己创建的box作为tab,为啥没有点击事件啊? [ 82%]

...BootClass", MyPage2UI);     var UI = new MyBootClass();     Laya.stage.addChild(UI); } function MyBoot() {     MyBoot.super(this);     this.MyTab.selectHandler = new Laya.Handler(this, onSelect, null, false);//设置 tab 的选择项发生改变时执行的处理器。     console.log("A1...

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

58. List中放TextInput,当list滚动的时候,复用会有问题,input中的内容会乱,尤其有输入框focus的情况下 [ 82%]

...Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.img.graphics.drawRect(0, 0, WID, HEI - 2, "#eeeeee"); this.label = new Label(); this.addChild(this.label); this.input = new TextInput(); this.addChild(this.input); this.input.x = 50; this.input.text =...

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

59. 代码创建精灵监听不到事件? [ 81%]

...ure(texture); box.on(Laya.Event.MOUSE_UP,this,onhh); box.pos(36, 85); this.addChild(box); function onhh(params) { console.log("--------------------------------hhhhhhhhhhh- "); }

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

60. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

... list.renderHandler = new Laya.Handler(this, this.updateItem); this.owner.addChild(list); // 设置数据源为对应图片的路径 var data: any[] = []; for (var i: number = 0; i < 10; ++i) { data.push("resources/res/ui/listskins/1.jpg"); data.push("resources/res/ui/listskins/2.jpg"); data.push...

来源: Laya3.0_文档 发布时间: 20251010