大约有 581 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0061 秒)
... private var sp:Sprite; public function Sprite_DrawShapes() { Laya.init(500, 300, WebGL); drawSomething(); } private function drawSomething():void ...
来源: Laya2.0_文档 发布时间: 20210714
...:ComboBox /***提示信息文本框**/ private var promptText:Text; public function UI_ComboBox() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); //画布垂直居中对齐 Laya.stage.alignV = Stage.ALIGN_MIDDLE; //画布水平居中对齐 Laya.stage.alignH = Stage.ALIGN_CENT...
来源: Laya2.0_文档 发布时间: 20210714
...rite; import flash.events.Event; public class Main extends Sprite { public function Main() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(event:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); IFlash.setSize(960, 640); //2D项目...
来源: Laya_社区 发布时间: 20151218
...ad("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: BlinnPhongMaterial = new BlinnPhongMaterial(); Texture2D.lo...
来源: Laya2.0_文档 发布时间: 20210714
...下Sprite3D中特有的克隆接口`instantiate`。 ```typescript public function static instantiate(original: Sprite3D, parent: Node = null, worldPositionStays: Boolean = true, position: Vector3 = null, rotation: Quaternion = null): Sprite3D; ``` - original :原始精灵。 - parent:父节点。 - ...
来源: Laya2.0_文档 发布时间: 20210715
...ring = "../../../../res/role.atlas"; private var roleAni:Animation; public function HelloLayabox() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scale...
来源: Laya2.0_文档 发布时间: 20210715
...aMonkey2/Assets/LayaMonkey/LayaMonkey-LayaMonkey.lm", Handler.create(this, function(mesh:Mesh):void { ........ //上面省略,我们再网格加载完成3秒后对该网格进行销毁 Laya.timer.once(3000,this,function ():void { //销毁了使用了该网格的精灵 layaMonkey.destroy(); //对...
来源: Laya2.0_文档 发布时间: 20210715
...取旋转方位信息: ```typescript private var info:Text; public function Gyroscope_Sample() { Laya.init(550, 400); info = new Text(); info.fontSize = 50; info.color = "#FFFFFF"; info.size(Laya.stage.width, Laya.stage.height); Laya.stage.addChild(info); ...
来源: Laya2.0_文档 发布时间: 20210714
...给别人用, 类似flash的swc一样 执行回调函数时报is not a function MOUSE_OVER注册的响应函数,如果鼠标一直在动,多久会执行一次,一帧吗?和frameLoop一样? 问题状态 最新活动: 2017-11-16 15:55 浏览: 571 关注: 2 人
来源: Laya_社区 发布时间: 20171115
...nds Image { //缩放时间100毫秒 public var scaleTime:int = 100; public function ImageRunTime() { //设置组件的中心点 this.anchorX = this.anchorY = 0.5; //添加鼠标按下事件侦听。按时时缩小按钮。 this.on(Event.MOUSE_DOWN,this,scaleSmall); //添加鼠标抬起事件侦听...
来源: Laya2.0_文档 发布时间: 20210714