大约有 1,367 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0052 秒)
...的API参数: ![1.png](img/1.png) ![2.png](img/2.png) ```java package { import laya.display.Text; public class LayaSample { public function LayaSample() { //初始化引擎 Laya.init(1136, 640); var txt:Text = new Text(); txt.text = "hello_world"; txt.color = "#ffffff"; Laya.stage.addChild(txt); }...
来源: Laya2.0_文档 发布时间: 20210714
....addChild(dialog); dialog.pos(165, 62.5); } } new UI_Image();module laya { import Stage = Laya.Stage; import Image = Laya.Image; import WebGL = Laya.WebGL; export class UI_Image { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MI...
来源: Laya2.0_示例 发布时间: 20241118
...utText.fontSize = 20; Laya.stage.addChild(inputText); } })();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_InputMultiline { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.cl...
来源: Laya_示例 发布时间: 20241118
...top(); console.text += "停止接收设备摇动"; } } })(); module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Shake = Laya.Shake; import Browser = Laya.Browser; import Handler = Laya.Handler; import Event = Laya.Event; export class InputDevice_Sha...
来源: Laya_示例 发布时间: 20241118
...atically generated by LayaAirIDE, please do not make any modifications. */ import View=Laya.View; import Dialog=Laya.Dialog; import Scene=Laya.Scene; export module ui { export class BGPageUI extends View { constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("BGPage...
来源: Laya_社区 发布时间: 20181014
...要立即drawToCanvas,加个延迟或者点击行为,譬如 package { import laya.display.Sprite; import laya.display.Stage; import laya.resource.HTMLCanvas; import laya.resource.Texture; import laya.ui.Image; import laya.utils.Handler; import laya.webgl.WebGL; public class LayaAirDemo { private...
来源: Laya_社区 发布时间: 20170704
...个入口类ComponentDemo.as,编写如下代码:** ```java package { import laya.ui.CheckBox; import laya.utils.Handler; import laya.webgl.WebGL; import ui.ComponentDemoUI; public class ComponentDemo { //资源路径 private var skin1:String="res/component/check.png"; private var skin2:String ="...
来源: Laya2.0_文档 发布时间: 20210714
...{ mCurrIndex = 0; } mArmature.play(mCurrIndex,false); } })();module laya { import Skeleton = Laya.Skeleton; import Templet = Laya.Templet; import Event = Laya.Event; import Browser = Laya.Browser; import Stat = Laya.Stat; import WebGL = Laya.WebGL; export class MultiTexture { private mAniPath:string...
来源: Laya_示例 发布时间: 20241118
...fff"; inputText.fontSize = 20; } } new Text_InputMultiline();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_InputMultiline { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.cl...
来源: Laya2.0_示例 发布时间: 20241118
...载失败: " + err); } } new Loader_ProgressAndErrorHandle();module laya { import Event = Laya.Event; import Loader = Laya.Loader; import Texture = Laya.Texture; import Handler = Laya.Handler; export class Loader_ProgressAndErrorHandle { constructor() { Laya.init(550, 400); // 无加载失败重试 ...
来源: Laya2.0_示例 发布时间: 20241118