• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 2,783 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0073 秒)

231. 设置遮罩(ActionScript-LayaAir基础篇(AS3)-位图) [ 85%]

...显示。 > ## 一、遮罩API介绍   遮罩属性位于[laya.display.Sprite](https://layaair2.ldc2.layabox.com/api2/Chinese/index.html?version=2.9.0beta&type=Core&category=display&class=laya.display.Sprite) API内(),该属性的说明如图1所示: ![1](img/1.jpg)(图1) ## 二、...

来源: Laya2.0_文档 发布时间: 20210714

232. 性能测试-虫子(慎入) [ 85%]

... y); } tick += 0.1; } } new PerformanceTest_Maggots();module laya { import Sprite = Laya.Sprite; import Browser = Laya.Browser; import Handler = Laya.Handler; import Stat = Laya.Stat; import Rectangle = Laya.Rectangle; import WebGL = Laya.WebGL; export class PerformanceTest_Maggots { private texture...

来源: Laya2.0_示例 发布时间: 20251209

233. 飞机大战出现的问题注册了类New的时候报错未定义 [ 85%]

...round(){ BackGround.super(this); //创建游戏背景1 this.bg1 = new Laya.Sprite(); //加载并显示背景图 this.bg1.loadImage("war/bc.png"); //把背景1放在容器中 this.addChild(this.bg1); //创建游戏背景2 this.bg2 = new Laya.Sprite(); //加载并显示背景图 this.bg2.loadImage("wa...

来源: Laya_社区 发布时间: 20191018

234. 代码创建精灵监听不到事件? [ 85%]

...监听不到事件? var boxstr = "ui/buildsmall.png"; var box = new Laya.Sprite(); var texture = Laya.loader.getRes(boxstr); box.graphics.drawTexture(texture); var arr = {data: StorageRoom.map_storageData[0][0],tag:0}; box.on(Laya.Event.MOUSE_UP,this,this.onclick,[arr]);   var _proto = StorageUIL...

来源: Laya_社区 发布时间: 20171113

235. js继承模式 [ 85%]

...ound'; window[className] = (function() { 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) ...

来源: Laya_社区 发布时间: 20170619

236. 鼠标交互-滑动 [ 85%]

...age.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); this.drawTrack(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; const w = 50; const h = 30; this.button = new Sprite(); this.button.graphics.drawRect(0, 0, w, h, "#FF7F50"); this.button.pivot(w ...

来源: Laya2.0_示例 发布时间: 20251209

237. 分享:截屏! [ 85%]

分享:截屏! package {     import laya.display.Sprite;     import laya.events.Event;     import laya.resource.HTMLCanvas;     import laya.resource.Texture;     import laya.utils.Browser;     import laya.webgl.WebGL;          public class LayaAirDemo {         pri...

来源: Laya_社区 发布时间: 20170424

238. 绘制三角形、多边形及根据数据绘制图案(TypeScript-LayaAir基础篇(TS)-矢量图) [ 85%]

...形,示例代码如下: ```javascript module laya {     import Sprite = Laya.Sprite;     import Stage = Laya.Stage;        export class Sprite_DrawShapes {         private sp: Sprite;            constructor()         {             ...

来源: Laya2.0_文档 发布时间: 20210714

239. 锯齿问题 求破 [ 85%]

锯齿问题 求破  var avatarContainer = new Sprite();  var imgTextTure = Laya.loader.getRes('http://q3.qlogo.cn/g?b=qq&s=100&nk=842256713');               var imgSprite = new Sprite();               imgSprite.x = 300               imgSprite.graphics.drawTexture(img...

来源: Laya_社区 发布时间: 20170209

240. 分享个用美术资源做位图文本的方法。。。 [ 85%]

...效果基本上还行, /* * 位图字体; */ class BPFont extends Laya.Sprite{ // 文本内容 private _text: string; // json数据 private _jsonData: any; // 图片数据 private _imageData: Laya.Texture; // 文本字间距 private _padding: number = 0; // 所有元素; private charSprites: Lay...

来源: Laya_社区 发布时间: 20161014