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

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

181. workerLoader问题 [ 66%]

workerLoader问题 版本:2.2.0beta1,ts_new 看代码 constructor(){ super();             this.worker = new Worker(WorkerLoader.workerPath); this.worker.onmessage = function(evt:any):void { //接收worker传过来的数据函数 (this as any as WorkerLoader).workerMessage(evt.data); } } 回...

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

182. 我想动态改自定义shader里的值,应该怎么写?? [ 66%]

...erial.js:34 (anonymous) function CustomMaterial() {     CustomMaterial.__super.call(this);     this.setShaderName("CustomShader"); }   Laya.class(CustomMaterial, "CustomMaterial", Laya.BaseMaterial);   CustomMaterial.DIFFUSETEXTURE = 1; CustomMaterial.NORMALTEXTURE = 2; CustomMaterial.ALPHATES...

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

183. 创建[HTMLDivElement]时遇到错误(手动实例一次本组件可定位错误) [ 66%]

...torUI.HtmlText');这句话改成__class(HtmlText,'laya.editorUI.HtmlText',_super);就没问题了

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

184. socket.sent [ 66%]

...i.v1UI{ public socket: Laya.Socket; public byte: Laya.Byte; constructor(){ super(); this.btn1.on(Laya.Event.CLICK,this,this.Btn1On); } Btn1On():void{ // socket.connect(“192.168.0.1.133”,8899); console.log("kjk"); this.socket.send("hello world");//这是发送字符串的形式。 //报错TypeE...

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

185. 关于removeChildren、 destroy和destroyChildren的疑惑 [ 66%]

...   var SightBead = (function () { function sightBeadSprite() { SightBead.super(this); this.name = 'sightBead'; this.graphics.drawCircle(0,0,40,null,'#ff0000',1); this.graphics.drawLine(-45,0,45,0,'#ff0000',1); this.graphics.drawLine(0,45,0,-45,'#ff0000',1); this.alpha = 0; Laya.stage.addChild(this)...

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

186. 重复背景,全方向地图拖动Demo [ 66%]

...图宽高 1800 class WorldPage extends ui.WorldPageUI{ constructor (x,y) { super() this.maxX = 149850 this.maxY = 97500 this.offsetX = x * 150 this.offsetY = y * 150 this.downMouseX = 0 this.downMouseY = 0 Laya.loader.load(['bg/world_bg.jpg']) Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.mouseDown)...

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

187. 更新LayaNative0.9.15需要注意的问题: [ 66%]

...Ani类中的构造函数,代码如下: public function GraphicsAni() { super(); if (Render.isConchNode) { this["drawSkin"] = function(skin:*):void { skin.transform || (skin.transform = Matrix.EMPTY); __JS__("this._addCmd([skin])"); this.setSkinMesh&&this.setSkinMesh( skin._ps, skin.mVBDa...

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

188. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 66%]

...sionBoll extends Laya.Sprite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.BoxCollider = this._boll1.addComponent(laya.physics.Bo...

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

189. Laya2.7.1 射线提示rayCast未定义 [ 66%]

...定义 export default class click3d extends Laya.Script3D{ constructor() { super(); //创建场景 this.scene = Laya.stage.addChild(new Laya.Scene3D()); //添加相机 this.camera = (this.scene.addChild(new Laya.Camera(0, 0.1, 100))); this.camera.transform.translate(new Laya.Vector3(0, 0.7, 5)); thi...

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

190. image在相应loaded的时候,无法正确获取高度 [ 66%]

...oleUIDynamic extends Laya.Image { matterBody: Matter.Body; constructor() { super(); this.on('start', this, this.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matte...

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