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

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

901. 写shader还区分2d,与3d么!看官网是3d的shader例子,有没有2d的shader例子? [ 83%]

...shader例子,有没有2d的shader例子? private initShader(): void { var attributeMap = { 'a_Position': Laya.VertexElementUsage.POSITION0, 'a_Normal': Laya.VertexElementUsage.NORMAL0 }; var uniformMap = { 'u_MvpMatrix': [Laya.Sprite3D.MVPMATRIX, Laya.Shader3D.PERIOD_SPRITE], 'u_WorldMat': [Laya...

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

902. ShaderPass介绍(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 83%]

...niform mat4 u_MvpMatrix; uniform mat4 u_WorldMat; attribute vec3 a_Normal; varying vec3 v_Normal; varying vec2 v_Texcoord0; void main() { gl_Position = u_MvpMatrix * a_Position; mat3 worldMat=mat3(u_WorldMat); v_Normal=worldMat*a_Normal; v_Texcoord0 = a_Texcoord0; gl_Position=remapGLPositionZ(gl_Pos...

来源: Laya2.0_文档 发布时间: 20210714

903. 对话框点击空白处无法关闭 [ 83%]

...法关闭 IDE版本1.7.15这是我在编辑模式发布的一个对话框var testUI=(function(_super){ function testUI(){ testUI.__super.call(this); } CLASS$(testUI,'ui.testUI',_super); var __proto__=testUI.prototype; __proto__.createChildren=function(){ laya.ui.Component.prototype.createChildren.ca...

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

904. zip更新 · LayaAir3.0文档 · LAYABOX [ 83%]

...重试) * @param opttimeout 超时时间(建议足够大) */ declare var downloadBigFile:(url:string, local:string, onprog:(total:number,now:number,speed:number)=>boolean,oncomp:(curlret:number, httpret:number)=>void, trynum:number, opttimeout:number)=>void; 处理zip文件的ZipFile...

来源: Laya3.0_文档 发布时间: 20230303

905. List属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 83%]

...epeatY 的值为6。设置 List 对象的全局引用名,即设置属性 var 的值为 m_list。 ​ ![图片0.png](img/5.png) ​ (图5) ####6. 在代码里给 List 对象赋值。 ```javascript var data:Array =[]; for(var m:int =0;m ​ (图6) ####8. 在代码里添加脚本,隐藏滚...

来源: Laya2.0_文档 发布时间: 20210715

906. 动画挂点(ActionScript-3D基础(AS3)-LayaAir3D之Animator动画) [ 83%]

...ction(res:Scene3D):void{ Laya.stage.addChild(res); //用于挂点的精灵 var box: MeshSprite3D = new MeshSprite3D(PrimitiveMesh.createBox(1,1,1)); var material: BlinnPhongMaterial = new BlinnPhongMaterial(); Texture2D.load("res/layabox.png", Handler.create(this, function(tex:Texture2D):void { mate...

来源: Laya2.0_文档 发布时间: 20210714

907. 多边形无法闭合 [ 83%]

多边形无法闭合 (function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var WebGL = Laya.WebGL; var sp; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(740, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleM...

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

908. uglify压缩后的错误堆栈解析 [ 83%]

...m install source-map   4、npm install stacktracey   5、解析脚本: var errorStack = process.argv[2]; var mapFilePath = process.argv[3]; var sourceMap = require('source-map'); var fs = require('fs'); var Stacktracey = require('stacktracey'); async function main()  { // const errorStack = "at...

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

909. 经验分享:如何控制龙骨动画的播放索引! [ 83%]

...a.events.Event; import laya.webgl.WebGL; public class DragonDemo { private var mFactory:Templet; private var mArmature:Skeleton; private var index:int;//帧频 private var time:Number; public function DragonDemo() { Laya.init(800,600,WebGL); index=15; mFactory=new Templet(); mFactory.on(Event.COMPLE...

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

910. 【简单跑酷--JS版】---Lv.3 添加地板 [ 83%]

...对象 继承此 Sprite Laya.class(Floor, "Floor", laya.display.Sprite); var _proto = Floor.prototype; _proto.init = function(type){ //创建一个帧循环处理函数 Laya.timer.frameLoop(1, this, this.onLoop); } //在地板上面添加物品 _proto.addItem = function(){ } _proto.onLoop = function...

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