大约有 6,598 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0149 秒)
Laya_社区(5247) Laya3.0_api(482) Laya2.0_文档(363) Laya_示例(154) Laya2.0_示例(116) Laya3.0_文档(105) Laya2.0_api(67) laya_api(64)
...s Laya.Node).getChildByName('Main Camera') as Laya.Camera; // var camera = new Laya.Camera(0, 0.1, 100); // scene_360.addChild(camera); camera.transform.rotationEuler = new Laya.Vector3(-32, -75, 0); camera.transform.position = new Laya.Vector3(-8.2, 5.3, 2.2); var modelViewer = camera.addComponent(...
来源: Laya_社区 发布时间: 20190813
...图纹理 this.bgTexture = Laya.loader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); this.addChild(this.bg); //因为上面的图片是截取的 所以右边可能没有图片了 这里补一个 this.rightBg = new laya.display.Sprite(); this.rightBg.graphics...
来源: Laya_社区 发布时间: 20160801
... var templet; Laya.init(1000,900,Laya.WebGL); //创建动画模板 templet=new Laya.Templet(); templet.on(Laya.Event.COMPLETE,this,parseComplete); templet.on(Laya.Event.ERROR,this,onError); //加载动画文件 templet.loadAni("res/spine/goblins/goblins.sk"); function onError() { console.log("parse ...
来源: Laya2.0_文档 发布时间: 20210715
...gt; </body> <script> $("#file").change(function (){ var file = new FileReader();//读取文件2进制 file.onload = function(e){ var base64 = e.target.result; var img = new Image();//创建一个图片对象 img.onload = function (){ var canvas = $("#canvas").get(0); var ctx = canvas.get...
来源: Laya_社区 发布时间: 20170111
...startFun() { mAniPath = "../../res/spine/spineRes2/goblins.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.on(Event.ERROR, this, onError); mFactory.loadAni(mAniPath); } function onError() { trace("error"); } function parseComplete() { //创建模式为1,...
来源: Laya_示例 发布时间: 20260303
...击事件,急,大神帮看哈 var sp; for(var i=0;i<5;i++){ sp=new Laya.Sprite(); sp.index=i; Laya.stage.addChild(sp); } 类似这样遍历出来的sprite 我怎么给每个sprite添加一个点击事件获得对应的sp.index值呢! 2017-02-21 添加评论 免费帖 --> 分享...
来源: Laya_社区 发布时间: 20170221
...资源, 用于还原脸部装扮 */ var struct: CmShowCharacterStruct = new CmShowCharacterStruct(); // gltf 模型资源对象 struct.gltfURL = {}; for (const key in this.gltfFile) { struct.gltfURL[key] = this.gltfFile[key]; } // 个性化配置对象 / 可省略 struct.customConfigURL = "res/sel...
来源: Laya2.0_文档 发布时间: 20210715
...完全不正确呢 zhengjiajia • 2017-09-13 20:09 @Monica:this.itemSpr = new Laya.Sprite; this.itemSpr.name = 'mySprite'; // this.itemSpr.cacheAs = 'normal'; this.itemSpr.cacheAsBitmap = false; this.addChild(this.itemSpr); //卡马克 for (var i: number = 0; i < 15; i++) { var attItem: HeadItem...
来源: Laya_社区 发布时间: 20170913
...e); //创建摄像机(横纵比,近距裁剪,远距裁剪) var camera= new Laya.Camera( 0, 0.1, 1000); //加载到场景 scene.addChild(camera); //移动摄像机位置 camera.transform.position=new Laya.Vector3(-8, 4, 15); //旋转摄像机角度 camera.transform.rotate(new Laya.Vector3( -8, -2...
来源: Laya_社区 发布时间: 20171017
...含有名字参数的时候获取不到边界 示例代码 : let ani = new Animation(); ani.play(); let bounds=ani.getGraphicsBounds(); 这段能获取到图片边界即大小 但是如梦是这样调用的: ani.play(0,"true","somename") 这样调用后就获取不到边界了 这肯定是个bug...
来源: Laya_社区 发布时间: 20200910