大约有 3,085 项符合查询结果, 库内数据总量为 31,629 项。 (搜索耗时: 0.0077 秒)
Laya_社区(2355) Laya2.0_文档(237) Laya_示例(147) Laya2.0_示例(117) Laya3.0_api(70) Laya2.0_api(64) laya_api(59) Laya3.0_文档(36)
...****022 • 2019-12-13 19:42 @NilZ: var scene3d = new Laya.Scene3D(); Laya.stage.addChild(scene3d); var camera = new Laya.Camera(0, 0.1, 1000); scene3d.addChild(camera); camera.transform.rotate(new Laya.Vector3(-45, 0, 0), false, false); camera.transform.translate(new Laya.Vector3(1000, 0, 0)); came...
来源: Laya_社区 发布时间: 20191206
...is,this.move); // drawSomething(); } move() { sp = new Laya.Sprite(); Laya.stage.addChild(sp); //画曲线 if(x<100){ x++; } sp.graphics.clear(); sp.graphics.drawCurves(10, 58, [x, 0, 19, -100, 39, 0], "#ff0000", 3); } } new Scene(); 附件 : --> 2019-05-20 添加评论 免费帖 --> 分享 微...
来源: Laya_社区 发布时间: 20190520
...对应的3D世界的路径数据 ```typescript //监听鼠标抬起 Laya.stage.on(Event.MOUSE_UP, this, function():void { index = 0; //获取每次生成路径 getGridIndex(path[curPathIndex % pointCount].x, path[curPathIndex++ % pointCount].z, startPoint); getGridIndex(path[nextPathIndex % pointCou...
来源: Laya2.0_文档 发布时间: 20210714
...rite = new Sprite(); sp.graphics.drawRect(0, 0, 100, 100, "#ffff00"); Laya.stage.addChild(sp); sp.x = 50; trace(sp.x); // 输出50 sp.cacheAs = "bitmap"; sp.staticCache = true; sp.x = 100; trace(sp.x); // 输出100,且编译出来的效果也是在这个位置,说明staticCache = true无效 2...
来源: Laya_社区 发布时间: 20171120
...ate(this, function(){ container = new Laya.Sprite(); var x = 0,y =80; Laya.stage.addChild(container); for(var i=0;i<1200;i++){ var role = new Laya.Sprite(); x = x+0.1; y = y+0.1 role.x = x; role.y = y; role.loadImage('comp/bg.png'); container.addChild(role); var role2 = new Laya.Sprite(); x = x+0...
来源: Laya_社区 发布时间: 20180122
...div.innerHTML="<img src='res/atlas/test.png'/>" Laya.stage.addChild(div); } TypeError: Illegal constructor laya.core.js:11687 at Function.getInstance (file:///D:/work/test2/bin/libs/laya.core.js:11687:24) at Function.getInstance (file:///D:/work/test2/bin/li...
来源: Laya_社区 发布时间: 20190926
...,代码如下: ```typescript //创建场景 var scene:Scene3D = Laya.stage.addChild(new Scene3D()) as Scene3D; //创建相机1 var camera1:Camera = scene.addChild(new Camera(0, 0.1, 100)) as Camera; //设置相机1清除颜色 camera1.clearColor = new Vector4(0.3, 0.3, 0.3, 1.0); camera1.transfo...
来源: Laya2.0_文档 发布时间: 20210715
...计大小低于物理屏幕的尺寸再通过引擎的适配模式来拉伸stage大小时,就会导致像素点没有完全和屏幕像素对上,看上去在一些高分辨率的机型上就会有边缘马赛克的感觉。这时候,可以通过调整设计模式的画布尺寸,来适配主...
来源: Laya2.0_文档 发布时间: 20210715
...= new Laya.Sprite() let sprite = new Laya.Sprite() sprite.mask = mask Laya.stage.addChild(sprite) //正方形 sprite.graphics.drawPoly(0, 0, [100, 100, 100, 200, 200, 200, 200, 100], "#ffffff") //一挑粗直线 遮挡正方形的左半部分 mask.graphics.drawLines(0, 0, [100, 150, 150, 150], "#ff0...
来源: Laya_社区 发布时间: 20180224
...过排版。 ```javascript var txt=new Laya.Text(); txt.text="text"; Laya.stage.addChild(txt); //后面只是更新文字内容,使用changeText能提高性能 txt.changeText("text changed."); ``` Text.changeText会直接修改绘图指令中该文本绘制的最后一条指令,这种前面的...
来源: Laya2.0_文档 发布时间: 20210714