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

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

381. 计时器-延迟执行 [ 78%]

... = Laya.Sprite; let w = 300, h = 60; let button = new Sprite(); Laya.stage.addChild(button); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } onDecreaseAlpha1(e) { const Event = Laya.E...

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

382. 官方DynamicBatchTest照做为什么动态合不了批? [ 78%]

...Mode = Laya.Stage.SCREEN_NONE; Laya.Stat.show();   var scene = Laya.stage.addChild(new Laya.Scene3D()); scene.ambientColor = new Laya.Vector3(1, 1, 1);   var camera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); camera.transform.translate(new Laya.Vector3(0, 6.2, 10.5)); camera.transform.rotate(...

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

383. Sprite-根据数据绘制路径 [ 78%]

...(); })(); function drawPentagram() { var canvas = new Sprite(); Laya.stage.addChild(canvas); var path = []; path.push(0, -130); path.push(33, -33); path.push(137, -30); path.push(55, 32); path.push(85, 130); path.push(0, 73); path.push(-85, 130); path.push(-55, 32); path.push(-137, -30); path.push(-...

来源: Laya_示例 发布时间: 20251209

384. List中放TextInput,当list滚动的时候,复用会有问题,input中的内容会乱,尤其有输入框focus的情况下 [ 78%]

...Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.img.graphics.drawRect(0, 0, WID, HEI - 2, "#eeeeee"); this.label = new Label(); this.addChild(this.label); this.input = new TextInput(); this.addChild(this.input); this.input.x = 50; this.input.text =...

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

385. UI-TextArea [ 78%]

... ta.padding = "70,8,8,8"; var scaleFactor = Browser.pixelRatio; Laya.stage.addChild(ta); } })();module laya { import Stage = Laya.Stage; import TextArea = Laya.TextArea; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_TextArea { private skin: ...

来源: Laya_示例 发布时间: 20251209

386. 文本-自动换行 [ 78%]

...extWidth >> 1; txt.y = Laya.stage.height - txt.textHeight >> 1; Laya.stage.addChild(txt); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_WordWrap { constructor() { // 不支持WebGL时自动切换...

来源: Laya_示例 发布时间: 20251209

387. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 78%]

...png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); this.addChild(this.bg); //因为上面的图片是截取的 所以右边可能没有图片了 这里补一个 this.rightBg = new laya.display.Sprite(); this.rightBg.graphics.drawTexture(laya.resource.Texture.createFromTexture(this...

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

388. Sprite-根据数据绘制路径 [ 78%]

...entagram(); } drawPentagram() { let canvas = new Laya.Sprite(); Laya.stage.addChild(canvas); let path = []; path.push(0, -130); path.push(33, -33); path.push(137, -30); path.push(55, 32); path.push(85, 130); path.push(0, 73); path.push(-85, 130); path.push(-55, 32); path.push(-137, -30); path.push(-...

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

389. UI-ColorPicker [ 78%]

...hangeHandler = new Handler(this, onChangeColor, [colorPicker]); Laya.stage.addChild(colorPicker); onChangeColor(colorPicker); } function onChangeColor(colorPicker) { console.log(colorPicker.selectedColor); } })();module laya { import Stage = Laya.Stage; import ColorPicker = Laya.ColorPicker; import ...

来源: Laya_示例 发布时间: 20251209

390. 关于DIalog的蒙版问题 [ 78%]

...关于DIalog的蒙版问题 var ccc:CCCView=new CCCView(); ccc.popup(); sp.addChild(ccc); Laya.stage.addChild(ccc);     按照这个方法解决了 弹出的层级问题,  但是第二次使用Dialog弹出的时候蒙版还是不可见 2017-01-11 添加评论 免费帖 --> 分享 微博 QZONE ...

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