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

大约有 7 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0022 秒)

1. js继承模式 [ 100%]

...function Class() { Class.super(this); // this定义.. this.init(); } Class.prototype.init = function() { console.log(this); }; return Class; })(); } var __extends = (this && this.__extends) || function(d, b) { for (var p in b) { (b.hasOwnProperty(p)) && (d[p] = b[p]); } function __()...

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

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

...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__")) { return prototype["__class__"]; } var constructorString = prototype.co...

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

3. 如何根据一个类的对象获取类名 [ 65%]

... 赞同来自: 根据Class获取类名(String)的  var arr:Array = class.prototype.__className.split("."); arr[arr.length-1]就是String类型的类名 2017-08-15 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 132*****180 相关问题 ...

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

4. 屏幕截屏问题 [ 65%]

屏幕截屏问题 Offline.prototype.setSave=function(){ if( window.conch ) { window.conch.captureScreen(function(arrayBuff,width,height){ window.image = window.document.createElement("img"); window.image.putImageData(arrayBuff,width,height); }) } }     E/LayaBox: >>>>>>>>...

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

5. Layabox web 复制一段文字到剪贴板 [ 63%]

...tyle.visibility = "visible"; } //点击取消按钮关闭模态框 ShowDiv.prototype.CloseDiv = function () {  this.modlueDiv.style.visibility = "hidden"; this.mask.style.visibility = "hidden"; } //点击确认按钮关闭模态框,提示增加信息 ShowDiv.prototype.CloseDivAndInfoMesg = functi...

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

6. js进度,进度,js场景进度效果 [ 62%]

...dh/W.json", "res/atlas/lucky8/bonus.json", ]; this.init(); } var p = Class.prototype; p.init = function() { //判断当前渲染模式是WebGL还是Canvas if (Laya.Render.isWebGL) { Laya.init(800, 600, Laya.WebGL); Config.isAlpha = true; //设置画布是否透明,只对2D(WebGL)、3D有效。 Lay...

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

7. 自定义UI导致编辑器无显示 [ 59%]

...lass(LabelAtlas,'laya.customUI.LabelAtlas',_super); var __proto=LabelAtlas.prototype; return LabelAtlas; })(Clip) xml如下: <?xml version="1.0" encoding="utf-8"?> <uiComp> <!-- drag:0-不能拖动,1-水平,2-垂直,3-全部 --> <LabelAtlas className=...

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