大约有 4,034 项符合查询结果, 库内数据总量为 30,906 项。 (搜索耗时: 0.0082 秒)
Laya_社区(3264) Laya2.0_文档(296) Laya_示例(141) Laya2.0_示例(117) Laya3.0_文档(107) Laya3.0_api(94) Laya2.0_api(9) laya_api(6)
...ight: canvas.height, destWidth: canvas.width, destHeight: canvas.height }) this.ctx.graphics.loadImage(wxhtmlC, 0, 0,this.ctx.width,this.ctx.height); 然后用drawTextture,很多问题都是有这个,可以带到下面那些东西怎么转成图片呢? var htmlC = Laya.stage.drawToTexture(Laya...
来源: Laya_社区 发布时间: 20191124
...代码: onCollisionEnter(other){ if(other.other.owner.name==="end"){ // this.owner.parent.removeSelf(); //删除自身场景 console.log(this.owner.parent) console.log(this.owner.parent.parent); //创建胜利的UI界面 let victoryScene=new VictoryScene(); Laya.stage.addChild(victoryScene); th...
来源: Laya_社区 发布时间: 20190903
...ng", "../../res/ui/input (4).png"]; Laya.loader.load(skins, Handler.create(this, onLoadComplete)); //加载资源。 })(); function onLoadComplete() { for (var i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Lay...
来源: Laya_示例 发布时间: 20250225
...请教请教! 我添加了方向光: //添加方向光 this.m_light = this.m_scene3D.addChild(new Laya.DirectionLight()) as Laya.DirectionLight; this.m_light.color = new Laya.Vector3(0.8, 0.8, 0.8); this.m_light.transform.worldMatrix.setF...
来源: Laya_社区 发布时间: 20200323
...on", type: Laya.Loader.ATLAS }]; Laya.loader.load(arr, Laya.Handler.create(this, this.onProgress)); } onProgress() { this.Progress = new Progress(); Laya.stage.addChild(this.Progress); //加载资源进度并且监听 Laya.loader.load(this.arr, Laya.Handler.create(this, this.onAssetsLoaded), Laya.Ha...
来源: Laya_社区 发布时间: 20171217
...et连接不上(已解决) socket = new Socket(); socket.on(Event.OPEN, this, onSocketOpen); socket.connect("127.0.0.1", 8080); 照着官方例子,服务器显示连接上了,但onSocketOpen没调用到,而且socket的connected为false。 能帮忙看是什么原因么? 具体代码:...
来源: Laya_社区 发布时间: 20170209
...= new Laya.Sprite(); bigMask.graphics.drawRect(0, 0, 300, 200, "#ffffff"); this.mask = bigMask; // let imgMask:Laya.Sprite = new Laya.Sprite(); imgMask.graphics.drawRect(0, 0, 100, 300, "#ffffff"); this.img.mask = imgMask; Laya.Tween.to(this.img, {x:100}, 10000).update = Laya.Handler.create(this, th...
来源: Laya_社区 发布时间: 20190722
...export default class player extends Laya.Sprite { constructor() { super(); this.pivot(this.width / 2, this.height / 2); this.graphics.drawRect(0, 0, this._size, this._size, this._color); } } //a文件 import player from './player'; // 程序入口 class GameMain { constructor() { Laya.init(640, 9...
来源: Laya_社区 发布时间: 20180804
...引用方式,方便其他类引用 GameMain.instance = this; //加载场景文件 this.loadScene("main_scene.scene"); } setup(){ Laya.SoundManager.playMusic("music/d1.mp3", 1, new Laya.Handler(this, this...
来源: Laya_社区 发布时间: 20200925
... m_templet : Laya.Templet; constructor() { Laya.init(1334,750,Laya.WebGL); this.m_templet = new Laya.Templet(); this.m_templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.m_templet.on(Laya.Event.ERROR,this,this.onError); this.m_templet.loadAni("res/spine/goblins/goblins.sk"); } private o...
来源: Laya_社区 发布时间: 20180126