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

大约有 6,579 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0189 秒)

341. sprite的rotation设置的位置不一样,子sprite的方向也不一样 [ 87%]

...rotation设置的位置不一样,子sprite的方向也不一样 var s1 = new Laya.Sprite(); var s2 = new Laya.Sprite(); var s3 = new Laya.Sprite(); s1.width = 64; s1.height = 64; s1.pivot(32, 32); s1.rotation = 90; s2.addChild(s3); s1.addChild(s2);    var s1 = new Laya.Sprite(); var s2 = new Lay...

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

342. new BoxMesh(x,y,z)中 的bug? [ 87%]

new BoxMesh(x,y,z)中 的bug? BoxMesh(x,y,z)中x与y对调了?创建一个微信3D的项目,修改其y,比如2,结果发现,并非如愿地让物体在竖直方向上由原来1变成两倍(而是垂直屏幕的方向),结果换了下y与z的值,效果才出来,于是我怀疑是...

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

343. 发布微信小游戏运行错误,Class constructor xx cannot be invoked without 'new' [ 87%]

...信小游戏运行错误,Class constructor xx cannot be invoked without 'new' 最终定位问题原因是给一个3d物体挂在脚本的时候 比如有个脚本是: class Test extends Laya.Script3D{ }   如xxx是一个3D节点,代码里执行: let script:Test = xxx.addComponent(Test);   在w...

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

344. 怎么设置模型高度 [ 87%]

怎么设置模型高度 //添加自定义模型 var boxmesh=new Laya.BoxMesh(0.6, 0.6, 0.6); var box = new Laya.MeshSprite3D(boxmesh); scene.addChild(box); box.transform.translate(_position); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); var material = new Laya.StandardMaterial()...

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

345. 文本-字符限制 [ 87%]

..."\u4e00-\u9fa5"; } createLabel(text) { const Text = Laya.Text; let label = new Text(); Laya.stage.addChild(label); label.text = text; label.color = "white"; label.fontSize = 20; return label; } createInput() { const Input = Laya.Input; let input = new Input(); Laya.stage.addChild(input); input.size(...

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

346. 新手的伤,ReferenceError: CameraMoveScript is not defined [ 87%]

...相关的链接 提交 1 个回复 p799411891 赞同来自: var camera = new Laya.Camera(0, 0.1, 1000); //加载到场景 scene.addChild(camera); //移动摄像机位置 camera.transform.position = new Laya.Vector3(0, 5, 23); //旋转摄像机角度 camera.transform.rotate(new Laya.Vector3(-17, 0, 0...

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

347. 3d 轮廓描边示例改描边颜色无效 [ 87%]

...描边示例改描边颜色无效 BlurEffect.init(); var unlitMaterial = new UnlitMaterial(); unlitMaterial.albedoColor = new Vector4(255,0,0,255); var shurikenMaterial:ShurikenParticleMaterial = new ShurikenParticleMaterial(); shurikenMaterial.color = new Vector4(255,0,0,255);   按我的理解,...

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

348. 加载-销毁Texture使用的图片资源 [ 87%]

...age(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this.aniFly = new Animation(); this.aniFly.loadAtlas(PathFly); this.aniFly.play(); this.aniFly.pos(250, 100); Laya.stage.addChild(this.aniFly); // 创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0, 0, this.bt...

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

349. 输入设备-摇一摇 [ 87%]

...tartShake(); } showShakePic() { const Sprite = Laya.Sprite; let shakePic = new Sprite(); shakePic.loadImage("res/inputDevice/shake.png"); Laya.stage.addChild(shakePic); } showConsoleText() { const Text = Laya.Text; console = new Text(); Laya.stage.addChild(console); console.y = picH + 10; console.wi...

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

350. 【求助】关于Cannot read property 'visible' of undefined问题 [ 87%]

...代码是这样子的: private function showFoods():void{ foodSprite = new Sprite(); Laya.stage.addChild(foodSprite); this.index = 0; foodsList = new Array(); foodsList.push(new Food("菜品1", "1", 0)); foodsList.push(new Food("菜品2", "2", 1)); foodsList.push(new Food("菜品3", "3", 2)); food...

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