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

大约有 3,979 项符合查询结果, 库内数据总量为 30,910 项。 (搜索耗时: 0.0075 秒)

2321. laya绘制图形进行缩放的时候有问题 [ 61%]

...amp; this.scaleX >= 0.5) { this.scaleX -= 0.1; this.scaleY -= 0.1; for (var i = 0; i < this.nodes.length; i++) { this.nodes[i].scaleX += 0.1; this.nodes[i].scaleY += 0.1; } } else if (e.delta < 0 && this.scaleX <= 1.5) { this.scaleX += 0.1; this.scaleY += 0.1; for (var i = 0; i &...

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

2322. Cannot read property 'rayCast' of undefined [ 61%]

...useY; //产生射线 this.camera.viewportPointToRay(this.point, this.ray); var out = new Laya.CannonHitResult(); this.scene.cannonPhysicsSimulation.rayCast(this.ray,out); if(out.succeeded) { console.log(111); } } } 附件 : --> web.rar 2020-09-03 添加评论 免费帖 --> 分享 微博 QZONE 微信...

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

2323. 如何使用vscode编译laya项目 [ 61%]

... //获取Node插件和工作路径 let ideModuleDir; let workSpaceDir; for(var argv of process.argv) { if(argv.indexOf("--cwd=") == 0) { ideModuleDir = argv.split("=")[1] + "\\node_modules\\"; } else if(argv.indexOf("--gulpfile=") == 0) { workSpaceDir = argv.split("=")[1].replace("/.laya/compile.js"...

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

2324. 分享-js资源进度加载 [ 61%]

分享-js资源进度加载 var ui_Socket: Socket; // 程序入口 class GameMain { //进度UI Progress: Progress; Socket: Socket; arr = [ { url: "images/1.jpg", type: Laya.Loader.IMAGE } , { url: "images/2.jpg", type: Laya.Loader.IMAGE } , { url: "images/3.jpg", type: Laya.Loader.IMAGE } , { url: ...

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

2325. 官方提供的关系链代码执行报错,是不是wx的sharedCanvas不是Laya的canvas导致的问题 [ 61%]

...的代码 微信主域代码: Laya.timer.once(400,this,function():void{ var rankTexture:Texture = new Texture(Browser.window.sharedCanvas); rankTexture.bitmap.alwaysChange = true;//小游戏使用,非常费,每帧刷新 rankSprite2.graphics.drawTexture(rankTexture,5,78,rankTexture.width,rankTe...

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

2326. 分享:关于自定义场景继承的实现 [ 60%]

...t {base} from "../script/base/BaseScene"; import BaseScene=base.BaseScene; var REG: Function = Laya.ClassUtils.regClass; export module ui { export class CustomSceneUI extends BaseScene { public txt_hello:Laya.Label; constructor(){ super()} createChildren():void { super.createChildren(); this.loadSce...

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

2327. 用npm的protobuf导出的ts代码。然后用import { } from "" 运行到这里没反应,不继续执行,也不报错。 [ 60%]

...rea.js"; export function testProto():void { console.log("call testProto"); var ProtobufUtil = com.bee.protobuf; let msg = ProtobufUtil.ProtoArea.create(); let buffer = ProtobufUtil.ProtoArea.encode(msg).finish(); let decode = ProtobufUtil.ProtoArea.decode(buffer); console.log("test"); console.log(`b...

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

2328. [0]Laya3.0.3 的VideoNode不支持在微信浏览器中播放 [ 60%]

...了一个简单的demo,按上述修改在微信浏览器上测试正常:var videoTexTure:Laya.VideoTexture = new Laya.VideoTexture(); videoTexTure.source = "https://www.layaair.com/3.x/de ... 3B%3B videoTexTure.on(Laya.Event.READY,this,()=>{ videoTexTure.play(); var image:Laya.Image = new Laya....

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

2329. laya.ui.List [ 60%]

...果可以当作图片源,再次绘制到其他Sprite里面,示例: var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 var sp:Sprite = new Sprite();//创建精灵 sp.graphics.drawTexture(htmlCanvas.getTexture());//把截图绘制到精灵上 Laya.st...

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

2330. 射线检测报错,outHitInfo.sprite3D=null; [ 60%]

...前射线碰撞的信息是:" + this.hit.sprite3D.name); //摄像机位置 var position:Laya.Vector3=new Laya.Vector3(this.camera.position.x, 0, this.camera.position.z); //开始绘制矢量3D精灵,类型为线型 this.phasorSprite3D.begin(Laya.WebGLContext.LINES, this.camera); //根据射线的...

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