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

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

911. [LayaAir3]3D场景里面鼠标感应区域 3.2.1跟3.3不同 [ 81%]

...小,这样才不会拉伸变形 this.spRole.texture.sourceWidth = Laya.stage.width; this.spRole.texture.sourceHeight = Laya.stage.height; //添加2D精灵, this.owner.addChild(this.spRole); this.spRole.pos(0, 0); this.spRole.size(Laya.stage.width, Laya.stage.height); }); 2025-01-09 0 0 分享 ...

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

912. HTML文本 · LayaAir3.0文档 · LAYABOX [ 81%]

... + "LayaBox</span><span>欢迎你的加入</span>"; Laya.stage.addChild(div); 运行效果: 3.2 同一个文本中设置字体、颜色不同 示例如下: var htmlD:HTMLDivElement = new HTMLDivElement(); Laya.stage.addChild(htmlD); htmlD.innerHTML = "<font style='fontSize:3...

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

913. 陀螺仪与加速计 · LayaAir3.4 · 引擎文档 · LAYABOX [ 81%]

... this.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, this.onDeviceorientation); } private onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInfo)...

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

914. 关于2d内的坐标转换问题 [ 81%]

...Point,true); }globalPoint: 绿色框的坐标 -- 舞台中央坐标(Laya.stage.width*.5,Laya.stage.height*.5) localSp:黑框容器对象 直接带入上面方法即可,中央的坐标你只知道相对于绿色框的坐标,则需要转换一下,很简单: globalPoint = greenBox.localToGl...

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

915. [0]Spine3.8.75报错:Error: Unsupported skeleton data, please export with a newer version of Spine. [ 81%]

...例的源码。   var Browser = Laya.Browser; var WebGL = Laya.WebGL; var Stage = Laya.Stage; var Event = Laya.Event; var Stat = Laya.Stat; var SpineTemplet = Laya.SpineTemplet; class SpineBinary {     constructor() {         this.aniPath = "res/powerup-pro.skel";         this.index = -1;...

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

916. 陀螺仪与加速计(TypeScript-LayaAir基础篇(TS)-硬件设备相关) [ 81%]

... this.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, this.onDeviceorientation); } private  onDeviceorientation(absolute: Boolean, rotationInfo: Laya.RotationInf...

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

917. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 81%]

...LayaUISample { constructor() { //初始化引擎 Laya.init(600, 400); Laya.stage.bgColor = "#ffcccc"; var data: string = "data:image/svg+xml," + '' + '' + '' + 'I like ' + '' + 'cheese' + '' + '' + ''; var sp: Laya.Sprite = new Laya.Sprite(); sp.loadImage(data, 0, 0, 200, 200); Laya.stage.addChild(s...

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

918. 关于鼠标事件的问题 [ 81%]

关于鼠标事件的问题 stage监听click事件,为什么无论点击哪里拖动到释放stage都有响应这个click事件,按理click是按下和弹起的对象相同才响应 现在界面上有个图标,我想拖动他(mouse down move up都有实现,up里面stopPropagation也不起...

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

919. drawToCanvas绘制显示不全 [ 81%]

...n.height + 'px';         style.width = Math.floor(screen.height / Laya.stage.height * Laya.stage.width) + 'px';         document.body.appendChild(this.nativeImg)     }     onEnable() {         Laya.timer.once(1000, this, this.delayShowImg);     }     delayShowImg() {         ...

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

920. discard property,please use transform's property instead [ 81%]

...    Laya3D.init(0, 0, true);         //适配模式         Laya.stage.scaleMode = Laya.Stage.SCALE_FULL;         Laya.stage.screenMode = Laya.Stage.SCREEN_NONE;         //开启统计信息         Laya.Stat.show();         var scene = Laya.stage.addChild(new Laya.Scene())...

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