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

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

91. 关于Pivot和Mask联合使用时的显示问题再次提交 [ 80%]

...tage.addChild(bg2);         bg2.scale(3, 3);         bg2.pivot(50,50)         //创建mask         maskSp = new Sprite();         maskSp.loadImage("../../res/mask.png");         maskSp.pivot(50, 50);//只是添加了这个         //设置mask         ...

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

92. 缓动-逐字缓动 [ 80%]

...let offset = Laya.stage.width - w >> 1; let endY = Laya.stage.height / 2 - 50; let demoString = "LayaBox"; for (let i = 0, len = demoString.length; i > 1; var endY: number = Laya.stage.height / 2 - 50; var demoString: string = "LayaBox"; for (var i: number = 0, len: number = demoString.length; i > 1...

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

93. layaair 3d 世界坐标辅助线怎么搞? [ 80%]

...eSprite3D(3)); lineXYZ.addLine(new Laya.Vector3(0, 0, 0), new Laya.Vector3(50, 0, 0), Laya.Color.RED, Laya.Color.RED); lineXYZ.addLine(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 50, 0), Laya.Color.GREEN, Laya.Color.GREEN); lineXYZ.addLine(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 50), La...

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

94. 物理Bodies绑定Laya.Sprite [ 80%]

...skin = new Laya.Sprite().loadImage("images/qiang_001.png"); gun_skin.scale(50, 50); gun_skin.pivot(gun_skin.width / 2, gun_skin.height / 2); gun = Bodies.rectangle(150, 150, 50, 50, { frictionAir: 0.5, //空气摩擦力 density: 0.68, // 密度 layaSprite: gun_skin, // 绑定一个laya的Sprite, 不...

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

95. 绘制直线与折线(TypeScript-LayaAir基础篇(TS)-矢量图) [ 80%]

...    constructor()         {             Laya.init(500, 300, WebGL);             this.drawSomething();         }           private drawSomething(): void {             this.sp = new Sprite();             Laya.stage.ad...

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

96. 绘制直线与折线(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 80%]

...n Sprite_DrawShapes()         {             Laya.init(500, 300, WebGL);             drawSomething();         }           private function drawSomething():void         {             sp = new Sprite();            ...

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

97. laya微信打包问题很多呀,就是加了一些绘图api,就报错 [ 79%]

...00", 3); //画连续直线 this.sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5); //画曲线 this.sp.graphics.drawCurves(352, 58, [0, 0, 19, -100, 39, 0, 58, 100, 78, 0, 97, -100, 117, 0, 136, 100, 156, 0], "#ff0000", 5); //画矩形 this.sp.graphics.drawRect(10...

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

98. 使用方向键 控制精灵在格子中移动 [ 79%]

...){ this.direction = this.keyList[0]; if(this.direction==37) this.next_x -= 50; if(this.direction==38) this.next_y -= 50; if(this.direction==39) this.next_x += 50; if(this.direction==40) this.next_y += 50; } 原理说一下, 就是当按键按下时, 就会把这个键的keycode 存储到一个...

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

99. hitArea用法问题 [ 79%]

...区域的坐标是相对于对象自己的 比如说往左、往上扩充50像素。应该是Rectangle(-50,-50,w,h) 2017-09-20 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Loongman 相关问题 发起问题须知,必看!!!不...

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

100. 图片使用pivotX参数后,再对图片添加遮罩会出现效果不对。 [ 79%]

...tage.addChild(bg2);         bg2.scale(3, 3);         bg2.pivot(50,50)         //创建mask         maskSp = new Sprite();         maskSp.loadImage("../../res/mask.png");         maskSp.pivot(50, 50);//只是添加了这个         //设置mask         ...

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