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

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

961. laya1.0 绘制物理引擎? [ 73%]

...raw.SetSprite(Laya.Render.canvas.getContext("2d")); debugDraw.SetDrawScale(this.worldScale); debugDraw.SetFillAlpha(0.5); debugDraw.SetFlags(PDynamic.b2DebugDraw.e_shapeBit | PDynamic.b2DebugDraw.e_jointBit); this.world.SetDebugDraw(debugDraw); Laya.timer.loop(1000/60,this,this.updateWorld); }    ...

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

962. 想用camera做一个类似照相机的功能 [ 73%]

...          //选择渲染目标为纹理             this.renderTargetCamera.renderTarget = new RenderTexture(Laya.stage.width, Laya.stage.height);             //渲染顺序             this.renderTargetCamera.renderingOrder = -1;         ...

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

963. 关于下拉列表的选择触发 [ 73%]

关于下拉列表的选择触发 this.small_map.selectHandler = new Laya.Handler(this, onSelect_small); this.big_map.selectHandler = new Laya.Handler(this, onSelect_big); function onSelect_small(e) { Laya.big_switch = 0 Laya.maptype = "small" this.now_map.text = "当前地图:" + this.small_map....

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

964. 这个圆形遮罩问题怎么解决 [ 73%]

...遮罩问题怎么解决 我的代码时这样的 var sp = new Sprite(); this.addChild(sp);         this.img = new Sprite(); sp.graphics.drawCircle(0,0,50,"transparent");         this.addChild(this.img); this.img.mark = sp;   我看被人也都是这样写的不知道为什么我的...

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

965. 物理形状扫描检测(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 73%]

...ya.SphereColliderShape(0.5); //使用球型碰撞器进行形状检测 if (this.castAll) { //进行形状检测,检测所有碰撞的物体 this.scene.physicsSimulation.shapeCastAll(sphereCollider, this.from, this.to, this.hitResults); for (i = 0, n = this.hitResults.length; i 该示例中射线摆...

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

966. 2.0如何射线检测 [ 73%]

...请: 与内容相关的链接 提交 1 个回复 158*****364 赞同来自: this.mousePos = new Laya.Vector2(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY); //鼠标点击屏幕产生射线         this.camera.viewportPointToRay(this.mousePos, this.ray);      var ph...

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

967. Laya.Scene.open这个功能可以统一一下吗 [ 73%]

...为并不是所有的页面,都需要在ui中使用var变量。变量的this使用方式,主要是给UI继承类来使用的,如果我们不使用UI继承类。那么对于UI挂脚本的需求,根本用不上varthis.xxx。那么此时,文件模式足够使用,还可以减少包体的...

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

968. 请问用laya的tab模板创建的tab,为啥没有点击事件啊?而且tab标签点击后没有一直处于按下状态 [ 73%]

...0); Laya.loader.load("res/atlas/template/Tab栏.json", Laya.Handler.create(this, onAssetLoaded2), null, Loader.ATLAS); function onAssetLoaded2() {     Laya.class(MyBoot, "MyBootClass", MyBootPage2UI);     UI = new MyBootClass();     Laya.stage.addChild(UI); } function MyBoot() {     MyBoot.s...

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

969. 微信小游戏图片加载不出来 [ 73%]

...pe: Laya.Loader.ATLAS }, ]; Laya.loader.load(resArray, Laya.Handler.create(this, this.onLoaded)); Laya.loader.create("ui/BG/play-bg.png", Laya.Handler.create(this, this.onLoaded)); 在微信小游戏里面可以显示,但是实体机子上就无法显示"ui/BG/play-bg.png"这一张图,其他图...

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

970. 物理形状扫描检测(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 73%]

...ya.SphereColliderShape(0.5); //使用球型碰撞器进行形状检测 if (this.castAll) { //进行形状检测,检测所有碰撞的物体 this.scene.physicsSimulation.shapeCastAll(sphereCollider, this.from, this.to, this.hitResults); for (i = 0, n = this.hitResults.length; i 该示例中射线摆...

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