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

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

471. 2.0label不改变文本内容,label颜色无法直接改变,1.0可以 [ 71%]

...     this.label.pos(500, 400);               this.label.width = 300; this.label.align = "center"; // this.label.stroke = 1; this.label.strokeColor = "#000000";             this.label.zOrder=9980             Laya.stage.addChild(this.label);          ...

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

472. laya中js 如何实现Sprite类继承 [ 71%]

...new Role(); this.RoleMap = new Laya.Sprite(); this.RoleMap.size(Laya.stage.width, Laya.stage.height/2); Laya.stage.addChild(this.RoleMap); this.RoleMap.addChild(this.Role); this.Role.pivot(16,24);// 图片32x48 this.Role.pos(100, 200);   Role.js基础代码: var Role = ( function ( _super ) { fun...

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

473. QQ玩一玩 获取头像后的数据是 BK.Buffer,需要如何用laya的Image显示出来? [ 71%]

...openID, BuffInfo){ if(openID == openID1) { var buff = BuffInfo.buffer; var width = BuffInfo.width; var height = BuffInfo.height; BK.Script.log(0,0,"headeBuff :"+ openId + " buff:"+ buff + " width:"+ width +" height:"+height); var tex = new BK.Texture(buff,width,height); var sp =new BK.Sprite(200,200...

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

474. tiledMap类createMap()创建地图 如何理解这个viewRect视口区 [ 71%]

...知道出来的是什么宽高)         console.log(tiledMap.gridWidth,tiledMap.gridHeight);         //地图宽高         console.log(tiledMap.width,tiledMap.height);         //         console.log(tiledMap.numColumnsGrid,tiledMap.numRowsGrid );       ...

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

475. dialog的lock属性没出现 [ 71%]

...rt laya.webgl.WebGL; public class DialogCenterClose { private const DIALOG_WIDTH:int = 220; private const DIALOG_HEIGHT:int = 275; private const CLOSE_BTN_WIDTH:int = 43; private const CLOSE_BTN_PADDING:int = 5; private var assets:Array; public function DialogCenterClose() { // 不支持WebGL时自...

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

476. 使用百度地图显示当前位置(ActionScript-LayaAir基础篇(AS3)-硬件设备相关) [ 71%]

... 2.2 refit函数: ```java private function refit():void { mapDiv.style.width = Browser.width / Browser.pixelRatio + "px"; mapDiv.style.height = Browser.height / Browser.pixelRatio + "px"; } ``` refit()使百度地图充满整个窗口,由于侦听了resize事件,在窗口resize...

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

477. 关于video [ 70%]

...ce); reference.size(640, 960); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#CCCCCC"); // 每次舞台尺寸变更时,都会调用Utils.fitDOMElementInArea设置Video的位置,对齐的位置和refence重合 Laya.stage.on(Laya.Event.RESIZE, this, Laya.Utils.fitDOMElement...

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

478. Laya多点触控是有开关吗 为什么多点触控没有任何反应 [ 70%]

...  this.text = new Laya.Text();         this.text.x = Laya.stage.width / 2 -50 ;         this.text.text = "触控点归零";         //显示文本显示框         this.text = new Laya.Text();         this.text.name = "ceshi";         this.text.overf...

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

479. sprite 添加点击事件没反应,对sprite设置了size也没用 [ 70%]

...w.music.btn_on) ; this.btn.pivot(75/2 , 75/2) ; this.btn.x = window.client_width - 25 ; this.btn.y = 25 ; this.btn.scaleX = 25 / 75 ; this.btn.scaleY = 25 / 75 ; Laya.stage.addChild(this.btn) ; this.btn.size(25,25) ; this.btn.on(Laya.Event.CLICK, this, music.music_voice_toggle); 代码是这样的 ...

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

480. 关于设置动画轴心点问题 [ 70%]

...成后通过getBounds来获取Animation的宽高,设置pivot轴心点为width/2,height/2,同时设置pos值为pivot值的相反值即可。如果pos已经设置过,将pos现有值-(povot.x,pivot.y) 2017-01-19 1 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复...

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