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

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

411. 滤镜问题,有复现demo [ 73%]

...消失了???? */ Laya.stage.graphics.drawRect(200, 200, Laya.stage.width / 2, Laya.stage.height / 2, "#ffff00"); var btn:Sprite = new Sprite(); btn.size(200, 100); btn.graphics.drawRect(0, 0, btn.width, btn.height, "#ff00ff"); Laya.stage.addChild(btn); btn.on(Event.MOUSE_DOWN, this, function...

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

412. video在安卓手机上,怎么设置同层播放,还有怎么设置隐藏控制播放按钮 [ 73%]

...ideoElement.setAttribute('preload', 'preload'); videoElement.setAttribute('width', '100%'); videoElement.setAttribute('height', '100%'); // videoElement.playbackRate = 2;//加速播放 // 设置画布上的对齐参照物 reference = new Sprite(); this.addChild(reference); reference.pos(0, 0); refer...

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

413. 微信关系链:LayaAir引擎针对微信小游戏好友关系链实现方案 [ 73%]

..., this, function():void{ //设置共享画布大小 __JS__('sharedCanvas').width = Laya.stage.width; __JS__('sharedCanvas').height = Laya.stage.height; //主域往子域透传消息 __JS__('wx').postMessage({type:"resizeShared",url:"",data:{width:Laya.stage.width,height:Laya.stage.height,matrix:Laya...

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

414. 用javascript如何实现游戏登录游戏前的资源加载进度,如何将图片,音乐等素材加载到界面通过加载条显示加载进度 [ 73%]

...atas(); } public updataPosition() { this.progressUI.setPosition(Laya.stage.width / 2, Laya.stage.height / 2); } public loadMainDatas() { Laya.loader.load([ { url: "res/ui/UIComponents@atlas0.png", type: Loader.IMAGE }, { url: "res/ui/UIComponents.fui", type: Loader.BUFFER }, { url: "res/ui/FastBet.f...

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

415. 陀螺仪与加速计(JavaScript-LayaAir基础篇(JS)-硬件设备相关) [ 73%]

...info.fontSize = 50; this.info.color = "#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height);  Laya.stage.addChild(this.info);  Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, onDeviceorientation); function onDeviceorientation(absolute, rotationInfo) { this.info.text = "alpha:" + Math....

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

416. Native(android)下创建二维码并显示在页面上 [ 73%]

...     // androidplat,创建二维码     createQrCode(url:string, width:number, height:number):string {         return this._bridge.call("createQrCode", url, width, height);     }     // 以下android代码 // JSBridge.javapublic static String createQrCode(final String c...

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

417. 文本-字数限制 [ 73%]

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createInput(); })(); function cr...

来源: Laya_示例 发布时间: 20260303

418. 这样写的代码,Tween动画里面只有alpha有效果,scalex和scaley没有变化,怎么回事啊? [ 73%]

...graphics.drawCircle(0, 0, 350, null, "#ff0000", 4); sprite.pivotX = sprite.width * 0.5; sprite.pivotY = sprite.height * 0.5; sprite.x = this.width * 0.5; sprite.y = this.height * 0.5; this.addChild(sprite);  Laya.Tween.to(sprite, {scaleX:1.5, scaleY:1.5, alpha:0}, 5000); 2018-07-08 添加评论 免...

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

419. 官方文档里的位图字体的制作与使用JS 跑不通 以及 文档的几个问题 [ 73%]

...,没放空格,最好设置一个空格宽度this.mBitmapFont.setSpaceWidth(10);Laya.Text.registerBitmapFont(this.mFontName,this.mBitmapFont);var txt = new Laya.Text();txt.text = "这是测试";//设置宽度,高度自动匹配txt.width = 250;//自动换行txt.wordWrap = true;txt.align = "cente...

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

420. 移动端横竖屏适配(类似锁屏效果)? [ 73%]

...ts.Event; import laya.utils.Browser; public class ShiPei { private var fillWidth:Number=Browser.width; private var fillHeight:Number=Browser.height; public function ShiPei() { //设置初始化 Laya.init(fillWidth,fillHeight); //设置横屏显示 Laya.stage.screenMode="horizontal"; //默认触发...

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