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

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

391. 屏幕适配-缩放-Extract Fit [ 94%]

...ya.stage.scaleMode = Stage.SCALE_EXACTFIT; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...

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

392. 屏幕适配-缩放-Show All [ 94%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...

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

393. 天理何在,一个轴心点位中心的addChild到一个父容器,父容器的轴线点也是中心 [ 94%]

...器,父容器的轴线点也是中心 constructor(skin:Box) { super(); this.mc = skin; this._name = this.mc.name; this.addChild(this.mc); var xx:number = this.mc.x; var yy:number = this.mc.y; this.x = xx; this.y = yy; //一个轴心点中心的addChild到另一个轴线点位中心的 this.size(77...

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

394. runTime使用(JavaScript-IDE篇(JS)-组件化开发相关) [ 94%]

...直接使用页面定义的属性(通过IDE内var属性定义),比如this.tipLbll,this.scoreLbl,具有代码提示效果** - **建议:如果是页面级的逻辑,需要频繁访问页面内多个元素,使用runtime继承式写法,如果是独立小模块,功能单一,建议用...

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

395. 3D变换 · LayaAir3.3 · 引擎文档 · LAYABOX [ 94%]

...cal: boolean = true): void { if (isLocal) { Matrix4x4.createFromQuaternion(this.localRotation, Transform3D._tempMatrix0); Vector3.transformCoordinate(translation, Transform3D._tempMatrix0, Transform3D._tempVector30); Vector3.add(this.localPosition, Transform3D._tempVector30, this._localPosition); th...

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

396. [LayaAir3]挂在scene3d节点上的脚本,onAwake(){ Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); } 点击就报错 [ 94%]

...cene3d节点上的脚本,onAwake(){ Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); } 点击就报错  挂在scene3d节点上的脚本,onAwake(){ Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown);} 点击就报错 附件 : --> 2023-12-20 添加评论 免费帖 --> 分...

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

397. Timer.clear 方法有问题 [ 94%]

...自: 假如执行域和方法都一样呢,如下: Laya.Timer.loop(100, this, this.fun, null, false); Laya.Timer.loop(200, this, this.fun, null, false); Laya.Timer.loop(300, this, this.fun,  null, false); 上面的代码应该是给this增加了3个定时器吧 2018-07-19 0 0 分享 微博 QZONE...

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

398. 发射射线检测不到,物体有包围盒 [ 94%]

...体确定加包围盒了      onStart(): void {         var self = this;             this.hitResult=new Laya.HitResult();                  Laya.Scene3D.load("res/LayaScene_game/Conventional/game.ls",Laya.Handler.create(null,function(scene3d){             // HelperApp.a = ...

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

399. 物理射线检测(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 94%]

....HitResult = new Laya.HitResult(); var hitResults = []; //是否穿透 if (this.castAll) { //进行射线检测,检测所有碰撞的物体 this.scene.physicsSimulation.raycastAllFromTo(this.from, this.to, this.hitResults); //遍历射线检测的结果 for (i = 0, n = this.hitResults.length; i (图...

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

400. 加载-加载序列 [ 94%]

...der.maxLoader = 1; Laya.loader.load("res/apes/monkey2.png", Handler.create(this, this.onAssetLoaded), null, null, 0, false); Laya.loader.load("res/apes/monkey1.png", Handler.create(this, this.onAssetLoaded), null, null, 1, false); Laya.loader.load("res/apes/monkey0.png", Handler.create(this, this.on...

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