大约有 2,783 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0081 秒)
Laya_社区(2254) Laya2.0_文档(123) Laya3.0_api(106) Laya_示例(84) Laya2.0_api(57) Laya2.0_示例(55) laya_api(53) Laya3.0_文档(51)
...过scale了 但是效果是这样的 : 代码 : var point = new Sprite(); this.addChild(point); point.graphics.drawCircle(88, 86, 40, 'transparent'); var tx = new Sprite(); tx.loadImage(PATH + 'tx.jpg'); tx.scale(0.3,0.3); this.addChild(tx); tx.mask = point; 2017-09-28 0 2 分享 微博...
来源: Laya_社区 发布时间: 20170928
...n(Event.CLICK, this, this.onDecreaseAlpha2); } createButton(label) { const Sprite = Laya.Sprite; let w = 300, h = 60; let button = new Sprite(); Laya.stage.addChild(button); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", ...
来源: Laya2.0_示例 发布时间: 20251209
...e = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#fff"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; let rowHeightD...
来源: Laya2.0_示例 发布时间: 20251209
...给loadImage这个方法引擎就会帮解码显示出来。 var sp: Laya.Sprite = new Laya.Sprite();sp.loadImage(data, 0, 0, 200, 200);Laya.stage.addChild(sp); 但现在2.0的loadImage 的 data 就只会被默认为url了, var sp: Laya.Sprite = new Laya.Sprite();sp.loadImage(data);Laya.stage.ad...
来源: Laya_社区 发布时间: 20200111
...age.width, Laya.stage.height); } } new SmartScale_T();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import Image = Laya.Image; import WebGL = Laya.WebGL; export class SmartScale_T { //所有适配模式 private modes: Array ...
来源: Laya2.0_示例 发布时间: 20251209
图片遮罩大小跟设置不一致 (function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.client...
来源: Laya_社区 发布时间: 20171220
...; private _targetsLastValue: number = null; private targets: Array<Laya.Sprite> = null; public static instance: ColorTool = null; private targetsFilter: Laya.ColorFilter = null; private _persent: number = 0; protected constructor() { this.targets = new Array<Laya.Sprite>(); } /** * 实...
来源: Laya_社区 发布时间: 20180930
...法获取物体 添加物体: var qb_pet = scene.addChild(Laya.Sprite3D.load("./test.lh")); qb_pet.once(Laya.Event.HIERARCHY_LOADED, this, function(){ qb_pet.addComponent(Laya.SphereCollider); }); 设置射线: Laya.timer.frameLoop(1, null, checkHit); ...
来源: Laya_社区 发布时间: 20170915
...und() { BackGround.__super.call(this); //创建背景1 this.bg1 = new Laya.Sprite(); //加载并显示背景图 this.bg1.loadImage("war/background.png"); //把背景1放到容器内 this.addChild(this.bg1); //创建背景2 this.bg2 = new Laya.Sprite(); //加载并显示背景图 this.bg2.loadImage("...
来源: Laya_社区 发布时间: 20170222
... Hp.HP_TYPE_SPEED = "hp_type_speed"; //Hp Laya.class(Hp,"Hp", laya.display.Sprite); var _proto = Hp.prototype; _proto.init = function(type){ this.width = 180; this.height = 21; var texture1 = Laya.loader.getRes("res/hp_bg.png"); var texture2; switch (type) { case Hp.HP_TYPE_ENERGY: texture2 = Laya.l...
来源: Laya_社区 发布时间: 20160803