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

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

231. 资源加载(TypeScript-3D基础(TS)-LayaAir3D之资源加载) [ 85%]

...l, function(tex) { //使用纹理 var earth1 = scene.addChild(new Laya.MeshSprite3D(PrimitiveMesh.createSphere(5, 32, 32))); earth1.transform.translate(new Laya.Vector3(10, 20, -8)); var earthMat = new Laya.BlinnPhongMaterial(); earthMat.albedoTexture = tex; earthMat.albedoIntensity = 1; earth1.mesh...

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

232. 设置遮罩(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

233. 性能测试-虫子(慎入) [ 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_示例 发布时间: 20260303

234. 飞机大战出现的问题注册了类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

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%]

...监听不到事件? 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

237. 鼠标交互-滑动 [ 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_示例 发布时间: 20260303

238. 分享:截屏! [ 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

239. 绘制三角形、多边形及根据数据绘制图案(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

240. 锯齿问题 求破 [ 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