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

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

421. 材质-BlinnPhong-法线贴图 [ 61%]

...; directionLight.direction = new Laya.Vector3(0, -0.8, -1); directionLight.color = new Laya.Vector3(1, 1, 1); Laya.loader.create("../../res/threeDimen/staticModel/lizardCal/lizardCaclute.lh", Laya.Handler.create(this, onComplete)); function onComplete() { var monster1 = this.scene.addChild(Laya.Spri...

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

422. 用raycast选取实体,hitresult始终是false [ 61%]

...Laya.PixelLineSprite3D; lineSprite.addLine(ray.origin, ray.direction, Laya.Color.BLUE, Laya.Color.RED); this.lineSprite.addChild(lineSprite); if (outHitResult.succeeded) { //删除碰撞到的物体 // this.text.text = "碰撞到了" + outHitResult.collider.owner.name; console.log("碰撞到物体...

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

423. laya.utils.PerfHUD [ 61%]

...Intance(comp:Component):* 添加组件实例。 Node  addDataDef(id:int, color:int, name:String, scale:Number):voidPerfHUD addInputChild(node:Node):NodeNode callLater(method:Function, args:Array = null):void 延迟运行指定的函数。 在控件被显示在屏幕之前调用,一般用于延...

来源: Laya2.0_api 发布时间: 20190513

424. 2D物理-桥 [ 60%]

...Laya.Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBridge(); this.eventListener(); } createBridge() { const startPosX = 250, startPosY = 450; let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody();...

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

425. 鼠标交互-键盘交互 [ 60%]

...lignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { listenKeyboard(); createLogger(); Laya.timer.frameLoop(1, this, keyboardInspector); } function listenKeyboard() { keyDownList = []; //添加键盘按下事件,一直按着...

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

426. 2D自由形态光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 60%]

...色 this.lightComp.falloffRange = 3; // 增大衰减范围 this.lightComp.color = new Laya.Color(1.0, 0.9, 0.6, 1); // 设置灯光颜色 this.lightComp.intensity = this.intensity; // 应用灯光强度 } onUpdate(): void { // 实现灯光旋转动画 this.lightComp.lightRotation += this.rotateSpeed...

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

427. 文本-滚动文本 [ 60%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createText(); })(); function createText() { txt = new Text(); txt.overflow = Text.SCROLL; txt.text = "Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开...

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

428. LayaAir下TTF字体的使用方式? [ 60%]

... Laya.stage.addChild(sp); var text:Text=new Text(); text.fontSize=40; text.color="#FF00FF"; text.text="哈哈哈哈哈哈哈哈哈哈哈哈哈哈"; text.font="hu" text.pos(600,600); Laya.stage.addChild(text); Laya.timer.once(1000,this,onLoop); } private function onLoop():void { var text:Text=new Tex...

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

429. FlashDevelop中第一个程序“Hello Layabox”(ActionScript-LayaAir基础篇(AS3)-快速上手) [ 60%]

...      //设置文本颜色为白色,默认颜色为黑色    txt.color = '#ffffff';         //将文本内容添加到舞台     Laya.stage.addChild(txt);   }  } } ``` ​ **步骤三**:完成代码编写后,使用之前定义的编译快捷键(Alt+F5),把AS3代...

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

430. 文本-滚动文本 [ 60%]

...age.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createText(); } createText() { const Text = Laya.Text, Event = Laya.Event; this.txt = new Text(); Laya.stage.addChild(this.txt); this.txt.overflow = Text.SCROLL; this.txt.text = "Layabox是HTML5引擎...

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