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

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

1. 射线检测-点击行走 [ 100%]

...t = new Laya.Vector2(); var _position = new Laya.Vector3(0, 0.25, 0); var _quaternion = new Laya.Quaternion(); var _outHitInfo = new Laya.RaycastHit(); function checkHit() { box.transform.position = _position; box.transform.rotation = _quaternion; //从屏幕空间生成射线 point.elements[0] = La...

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

2. 灯光-方向光 [ 94%]

...ComponentByType(Laya.Animator); animator.play(null, 1.0, 40, 70); }); var _quaternion = new Laya.Quaternion(); Laya.timer.frameLoop(1, null, function () { Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion); var _direction = directionLight.direction; Laya.Vector3.transformQuat(_directio...

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

3. 灯光-点光 [ 94%]

...tor.play(null, 1.0, 75, 110); }); var _position = new Laya.Vector3(); var _quaternion = new Laya.Quaternion(); Laya.timer.frameLoop(1, null, function () { Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion); Laya.Vector3.transformQuat(pointLight.transform.position, _quaternion, _positio...

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

4. Mesh网格-网格加载 [ 94%]

... new Laya.Vector3(0.3, 0.3, 0.3); layaMonkey.transform.rotation = new Laya.Quaternion(0.7071068, 0, 0, -0.7071067); class MeshLoad { constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; var scene = Laya.stage.addChild(...

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

5. 灯光-聚光 [ 92%]

...mponentByType(Laya.Animator); animator.play(null, 1.0, 115, 150); }); var _quaternion = new Laya.Quaternion(); var _position = new Laya.Vector3(); Laya.timer.frameLoop(1, null, function () { Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion); Laya.Vector3.transformQuat(spotLight.transf...

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

6. 材质-BlinnPhong-反射贴图 [ 91%]

...tion = new Laya.Vector3(-0.8, 0, 0); teapot1.transform.rotation = new Laya.Quaternion(0.7071068, 0, 0, -0.7071067); var teapot2 = scene.addChild(new Laya.MeshSprite3D(Laya.Mesh.load("../../res/threeDimen/staticModel/teapot/teapot-Teapot001.lm"))); teapot2.transform.position = new Laya.Vector3(0.8, 0...

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

7. 材质-BlinnPhong材质加载 [ 91%]

... new Laya.Vector3(0.3, 0.3, 0.3); layaMonkey.transform.rotation = new Laya.Quaternion(0.7071068, 0, 0, -0.7071067); Laya.timer.frameLoop(1, this, function () { layaMonkey.transform.rotate(this.rotation, false); });class BlinnPhongMaterialLoad { private rotation:Laya.Vector3 = new Laya.Vector3(0, 0.0...

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

8. 高级应用-实时阴影 [ 91%]

.../LayaMonkey/LayaMonkey.lh" ], Laya.Handler.create(this, onComplete)); var _quaternion = new Laya.Quaternion(); Laya.timer.frameLoop(1, null, function () { Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion); var _direction = directionLight.direction; Laya.Vector3.transformQuat(_directio...

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

9. Sprite3D-Sprite3D加载 [ 81%]

...ial.StandardMaterial; import laya.d3.core.scene.Scene; import laya.d3.math.Quaternion; import laya.d3.math.Vector3; import laya.d3.math.Vector4; import laya.d3.resource.Texture2D; import laya.d3.resource.TextureCube; import laya.d3.resource.models.BaseMesh; import laya.d3.resource.models.Mesh; impor...

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

10. 自定义shader-简单shader [ 80%]

... new Laya.Vector3(0.3, 0.3, 0.3); layaMonkey.transform.rotation = new Laya.Quaternion(0.7071068, 0, 0, -0.7071067); var customMaterial = new CustomMaterial(); layaMonkey.meshRender.sharedMaterial = customMaterial; var rotation = new Laya.Vector3(0, 0.01, 0); Laya.timer.frameLoop(1, this, function ()...

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