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

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

4181. Shader预编译(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 41%]

...hader_GlowingEdge)示例 ```typescript Laya.stage.on(Event.MOUSE_DOWN,this,function():void{ let arr; for(let i = 0;i 生成的相关数据 ```typescript { "GlowingEdgeMaterial":[ { "defineNames":["DIRECTIONLIGHT"], "passIndex":0, "subShaderIndex":0 }, { "defineNames":["DIRECTIONLIGHT","BONE"], "pass...

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

4182. [LayaAirIDE3]应该如何定义@property才能像GTextField一样加载字体? [ 41%]

...项目设置-脚本编译-启动脚本 启动脚本代码: export async function main() {     console.log("Hello LayaAir!");     Laya.loader.load("resources/BitmapFont.fnt", Laya.Loader.FONT).then((res) => {         Laya.Scene.open(Laya.PlayerConfig.startupScene); //可以设置场景...

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

4183. 时间轴动画(JavaScript-LayaAir基础篇(JS)-动画基础) [ 41%]

...ya.loader.load("res/atlas/ui.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //创建一个Animation实例 var tl = new Laya.Animation(); //加载动画文件 tl.loadAnimation("TimeLine.ani"); //添加到舞台 Laya.stage.addChild(tl); //播放Animation动画 tl.play(); } ``` 代...

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

4184. 播放动画(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 41%]

...ani.play("attack"); //等待动画播放完成 Laya.timer.frameLoop(1,this,function(){ //如果当前播放state已经播放完了一次 if(ani.getCurrentAnimatorPlayState().normalizedTime >= 1){ //回到站立状态 ani.play("stand"); } }); } ``` ![](img/6.gif)(图6)

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

4185. laya.d3.core.particleshuriken.module.GradientVelocity_API3.0 [ 41%]

...RandomTwoConstant createByRandomTwoGradient Legend Object literal Variable Function Type alias Class Class with type parameter Constructor Method Enumeration Interface Static method

来源: Laya3.0_api 发布时间: 20231115

4186. 脚本编译 · LayaAir3.4 · 引擎文档 · LAYABOX [ 41%]

...脚本必须是一个异步的main函数,不能修改命名 export async function main() { console.log("Hello LayaAir!"); //示例:加载场景并打开场景 Laya.Scene.open('Scene.ls'); } 避免在 main 函数中编写测试代码,保持启动逻辑简洁 遵循 LayaAir 引擎的启动流程...

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

4187. 小游戏字体bug:使用位图字体,加载解析出错。使用ttf字体在小游戏中无效果 [ 41%]

...成xml加载也不行 Laya.loader.load("res/msyhbd.fnt",new Handler(this,function():void{                                              }),null,Loader.XML) 这样都报错 2018-05-16 0 7 分享 微博 QZONE 微信 薛召 赞同来自: 加入xml解析后,部分机型...

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

4188. android下layabox调用Laya.Texture2D.load报错 [ 41%]

...============================   代码调用: D3Helper.getMaterialByName = function (name) { if (undefined == D3Helper.materialDic[name]) { var material = new Laya.StandardMaterial(); D3Helper.materialDic[name] = material; [b]var testTexture = Laya.Texture2D.load(name);[/b] material.diffuseTexture =...

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

4189. 高级应用-Laya3D与网页混合 [ 41%]

...t; import common.CameraMoveScript; public class Laya3DCombineHtml { public function Laya3DCombineHtml() { __JS__("var div = document.createElement('div')"); __JS__("div.innerHTML = '此内容来源于HTML网页, 可直接在html代码中书写 - h1标签'"); __JS__("document.body.appendChild(div)");...

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

4190. 播放动画(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 40%]

...ani.play("attack"); //等待动画播放完成 Laya.timer.frameLoop(1,this,function(){ //如果当前播放state已经播放完了一次 if(ani.getCurrentAnimatorPlayState().normalizedTime >= 1){ //回到站立状态 ani.play("stand"); } }); } ``` ![](img/6.gif)(图6)

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