大约有 7 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0027 秒)
...nction setup() { createParagraph(); // 代码创建 showExternalHTML(); // 使用外部定义的html } function createParagraph() { var p = new HTMLDivElement(); Laya.stage.addChild(p); p.style.font = "Impact"; p.style.fontSize = 30; var html = "使用"; html += "HTMLDivElement"; html += "创建的"...
来源: Laya_示例 发布时间: 20260303
...ge.bgColor = "#232628"; showApe(); })(); function showApe() { // 方法1:使用loadImage var ape = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("../../res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { va...
来源: Laya_示例 发布时间: 20260303
...wLine(terminalX, 0, terminalX, Laya.stage.height, "#FFFFFF"); // characterA使用Tween.to缓动 Tween.to(characterA, { x: terminalX }, 1000); // characterB使用Tween.from缓动 characterB.x = terminalX; Tween.from(characterB, { x: 0 }, 1000); } function createCharacter(skin) { var character = new S...
来源: Laya_示例 发布时间: 20260303
...台没有任何对象,也会占用这部分内存; * 2. 销毁 Texture 使用的图片资源后,会保留 Texture 壳,当下次渲染时,发现 Texture 使用的图片资源不存在,则自动恢复。 */ var GameMain = /** @class */ (function () { function GameMain() { this.isDestroyed ...
来源: Laya_示例 发布时间: 20260303
...ring() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChannels.g = 0; //obj.g = Math.floor(obj.g); bgColorChannels.b = Math.floor(bgColorChannels.b); var r = bgColorChannels.r.toString(16); r = r.length == 2 ? r : "0" + r; var g = bgColorChannels.g.toString(16); g...
来源: Laya_示例 发布时间: 20260303
...idth - WID) / 2; list.y = (Laya.stage.height - HEI * list.repeatY) / 2; // 使用但隐藏滚动条 list.vScrollBarSkin = ""; list.selectEnable = true; list.selectHandler = new Handler(this, onSelect); list.renderHandler = new Handler(this, updateItem); Laya.stage.addChild(list); // 设置数据项...
来源: Laya_示例 发布时间: 20260303
... firstTime = false; alert("在当前设备中无法获取地球坐标系,使用设备坐标系,你可以继续观赏,但是提供的方位并非正确方位。"); } // 更新角度显示 degreesText.text = 360 - Math.floor(info.alpha) + "°"; compassImg.rotation = info.alpha; // 更新方位...
来源: Laya_示例 发布时间: 20260303