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

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

71. Laya.Handler.create和new Laya.Handler有啥区别 [ 94%]

Laya.Handler.create和new Laya.Handler有啥区别 this.sList.mouseHandler = Laya.Handler.create(this, this.onMouse);//鼠标响应事件 this.sList.mouseHandler = new Laya.Handler(this, this.onMouse) ; // 鼠标事件响应. 2017-04-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

72. layabox 只支持一个灯光? [ 94%]

...te addLoadCCDLight() { //聚光灯 this.loadCCDlight = this.scene.addChild(new Laya.SpotLight()) as Laya.SpotLight; this.loadCCDlight.color = new Laya.Vector3(1, 1, 1); this.loadCCDlight.transform.position = new Laya.Vector3(-1, 1.2, 0.0); this.loadCCDlight.direction = new Laya.Vector3(0.15, -1.0, 0...

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

73. viewportPointToRay产生的射线始终有偏差,是为什么? [ 94%]

...是为什么? 我使用这种方式构造了一个射线: let point = new Vector2(Laya.stage.mouseX, Laya.stage.mouseY); camera.viewportPointToRay(point, this._ray);然后发现ray构造出来的位置始终不对,我沿着ray的方向放了一组3D物体,和从屏幕点击下去的位置始...

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

74. 可以手动new 一个Laya.Stage么,怎么切换? [ 94%]

可以手动new 一个Laya.Stage么,怎么切换? 2017-05-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: stage可以new。但是舞台一般只有一个,不需要你去new,你...

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

75. Cannot read property 'rayCast' of undefined [ 94%]

...s indexscene extends Laya.Script { constructor(){ super(); this.rotation = new Laya.Vector3(0, 0.01, 0); this.point = new Laya.Vector2(); this.ray = new Laya.Ray(new Laya.Vector3(),new Laya.Vector3()); //1.开启第四个参数 let config3D = new Laya.Config3D(); config3D.isAlpha = true; Laya3D.init...

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

76. laya3d物体碰撞与触发检测的问题 [ 94%]

...("test/TestScene.scene"); //添加3D场景 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, 3, 3)); camera.transform.rotate(new Laya.Vector3(-30, 0, 0), true, false); cam...

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

77. Laya.Pool用法 [ 94%]

...  constructor() {             // Pool.recover(ProtoPool.PROTO_HEAD, new com.bigao.h5.proto.Head());             // Pool.recover(ProtoPool.PROTO_BINARY_REQUEST, new com.bigao.h5.proto.BinaryRequest());             // Pool.recover(ProtoPool.PROTO_PARAMS, new com.bigao.h5.proto.Param...

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

78. Sprite-新手引导 [ 94%]

...createPage() { const Sprite = Laya.Sprite; // 绘制底图 gameContainer = new Sprite(); Laya.stage.addChild(gameContainer); gameContainer.loadImage("res/guide/crazy_snowball.png"); gameContainer.on(Laya.Event.CLICK, this, this.nextStep); // 引导所在容器 guideContainer = new Sprite(); Laya.sta...

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

79. 区块地图-等角地图 [ 94%]

....TiledMap, Rectangle = Laya.Rectangle, Point = Laya.Point; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Laya.Handler.create(this, this.mapLoaded), null, new Point(1600, 800)); } onStag...

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

80. 直接new sprite 跟graphics.drawTexture 有什么区别 [ 94%]

直接new sprite 跟graphics.drawTexture 有什么区别 var downScoreTexture = Laya.loader.getRes("img/game/kc/score.png"); var _downScore = new Sprite(); _downScore.pos(150,130); _downScore.graphics.drawTexture(downScoreTexture); touPane.addChild(_downScore); 这个东西,跟 直接new sprite ...

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