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

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

1. 屏幕适配-屏幕适配 [ 100%]

...人会放大缩小 var boy = e.target; if (boy.scaleX === 1) { boy.scale(1.2, 1.2); } else { boy.scale(1, 1); } } function onTxtClick(e) { //点击后切换适配模式 e.stopPropagation(); index++; if (index >= modes.length) index = 0; Laya.stage.scaleMode = modes[index]; txt.text = "点击我切...

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

2. 灯光-聚光 [ 80%]

...aya.Vector3(1, 1, 0); spotLight.transform.position = new Laya.Vector3(0.0, 1.2, 0.0); spotLight.direction = new Laya.Vector3(0.15, -1.0, 0.0); spotLight.attenuation = new Laya.Vector3(0.0, 0.0, 0.8); spotLight.range = 6.0; spotLight.spot = 32; var grid = scene.addChild(Laya.Sprite3D.load("../../res/...

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

3. 高级应用-实时阴影 [ 75%]

....Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 0.7, 1.2)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.direction = new Laya.Vector3(0, -0.8, -1); directionLight.color = new La...

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