大约有 12 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)
...要将aSprite的x在1秒内移动到600,然后在两秒内将y移动到400,就可以这样设置代码: //将两个缓动效果串行在一起 Laya.Tween.create(aSprite).duration(1000).to("x", 600) .chain().duration(2000).to("y", 400); 运行效果如图: chain()方法会默认继承前一...
来源: Laya3.0_文档 发布时间: 20251010
...Gyroscope_Sample { private info: Laya.Text; constructor() { Laya.init(550, 400); this.info = new Laya.Text(); 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,...
来源: Laya3.0_文档 发布时间: 20251010
...rogressBar.png"); this.progressBar.pos(100, 500); this.progressBar.width = 400; this.progressBar.sizeGrid = "5,5,5,5"; this.progressBar.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(this.progressBar); Laya.timer.loop(100, this, this.changeValue); }); } // 模拟进度条...
来源: Laya3.0_文档 发布时间: 20251010
...der = new Laya.VSlider(); vs.skin = "vslider.png"; vs.height = 300; vs.pos(400, 50); vs.min = 0; vs.max = 100; vs.value = 50; vs.tick = 1; vs.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(vs); } private onChange(value: number): void { console.log("滑块的位置:" + v...
来源: Laya3.0_文档 发布时间: 20251010
...pnum1: Laya.FontClip = new Laya.FontClip(this._ClipNum1); clipnum.pos(240, 400); clipnum.size(250, 50); clipnum.sheet = "0123456789"; clipnum.value = "114499"; clipnum.spaceY = 10; testClipNum.pos(200, 300); testClipNum.sheet = "0123456789"; testClipNum.value = "0123456789"; clipnum1.pos(150, 100); ...
来源: Laya3.0_文档 发布时间: 20251010
...: class LayaUISample { constructor() { //初始化引擎 Laya.init(600,400,Laya.WebGL); //设置Laya提供的worker.js路径 Laya.WorkerLoader.workerPath = "libs/worker.js"; //开启worker线程 Laya.WorkerLoader.enable = true; //加载引擎需要的资源 Laya.loader.load("../atlas/comp.atlas",L...
来源: Laya3.0_文档 发布时间: 20251010
...000): class Test { private text:Laya.Text; constructor() { Laya.init(550,400,Laya.WebGL); Laya.Stat.show(); var textBox=new Laya.Sprite(); for(var i=0;i<10000;i++) { this.text=new Laya.Text(); this.text.text=(Math.random()*100).toFixed(0); this.text.color="#CCCCCC"; this.text.x=Math.random()*55...
来源: Laya3.0_文档 发布时间: 20251010
...在把设计好的组件拖出来使用,并且把组件的宽度拉长为400像素。可以看到,笑脸图标依照左->中的关联规则发生了位移,它现在所在的位置是100像素,仍然保持了与容器组件中心距离1/4的宽度。如图1-10所示: (图1-10) 1.3.2 ...
来源: Laya3.0_文档 发布时间: 20251010
...提供HTML5开发技术方案!"; this.txt.fontSize = 35; this.txt.size(400,150); this.txt.borderColor = "#fa1515"; this.txt.overflow = "scroll"; this.txt.on(Laya.Event.MOUSE_DOWN, this, this.startScrollText); } /* 开始滚动文本 */ startScrollText() { prevX = this.txt.mouseX; prevY = this.txt....
来源: Laya3.0_文档 发布时间: 20251010
...路径 var path:any[] = [ ["moveTo", 0, 0], //画笔的起始点 ["lineTo",400,0], ["arcTo", 500, 0, 500, 30, 30], //p1(500,0)为夹角B,(500,30)为端点p2 ["lineTo",500,200], ["arcTo", 500, 300, 470, 300, 30],//p1(500,300)为夹角C,(470,300)为端点p2 ["lineTo",30,300], ["arc...
来源: Laya3.0_文档 发布时间: 20251010