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

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

1. 性能测试-卡通人物2 [ 100%]

...cter function Character(images) { Character.super(this); Character.WIDTH = 110; Character.HEIGHT = 110; var bloodBar; var animation; var nameLabel; Character.prototype.createAnimation = function(images) { animation = new Animation(); animation.loadImages(images); animation.interval = 70; animation.p...

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

2. 鼠标交互-双指旋转(多点触控) [ 97%]

...touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX); Laya.stage.on(Event.MOUSE_MOVE, this, onMouseMove); } } function onMouseMove(e) { var touches = e.touches; if (touches && touches.length == 2) { var nowRadian = Math.atan2( t...

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

3. UI-Tree [ 97%]

...类对应的json对象: // {"child": [{"type": "Clip", "props": {"x": "13", "y": "0", "left": "12", "height": "24", "name": "selectBox", "skin": "ui/clip_selectBox.png", "right": "0", "clipY": "2"}}, {"type": "Clip", "props": {"y": "4", "x": "14", "name": "folder", "clipX": "1", "skin": "ui/clip_t...

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

4. 射线检测-射线检测 [ 97%]

...()); //初始化照相机 var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 1, 3)); camera.clearColor = null; Laya.loader.create(["../../res/threeDimen/skinModel/NvWu/NvWu-shenminvwu.lm", "../../res/threeDimen/skinModel/CunMinNan/CunMinNan-cunm...

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

5. 文本-多行输入 [ 96%]

...inputText.multiline = true; inputText.wordWrap = true; inputText.size(350, 100); inputText.x = Laya.stage.width - inputText.width >> 1; inputText.y = Laya.stage.height - inputText.height >> 1; inputText.padding = [2, 2, 2, 2]; inputText.bgColor = "#666666"; inputText.color = "#ffffff"; inputText.fon...

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

6. 自定义shader-地形shader [ 95%]

...ne/terrain/terrain.ls")); var camera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); camera.transform.rotate(new Laya.Vector3(-38, 180, 0), false, false); camera.transform.translate(new Laya.Vector3(-5, 20, -30), false); camera.addComponent(CameraMoveScript); scene.once(Laya.Event.HIERARCHY_LOADED,...

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

7. 计时器-间隔循环 [ 95%]

... return t; } function animateTimeBased() { rotateTimeBasedText.rotation += 1; } function animateFrameRateBased() { rotateFrameRateBasedText.rotation += 1; } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class T...

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

8. UI-Clip [ 95%]

...ew Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } function createTimerAnimation() { counter = new Clip(clipSkin, 10, 1); counter.autoPlay = true; counter.interval = 1000; counter.x = (Laya.stage.width - count...

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

9. UI-Button [ 95%]

... Laya.Handler; var WebGL = Laya.WebGL; var COLUMNS = 2; var BUTTON_WIDTH = 147; var BUTTON_HEIGHT = 165 / 3; var HORIZONTAL_SPACING = 200; var VERTICAL_SPACING = 100; var xOffset; var yOffset; var skins; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.a...

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

10. 混合模式-Lighter [ 93%]

...eatePhoenixes(); // 动态背景渲染 evalBgColor(); Laya.timer.frameLoop(1, this, renderBg); } function createPhoenixes() { var scaleFactor = Math.min( Laya.stage.width / (phoenixWidth * 2), Laya.stage.height / phoenixHeight); // 加了混合模式的凤凰 var blendedPhoenix = createAnimation(); ...

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