@@ -150,7 +150,6 @@ declare abstract class Component extends egret.DisplayObjectContainer {
150
150
onRemovedFromEntity ( ) : void ;
151
151
onEnabled ( ) : void ;
152
152
onDisabled ( ) : void ;
153
- onEntityTransformChanged ( comp : ComponentTransform ) : void ;
154
153
update ( ) : void ;
155
154
debugRender ( ) : void ;
156
155
registerComponent ( ) : void ;
@@ -193,7 +192,6 @@ declare class Entity extends egret.DisplayObjectContainer {
193
192
update ( ) : void ;
194
193
onAddedToScene ( ) : void ;
195
194
onRemovedFromScene ( ) : void ;
196
- onTransformChanged ( comp : ComponentTransform ) : void ;
197
195
destroy ( ) : void ;
198
196
}
199
197
declare class Scene extends egret . DisplayObjectContainer {
@@ -240,70 +238,6 @@ declare class SceneManager {
240
238
static render ( ) : void ;
241
239
static startSceneTransition < T extends SceneTransition > ( sceneTransition : T ) : T ;
242
240
}
243
- declare enum DirtyType {
244
- clean = 0 ,
245
- positionDirty = 1 ,
246
- scaleDirty = 2 ,
247
- rotationDirty = 3
248
- }
249
- declare enum ComponentTransform {
250
- position = 0 ,
251
- scale = 1 ,
252
- rotation = 2
253
- }
254
- declare class Transform {
255
- readonly entity : Entity ;
256
- private _children ;
257
- private _parent ;
258
- private _localPosition ;
259
- private _localRotation ;
260
- private _localScale ;
261
- private _translationMatrix ;
262
- private _rotationMatrix ;
263
- private _scaleMatrix ;
264
- private _worldTransform ;
265
- private _worldToLocalTransform ;
266
- private _worldInverseTransform ;
267
- private _rotation ;
268
- private _position ;
269
- private _scale ;
270
- private _localTransform ;
271
- private _hierachyDirty ;
272
- private _localDirty ;
273
- private _localPositionDirty ;
274
- private _localScaleDirty ;
275
- private _localRotationDirty ;
276
- private _positionDirty ;
277
- private _worldToLocalDirty ;
278
- private _worldInverseDirty ;
279
- readonly childCount : number ;
280
- constructor ( entity : Entity ) ;
281
- getChild ( index : number ) : Transform ;
282
- readonly worldInverseTransform : Matrix2D ;
283
- readonly localToWorldTransform : Matrix2D ;
284
- readonly worldToLocalTransform : Matrix2D ;
285
- parent : Transform ;
286
- setParent ( parent : Transform ) : this;
287
- rotation : number ;
288
- localRotation : number ;
289
- position : Vector2 ;
290
- localPosition : Vector2 ;
291
- scale : Vector2 ;
292
- localScale : Vector2 ;
293
- rotationDegrees : number ;
294
- localRotationDegrees : number ;
295
- setLocalScale ( scale : Vector2 ) : this;
296
- setScale ( scale : Vector2 ) : this;
297
- setLocalRotationDegrees ( degrees : number ) : this;
298
- setLocalRotation ( radians : number ) : this;
299
- setRotation ( radians : number ) : this;
300
- setRotationDegrees ( degrees : number ) : this;
301
- setLocalPosition ( localPosition : Vector2 ) : this;
302
- setPosition ( position : Vector2 ) : this;
303
- setDirty ( dirtyFlagType : DirtyType ) : void ;
304
- roundPosition ( ) : void ;
305
- updateTransform ( ) : void ;
306
- }
307
241
declare class Camera extends Component {
308
242
private _zoom ;
309
243
private _origin ;
@@ -347,26 +281,6 @@ declare class ComponentPool<T extends PooledComponent> {
347
281
obtain ( ) : T ;
348
282
free ( component : T ) : void ;
349
283
}
350
- declare class Mesh extends Component {
351
- private _verts ;
352
- private _primitiveCount ;
353
- private _triangles ;
354
- private _topLeftVertPosition ;
355
- private _width ;
356
- private _height ;
357
- initialize ( ) : void ;
358
- setVertPosition ( positions : Vector2 [ ] ) : this;
359
- setTriangles ( triangles : number [ ] ) : this;
360
- recalculateBounds ( ) : this;
361
- render ( ) : void ;
362
- }
363
- declare class VertexPosition {
364
- position : Vector2 ;
365
- constructor ( position : Vector2 ) ;
366
- }
367
- declare class PolygonMesh extends Mesh {
368
- constructor ( points : Vector2 [ ] , arePointsCCW ?: boolean ) ;
369
- }
370
284
declare abstract class PooledComponent extends Component {
371
285
abstract reset ( ) : any ;
372
286
}
@@ -386,10 +300,15 @@ declare abstract class RenderableComponent extends PooledComponent implements IR
386
300
protected onBecameInvisible ( ) : void ;
387
301
abstract render ( camera : Camera ) : any ;
388
302
isVisibleFromCamera ( camera : Camera ) : boolean ;
389
- onEntityTransformChanged ( comp : ComponentTransform ) : void ;
390
303
}
391
- declare class ScreenSpaceCamera extends Camera {
392
- protected updateMatrixes ( ) : void ;
304
+ declare class Mesh extends RenderableComponent {
305
+ private _mesh ;
306
+ constructor ( ) ;
307
+ setTexture ( texture : egret . Texture ) : Mesh ;
308
+ onAddedToEntity ( ) : void ;
309
+ onRemovedFromEntity ( ) : void ;
310
+ render ( camera : Camera ) : void ;
311
+ reset ( ) : void ;
393
312
}
394
313
declare class Sprite {
395
314
texture2D : egret . Texture ;
@@ -446,7 +365,6 @@ declare abstract class Collider extends Component {
446
365
collidesWith ( collider : Collider , motion : Vector2 ) : CollisionResult ;
447
366
onAddedToEntity ( ) : void ;
448
367
onRemovedFromEntity ( ) : void ;
449
- onEntityTransformChanged ( comp : ComponentTransform ) : void ;
450
368
onEnabled ( ) : void ;
451
369
onDisabled ( ) : void ;
452
370
}
@@ -528,7 +446,6 @@ declare class ComponentList {
528
446
getComponent < T extends Component > ( type : any , onlyReturnInitializedComponents : boolean ) : T ;
529
447
getComponents ( typeName : string | any , components ?: any ) : any ;
530
448
update ( ) : void ;
531
- onEntityTransformChanged ( comp : any ) : void ;
532
449
}
533
450
declare class ComponentTypeManager {
534
451
private static _componentTypesMask ;
@@ -632,8 +549,6 @@ declare class Viewport {
632
549
bounds : Rectangle ;
633
550
constructor ( x : number , y : number , width : number , height : number ) ;
634
551
}
635
- declare abstract class GraphicsResource {
636
- }
637
552
declare class GaussianBlurEffect extends egret . CustomFilter {
638
553
private static blur_frag ;
639
554
constructor ( ) ;
@@ -656,16 +571,6 @@ declare class PostProcessor {
656
571
protected drawFullscreenQuad ( ) : void ;
657
572
unload ( ) : void ;
658
573
}
659
- declare class BloomSettings {
660
- readonly threshold : any ;
661
- readonly blurAmount : any ;
662
- readonly intensity : any ;
663
- readonly baseIntensity : any ;
664
- readonly saturation : any ;
665
- readonly baseStaturation : any ;
666
- constructor ( bloomThreshold : number , blurAmount : number , bloomIntensity : number , baseIntensity : number , bloomSaturation : number , baseSaturation : number ) ;
667
- static presetSettings : BloomSettings [ ] ;
668
- }
669
574
declare class GaussianBlurPostProcessor extends PostProcessor {
670
575
onAddedToScene ( scene : Scene ) : void ;
671
576
}
0 commit comments