大约有 31 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0020 秒)
...e++; laser.life = 0; var pos1; var pos2; if (type % 2) { pos1 = new Point(-20, Math.random() * viewHeight); pos2 = new Point(viewWidth, Math.random() * viewHeight + 20); } else { pos1 = new Point(Math.random() * viewWidth, -20); pos2 = new Point(Math.random() * viewWidth, viewHeight + 20); } var dis...
来源: Laya_示例 发布时间: 20241124
...; function createTexts() { createLabel("只允许输入数字:").pos(50, 20); var input = createInput(); input.pos(50, 50); input.restrict = "0-9"; createLabel("只允许输入字母:").pos(50, 100); input = createInput(); input.pos(50, 130); input.restrict = "a-zA-Z"; createLabel("只允许输...
来源: Laya_示例 发布时间: 20241124
... (Laya.WebGL.shaderHighPrecision) sc.precompileShaderWithShaderDefine(73,4,20); else sc.precompileShaderWithShaderDefine(73 - Laya.ShaderCompile3D.SHADERDEFINE_HIGHPRECISION,4,20);class ShaderPrecompile { constructor() { Laya3D.init(0, 0, true); //开启Shader编译调试模式,可在输出宏定...
来源: Laya_示例 发布时间: 20241124
...高度 var heightLimitText = createSampleText(); heightLimitText.height = 20; heightLimitText.y = 320; } function createSampleText() { var text = new Text(); text.overflow = Text.HIDDEN; text.color = "#FFFFFF"; text.font = "Impact"; text.fontSize = 20; text.borderColor = "#FFFF00"; text.x = 80; Laya...
来源: Laya_示例 发布时间: 20241124
...fset: 23.5, yOffset: 23.5 } } }, rock = Matter.Bodies.polygon(170, 450, 8, 20, rockOptions), anchor = { x: 170, y: 450 }, elastic = Matter.Constraint.create( { pointA: anchor, bodyB: rock, stiffness: 0.05, render: { lineWidth: 5, strokeStyle: '#dfa417' } }); var pyramid = Matter.Composites.pyramid(5...
来源: Laya_示例 发布时间: 20241124
...er() { var label = null; ListItemRender.__super.call(this); this.size(100, 20); label = new Label(); label.fontSize = 12; label.color = "#FFFFFF"; this.addChild(label); this.setLabel = function(value) { label.text = value; } } Laya.class(ListItemRender, "ListItemRender", Box); // 主要逻辑代码 ...
来源: Laya_示例 发布时间: 20241124
...s2.elements[0] = scaleValue * 13; pos1.elements[1] = Math.sin(scaleValue * 20) * 2; pos2.elements[1] = Math.sin(scaleValue * 20) * 2; glitter.addGlitterByPositions(pos1, pos2); }class GlitterDemo { private glitter: Laya.Glitter; private pos1: Laya.Vector3; private pos2: Laya.Vector3; private scaleDe...
来源: Laya_示例 发布时间: 20241124
...up }, render: { visible: false } }; var cloth = Matter.Composites.softBody(200, 200, 20, 12, 5, 5, false, 8, particleOptions); for (var i = 0; i < 20; i++) { cloth.bodies[i].isStatic = true; } Matter.World.add(engine.world, [ cloth, Matter.Bodies.circle(300, 500, 80, { isStatic: true }), Matter.Bodi...
来源: Laya_示例 发布时间: 20241124
...aya.stage.height - apeTexture.height) / 2; } function makeRedApe() { //由 20 个项目(排列成 4 x 5 矩阵)组成的数组,红色 var redMat = [ 1, 0, 0, 0, 0, //R 0, 0, 0, 0, 0, //G 0, 0, 0, 0, 0, //B 0, 0, 0, 1, 0, //A ]; //创建一个颜色滤镜对象,红色 var redFilter = new ColorF...
来源: Laya_示例 发布时间: 20241124
...ext.bgColor = "#666666"; inputText.color = "#ffffff"; inputText.fontSize = 20; inputText.maxChars = 5; Laya.stage.addChild(inputText); } })();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_MaxChars { con...
来源: Laya_示例 发布时间: 20241124