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

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

191. 发布ios,sprite无法设置宽高 [ 87%]

发布ios,sprite无法设置宽高 在浏览器上可以运行,但是发布到ios端,场景无法显示,并且在其他项目中,new一个Sprite或者Image的时候,不能设置宽高,只能scale,这个demo只有一个场景,一张图片,但是在app上,黑屏,什么都没...

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

192. 屏幕适配-屏幕适配 [ 87%]

...种开发语言、LayaAirIDE让项目开发更高效。(function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Text = Laya.Text; var Event = Laya.Event; var Image = Laya.Image; var WebGL = Laya.WebGL; //所有适配模式 var modes = ["noscale", "exactfit", "showall", "noborder", "full",...

来源: Laya_示例 发布时间: 20251209

193. 缓动-时间线 [ 87%]

...; Laya.stage.on(Event.KEY_DOWN, this, this.keyDown); } createApe() { const Sprite = Laya.Sprite; this.target = new Sprite(); Laya.stage.addChild(this.target); this.target.loadImage("res/apes/monkey2.png"); this.target.pivot(55, 72); this.target.pos(100,100); } createTimerLine() { const TimeLine = La...

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

194. 鼠标交互-自定义事件 [ 86%]

...age.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; this.sp = new Sprite(); this.sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); this.sp.pivot(100, 100); this.sp.x = Laya.stage.width / 2; this.sp.y =...

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

195. 后期处理 · LayaAir3.3 · 引擎文档 · LAYABOX [ 86%]

...() export class Script extends Laya.Script { //获取节点 @property(Laya.Sprite) public sp: Laya.Sprite; onAwake(): void { //创建后期处理实例 this.sp.postProcess = new Laya.PostProcess2D(); //创建变色效果 let colorEffect2D = new Laya.ColorEffect2D(); //创建后期处理效果数组 ...

来源: Laya3.0_文档 发布时间: 20251010

196. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 86%]

...显示。 > ## 一、遮罩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_文档 发布时间: 20210715

197. 加了两个遮罩后的动画,帧频只有10了,有demo,有项目,有源码 [ 86%]

...ya.init(1920,950,Laya.WebGL); Laya.Stat.show(); const container = new Laya.Sprite(); Laya.stage.addChild(container); const mask = new Laya.Sprite(); mask.graphics.drawPoly(0, 0, [0, 0, 484, 0, 1483, 950, 0, 950], '#ff0000'); // container.addChild(mask); container.mask = mask; const ani = new Laya.An...

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

198. 将字节数组转为图片 [ 86%]

...ng = Browser.window.URL.createObjectURL(blob);             var sp:Sprite = new Sprite();             sp.loadImage(url);             addChild(sp);             sp.pos(100, 200);             trace("url=" + url);//blob:file%3A///1c4effc4-4022-4ab5-8feb-e39ff7...

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

199. 3D+2D场景截屏,在不同浏览器显示效果不一致 [ 86%]

...s = Laya.Browser.document.getElementById("layaCanvas"); var spi = new Laya.Sprite(); var spi1 = new Laya.Sprite(); var spi2 = new Laya.Sprite(); this.tempTexture2D.loadImageSource(cans, true); spi.texture = spi1.texture = spi2.texture = this.tempTexture; //创建模糊滤镜实例 var blurFilter = n...

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

200. Laya集成Matter.js库layaSprite水平翻转无法显示的bug [ 86%]

Laya集成Matter.js库layaSprite水平翻转无法显示的bug layaair版本:1.7.19.1beta 项目类型:全部(目前测试的有JS和TS) 环境:Win7 x64 问题描述: laya集成matters.js, 1、创建一个sprite,水平翻转sprite(scalex=-1) 2、创建matter.js刚体body,并且设...

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