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

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

341. matter中layasprite怎么改变图片大小? [ 81%]

matter中layasprite怎么改变图片大小?   var roleOptions: any = {mass:1, restitution:0.8, layaSprite: sprite}; var role: any = Matter.Bodies.rectangle(180, 450, 334, 522, roleOptions);   代码类似这样的:sprite是我传入的图片,要怎么改变这张图片的大小? 2018-08-...

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

342. 关于环形进度条,进度不能重置问题 [ 81%]

...per(this); this.angle = 0; Laya.timer.loop(200,this,this.loadProgress) var Sprite = Laya.Sprite; this.box = new Sprite(); this.box.cacheAs = "bitmap"; this.box.pos(0,0); this.say.addChild(this.box); this.draw = new Sprite(); this.box.addChild(this.draw); this.draw.graphics.drawPie(this.say.width/2, ...

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

343. 分享:TiledMap设置viewport后黑屏问题! [ 81%]

...可能会被裁剪掉,设置方式如下:package { import laya.display.Sprite; import laya.display.Stage; import laya.map.TiledMap; import laya.maths.Rectangle; import laya.utils.Handler; public class LayaAirDemo { private var tiledMap:TiledMap; public function LayaAirDemo() { // 不支持WebGL...

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

344. event自定义事件的问题 [ 81%]

...成功,下面是testDemo LayaSample类: package { import laya.display.Sprite; public class LayaSample extends Sprite{ public static var event:String = "event"; public function LayaSample() { super(); //初始化引擎 Laya.init(1136, 640); var re:Revent = new Revent(); var de:DisEvent = new DisE...

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

345. 我竟然被射线检测这个小功能给难了一天了 [ 81%]

...nsole.log("相机位置",(this.owner.getChildByName("Main Camera") as Laya.Sprite3D).transform.position) } onStart(): void {     Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.onMouseDownCb) } private onMouseDownCb(e:Laya.Event):void{ console.log("点击屏幕") // console.log("相机位置",this.c...

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

346. 如何获得box单独每个面的material [ 81%]

...xWidth, ConstValue.boxHeight); var box = this.parent.addChild(new Laya.MeshSprite3D(mesh)); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); box.transform.position = new Laya.Vector3(ConstValue.boxOutScreen,ConstValue.boxHeight/2,0); var material = new Laya.StandardMaterial(); materia...

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

347. 绘制矩形与圆角矩形(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 81%]

...形,示例代码如下: ```java package {     import laya.display.Sprite;     import laya.display.Stage;            public class Sprite_DrawShapes     {         private var sp:Sprite;                    public function Sprite_DrawShapes() ...

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

348. 3d模型预加载后二次调用报错 [ 81%]

...二次调用报错 使用Laya.loader.create 预加载,第一次用Laya.Sprite3D.load("xxx.lh").getChildAt(0) 可以创建,第二次再调用Laya.Sprite3D.load("xxx.lh").getChildAt(0) 创建就返回undefined了,help~ 2018-03-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...

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

349. 多重遮罩显示异常 [ 81%]

...者消失,测试代码如下 export default class ClipView extends Laya.Sprite { constructor() { super(); this.init(); } init() { let bg = new Laya.Sprite(); bg.graphics.drawRect(0, 0, 500, 500, '#aaa'); this.addChild(bg); this.panel = new Laya.Panel(); this.panel.width = 500; this.panel.height = ...

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

350. 关于平行光渲染投影问题,求解惑 [ 81%]

....SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; let ape: Laya.Sprite = new Laya.Sprite(); Laya.stage.addChild(ape); ape.loadImage("../laya/assets/fish_bg.png"); //开启统计信息 Laya.Stat.show(); //添加3D场景 let scene: Laya.Scene = Laya.stage.addChild(new Laya.Scene()) as Laya....

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