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

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

591. 相对屏幕坐标 [ 62%]

相对屏幕坐标 目前做一款 贪吃蛇游戏。。一个Sprite 上面 加载了 十多张 1024的图片  大地图   地图上有些道具和豆, 因为这个豆或者道具 可能在 几千的像素点上!怎么可以转化成 相对于屏幕的坐标点? 2017-05-04 添加评论 免...

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

592. 输入文本组件 · LayaAir3.0文档 · LAYABOX [ 62%]

...export class TextInputControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextInput } ) public txtin: Laya.TextInput; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake():...

来源: Laya3.0_文档 发布时间: 20230629

593. 如何获取图片每个像素点的RGB? [ 62%]

...啦,我给你看下我的三行代码~ let my_canvas: HTMLCanvas = the_sprite.drawToCanvas(Game_Parameter.game_width, Game_Parameter.game_height, 0, 0); //把精灵绘制到canvas上面let my_texture: Texture = new Texture(my_canvas); //使用htmlCanvas创建Texture let pixels = my_texture.getPixe...

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

594. 关于mouseover的问题 [ 62%]

....alignV=Stage.ALIGN_TOP;                          var sp:Sprite=new Sprite();             sp.width=100;             sp.height=100;             sp.graphics.drawRect(0,0,100,100,"#ff0000");             sp.on(Event.MOUSE_OVER,this,onMouse);     ...

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

595. 3D基础显示对象 · LayaAir3.0文档 · LAYABOX [ 62%]

...用于创建简单网格 注意:这里还不是最终场景中看到的 Sprite3D。 用 createBox 来举例,看下API是如何创建网格的: /** * 创建Box网格。 * @param long 半径 * @param height 垂直层数 * @param width 水平层数 * @return */ static createBox(long: number = 1, ...

来源: Laya3.0_文档 发布时间: 20240624

596. 缓动-简单的Tween [ 62%]

...ya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Sprite = Laya.Sprite, Tween = Laya.Tween; let terminalX = 200; let characterA = this.createCharacter("res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; let characterB = this.createCharacter("res/c...

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

597. 写消消乐游戏, 如何在tiledMap格子中添加精灵? [ 62%]

...s.tMap.createMap("res/map/map.json",viewRect); // 精灵 var sp = new Laya.Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#FF0000", "#0000FF", 1) sp.zOrder = 1000;     请问这里如何把精灵添加到地图中?看文档没看明白啊, 其他回答仿写都无效果. 2018-07-21 添加评论 ...

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

598. WebGL 绘制图形报错 [ 62%]

...D的fillRect报错 代码如下: Laya.init(1136, 640, WebGL ); var mask :Sprite = new Sprite(); mask.graphics.save(); mask.graphics.drawRect( 0, 0, Laya.stage.width, Laya.stage.height, 0xff0000 ); mask.graphics.restore(); mask.x = 0; mask.y = 0; Laya.stage.addChild( mask ); 麻烦看下是什么...

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

599. 请问,怎么写代码能直接调用canvas 内的发光滤镜? [ 62%]

...博 QZONE 微信 王 坤 赞同来自: 原生接口绘制,可以绘制到Sprite上吗? 像spbg.graphics.drawPath一样 2018-06-21 0 1 分享 微博 QZONE 微信 王 坤 赞同来自: 直接绘制到画布上,那不是被前面所有的sprite遮挡了吗? 这个不是我想要的啊 2018-06-2...

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

600. 事件绑定不触发bug [ 62%]

...定不触发bug         var Event   = Laya.Event;         var Sprite  = Laya.Sprite;         var Stage   = Laya.Stage;         var Texture = Laya.Texture;         var Browser = Laya.Browser;         var Handler = Laya.Handler;         var WebGL   = Laya.WebGL;...

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