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

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

3941. laya.d3.math.Quaternion_API3.0 [ 45%]

...元数 Returns void set set(x: number, y: number, z: number, w: number): this Defined in laya/d3/math/Quaternion.ts:297 设置四元数的值。 Parameters x: number X值。 y: number Y值。 z: number Z值。 w: number Returns this 返回四元数 setValue setValue(x: number, y: number, z: number, ...

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

3942. laya2.0调试时候Error: "abort Cannot enlarge memory arrays.这个问题定位到了Physics3D,要怎么解决呀 [ 45%]

...回复吧,打开 laya.d3.js (2.1.1beta的版本在13790行),这样 this._defaultPhysicsMemory=512;

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

3943. 寻路系统(ActionScript-3D基础(AS3)-LayaAir3D之高级应用) [ 45%]

...径数据 ```typescript //监听鼠标抬起 Laya.stage.on(Event.MOUSE_UP, this, function():void { index = 0; //获取每次生成路径 getGridIndex(path[curPathIndex % pointCount].x, path[curPathIndex++ % pointCount].z, startPoint); getGridIndex(path[nextPathIndex % pointCount].x,path[nextPathInde...

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

3944. Laya.SoundManager.playSound()问题,任务不是当前标签停止播放,当任务回到当前标签页,不能恢复播放 [ 45%]

...SoundChannel = Laya.SoundManager.playSound(url, loops, Laya.Handler.create(this, () => { resolve(soundChannel); }), soundClass, startTime); }); } 我使用Promise封装了一下音效播放,正常使用await播放没啥的问题,可以做同步异步转换,出问题是的使用await 的时...

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

3945. 2.x引擎项目升级说明 · LayaAir3.4 · 引擎文档 · LAYABOX [ 45%]

...事件监听方式和Laya.Script命名函数方式处理输入。例如: this.aNode.on(Laya.Event.CLICK, ()=> { console.log("clicked"); }); class MyScript extends Laya.Script { //脚本事件 onMouseClick(e:Event) { console.log("clicked"); } } aNode.addComponent(MyScript); 以上两种方式是...

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

3946. 从Unity中编辑并导出摄像机(ActionScript-3D基础(AS3)-LayaAir3D之Camera) [ 44%]

...载角色动画资源 Laya.loader.create("monkey/monkey.ls",Handler.create(this,onSceneOK)); } private function onSceneOK():void { //添加3D场景 var scene:Scene3D = Laya.loader.getRes("monkey/monkey.ls"); Laya.stage.addChild(scene); //从场景中获取摄像机 var camera:Camera = scene.getChild...

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

3947. drawcall优化问题 [ 44%]

... 2018-01-22 23:37 Laya.loader.load( 'res/atlas/comp.json', Handler.create(this, function(){ container = new Laya.Sprite(); var x = 0,y =80; Laya.stage.addChild(container); for(var i=0;i<1200;i++){ var role = new Laya.Sprite(); x = x+0.1; y = y+0.1 role.x = x; role.y = y; role.loadImage('comp/bg.p...

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

3948. laya.ui.Radio_API3.0 [ 44%]

...背景颜色。 Laya.loader.load("resource/ui/button.png", Handler.create(this,onLoadComplete)); } private function onLoadComplete():void { trace("资源加载完成!"); var button:Button = new Button("resource/ui/button.png","label");//创建一个 Button 实例对象 button ,传入它的皮肤sk...

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

3949. 多摄像机窗口的使用(ActionScript-3D基础(AS3)-LayaAir3D之Camera) [ 44%]

...赋值。 > 动态修改摄影机视口 ```typescript Laya.timer.once(3000,this,function ():void { //获取第一个摄影的视口 var viewport1:Viewport = camera1.normalizedViewport; //修改参数 viewport1.width = 0.2; //重新赋值是视口 camera1.normalizedViewport = viewport1; var viewport2...

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

3950. 如何为灯光添加阴影(JavaScript-3D基础(JS)-LayaAir3D之灯光) [ 44%]

...Shadow = true; ....... // A sphere cast/receive shadow. var sphereSprite = this.addPBRSphere(Laya.PrimitiveMesh.createSphere(0.1), new Laya.Vector3(0, 0.2, 0.5), scene); sphereSprite.meshRenderer.castShadow = true; sphereSprite.meshRenderer.receiveShadow = true; ``` 然后来看下效果。 ![](img/...

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