大约有 520 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0038 秒)
...age.alignH = 'middle'; // 适配水平对齐方式 Laya.stage.screenMode = this.Stage.SCREEN_HORIZONTAL; // 始终以横屏展示 Laya.stage.scaleMode = "fixedwidth"; // 宽度不变 this.engine; var world; this.engine = Matter.Engine.create({ enableSleeping: true // 开启睡眠 }); world = this.en...
来源: Laya_社区 发布时间: 20180522
...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; this.createApe(); this.createTimerLine(); Laya.stage.on(Event.KEY_DOWN, this, this.keyDown); } createApe() { const Sprite = Laya.Sprite; this.target = new Sprite(); Laya.sta...
来源: Laya2.0_示例 发布时间: 20251130
...; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Handler.create(this, createApe)); })(); function createApe() { // 添加一只猩猩 ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.pivot(texture.width / 2, texture.height / 2); ape.pos(Laya.stage...
来源: Laya_示例 发布时间: 20251130
...bgl.js的8418行崩溃了。两句代码是这样的: if (!this.customCompile && !gl.getProgramParameter(this._program,/*laya.webgl.WebGLContext.LINK_STATUS*/0x8B82)) throw gl.getProgramInfoLog(this._program); 应该就是抛出异常,所以崩了。 ...
来源: Laya_社区 发布时间: 20180822
...提交 4 个回复 ymsdandan 赞同来自: 你试下LoginView.__super.call(this) , 注意,是2个下划线 2017-11-08 0 3 分享 微博 QZONE 微信 caochangli 赞同来自: 官方没人回复下吗? 2017-11-08 0 0 分享 微博 QZONE 微信 ymsdandan 赞同来自: 你把这个替换到...
来源: Laya_社区 发布时间: 20171108
...n setup() { createApe(); createTimerLine(); Laya.stage.on( Event.KEY_DOWN, this, this.keyDown); } function createApe() { target = new Sprite(); target.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(target); target.pivot(55, 72); target.pos(100,100); } function createTimerLine() { timeL...
来源: Laya_示例 发布时间: 20251130
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.drawSomething(); } drawSomething() { let sp = new Laya.Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78,...
来源: Laya2.0_示例 发布时间: 20251130
..._CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; this.createMovieClip(); } private createMovieClip(): void { var mc: MovieClip = new MovieClip(); mc.load(this.SWFPath); mc.x = (Laya.stage.width - this.MCWidth) / 2; mc.y = (Laya.stage.height - this.MCHeight) / 2; Laya.stage....
来源: Laya_示例 发布时间: 20251130
..., 0, 0.5); var scaleDelta = 0; var scaleValue = 0; Laya.timer.frameLoop(1, this, loop); function loop() { scaleValue = Math.sin(scaleDelta += 0.01); pos1.elements[0] = pos2.elements[0] = scaleValue * 13; pos1.elements[1] = Math.sin(scaleValue * 20) * 2; pos2.elements[1] = Math.sin(scaleValue * 20) *...
来源: Laya_示例 发布时间: 20251130
...aya.stage.loadImage("../../res/pixi/laserBG.jpg"); Laya.stage.frameLoop(1, this, animate); })(); function animate() { if (tick > frequency) { tick = 0; // iterate through the dudes and update the positions var laser = new Sprite(); laser.loadImage("../../res/pixi/laser0" + ((type % 5) + 1) + ".png")...
来源: Laya_示例 发布时间: 20251130