大约有 2,023 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0066 秒)
Laya_社区(1419) Laya2.0_文档(233) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(61) Laya3.0_文档(39) Laya2.0_api(7) laya_api(6)
...; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); })(); function setup() { createApe(); showDragRegion(); } function createApe() { ape = new Sprite(); ape.loadImage(ApePath); Laya.stage.addChild(ape); var texture = Laya.loader.getRes(ApePath); ape.pivot(textur...
来源: Laya_示例 发布时间: 20241117
...(); })(); function setup() { createSprite(); Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 200, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.po...
来源: Laya_示例 发布时间: 20241117
...OWALL; Laya.stage.bgColor = "#232628"; createMap(); Laya.stage.on("click", this, onStageClick); })(); function createMap() { tiledMap = new TiledMap(); tiledMap.createMap("../../res/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(thi...
来源: Laya_示例 发布时间: 20241117
...le)"; txt.bold = true; txt.pos(0, 200); txt.fontSize = 30; txt.on("click", this, onTxtClick); Laya.stage.addChild(txt); //实例一个小人,放到右上角,并相对布局 var boy1 = new Image(); boy1.skin = "../../res/cartoonCharacters/1.png"; boy1.top = 0; boy1.right = 0; boy1.on("click", thi...
来源: Laya_示例 发布时间: 20241117
...ignV = Stage.ALIGN_MIDDLE; Laya.loader.load(compassImgPath, Handler.create(this, init)); })(); function init() { // 创建罗盘 createCompass(); // 创建方位指示器 createDirectionIndicator(); // 画出其他UI drawUI(); // 创建显示角度的文本 createDegreesText(); Gyroscope.instance.on...
来源: Laya_示例 发布时间: 20241117
...ya.Tween; TextArea = Laya.TextArea; class UI_RefreshList { constructor() { this.baseBox = null; this.refreshLoading = null; this.loadingAni = null; this.loadingLabel = null; this.refreshList = null; /** 消息生成的当前最大id值 */ this.msgIdNow=1; /** 滚动条效果是否停止 */ this.scro...
来源: Laya2.0_示例 发布时间: 20241117
...() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; this.btnArr = ["res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png"]; this.nameArr = ["canvas截图","sprite截图","清理"]; this._canvas = null; this.aimSp = null; this.drawImage =...
来源: Laya2.0_示例 发布时间: 20241117
...annel extends Laya.SoundChannel { constructor(audio, miniSound) { super(); this._audio = audio; this._miniSound = miniSound; this._onEnd = MiniSoundChannel.bindToThis(this.__onEnd, this); audio.onEnded(this._onEnd); } static bindToThis(fun, scope) { var rst = fun; rst = fun.bind(scope); return rst; ...
来源: Laya_社区 发布时间: 20200103
..., "../../res/ui/checkbox (6).png"]; Laya.loader.load(skins, Handler.create(this, onCheckBoxSkinLoaded)); })(); function onCheckBoxSkinLoaded() { var cb; for (var i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; L...
来源: Laya_示例 发布时间: 20241117
... Laya.class(Class, className, Laya.Sprite); function Class() { Class.super(this); // this定义.. this.init(); } Class.prototype.init = function() { console.log(this); }; return Class; })(); } var __extends = (this && this.__extends) || function(d, b) { for (var p in b) { (b.hasOwnProperty(p...
来源: Laya_社区 发布时间: 20170619