大约有 657 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0057 秒)
Laya_社区(335) Laya3.0_api(62) Laya2.0_api(58) laya_api(53) Laya2.0_文档(51) Laya2.0_示例(44) Laya_示例(39) Laya3.0_文档(15)
... 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_文档 发布时间: 20240910
...wPortPivotByScale(0,0); //将原地图放大3倍 this.tMap.scale = 3; Laya.stage.on(Laya.Event.RESIZE,this,this.resize); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); this.resize(); } /** * 移动地图视口 */ private mouseMove(...
来源: Laya2.0_文档 发布时间: 20210715
....pos(0, 0); reference.size('100%', '100%'); this.addChild(reference); Laya.stage.on(Laya.Event.RESIZE, this, Laya.Utils.fitDOMElementInArea, [videoElement,reference,0, 0,'100%','100%']); Laya.Utils.fitDOMElementInArea(videoElement,reference,0, 0,'100%','100%') } } 2018-11-24 添加评论 免费帖 -...
来源: Laya_社区 发布时间: 20181124
... 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
Touch接口缺少stageX,stageY 根据官方DEMO “鼠标交互--双指旋转(多点触控)”有这样的代码: private onMouseDown(e: Event): void { var touches: Array<any> = e.touches; if (touches && touches.length == 2) { ...
来源: Laya_社区 发布时间: 20180301
...layaair2.ldc2.layabox. ... DForm 1、constructor里的最后一行: Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements, [emailInput, birthdayInput, passwordInput]); 当stage调整尺寸时,对3个input位置进行调整,当初次运行时,3个input框排在网页左上角,必须手...
来源: Laya_社区 发布时间: 20221205
...下:private function showFoods():void{ foodSprite = new Sprite(); Laya.stage.addChild(foodSprite); //初始化当前菜品下标 this.index = 0; //数据数组 foodArray = ; foodArray.push(new Food("菜品1", "1", 0)); foodArray.push(new Food("菜品2", "2", 1)); foodArray.push(new Food("菜品3",...
来源: Laya_社区 发布时间: 20180407
...完毕,此方法只执行一次 */ onAwake(): void { this.txt.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置 this.txt.size(500, 30); //大小 this.txt.pivot(this.txt.width/2, this.txt.height/2); //轴心点 this.txt.text = "大家好,欢迎各位开发者使用LayaAir I...
来源: Laya3.0_文档 发布时间: 20240910
...的问题!! 在鼠标控制飞机移动时,写成this.hero.pos(Laya.stage.mouseX, Laya.stage.mouseY);是没有用的,可以看到hero容器的坐标变化了,但是机身显示还在原地并未移动, 但如果设置this.hero.aniBody.pos(Laya.stage.mouseX, Laya.stage.mouseY), 机身...
来源: Laya_社区 发布时间: 20180502
...输入已下代码并执行: (function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.cl...
来源: Laya_社区 发布时间: 20180313