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

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

731. 怎么像canvas那样做到每次循环去清空一次画布,我发现每次画的时候他会把上一次的坐标也画出来,导致变形了,该如何让他每次累加的同时清空上次的路径 [ 46%]

...路径 var sp; var x = 0; export default class Scene extends Laya.Sprite{ constructor(){ super(); Laya.init(500, 300, Laya.WebGL); var bg = new Laya.Sprite(); bg.loadImage("comp/hunter.jpg"); this.addChild(bg); Laya.timer.frameLoop(1,this,this.move); // drawSomething(); } move() { sp = new Laya.Spri...

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

732. 微信小游戏无法用bin目录调试,只能发布后在release/wxgame/中调试 [ 46%]

...on/",  运行报错 gameContext?id=1:58 libs/laya.ui.js: TypeError: Class constructor Component cannot be invoked without 'new' at new Widget (laya.ui.js:201) at laya.ui.js:349 at laya.ui.js:1 at wrapFn (gameContext?id=1:51) at require (VM505 WAGameSubContext.js:2) at a (VM505 WAGameSubContext.js:2...

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

733. laya.d3.math.Vector2 [ 46%]

...opertypublic var x:NumberX轴坐标yproperty public var y:NumberY轴坐标Constructor DetailVector2()Constructorpublic function Vector2(x:Number = 0, y:Number = 0) 创建一个 Vector2 实例。 Parameters x:Number (default = 0) — X轴坐标。  y:Number (default = 0) — Y轴坐标。 Method De...

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

734. 引用3d物理引擎失败,有文件丢失 Laya3D._physics3D.btVector3 找不到 [ 46%]

...sics3D.btVector3 找不到 TypeError: Laya3D._physics3D.btVector3 is not a constructor preload.js:55 at new PhysicsSimulation (file:///E:/ycyheroH5/ycyZYWZW/Client/bin/js/bundle.js:12452:27) at new Scene3D (file:///E:/ycyheroH5/ycyZYWZW/Client/bin/js/bundle.js:69360:28) at BoBingPanelView.__proto.in...

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

735. laya.sprite精灵无缝拼接地图,会出现黑线跟白线,使用laya的2.0.1beta版本 [ 46%]

...ss MapSprite extends Laya.Image{ isShow:boolean = false; name:string = ""; constructor() { super(); }  loadImageAndPos(name:string,posX:number,posY:number):void { this.name = name; this.anchorX = 0; this.anchorY = 0; this.x = posX; //这里是256*整数倍的叠加 每张图片都是256*256大小...

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

736. box2d动态创建绑定多个关节报错 Node:the component is singleton,can't add the second one. [ 46%]

...;         if (comp.isSingleton && this.getComponent((comp).constructor))             throw "Node:the component is singleton,can't add the second one.";         this._addComponentInstance(comp);         return comp;     }   暂时的处理方式是把i...

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

737. Spine 间隔一段时间卡顿5000毫秒左右,期间GPU占用极高, Demo已上传 [ 46%]

... Templet = Laya.Templet; import Skeleton = Laya.Skeleton;  class Main {  constructor() { WebGL.enable(); Laya.init(Browser.width, Browser.height); Stat.show();  //棋子动画 this.genSpine("res/spine/ludo_qizidongzuo.skel", Laya.Handler.create(this, (templet: Laya.SpineTemplet) => {  //模...

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

738. laya.device.geolocation.Geolocation [ 46%]

...y,意味着getCurentPosition()直到位置可用时才会返回信息。 Constructor DetailGeolocation()Constructorpublic function Geolocation()Method DetailclearWatch()method public static function clearWatch(id:int):void 移除watchPosition安装的指定处理器。 Parameters id:intgetCurrentP...

来源: laya_api 发布时间: 20170929

739. laya.device.geolocation.Geolocation [ 46%]

...y,意味着getCurentPosition()直到位置可用时才会返回信息。 Constructor DetailGeolocation()Constructorpublic function Geolocation()Method DetailclearWatch()method public static function clearWatch(id:int):void 移除watchPosition安装的指定处理器。 Parameters id:intgetCurrentP...

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

740. 图片像素精准点击问题! [ 46%]

...   下面是我的代码处理: class demo { private down:Laya.Image; constructor() { // 鼠标事件 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.onMouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.onMouseUp, [true]); } /**...

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