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

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

361. 文本-Overflow [ 81%]

..."; txt.size(300, 50); txt.fontSize = 20; txt.color = "#ffffff"; Laya.stage.addChild(txt); return txt; } } new Text_Overflow();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_Overflow { constructor() { // ...

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

362. 资源加载(JavaScript-3D基础(JS)-LayaAir3D之资源加载) [ 81%]

...create(this,function(scene) { //加载完成获取到了Scene3d Laya.stage.addChild(scene); //获取摄像机 var camera = scene.getChildByName("Main Camera"); //清除摄像机的标记 camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; //添加光照 var directionLight = scene.addChild(new Laya.Dir...

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

363. UI弹窗 · LayaAir3.0文档 · LAYABOX [ 81%]

...Dialog(); var bg: Laya.Image = new Laya.Image(this.assets[0]); this.dialog.addChild(bg); var button: Laya.Button = new Laya.Button(this.assets[1]); button.name = Laya.Dialog.CLOSE; button.pos(this.DIALOG_WIDTH - this.CLOSE_BTN_WIDTH - this.CLOSE_BTN_PADDING, this.CLOSE_BTN_PADDING); this.dialog.addC...

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

364. 把摄像机添加到一个物体上,然后绕着这个物体旋转 [ 81%]

...t3D,给它添加一个cameraMoveScript脚本组件,然后​cameraroot.addchild创建一个摄像机,设置好摄像机的默认位置角度使其朝向物体就行了 var map: Laya.Sprite3D = Laya.loader.getRes("cj/cj.lh"); this.scene.addChild(map); var cjd0: Laya.Sprite3D = new Laya.Sprite3D...

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

365. 为什么laya2.0加载不了.lm文件? [ 81%]

....create(this, this.completeHandler)); completeHandler(): void { Laya.stage.addChild(Laya.loader.getRes("LayaScene_Scene/Scene.ls")); Laya.stage.addChild(Laya.loader.getRes("LayaScene_Scene/Assets/BakerHouse/Models/Baker_house-Baker_house.lm")) } 在第二个addchild的时候报错了!!!! 201...

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

366. "Background is not defined"怎么会没定义呢???求救 [ 81%]

... Game(){ Laya.init(600,800); this.bg = new window.Background(); Laya.stage.addChild(this.bg); })(); })();Background.js var Background = (function(_super){ function Background(){ Background.super(this); this.bg1 = new Laya.Sprite(); this.bg1.loadImage("res/background.png"); this.addChild(this.bg1); }...

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

367. timer无法执行 [ 81%]

...D = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createSphere(1)); this.scene1.addChild(ball);   ball.transform.position = new Laya.Vector3((Math.random() - 0.5) * 2, 10, 17); //添加刚体   ball.addComponent(Laya.PhysicsCollider); let ballrigid: Laya.Rigidbody3D = ball.addComponent(Laya.Rigidbody3D...

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

368. 文本-滚动文本 [ 81%]

...st Text = Laya.Text, Event = Laya.Event; this.txt = new Text(); Laya.stage.addChild(this.txt); this.txt.overflow = Text.SCROLL; this.txt.text = "Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!\n" + "Layabox是HTML5引擎技术...

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

369. 资源加载 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

....skin = url; //ui组件直接设置skin也可以 img.pos(x, y); this.owner.addChild(img); }); } } 1.2 带类型的加载方式 有的时候,网络资源没有后缀名,又或者,图片xxx.png并非是当成Texture使用,需要被定义为TextureCube。所以,这些时候需要通过类型...

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

370. 鼠标交互-键盘交互 [ 81%]

..."; this.logger.align = 'center'; this.logger.valign = 'middle'; Laya.stage.addChild(this.logger); } } } new laya.Interaction_Keyboard();package { import laya.display.Stage; import laya.display.Text; import laya.events.Event; import laya.utils.Browser; import laya.webgl.WebGL; public class Interactio...

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