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

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

281. 飞机大战地图滚动报错,麻烦看下? [ 84%]

...ion bg_rolling() {     box = new laya.display.Sprite();     Laya.stage.addChild(box);     bg1 = new laya.display.Sprite();     bg1.loadImage("res/bg1.png");     box.addChild(bg1);     bg2 = new laya.display.Sprite();     bg2.loadImage("res/bg1.png");     bg2.pos(650, 0);     box.ad...

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

282. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 84%]

..., this.onComplete)); } onComplete(){ //记载场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //加载相机 var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, fal...

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

283. 场景切换问题 [ 84%]

...; gamewbz.removeSelf(); hallwbz = hallwbz || new HallViewwbz(); Laya.stage.addChild(hallwbz);   这样写 有没有问题,,,用这样的方式写  ,我切换 了 3个页面  ,然后发现这3个页面都还存在,,这样是不是有问题 附件 : --> 2017-10-24 添加评论 免费...

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

284. 骨骼动画-多纹理 [ 84%]

...装(相当耗费内存) mArmature = mFactory.buildArmature(1); Laya.stage.addChild(mArmature); mArmature.pos(mStartX, mStartY); mArmature.scale(0.5, 0.5); mArmature.on(Laya.Event.STOPPED, this, this.completeHandler); this.play(); } completeHandler() { this.play(); } play() { mCurrIndex++; let aniNum...

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

285. 文本在屏幕不垂直居中 [ 84%]

...idth /2 ,tx.height / 2); tx.align="center"; tx.valign="middle"; Laya.stage.addChild(tx); } })()   2017-11-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Monica - 知识达人 赞同来自: 修改后的代码...

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

286. 请问video可以像其他组件一样使用addChild添加到panel中么 [ 84%]

请问video可以像其他组件一样使用addChild添加到panel中么 我的页面开发这样:stage->panel->panel中内容,stage宽高375*603,panel宽高375*603,pannel中内容宽高3000*603,也就是说panel中内容靠panel左右滑动才能观看,我想把一些视频放进...

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

287. 我想用代码来绘制一个3D球如何弄呢?看我写的 [ 84%]

...eenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); // camera.transform.translate(new Laya.Vector3(0, 0.8, 1.0)); // camera.transform.rotate(new Laya.Vector3(-30, 0, 0), true, false); camera...

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

288. 文本基础样式(TypeScript-LayaAir基础篇(TS)-文本) [ 84%]

...xt属性赋值 txt.text = "hello_world"; txt.color = "#ffffff"; Laya.stage.addChild(txt); } } } new laya.HelloLayabox(); ``` 这个时候我们就可以看到txt已经添加到舞台上了,显示了txt中白色的hello_world。 接着我们给文本添加一些其他的字体样式,粗体、斜...

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

289. 鼠标交互-双指旋转(多点触控) [ 84%]

...2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].st...

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

290. 物理引擎-牛顿摆 [ 84%]

...esize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render = LayaRender.create( { engine: engine, container: gameWorld, width: stageWidth, hei...

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