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

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

831. 更新到1.7.6beta之后,HBox有bug [ 67%]

...laya.display.Sprite(); var img: laya.ui.Image = new laya.ui.Image(skin); s.width = img.width; s.height = img.height; s.addChild(img); hbox.addChild(s); } Laya.stage.addChild(hbox); } 2017-06-08 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, ...

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

832. laya.ui.Tree_API3.0 [ 67%]

...对象的属性 y 的值,用于控制 tree 对象的显示位置。 tree.width = 200;//设置 tree 的宽度。 tree.height = 100;//设置 tree 的高度。 Laya.stage.addChild(tree);//将 tree 添加到显示列表。 } } } import laya.ui.Box; import laya.ui.Clip; import laya.ui.Label; class Item...

来源: Laya3.0_api 发布时间: 20231115

833. js环境下使用Loader加载图片在Sprite对象的.on函数无效 [ 67%]

...被触发 //设置背景图片 this.bgimg = new Laya.Sprite(); this.bgimg.width=2*scronw; this.bgimg.height=2*scronh; //加载显示图片,坐标位于0,0 var temptexture=Loader.getRes(pic); if (typeof(temptexture)!="undefined"){ this.bgimg.texture=Loader.getRes(pic) }else{ this.bgimg.loadImage(pi...

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

834. laya.ui.Component [ 67%]

...only] 对象的显示高度(以像素为单位)。 Component  displayWidth : Number[read-only] 对象的显示宽度(以像素为单位)。 Component filters : Array滤镜集合。可以设置多个滤镜组合。Sprite globalScaleX : Number[read-only] 获得相对于stage的全局X轴...

来源: laya_api 发布时间: 20170929

835. 3D空间转2D空间的问题 [ 67%]

...Pos2.x < 0 ){ this.imgPos2.x = 0; }else if( this.imgPos2.x >= camera_width){ this.imgPos2.x = camera_width - 84; //判断显示图标的Y是在上面还是下面 if(this.imgPos2.y < 0 ){ this.imgPos2.y = 0; } MainScene.RobotLocations[i-1].pos(this.imgPos2.x, this.imgPos2.y); 其中this.imgP...

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

836. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 66%]

.../monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用size设置:** ```typescript Laya.loader.load("res/apes/monkey2.png",Laya...

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

837. 2D物理-碰撞过滤器 [ 66%]

...0,200,100,600,1100,600,1100,200"; } private function createBox(posx, posy, width, height, ratio) { var box = new Sprite(); box.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.addChild(box); box.pos(posx, posy).size(width * ratio, height * ratio); var rigidbody: RigidBody = box.addComponent(Ri...

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

838. list 加载动画为什么实现的效果会错乱掉? [ 66%]

...的边界信息 var bounds = ani.getGraphicBounds(); ani.scale(80/bounds.width ,80/bounds.height) this.addChild(ani) } } Laya.class(Item1, "Item1", Box); var List = Laya.List; function setup(effList) { var list = new List(); list.itemRender = Item1; list.repeatX = 3; list.repeatY = 4; list.x = (Laya...

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

839. laya.ui.ColorPicker_API3.0 [ 66%]

...hitTestPrior mouseThrough name tag drawtocanvCtx Accessors _isHeightSet _isWidthSet active activeInHierarchy alpha anchorX anchorY bgColor blendMode borderColor bottom cacheAs centerX centerY components customRenderEnable dataSource destroyed disabled displayHeight displayWidth displayedInStage draw...

来源: Laya3.0_api 发布时间: 20231115

840. Label属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 66%]

...).pos(290, 150); } function createLabel(color, strokeColor) { const STROKE_WIDTH = 4; var label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor; } Laya...

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