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

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

671. 高级应用-闪光 [ 66%]

...haredMaterial; glitterMaterial.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/layabox.png"); glitterMaterial.albedo = new Laya.Vector4(1.3, 1.3, 1.3, 1); glitterTemplet.lifeTime = 1.3; glitterTemplet.minSegmentDistance = 0.1; glitterTemplet.minInterpDistance = 0.6; glitterTemplet.maxSler...

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

672. 新人求教!!! [ 66%]

... class Main{ //需要切换的图片资源路径 private monkey1:string = "res/img/monkey1.png"; private monkey2:string = "res/img/monkey2.png"; //切换状态 private flag:boolean = false; private img:Laya.Sprite; constructor() {       //初始化引擎       Laya.init(1334,750);      //...

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

673. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 66%]

...ge后获取宽高: ```javascript var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直...

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

674. SWF问题,转换了以后我按照示例做了个测试,SWF文件没有显示请帮我看看 [ 66%]

...现SWF文件且没有出现报错提示。 SWF文件和json 文件均放在res/atlas/swf/这个目录里面。     var MovieClip = Laya.MovieClip; (function() { var MC = new MovieClip(); Laya.stage.addChild(MC); MC.load("res/atlas/swf/cesi.swf",true); })(); 附件 : --> cesi.zip 2018-03-30 添加...

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

675. UNITY导出的模型旋转不了 [ 66%]

...reenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); Laya.Scene3D.load('/1/res/SampleScene.ls', Laya.Handler.create(null, function(scene1){ let scene = Laya.stage.addChild(scene1); Laya.Sprite3D.load("/1/res/SampleScene.lh", Laya.Handler.create(null, function(sp) { //let obj = sp; let obj = scene.ad...

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

676. 调试正常但发布后,index.html在浏览器打开出现跨源受限的问题 [ 66%]

... Image from origin 'file://' has been blocked from loading by Cross-Origin Resource Sharing policy: Invalid response. Origin 'null' is therefore not allowed access. laya.core.min.js:6 [warn]Retry to load: E:/laya/layatest/release/layaweb/1.0.0/res/img/image.png index.html:1 Image from origin 'file:/...

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

677. 区块地图-等角地图 [ 66%]

...int = Laya.Point; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Laya.Handler.create(this, this.mapLoaded), null, new Point(1600, 800)); } onStageClick() { let p = new Laya.Point(0, 0); ...

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

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

... 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 = scene3d;             //...

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

679. 在微信小游戏中使用BitmapFont会导致报错. [ 66%]

...nit(); //程序入口 Laya.init(600, 400); //激活资源版本控制 Laya.ResourceVersion.enable("version.json", Handler.create(null, beginLoad), Laya.ResourceVersion.FILENAME_VERSION);  function beginLoad(){     let timerFont = new Laya.BitmapFont();     timerFont.loadFont('res/timerfont....

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

680. 在微信小游戏真机wx.onShow和wx.onHide中的currTimer的问题 [ 66%]

...wWX); MiniAdpter.window.wx.onHide(_onHideWX); } private function _onShowWX(res:*):void { console.log("wx.onShow:",res); console.log(Laya.timer.currTimer); } private function _onHideWX():void { console.log("wx.onHide:"); console.log(Laya.timer.currTimer); } wx.onShow.currTimer == wx.onHide.currTimer ...

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