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

大约有 7 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0017 秒)

1. Sprite-显示图片 [ 100%]

...; Laya.stage.addChild(ape); ape.loadImage(monkey1Path); // 方法2:使用drawTexture Laya.loader.load(monkey2Path, Laya.Handler.create(this, function () { let monkey2 = Laya.loader.getRes(monkey2Path); let ape2 = new Laya.Sprite(); Laya.stage.addChild(ape2); ape2.graphics.drawTexture(monkey2, 100,...

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

2. Sprite-屏幕截图 [ 97%]

...yTexture = Laya.loader.getRes("res/apes/monkey3.png"); this.aimSp.graphics.drawTexture(this.monkeyTexture,0,0,this.monkeyTexture.width,this.monkeyTexture.height); this.drawImage = new Image(); this.drawImage.size(Browser.clientWidth/2,Browser.clientHeight/2); Laya.stage.addChild(this.drawImage); thi...

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

3. Sprite-切换纹理 [ 94%]

...g) ? monkey1Res : monkey2Res; this.ape.graphics.clear(); this.ape.graphics.drawTexture(monkey, 0, 0); this.ape.size(monkey.width, monkey.height); } } new Sprite_SwitchTexture();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Texture = Laya.Texture; import Handler = Laya....

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

4. Sprite-遮罩-放大镜 [ 88%]

...Res(maskPath); let bg = new Sprite(); Laya.stage.addChild(bg); bg.graphics.drawTexture(bgRes); let bg2 = new Sprite(); Laya.stage.addChild(bg2); bg2.graphics.drawTexture(bgRes); bg2.scale(3, 3); // 创建mask let maskSp = new Sprite(); maskSp.graphics.drawTexture(maskRes); maskSp.pivot(50, 50); // ...

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

5. 滤镜-模糊滤镜 [ 58%]

...ld(this.ape); let texture = Laya.loader.getRes(apePath); this.ape.graphics.drawTexture(texture); this.ape.x = (Laya.stage.width - texture.width) / 2; this.ape.y = (Laya.stage.height - texture.height) / 2; } applayFilter() { // 创建一个模糊滤镜 const BlurFilter = Laya.BlurFilter; // let blurF...

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

6. 滤镜-发光滤镜 [ 56%]

...ld(this.ape); let texture = Laya.loader.getRes(apePath); this.ape.graphics.drawTexture(texture); this.ape.x = (Laya.stage.width - texture.width) / 2; this.ape.y = (Laya.stage.height - texture.height) / 2; } applayFilter() { // 创建一个发光滤镜 const GlowFilter = Laya.GlowFilter; let glowFilt...

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

7. 滤镜-颜色滤镜 [ 45%]

...tage.addChild(ape); apeTexture = Laya.loader.getRes(apePath); ape.graphics.drawTexture(apeTexture); return ape; } } new Filters_Color();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import ColorFilter = Laya.ColorFilter; import Texture = Laya.Texture; import Browser = Laya.Br...

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