大约有 460 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0061 秒)
Laya_社区(251) Laya2.0_示例(90) Laya_示例(69) Laya2.0_文档(37) Laya3.0_文档(9) Laya3.0_api(2) laya_api(1) Laya2.0_api(1)
...ce Pixel Ratio),中文叫设备像素比 。LayaAir引擎中通过 `Laya.Browser.pixelRatio` 可以获得浏览器的DPR值。 这里稍展开讲几句,在浏览器里,默认是由用户来控制缩放的,例如,我们在手机浏览器双指扩张,发现网页会放大,但清晰度并...
来源: Laya2.0_文档 发布时间: 20210715
...结构数据。 example package { import laya.ui.Tree; import laya.utils.Browser; import laya.utils.Handler; public class Tree_Example { public function Tree_Example() { Laya.init(640, 800); Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load(["resource/ui/vscroll.png", ...
来源: Laya3.0_api 发布时间: 20231115
....Sprite; import laya.events.Event; import laya.ui.Image; import laya.utils.Browser; public class TestDemo { private var sp:Sprite; public function TestDemo() { Laya.init(500,500); Laya.stage.bgColor="#EEFFCC"; sp=new Sprite(); sp.graphics.drawRect(0,0,100,50,"#FF0000"); sp.size(100,50); // 设置轴...
来源: Laya_社区 发布时间: 20170106
... private function onLink(data:*):void { // TODO Auto Generated method stub Browser.window.location.href=data; }5、实现html页面跳转 示例如下: var iHtml:HTMLIframeElement=new HTMLIframeElement(); Laya.stage.addChild(iHtml); iHtml.href="res/html/test.html";6、简单的图片显示 示例...
来源: Laya_社区 发布时间: 20161027
...ya.Event.MOUSE_WHEEL, this, this.mouseWheel) } onUpdate(): void { if (Laya.Browser.onMobile) { this.AroundByMobileInput(); } else { this.AroundByMouseInput(); } if (!this.canRotation_X) this.targetAngles.y = 0; if (!this.canRotation_Y) this.targetAngles.x = 0; //Lerp. this.CurrentAngles = this.LerpV...
来源: Laya_社区 发布时间: 20170714
...ya.Event.MOUSE_WHEEL, this, this.mouseWheel) } onUpdate(): void { if (Laya.Browser.onMobile) { this.AroundByMobileInput(); } else { this.AroundByMouseInput(); } if (!this.canRotation_X) this.targetAngles.y = 0; if (!this.canRotation_Y) this.targetAngles.x = 0; //Lerp. this.CurrentAngles = this.LerpV...
来源: Laya_社区 发布时间: 20190224
...渲染,代码如下: //创建一个url对象; var url:string = Laya.Browser.window.URL.createObjectURL(imgBlob); //加载URL获得HTMLImageElement Laya.loader.fetch( url,"image" ).then((res)=>{ //创建Texture2D var t2d: Texture2D = new Texture2D(res.width, res.height, TextureFormat.R8G8B8A...
来源: Laya3.0_文档 发布时间: 20230303
....drawTexture(texture2, 0, 0); //把草垛居底部显示 // this.grass.y = Browser.clientHeight - this.grass.height; this.addChild(this.grass); //创建一个帧循环处理函数,用于背景位置的更新,实现背景滚动效果。 Laya.timer.frameLoop(1, this, this.onLoop) } _proto.onLoop =...
来源: Laya_社区 发布时间: 20160722
...2; Laya.loader.load(proArr,Laya.Handler.create(this,onProLoaded)); if(Laya.Browser.onAndriod) { Laya.stage.scaleMode = Laya.Stage.SCALE_EXACTFIT; } else { Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; } Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Load...
来源: Laya_社区 发布时间: 20170701
...尽的讯息。 Laya Engine : 1.17.19.1beta 作业系统: macOS 10.12.6 Browser : chrome 67.0.3396.99 没有什么复杂的程式码,只是让物件一直旋转。有将mask拿掉测试,发现就不会有类似问题。class GameLayer extends ui.GameLayerUI { private infos : any; construct...
来源: Laya_社区 发布时间: 20180720