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

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

1. Mesh网格-自定义网格 [ 100%]

.../正方体 var box = scene.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(0.5, 0.5, 0.5))); box.transform.position = new Laya.Vector3(1.5, 0.25, 0.6); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); //球体 var sphere = scene.addChild(new Laya.MeshSprite3D(new Laya.SphereMesh(0.25)...

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

2. 射线检测-选取物体 [ 99%]

.../正方体 var box = scene.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(0.5, 0.5, 0.5))); var boxMat = new Laya.StandardMaterial(); boxMat.diffuseTexture = Laya.Texture2D.load("../../res/threeDimen/texture/layabox.png"); box.meshRender.material = boxMat; box.transform.position = new Laya.Vector3(...

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

3. 计时器-延迟执行 [ 99%]

...setup() { var vGap = 100; button1 = createButton("点我3秒之后 alpha - 0.5"); button1.x = (Laya.stage.width - button1.width) / 2; button1.y = (Laya.stage.height - button1.height - vGap) / 2; Laya.stage.addChild(button1); button1.on(Event.CLICK, this, onDecreaseAlpha1); button2 = createButton("...

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

4. 照相机-多照相机 [ 96%]

....Vector3(0, 0, 1.5)); camera1.normalizedViewport = new Laya.Viewport(0, 0, 0.5, 1.0); var camera2 = scene.addChild(new Laya.Camera( 0, 0.1, 100)); camera2.clearColor = new Laya.Vector4(0.0, 0.0, 1.0, 1.0); camera2.transform.translate(new Laya.Vector3(0, 0, 1.5)); camera2.normalizedViewport = new Lay...

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

5. 骨骼动画-多纹理 [ 89%]

...Armature(1); mArmature.x = mStartX; mArmature.y = mStartY; mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); mArmature.on(Event.STOPPED, this, completeHandler); play(); } function completeHandler() { play(); } function play() { mCurrIndex++; if (mCurrIndex >= mArmature.getAnimNum()) { mCurr...

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

6. 骨骼动画-藤蔓 [ 89%]

...Armature(1); mArmature.x = mStartX; mArmature.y = mStartY; mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); mArmature.on(Event.STOPPED, this, completeHandler); play(); } function completeHandler() { play(); } function play() { mCurrIndex++; if (mCurrIndex >= mArmature.getAnimNum()) { mCurr...

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

7. 骨骼动画-橡胶人 [ 89%]

...mature(1); mArmature.x = mStartX; mArmature.y = mStartY; //mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); mArmature.on(Event.STOPPED, this, completeHandler); play(); } function completeHandler() { play(); } function play() { mCurrIndex++; if (mCurrIndex >= mArmature.getAnimNum()) { mCurr...

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

8. 高级应用-闪光 [ 86%]

... 128; glitterTemplet.maxSegments = 600; var pos1 = new Laya.Vector3(0, 0, -0.5); var pos2 = new Laya.Vector3(0, 0, 0.5); var scaleDelta = 0; var scaleValue = 0; Laya.timer.frameLoop(1, this, loop); function loop() { scaleValue = Math.sin(scaleDelta += 0.01); pos1.elements[0] = pos2.elements[0] = sca...

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

9. 高级应用-渲染纹理 [ 85%]

...Laya.Camera(0, 0.1, 1000)); camera.transform.translate(new Laya.Vector3(0, 0.5, 1)); camera.transform.rotate(new Laya.Vector3(-10, 0, 0), true, false); camera.addComponent(CameraMoveScript); var renderTargetCamera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); renderTargetCamera.transform.translat...

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

10. 骨骼动画-Spine事件 [ 84%]

...Armature(1); mArmature.x = mStartX; mArmature.y = mStartY; mArmature.scale(0.5, 0.5); Laya.stage.addChild(mArmature); mArmature.on(Event.LABEL, this, onEvent); mArmature.on(Event.STOPPED, this, completeHandler); play(); } function completeHandler() { play(); } function play() { mCurrIndex++; if (mCu...

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