大约有 2,991 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0103 秒)
Laya_社区(2265) Laya2.0_文档(235) Laya_示例(147) Laya2.0_示例(117) Laya3.0_api(70) Laya2.0_api(64) laya_api(59) Laya3.0_文档(34)
...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
...位置与pc不一致 laya引擎1.7.21 layanative版本1.0.2 在Laya.stage.scaleMode = Stage.SCALE_FIXED_AUTO; 模式下,设置了相机的viewport后,在PC上显示位置,如下图 而打成app后,则显示如下: 很明显中间layabox的模型位置不正确。 附件 : --> ...
来源: Laya_社区 发布时间: 20181214
...t:Text = new Text(); txt.text = "hello_world"; txt.color = "#ffffff"; Laya.stage.addChild(txt); } } } ``` 这个时候我们就可以看到txt已经添加到舞台上了,显示了txt中 白色的hello_world。 接着我们给我们的文本添加一些其他的字体样式,粗体、斜体、字...
来源: Laya2.0_文档 发布时间: 20210714
... = new Laya.Sprite(); //添加到舞台上 console.log(self.foodBox); Laya.stage.addChild(self.foodBox); // Laya.stage.addChildAt(foodBox,self); self.foodBox = self.fooddata; console.log(self.foodBox); 2018-12-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀...
来源: Laya_社区 发布时间: 20181220
...prite; constructor() { Laya.init(2000, 1500); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" this.sp = new Laya.Sprite(); let width = 660 let height = 420 this.sp.size(width, height) this.sp.pivot(Math.round(width / 2), Math.round(height / 2)) this.sp.graphics.drawCircle(0, 0, 5, "#000000") ...
来源: Laya_社区 发布时间: 20171230
...给主角飞机(hero)添加事件,怎么做 demo中的事件都是给stage添加的,stage.on()之类的,因为主机飞机(hero)都是用Role()类去构造的,添加事件应该怎么做 2018-06-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...
来源: Laya_社区 发布时间: 20180613
...ion Tab_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load(["resource/ui/tab.png"], Handler.create(this, onLoadComplete));//加载资源。 } private function onLoadComplete():void { var tab:Tab = new Tab();/...
来源: Laya3.0_api 发布时间: 20231115
...= new Sprite(); _parent.graphics.drawRect(0, 0, 500, 500, '#ff0000'); Laya.stage.addChild(_parent); var _child = new Sprite(); _child.graphics.drawRect(0, 0, 50, 50, '#336699'); _parent.addChild(_child);就像上面那样,我需要在addChild的时候,_child默认在_parant的左下角~按上面...
来源: Laya_社区 发布时间: 20170222
...步:添加动画到舞台,播放动画 ```java //添加到舞台 Laya.stage.addChild(tl); //播放Animation动画 tl.play(); ``` 完整的示例代码如下: **入口类TimeLineDemo.as** ```java package { import laya.display.Animation; import laya.utils.Handler; import laya.webgl.WebGL; public...
来源: Laya2.0_文档 发布时间: 20210715
... Laya.init(550,400); var sp:Image=new Image(); sp.loadImage("2.png"); Laya.stage.addChild(sp); var text:Text=new Text(); text.fontSize=40; text.color="#FF00FF"; text.text="哈哈哈哈哈哈哈哈哈哈哈哈哈哈"; text.font="hu" text.pos(600,600); Laya.stage.addChild(text); Laya.timer.once(1000,t...
来源: Laya_社区 发布时间: 20160514