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

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

981. Sprite设置mask属性为什么显示是透明的?怎样才能显示正常? [ 73%]

... Laya.stage.width, Laya.stage.height, "#000000"); mask.on(Laya.Event.CLICK,this,chick);   function chick(){ mask.destroy(); gameContainer.destroy(); }   gameContainer.mask=mask; Laya.stage.addChild(gameContainer);  })();  })(); 附件 : --> 2020-06-03 添加评论 免费帖 --> 分享 微博 QZO...

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

982. 销毁 new 出的带有 PhysicsCollider 的正方体模型报错 [ 73%]

销毁 new 出的带有 PhysicsCollider 的正方体模型报错 this.box = scene.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(1, 1, 1))) as Laya.MeshSprite3D; this.box.addComponent(Laya.PhysicsCollider); this.box.destroy();引擎版本 LayaAirIDE2.0_beta.5 报错: Uncaught TypeError: Cannot r...

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

983. DirectionLight介绍(JavaScript-3D基础(JS)-LayaAir3D之灯光) [ 73%]

...常用来模拟固定方向的太阳光。 ```typescript //创建方向光 this.directionLight = this.scene.addChild(new Laya.DirectionLight()); //设置灯光颜色 this.directionLight.color = new Laya.Vector3(1, 1, 1); //设置灯光方向 var mat = this.directionLight.transform.worldMatrix; mat.s...

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

984. 位图字体的制作与使用(TypeScript-LayaAir基础篇(TS)-文本) [ 73%]

...yFont"; constructor() {super();} onAwake(): void { //加载位位图字体 this.loadBitmapFont(); } /** * 实例化位图字体类,并加载位图字体 */ loadBitmapFont(): void { let bitmapFont: Laya.BitmapFont = new Laya.BitmapFont(); bitmapFont.loadFont("res/vvv.fnt", new Laya.Handler(this, th...

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

985. 显卡驱动停止响应,且大概率蓝屏,原来是Handler惹的祸,但原因是什么 [ 73%]

...eteHandler:Handler; public function A() { completeHandler = Handler.create(this,onComplete,[this]); completeHandler.run(); new B().load(completeHandler); trace('A',completeHandler.method == null,completeHandler['_id']) } private function onComplete():void { trace('haha') } } }package { import laya.u...

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

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

...mic 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 = Matter.Bodies....

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

987. socket.sent [ 73%]

...e: Laya.Loader.ATLAS}, ]; Laya.loader.load (uiResArr , Laya.Handler.create(this,this.onLoded));      //加载图片 this.byte = new Laya.Byte(); //这里我们采用小端 this.byte.endian = Laya.Byte.LITTLE_ENDIAN; this.socket = new Laya.Socket(); //这里我们采用小端 this.socket.endian =...

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

988. 微信小游戏开放域(ActionScript-小游戏适配文档-微信小游戏) [ 73%]

...aya.loader.load(["json/reward.json","res/atlas/test.atlas"],Handler.create(this,function(){ //加载完成 //使用接口将图集透传到子域 MiniAdpter.sendAtlasToOpenDataContext("res/atlas/test.atlas"); //使用接口将json投促函到子域 MiniAdpter.sendJsonDataToDataContext("json/reward.j...

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

989. 加载解析ByteArray问题 [ 73%]

...载解析: var loader:Loader = new Loader(); loader.on(Event.COMPLETE, this, loadEnd); loader.load("atlas/byarr.byte",Loader.BUFFER); private function loadEnd(data:*):void { if (data is ArrayBuffer) { var byts:Byte = new Byte(data); byts.pos = 0; var fr:int = byts.getByte(); var a:int = byts.getIn...

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

990. 物理射线检测(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 73%]

...ory=3d&group=Physics3D&name=PhysicsWorld_RayShapeCast)); ```typescript this.hitResult = new Laya.HitResult(); this.hitResults= []; //是否穿透 if (this.castAll) { //进行射线检测,检测所有碰撞的物体 this.scene.physicsSimulation.raycastAllFromTo(this.from, this.to, this.hitResults...

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