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

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

1. Sprite-新手引导 [ 100%]

...游戏背景 var maskArea = new Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); guideContainer.addChild(maskArea); //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 interactionArea = new Sprite(); //...

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

2. 其他引擎的Demo-Example_21 [ 94%]

...种开发语言、LayaAirIDE让项目开发更高效。(function() { var Graphics = Laya.Graphics; var Sprite = Laya.Sprite; var Browser = Laya.Browser; var WebGL = Laya.WebGL; var colors = ["#5D0776", "#EC8A49", "#AF3666", "#F6C84C", "#4C779A"]; var colorCount = 0; var isDown = false; var path = []...

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

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

...var textureUrl = (flag = !flag) ? texture1 : texture2; // 更换纹理 ape.graphics.clear(); var texture = Laya.loader.getRes(textureUrl); ape.graphics.drawTexture(texture, 0, 0); // 设置交互区域 ape.size(texture.width, texture.height); } })();module laya { import Sprite = Laya.Sprite; import ...

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

4. 骨骼动画-Spine事件 [ 87%]

...lSprite); mLabelSprite.x = mStartX; mLabelSprite.y = mStartY; mLabelSprite.graphics.clear(); mLabelSprite.graphics.fillText(tEventData.name, 0, 0, "20px Arial", "#ff0000", "center"); Tween.to(mLabelSprite, { y:mStartY - 200 }, 1000, null,Handler.create(this,playEnd)) } function playEnd() { mLabelSpr...

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

5. 混合模式-Lighter [ 84%]

...tion onTweenComplete() { evalBgColor(); } function renderBg() { Laya.stage.graphics.clear(); Laya.stage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, getHexColorString()); } function getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChanne...

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