大约有 43 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0030 秒)
...化舞台 Laya.init(1334, 750); //需要切换的图片资源路径 this.monkey2 = "res/img/monkey2.png"; //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(this.monkey2,...
来源: Laya_社区 发布时间: 20170825
... Laya.WebGL; export class Main { private ApePath: string = "../../res/apes/monkey2.png"; private apeTexture: Texture; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Sta...
来源: Laya2.0_文档 发布时间: 20210715
...a.webgl.WebGL; public class Main { private const ApePath:String = "res/img/monkey1.png"; private var apeTexture:Texture; public function Main() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage....
来源: Laya2.0_文档 发布时间: 20210715
... > 新版本骨骼挂点 ```typescript Laya.Scene3D.load("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Laya.Handler.create(this,function(res){ Laya.stage.addChild(res); //用于挂点的精灵 var box = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1,1,1)); var material = new Laya.BlinnPh...
来源: Laya2.0_文档 发布时间: 20210715
... > 新版本骨骼挂点 ```typescript Laya.Scene3D.load("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Laya.Handler.create(this,function(res){ Laya.stage.addChild(res); //用于挂点的精灵 var box = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1,1,1)); var material = new Laya.BlinnPh...
来源: Laya2.0_文档 发布时间: 20210714
...出。 > 新版本骨骼挂点 ```typescript Scene3D.load("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Handler.create(this,function(res:Scene3D):void{ Laya.stage.addChild(res); //用于挂点的精灵 var box: MeshSprite3D = new MeshSprite3D(PrimitiveMesh.createBox(1,1,1)); var material: Blin...
来源: Laya2.0_文档 发布时间: 20210714
...: ```javascript var sp:Sprite = new Sprite(); sp.loadImage("res/apes/monkey2.png", 0, 0, 0, 0, Handler.create(this, function() { console.log(sp.width, sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高...
来源: Laya2.0_文档 发布时间: 20210715
...宽高: ```javascript var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用si...
来源: Laya2.0_文档 发布时间: 20210715
...宽高: ```typescript var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用si...
来源: Laya2.0_文档 发布时间: 20210714
.../预加载所有资源 var resource:Array = ["res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh"]; Laya.loader.create(resource, Laya.Handler.create(this, this.onComplete)); } onComplete(){ //记载场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //加载相机 var camera = scene.addChild(...
来源: Laya2.0_文档 发布时间: 20210714