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

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

931. 判断玩家在地面还在空中 [ 74%]

...物体代码   onGround():any{         let bc:Laya.BoxColliderShape = this.rigidbody.colliderShape as Laya.BoxColliderShape         let y:number = this.transform.position.y-bc.sizeY/2 - 0.05         let vec3:Laya.Vector3 = new Laya.Vector3(this.transform.position.x,y,this.transform.posi...

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

932. TiledMap加载报错 relativePath为空 [ 74%]

...eateMap("res/maps/scence1.json",new Rectangle(0,0,800, 800),Handler.create(this,onMapLoaded)); function onMapLoaded(){ console.log("地图加载完成"); }scence1.json { "height":25, "infinite":false, "layers":[ { "data":[7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 1, 1, 7, ...

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

933. TieldMap is not counstructer [ 74%]

...is not counstructer 代码如下: //创建TiledMap实例         this._tMap = new TiledMap();         //创建Rectangle实例,视口区域         var viewRect:Laya.Rectangle = new Laya.Rectangle();         console.log(this._tMap);         //创建T...

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

934. MovieClip 给SWF播放的对象 [ 74%]

...才对啊? Sprite.as public function set transform(value:Matrix):void { this._tfChanged = false; var m:Matrix = this._transform || (this._transform = _createTransform()); value.copyTo(m); _setTransform(m); //设置transform时重置x,y if (value) { _x = value.tx; _y = value.ty; value.tx = value.ty...

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

935. 3d项目base64 截图成绩有偏差 [ 74%]

...,2d没问题,3d有偏差,层级感觉反过来刷了一遍。    this.an_img.on(Laya.Event.MOUSE_DOWN, this, function (): void {                 console.log("点击");                 var htmlCanvas:Laya.HTMLCanvas = Laya.stage.drawToCanvas(1334, 750, 0, 0);//...

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

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

...Laya3.0.3 的VideoNode不支持在微信浏览器中播放 let videoNode = this.owner.getChildByName("VideoNode") as Laya.VideoNode; videoNode.source = 'xxx.mp4'; videoNode.play(); // 上面代码在PC端安卓苹果等自带浏览器支持视频播放,但是在微信浏览器无任何显示。 le...

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

937. 调用Sprite的drawToCanvas怎么返回的是uint8array [ 74%]

...         {                          var _canvas:* =this.drawToCanvas(this.width,this.height,0,0);             var base64:*  = _canvas._canvas.source.toDataURL();                         return base64;          } 附件 : --> 2017-04-01 添...

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

938. app构建后在真机中运行报错 [ 74%]

...     function Prefab(){         /**@private */         this.json=null;     }      __class(Prefab,'laya.components.Prefab');     var __proto=Prefab.prototype;     /**     *通过预制创建实例     */     __proto.create=function(){         i...

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

939. 缓动-逐字缓动 [ 74%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Text = Laya.Text, Tween = Laya.Tween, Ease = Laya.Ease; let w = 400; let offset = Laya.stage.width - w >> 1; let endY = Laya.stage.height / 2 - 50; let demoString = "LayaBox"; for (let i = 0, l...

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

940. 关于下拉列表的选择触发 [ 74%]

关于下拉列表的选择触发 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