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

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

431. 滤镜-颜色滤镜 [ 93%]

...a.stage.bgColor = "#232628"; Laya.loader.load(apePath, Laya.Handler.create(this, this.setup)); } setup() { this.normalizeApe(); this.makeRedApe(); this.grayingApe(); } normalizeApe() { let originalApe = this.createApe(); originalApe.x = (Laya.stage.width - apeTexture.width * 3) / 2; originalApe.y = ...

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

432. 高级应用-闪光 [ 93%]

..., 0, 0.5); var scaleDelta = 0; var scaleValue = 0; Laya.timer.frameLoop(1, this, loop); function loop() { scaleValue = Math.sin(scaleDelta += 0.01); pos1.elements[0] = pos2.elements[0] = scaleValue * 13; pos1.elements[1] = Math.sin(scaleValue * 20) * 2; pos2.elements[1] = Math.sin(scaleValue * 20) *...

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

433. 物理引擎-布 [ 93%]

...)(); function setup() { initMatter(); initWorld(); Laya.stage.on("resize", this, onResize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render...

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

434. timer.loop帧率高于物理帧率移动父级导致子物体本地坐标异常 [ 93%]

...ameRate = Laya.Stage.FRAME_SLOW;         Laya.Stat.show();         this.scene = Laya.stage.addChild(new Laya.Scene3D());                  Laya.timer.loop(1, this, this.loopfun);     }     loopfun(){         this.lastT = Date.now();         let dis = 1;         if(!th...

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

435. 3D模型怎么删除?没回切换页面原来的模型都还在? [ 93%]

...面并继承了各自的ui.xxxUI   2.新建了个场景添加到B页面 this.scene = new Laya.Scene(); this.addChild(this.scene); 3.新建模型,并且添加B页面的3D场景中 var map: Laya.Sprite3D = Laya.Sprite3D.load("cj/cj.lh"); this.scene.addChild(map);   4.切换页面 private playGame():...

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

436. 类似古文显示方式脚本,文字垂直显示,可以控制显示速度出现打字效果等 [ 93%]

...alSpace: number = 5; private sprite: Laya.Sprite; constructor() { super(); this.sprite = new Laya.Sprite(); } drawText(x: number, y: number, w: number, h: number) { console.log(2222); var j = 0;//控制行列 var printNumber = 0;//当前输出字数 var fonts = this.fontSize + "px" + " " +this.font ...

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

437. 模型不同实例,AnimationNode位置只有第一个会更新的问题 [ 93%]

...题 同一模型创建不同Sprite3D实例,Animation在更新的时候 this._curAvatarNodeDatas=clip._getAvatarDataWithCache(this._avatar,this._cachePlayRate,frameIndex); if (!this._curAvatarNodeDatas){ this._curAvatarNodeDatas=[]; this._curAvatarNodeDatas.length=this._avatarNodes.length; clip._ca...

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

438. 使用3D摄像机 · LayaAir3.0文档 · LAYABOX [ 93%]

...* 此方法为虚方法,使用时重写覆盖即可 */ onAwake(): void { this.curpos = new Laya.Vector3(); } /** * 第一次执行update之前执行,只会执行一次 * 此方法为虚方法,使用时重写覆盖即可 */ onStart(): void { this.camera = this.owner as Laya.Camera; if (this.tar...

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

439. 感觉实例之间是关联的,求指教。(已解决) [ 93%]

...面; */ var Panel1 = (function (_super) { function Panel1() { Panel1.super(this); //this.poke_a.x=0; } Laya.class(Panel1, "Panel1", _super); var _proto = Panel1.prototype; //======================================= //将指定的牌显示到桌面上 //======================================= _proto.s...

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

440. 计时器-间隔循环 [ 93%]

...rotateTimeBasedText.x, rotateTimeBasedText.y + vGap); Laya.timer.loop(200, this, animateTimeBased); Laya.timer.frameLoop(2, this, animateFrameRateBased); } function createText(text, x, y) { var t = new Text(); t.text = text; t.fontSize = 30; t.color = "white"; t.bold = true; t.pivot(t.width / 2, t.h...

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