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

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

141. 性能测试-卡通人物2 [ 89%]

...ation.loadImages(images); animation.interval = 70; animation.play(0); this.addChild(animation); } Character.prototype.createBloodBar = function() { bloodBar = new Sprite(); bloodBar.loadImage("../../res/cartoon2/blood_1_r.png"); bloodBar.x = 20; this.addChild(bloodBar); } Character.prototype.createN...

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

142. 文本-多行输入 [ 89%]

...nput() { const Input = Laya.Input; let inputText = new Input(); Laya.stage.addChild(inputText); //多行输入 inputText.multiline = true; inputText.wordWrap = true; inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = Laya.stage.height - inputText.height >>...

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

143. 3D加载不了 [ 89%]

...at.show();         //添加3D场景         var scene = Laya.stage.addChild(new Laya.Scene());         //添加照相机         var camera = (scene.addChild(new Laya.Camera(0, 0.1, 10000)));         camera.transform.translate(new Laya.Vector3(0, 5, 5));         camera.transf...

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

144. 圆形的头像怎么实现? [ 89%]

...是效果是这样的 :     代码 : var point = new Sprite(); this.addChild(point); point.graphics.drawCircle(88, 86, 40, 'transparent');   var tx = new Sprite(); tx.loadImage(PATH + 'tx.jpg'); tx.scale(0.3,0.3); this.addChild(tx); tx.mask = point; 2017-09-28 0 2 分享 微博 QZONE 微信 ...

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

145. 文本-自动换行 [ 89%]

...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_示例 发布时间: 20240929

146. Sprite-根据数据绘制路径 [ 89%]

...(); })(); 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_示例 发布时间: 20240929

147. Sprite-根据数据绘制路径 [ 89%]

...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_示例 发布时间: 20240929

148. 使用 addChild 加载界面后,绑定事件报错 [ 89%]

使用 addChild 加载界面后,绑定事件报错 onConfigLoaded(): void {         //加载IDE指定的场景         //GameConfig.startScene && Laya.Scene.open(GameConfig.startScene);         Main.gameStart = new GameStart(); Laya.stage.addChild(Main.gameStart); ...

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

149. 文本-自动换行 [ 89%]

... } createText() { const Text = Laya.Text; var txt = new Text(); Laya.stage.addChild(txt); txt.text = "Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!"; txt.width = 300; txt.fontSize = 40; txt.color = "#ffffff"; // 设置文本...

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

150. Tween.to 执行失败 [ 89%]

...tch(dir){ case "up": hero_p1.roleAni.play(0,true,"p1_walk_up"); Laya.stage.addChild(hero_p1.roleAni); break ; case "down": hero_p1.roleAni.play(0,true,"p1_walk_down"); Laya.stage.addChild(hero_p1.roleAni); break ; case "left": hero_p1.roleAni.play(0,true,"p1_walk_left"); Laya.stage.addChild(hero_p1....

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