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

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

681. 鼠标交互-拖动 [ 86%]

...Sprite(); this.ape.loadImage(this.ApePath); Laya.stage.addChild(this.ape); var texture: Texture = Laya.loader.getRes(this.ApePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; this.ape.on(Event.MOUSE_DOWN, this, this.o...

来源: Laya2.0_示例 发布时间: 20241001

682. laya.d3.component.AnimatorControllerLayer [ 86%]

...克隆。 AnimatorControllerLayerProperty DetailblendingModepropertypublic var blendingMode:int 名称。defaultStateproperty defaultState:AnimatorState 获取默认动画状态。 Implementation     public function get defaultState():AnimatorState    public function set defaultState(value:...

来源: Laya2.0_api 发布时间: 20190513

683. 请问graphics.drawTexture(texture)中如何增加一个matrix,只显示图中的一个圆形区域 [ 86%]

...只显示图中的一个圆形区域 我可以另外建一个圆形比如 var mapMask = new Laya.Sprite(); mapMask.size(100,100); mapMask.pos(50,50); mapMask.graphics.drawCircle(0, 0, 50, "#000000") 我这么获得mapMask的matrix,然后放进graphics.drawTexture中呢? 不要说直接用mask,...

来源: Laya_社区 发布时间: 20181125

684. 怎么获取完全限定类名,就像as的getQualifiedClassName [ 86%]

...对象的完全限定名 */ static getQualifiedClassName(value):string { var type = typeof value; if (!value || (type != "object" && !value.prototype)) { return type; } var prototype = value.prototype ? value.prototype : Object.getPrototypeOf(value); if (prototype.hasOwnProperty("__class__")...

来源: Laya_社区 发布时间: 20170317

685. 请问我看错了吗??文档问题 [ 86%]

... public static function destroyUnusedResources(group:String = null):void { var res:Resource; if (group) { var resouList:Vector.<Resource> = _groupResourcesMap[group]; if (resouList) { var tempResouList:Vector.<Resource> = resouList.slice(); for (var i:int, n:int = tempResouList.length; i...

来源: Laya_社区 发布时间: 20190126

686. 三个图好像无法绑定不同的事件? [ 86%]

...像无法绑定不同的事件? Laya.init(400, 400, laya.webgl.WebGL); var img1 = new Laya.Sprite(); img1.loadImage('https://layaair.ldc.layabox.com/demo/h5/res/apes/monkey2.png',100,100,90,90); Laya.stage.addChild(img1); img1.on(Laya.Event.CLICK,this, function(name){ console.log(name);},['图1'])...

来源: Laya_社区 发布时间: 20180621

687. WaterPrimaryMaterial的使用 [ 86%]

...水的Material有demo吗? 我这里怎么调都是单一色块呢?   var box: Laya.MeshSprite3D = scene.addChild(new Laya.MeshSprite3D(new Laya.PlaneMesh(10, 10))) as Laya.MeshSprite3D; // box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); // var material: Laya.BlinnPhongMaterial =...

来源: Laya_社区 发布时间: 20181030

688. 分享:截屏! [ 86%]

...bgl.WebGL;          public class LayaAirDemo {         private var sp:Sprite ;         public function LayaAirDemo() {             //初始化引擎             Laya.init(Browser.width, Browser.height,WebGL);             //设置背景颜色        ...

来源: Laya_社区 发布时间: 20170424

689. Sprite-缓存为静态图像 [ 86%]

....bgColor = "#232628"; Stat.show(); this.setup(); } private setup(): void { var textBox: Sprite = new Sprite(); // 随机摆放文本 var text: Text; for (var i: number = 0; i < 1000; i++) { text = new Text(); text.fontSize = 20; text.text = (Math.random() * 100).toFixed(0); text.rotation = Math.rand...

来源: Laya2.0_示例 发布时间: 20241001

690. 聊天室使用HTMLDivElement,宽度被固定为180了,这个怎末改,求救 [ 86%]

...使用HTMLDivElement,宽度被固定为180了,这个怎末改,求救 var HTMLDivElement = Laya.HTMLDivElement; var textfiled = new HTMLDivElement(); this.addChild(textfiled); textfiled.pos(10, 10); textfiled.width = 890; textfiled.style.color = "#10922a"; textfiled.style.font = "黑体"; textf...

来源: Laya_社区 发布时间: 20190222