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

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

1. 文本-Overflow [ 100%]

... createTexts() { var t1 = createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); var t2 = createText(); t2.overflow = Text.SCROLL; t2.pos(10, 110); var t3 = createText(); t3.overflow = Text.HIDDEN; t3.pos(10, 210); } function createText() { var txt = new Text(); txt.text = "Layabox是HTML5引擎...

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

2. Sprite-绘制各种形状 [ 96%]

... sp = new Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5); //画曲线 sp.graphics.drawCurves(352, 58, [0, 0, 19, -100, 39, 0, 58, 100, 78, 0, 97, ...

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

3. 输入设备-摇一摇 [ 91%]

...) { console = new Text(); Laya.stage.addChild(console); console.y = picH + 10; console.width = Laya.stage.width; console.height = Laya.stage.height - console.y; console.color = "#FFFFFF"; console.fontSize = 50; console.align = "center"; console.valign = 'middle'; console.leading = 10; } function sta...

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

4. 性能测试-骨骼 [ 88%]

...e; var fileName = "Dragon"; var mTexturePath; var mAniPath; var rowCount = 10; var colCount = 10; var xOff = 50; var yOff = 100; var mSpacingX; var mSpacingY; var mAnimationArray = []; var mFactory; function init() { mSpacingX = Browser.width / colCount; mSpacingY = Browser.height / rowCount; Laya.i...

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

5. UI-Clip [ 85%]

...hild(bg); } function createTimerAnimation() { counter = new Clip(clipSkin, 10, 1); counter.autoPlay = true; counter.interval = 1000; counter.x = (Laya.stage.width - counter.width) / 2 - 35; counter.y = (Laya.stage.height - counter.height) / 2 - 40; Laya.stage.addChild(counter); } function showTotalS...

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

6. 鼠标交互-修正交互区域 [ 84%]

...ar deepSkyblueRect = new Sprite(); deepSkyblueRect.graphics.drawRect(0, 0, 100, 100, "#00BFFF"); //设置名称 deepSkyblueRect.name = "天蓝色矩形"; //设置宽高(要接收鼠标事件必须设置宽高,否则不会被命中) deepSkyblueRect.size(100, 100); deepSkyblueRect.pos(10, 10); L...

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

7. Mesh网格-自定义网格 [ 84%]

...ild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 2, 5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new Laya....

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

8. 照相机-正交相机 [ 83%]

...cript三种开发语言、LayaAirIDE让项目开发更高效。Laya3D.init(1024, 768, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_HEIGHT; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; /** * (pos.x pos.y) 屏幕位置 * pos.z 深度取值范围(-1,1); * */ var pos = new Laya.Vector3(310,50...

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

9. 射线检测-射线检测 [ 80%]

...; //初始化照相机 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-cunminn...

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

10. 计时器-延迟调用 [ 80%]

...232628"; demonstrate(); })(); function demonstrate() { for (var i = 0; i < 10; i++) { Laya.timer.callLater(this, onCallLater); } } function onCallLater() { console.log("onCallLater triggered"); var text = new Text(); text.font = "SimHei"; text.fontSize = 30; text.color = "#FFFFFF"; text.text = "打...

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