@awayjs/scene 0.13.301 → 0.13.303
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/awayjs-scene.umd.js +2 -2
- package/bundle/awayjs-scene.umd.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/Scene.d.ts +4 -4
- package/dist/lib/Scene.d.ts.map +1 -1
- package/dist/lib/display/Billboard.d.ts +2 -2
- package/dist/lib/display/Billboard.d.ts.map +1 -1
- package/dist/lib/display/Billboard.js +1 -1
- package/dist/lib/display/DisplayObject.d.ts +6 -6
- package/dist/lib/display/DisplayObject.d.ts.map +1 -1
- package/dist/lib/display/DisplayObject.js +4 -2
- package/dist/lib/display/DisplayObjectContainer.d.ts +1 -1
- package/dist/lib/display/DisplayObjectContainer.d.ts.map +1 -1
- package/dist/lib/display/DisplayObjectContainer.js +7 -4
- package/dist/lib/display/LineSegment.d.ts +2 -2
- package/dist/lib/display/LineSegment.d.ts.map +1 -1
- package/dist/lib/display/LineSegment.js +2 -2
- package/dist/lib/display/MovieClip.d.ts.map +1 -1
- package/dist/lib/display/MovieClip.js +1 -1
- package/dist/lib/display/Skybox.d.ts +2 -2
- package/dist/lib/display/Skybox.d.ts.map +1 -1
- package/dist/lib/display/Skybox.js +4 -4
- package/dist/lib/display/Sprite.d.ts +2 -3
- package/dist/lib/display/Sprite.d.ts.map +1 -1
- package/dist/lib/display/Sprite.js +1 -1
- package/dist/lib/display/TextField.d.ts +2 -2
- package/dist/lib/display/TextField.d.ts.map +1 -1
- package/dist/lib/display/TextSprite.d.ts +2 -2
- package/dist/lib/display/TextSprite.d.ts.map +1 -1
- package/dist/lib/events/FocusEvent.d.ts +3 -3
- package/dist/lib/events/FocusEvent.d.ts.map +1 -1
- package/dist/lib/events/MouseEvent.d.ts +2 -2
- package/dist/lib/events/MouseEvent.d.ts.map +1 -1
- package/dist/lib/events/PointerEvent.d.ts +2 -2
- package/dist/lib/events/PointerEvent.d.ts.map +1 -1
- package/dist/lib/events/TouchEvent.d.ts +2 -2
- package/dist/lib/events/TouchEvent.d.ts.map +1 -1
- package/dist/lib/image/SceneImage2D.d.ts.map +1 -1
- package/dist/lib/image/SceneImage2D.js +1 -1
- package/dist/lib/managers/MouseManager.js +1 -1
- package/index.ts +1 -1
- package/lib/Scene.ts +5 -5
- package/lib/display/Billboard.ts +3 -3
- package/lib/display/DisplayObject.ts +13 -11
- package/lib/display/DisplayObjectContainer.ts +8 -4
- package/lib/display/LineSegment.ts +4 -4
- package/lib/display/MovieClip.ts +1 -1
- package/lib/display/Skybox.ts +6 -6
- package/lib/display/Sprite.ts +3 -5
- package/lib/display/TextField.ts +2 -2
- package/lib/display/TextSprite.ts +2 -2
- package/lib/events/FocusEvent.ts +3 -3
- package/lib/events/MouseEvent.ts +2 -2
- package/lib/events/PointerEvent.ts +2 -2
- package/lib/events/TouchEvent.ts +2 -2
- package/lib/image/SceneImage2D.ts +0 -2
- package/lib/managers/MouseManager.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContainerNode,
|
|
1
|
+
import { ContainerNode, IContainer } from '@awayjs/view';
|
|
2
2
|
import { PointerEvent } from './PointerEvent';
|
|
3
3
|
/**
|
|
4
4
|
* A touchEvent is dispatched when a touch event occurs over a touchEnabled object in View.
|
|
@@ -50,6 +50,6 @@ export declare class TouchEvent extends PointerEvent {
|
|
|
50
50
|
* Creates a copy of the touchEvent object and sets the value of each property to match that of the original.
|
|
51
51
|
*/
|
|
52
52
|
clone(): TouchEvent;
|
|
53
|
-
_dispatchEvent(dispatcher: ContainerNode, target:
|
|
53
|
+
_dispatchEvent(dispatcher: ContainerNode, target: IContainer): void;
|
|
54
54
|
}
|
|
55
55
|
//# sourceMappingURL=TouchEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TouchEvent.d.ts","sourceRoot":"","sources":["../../../lib/events/TouchEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"TouchEvent.d.ts","sourceRoot":"","sources":["../../../lib/events/TouchEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,qBAAa,UAAW,SAAQ,YAAY;IAE3C;;OAEG;IACH,OAAc,UAAU,EAAE,MAAM,CAAiB;IAEjD;;OAEG;IACH,OAAc,SAAS,EAAE,MAAM,CAAgB;IAE/C;;OAEG;IACH,OAAc,eAAe,EAAE,MAAM,CAAqB;IAE1D;;OAEG;IACH,OAAc,cAAc,EAAE,MAAM,CAAoB;IACxD;;OAEG;IACH,OAAc,SAAS,EAAE,MAAM,CAAe;IAE9C;;OAEG;IACH,OAAc,WAAW,EAAE,MAAM,CAAiB;IAElD;;OAEG;IACH,OAAc,UAAU,EAAE,MAAM,CAAiB;IAEjD;;OAEG;IACH,OAAc,SAAS,EAAE,MAAM,CAAW;IAE1C;;OAEG;IACI,YAAY,EAAE,MAAM,CAAK;IAEhC;;;OAGG;gBACS,IAAI,EAAE,MAAM;IAIxB;;OAEG;IACI,KAAK,IAAI,UAAU;IA+BnB,cAAc,CAAC,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU;CAMnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneImage2D.d.ts","sourceRoot":"","sources":["../../../lib/image/SceneImage2D.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAIzD,OAAO,EACN,cAAc,EACd,MAAM,EACN,SAAS,EACT,KAAK,
|
|
1
|
+
{"version":3,"file":"SceneImage2D.d.ts","sourceRoot":"","sources":["../../../lib/image/SceneImage2D.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,C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AAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAM/C;;OAEG;IACI,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAM7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuEG;IAGI,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,OAAO;IAC3I,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,OAAO;IAmBlJ,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAiBrC,OAAO,CAAC,aAAa;IA8ErB,OAAO,CAAC,cAAc;IA+If,KAAK;IAEL,KAAK,IAAI,YAAY;CAc5B"}
|
|
@@ -5,7 +5,7 @@ import { DisplayObjectContainer } from '../display/DisplayObjectContainer';
|
|
|
5
5
|
import { DisplayObject } from '../display/DisplayObject';
|
|
6
6
|
import { Billboard } from '../display/Billboard';
|
|
7
7
|
import { Settings } from '../Settings';
|
|
8
|
-
import { Rectangle, Point, PerspectiveProjection, CoordinateSystem, Vector3D, Transform } from '@awayjs/core';
|
|
8
|
+
import { Rectangle, Point, PerspectiveProjection, CoordinateSystem, Vector3D, Transform, } from '@awayjs/core';
|
|
9
9
|
import { Stage, BitmapImage2D, _Stage_BitmapImage2D, BlendMode } from '@awayjs/stage';
|
|
10
10
|
import { DefaultRenderer, RenderGroup, Style } from '@awayjs/renderer';
|
|
11
11
|
// empty matrix for transform reset
|
|
@@ -156,7 +156,7 @@ var MouseManager = /** @class */ (function () {
|
|
|
156
156
|
// in FP6, a mouseclick on non focus-able object still steal the focus
|
|
157
157
|
// in newer FP they only steal the focus if the the new hit is focusable
|
|
158
158
|
if (this._allowFocusOnUnfocusable || this._focusNode.container.tabEnabled) {
|
|
159
|
-
if (this._focusNode) {
|
|
159
|
+
if (this._focusNode && this._focusNode.container) {
|
|
160
160
|
this.dispatchEvent(this._focusOut, this._focusNode);
|
|
161
161
|
this._focusNode.container.setFocus(false, true);
|
|
162
162
|
}
|
package/index.ts
CHANGED
package/lib/Scene.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
PickGroup,
|
|
10
10
|
ContainerNode,
|
|
11
11
|
INode,
|
|
12
|
-
|
|
12
|
+
IContainer,
|
|
13
13
|
} from '@awayjs/view';
|
|
14
14
|
|
|
15
15
|
import { RendererBase, RenderGroup, IRendererClass, DefaultRenderer } from '@awayjs/renderer';
|
|
@@ -43,7 +43,7 @@ export class Scene {
|
|
|
43
43
|
private _rendererClass: IRendererClass;
|
|
44
44
|
private _camera: Camera;
|
|
45
45
|
private _renderer: RendererBase;
|
|
46
|
-
private _container:
|
|
46
|
+
private _container: IContainer;
|
|
47
47
|
private _node: INode;
|
|
48
48
|
private _view: View;
|
|
49
49
|
private _pickGroup: PickGroup;
|
|
@@ -59,11 +59,11 @@ export class Scene {
|
|
|
59
59
|
public _mouseX: number;
|
|
60
60
|
public _mouseY: number;
|
|
61
61
|
|
|
62
|
-
public get container():
|
|
62
|
+
public get container(): IContainer {
|
|
63
63
|
return this._container;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
public set container(value:
|
|
66
|
+
public set container(value: IContainer) {
|
|
67
67
|
if (this._container == value)
|
|
68
68
|
return;
|
|
69
69
|
|
|
@@ -124,7 +124,7 @@ export class Scene {
|
|
|
124
124
|
*
|
|
125
125
|
*/
|
|
126
126
|
constructor(
|
|
127
|
-
container:
|
|
127
|
+
container: IContainer = null, camera: Camera = null, view: View = null, rendererClass: IRendererClass = null) {
|
|
128
128
|
|
|
129
129
|
this._onProjectionChangedDelegate = (event: CameraEvent) => this._onProjectionChanged(event);
|
|
130
130
|
|
package/lib/display/Billboard.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
PickingCollision,
|
|
3
3
|
PickEntity,
|
|
4
4
|
_Pick_PickableBase,
|
|
5
|
-
|
|
5
|
+
IEntity,
|
|
6
6
|
} from '@awayjs/view';
|
|
7
7
|
import {
|
|
8
8
|
RenderableEvent,
|
|
@@ -194,7 +194,7 @@ export class Billboard extends DisplayObjectContainer {
|
|
|
194
194
|
//override for billboard
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
public getEntity():
|
|
197
|
+
public getEntity(): IEntity {
|
|
198
198
|
return this;
|
|
199
199
|
}
|
|
200
200
|
|
|
@@ -411,7 +411,7 @@ export class _Render_Billboard extends _Render_RenderableBase {
|
|
|
411
411
|
protected _getRenderMaterial(): _Render_MaterialBase {
|
|
412
412
|
const material: IMaterial = (<Billboard> this._asset).material || MaterialUtils.getDefaultColorMaterial();
|
|
413
413
|
return material.getAbstraction<_Render_MaterialBase>(
|
|
414
|
-
this.renderer.getRenderElements(this.stageElements.elements));
|
|
414
|
+
this.entity.renderer.getRenderElements(this.stageElements.elements));
|
|
415
415
|
}
|
|
416
416
|
|
|
417
417
|
protected _getStyle(): Style {
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
Transform,
|
|
3
3
|
TransformEvent,
|
|
4
4
|
Sphere,
|
|
5
|
-
MathConsts,
|
|
6
5
|
Matrix3D,
|
|
7
6
|
Rectangle,
|
|
8
7
|
Vector3D,
|
|
9
8
|
AssetBase,
|
|
10
9
|
Loader,
|
|
10
|
+
IAbstraction,
|
|
11
11
|
} from '@awayjs/core';
|
|
12
12
|
|
|
13
13
|
import { BlendMode } from '@awayjs/stage';
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
BoundingBox,
|
|
17
17
|
BoundingSphere,
|
|
18
18
|
BoundingVolumeType,
|
|
19
|
-
|
|
19
|
+
IEntity,
|
|
20
20
|
BoundsPicker,
|
|
21
|
-
HeirarchicalEvent,
|
|
22
21
|
HierarchicalProperty,
|
|
23
22
|
AlignmentMode,
|
|
24
23
|
OrientationMode,
|
|
25
|
-
|
|
26
|
-
ContainerNode
|
|
24
|
+
IContainer,
|
|
25
|
+
ContainerNode,
|
|
26
|
+
View
|
|
27
27
|
} from '@awayjs/view';
|
|
28
28
|
|
|
29
29
|
import {
|
|
@@ -174,7 +174,7 @@ import { Settings } from '../Settings';
|
|
|
174
174
|
* display is not rendering. This is the case when the
|
|
175
175
|
* content is either minimized or obscured. </p>
|
|
176
176
|
*/
|
|
177
|
-
export class DisplayObject extends AssetBase implements IBitmapDrawable,
|
|
177
|
+
export class DisplayObject extends AssetBase implements IBitmapDrawable, IContainer {
|
|
178
178
|
|
|
179
179
|
private _mouseChildren: boolean = true;
|
|
180
180
|
public _material: IMaterial;
|
|
@@ -205,7 +205,7 @@ export class DisplayObject extends AssetBase implements IBitmapDrawable, IPartit
|
|
|
205
205
|
private _visible: boolean = true;
|
|
206
206
|
private _maskId: number = -1;
|
|
207
207
|
|
|
208
|
-
protected _masks:
|
|
208
|
+
protected _masks: DisplayObject[];
|
|
209
209
|
protected _scriptMask: DisplayObject;
|
|
210
210
|
|
|
211
211
|
private _mouseEnabled: boolean = true;
|
|
@@ -1230,7 +1230,7 @@ export class DisplayObject extends AssetBase implements IBitmapDrawable, IPartit
|
|
|
1230
1230
|
this.invalidate();
|
|
1231
1231
|
}
|
|
1232
1232
|
|
|
1233
|
-
public getScrollRectPrimitive():
|
|
1233
|
+
public getScrollRectPrimitive(): IContainer {
|
|
1234
1234
|
if (this._scrollRectPrimitiveDirty) {
|
|
1235
1235
|
this._scrollRectPrimitiveDirty = false;
|
|
1236
1236
|
|
|
@@ -1251,7 +1251,7 @@ export class DisplayObject extends AssetBase implements IBitmapDrawable, IPartit
|
|
|
1251
1251
|
return this._scrollRectPrimitive;
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
|
-
public getBoundsPrimitive(picker: BoundsPicker):
|
|
1254
|
+
public getBoundsPrimitive(picker: BoundsPicker): IContainer {
|
|
1255
1255
|
if (this._boundsPrimitive == null) {
|
|
1256
1256
|
switch (this._defaultBoundingVolume) {
|
|
1257
1257
|
case BoundingVolumeType.BOX:
|
|
@@ -1618,7 +1618,7 @@ export class DisplayObject extends AssetBase implements IBitmapDrawable, IPartit
|
|
|
1618
1618
|
//default to do nothing
|
|
1619
1619
|
}
|
|
1620
1620
|
|
|
1621
|
-
public getEntity():
|
|
1621
|
+
public getEntity(): IEntity {
|
|
1622
1622
|
if (this._iController)
|
|
1623
1623
|
this._iController.update();
|
|
1624
1624
|
|
|
@@ -1775,7 +1775,9 @@ export class DisplayObject extends AssetBase implements IBitmapDrawable, IPartit
|
|
|
1775
1775
|
}
|
|
1776
1776
|
|
|
1777
1777
|
public _invalidateHierarchicalProperty(propDirty: HierarchicalProperty): void {
|
|
1778
|
-
|
|
1778
|
+
for (const key in this._abstractionPool)
|
|
1779
|
+
if ((<ContainerNode> this._abstractionPool[key]).invalidateHierarchicalProperty)
|
|
1780
|
+
(<ContainerNode> this._abstractionPool[key]).invalidateHierarchicalProperty(propDirty);
|
|
1779
1781
|
}
|
|
1780
1782
|
|
|
1781
1783
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Point, ArgumentError, RangeError } from '@awayjs/core';
|
|
2
2
|
import { IAnimator, IRenderContainer } from '@awayjs/renderer';
|
|
3
|
-
import {
|
|
3
|
+
import { ContainerNode } from '@awayjs/view';
|
|
4
4
|
import { DisplayObject } from './DisplayObject';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -30,7 +30,7 @@ export class DisplayObjectContainer extends DisplayObject implements IRenderCont
|
|
|
30
30
|
private static NO_CHILD_ERROR = new ArgumentError('Child parameter is not a child of the caller');
|
|
31
31
|
|
|
32
32
|
private _animator: IAnimator;
|
|
33
|
-
protected _children:
|
|
33
|
+
protected _children: DisplayObject[] = [];
|
|
34
34
|
|
|
35
35
|
public doingSwap: boolean = false;
|
|
36
36
|
|
|
@@ -171,7 +171,9 @@ export class DisplayObjectContainer extends DisplayObject implements IRenderCont
|
|
|
171
171
|
|
|
172
172
|
child._setParent(this);
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
for (const key in this._abstractionPool)
|
|
175
|
+
if ((<ContainerNode> this._abstractionPool[key]).addChildAt)
|
|
176
|
+
(<ContainerNode> this._abstractionPool[key]).addChildAt(child, index);
|
|
175
177
|
|
|
176
178
|
return child;
|
|
177
179
|
}
|
|
@@ -531,7 +533,9 @@ export class DisplayObjectContainer extends DisplayObject implements IRenderCont
|
|
|
531
533
|
|
|
532
534
|
child._setParent(null);
|
|
533
535
|
|
|
534
|
-
|
|
536
|
+
for (const key in this._abstractionPool)
|
|
537
|
+
if ((<ContainerNode> this._abstractionPool[key]).removeChildAt)
|
|
538
|
+
(<ContainerNode> this._abstractionPool[key]).removeChildAt(index);
|
|
535
539
|
|
|
536
540
|
return child;
|
|
537
541
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Vector3D, Matrix3D, Box, Sphere } from '@awayjs/core';
|
|
2
2
|
|
|
3
3
|
import { PickingCollision, _Pick_PickableBase,
|
|
4
|
-
PickEntity, IEntityTraverser,
|
|
4
|
+
PickEntity, IEntityTraverser, IEntity } from '@awayjs/view';
|
|
5
5
|
|
|
6
6
|
import { RenderableEvent, IMaterial } from '@awayjs/renderer';
|
|
7
7
|
|
|
@@ -89,7 +89,7 @@ export class LineSegment extends DisplayObject {
|
|
|
89
89
|
this._halfThickness = thickness * 0.5;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
public getEntity():
|
|
92
|
+
public getEntity(): IEntity {
|
|
93
93
|
return this;
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -109,7 +109,7 @@ import { _Stage_ElementsBase, _Render_MaterialBase, _Render_RenderableBase,
|
|
|
109
109
|
* @class away.pool._Render_LineSegment
|
|
110
110
|
*/
|
|
111
111
|
export class _Render_LineSegment extends _Render_RenderableBase {
|
|
112
|
-
private static _lineGraphics: Object =
|
|
112
|
+
private static _lineGraphics: Object = {};
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* //TODO
|
|
@@ -144,7 +144,7 @@ export class _Render_LineSegment extends _Render_RenderableBase {
|
|
|
144
144
|
protected _getRenderMaterial(): _Render_MaterialBase {
|
|
145
145
|
const material: IMaterial = (<LineSegment> this._asset).material || MaterialUtils.getDefaultColorMaterial();
|
|
146
146
|
return material.getAbstraction<_Render_MaterialBase>(
|
|
147
|
-
this.renderer.getRenderElements(this.stageElements.elements));
|
|
147
|
+
this.entity.renderer.getRenderElements(this.stageElements.elements));
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
protected _getStyle(): Style {
|
package/lib/display/MovieClip.ts
CHANGED
|
@@ -22,7 +22,7 @@ export class MovieClip extends Sprite {
|
|
|
22
22
|
|
|
23
23
|
public static movieClipSoundsManagerClass = null;
|
|
24
24
|
|
|
25
|
-
private static _movieClips:
|
|
25
|
+
private static _movieClips: MovieClip[] = [];
|
|
26
26
|
private static _activeSounds: Record<number, WaveAudio> = {};
|
|
27
27
|
|
|
28
28
|
public static stopSounds(sound?: WaveAudio) {
|
package/lib/display/Skybox.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AssetEvent } from '@awayjs/core';
|
|
|
2
2
|
|
|
3
3
|
import { BlendMode, ImageCube } from '@awayjs/stage';
|
|
4
4
|
|
|
5
|
-
import { PickingCollision, BoundingVolumeType, INode,
|
|
5
|
+
import { PickingCollision, BoundingVolumeType, INode, IEntity, ContainerNode } from '@awayjs/view';
|
|
6
6
|
|
|
7
7
|
import { IAnimationSet, IMaterial, ITexture, RenderableEvent,
|
|
8
8
|
MaterialEvent, Style, StyleEvent, IRenderContainer, ImageTextureCube, DefaultRenderer } from '@awayjs/renderer';
|
|
@@ -132,7 +132,7 @@ export class Skybox extends DisplayObjectContainer implements IMaterial {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
public getEntity():
|
|
135
|
+
public getEntity(): IEntity {
|
|
136
136
|
return this;
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -259,10 +259,10 @@ export class _Render_SkyboxMaterial extends _Render_MaterialPassBase {
|
|
|
259
259
|
public _pUpdateRender(): void {
|
|
260
260
|
super._pUpdateRender();
|
|
261
261
|
|
|
262
|
-
this.requiresBlending = (this.
|
|
262
|
+
this.requiresBlending = ((<IMaterial> this._asset).blendMode != BlendMode.NORMAL);
|
|
263
263
|
|
|
264
|
-
this.shader.setBlendMode((this.
|
|
265
|
-
BlendMode.LAYER : this.
|
|
264
|
+
this.shader.setBlendMode(((<IMaterial> this._asset).blendMode == BlendMode.NORMAL && this.requiresBlending) ?
|
|
265
|
+
BlendMode.LAYER : (<IMaterial> this._asset).blendMode);
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
public _includeDependencies(shader: ShaderBase): void {
|
|
@@ -332,7 +332,7 @@ export class _Render_Skybox extends _Render_RenderableBase {
|
|
|
332
332
|
|
|
333
333
|
protected _getRenderMaterial(): _Render_SkyboxMaterial {
|
|
334
334
|
return this._asset.getAbstraction<_Render_SkyboxMaterial>(
|
|
335
|
-
this.renderer.getRenderElements(this.stageElements.elements));
|
|
335
|
+
this.entity.renderer.getRenderElements(this.stageElements.elements));
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
protected _getStyle(): Style {
|
package/lib/display/Sprite.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IPartitionEntity } from '@awayjs/view';
|
|
1
|
+
import { IEntity } from '@awayjs/view';
|
|
3
2
|
import { IMaterial } from '@awayjs/renderer';
|
|
4
3
|
import { Graphics } from '@awayjs/graphics';
|
|
5
4
|
import { DisplayObjectContainer } from './DisplayObjectContainer';
|
|
@@ -14,7 +13,7 @@ export class Sprite extends DisplayObjectContainer {
|
|
|
14
13
|
|
|
15
14
|
public _iSourcePrefab: PrefabBase;
|
|
16
15
|
|
|
17
|
-
private static _sprites:
|
|
16
|
+
private static _sprites: Sprite[] = [];
|
|
18
17
|
|
|
19
18
|
public static assetType: string = '[asset Sprite]';
|
|
20
19
|
|
|
@@ -33,7 +32,6 @@ export class Sprite extends DisplayObjectContainer {
|
|
|
33
32
|
Sprite._sprites = [];
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
private _center: Vector3D;
|
|
37
35
|
public _graphics: Graphics;
|
|
38
36
|
|
|
39
37
|
/**
|
|
@@ -85,7 +83,7 @@ export class Sprite extends DisplayObjectContainer {
|
|
|
85
83
|
// this.generateBitmapCache = this.generateBitmapCache.bind(this);
|
|
86
84
|
}
|
|
87
85
|
|
|
88
|
-
public getEntity():
|
|
86
|
+
public getEntity(): IEntity {
|
|
89
87
|
super.getEntity();
|
|
90
88
|
|
|
91
89
|
if (this._iSourcePrefab)
|
package/lib/display/TextField.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ColorUtils, Matrix, Rectangle, Point, Vector3D } from '@awayjs/core';
|
|
|
2
2
|
|
|
3
3
|
import { ImageSampler, Float2Attributes } from '@awayjs/stage';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { IEntity } from '@awayjs/view';
|
|
6
6
|
|
|
7
7
|
import { Style, TriangleElements } from '@awayjs/renderer';
|
|
8
8
|
|
|
@@ -1887,7 +1887,7 @@ export class TextField extends DisplayObjectContainer {
|
|
|
1887
1887
|
//override for textfield
|
|
1888
1888
|
}
|
|
1889
1889
|
|
|
1890
|
-
public getEntity():
|
|
1890
|
+
public getEntity(): IEntity {
|
|
1891
1891
|
|
|
1892
1892
|
this.reConstruct(true);
|
|
1893
1893
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Sprite } from './Sprite';
|
|
2
2
|
import { TextField } from './TextField';
|
|
3
3
|
import { TesselatedFontTable } from '../text/TesselatedFontTable';
|
|
4
|
-
import { HierarchicalProperty,
|
|
4
|
+
import { HierarchicalProperty, IEntity } from '@awayjs/view';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* TextSprite is used for masked text.
|
|
@@ -10,7 +10,7 @@ import { HierarchicalProperty, IPartitionEntity } from '@awayjs/view';
|
|
|
10
10
|
export class TextSprite extends Sprite {
|
|
11
11
|
public parentTextField: TextField;
|
|
12
12
|
|
|
13
|
-
public getEntity():
|
|
13
|
+
public getEntity(): IEntity {
|
|
14
14
|
|
|
15
15
|
const tf: TextField = this.parentTextField;
|
|
16
16
|
//tf.reConstruct(true);
|
package/lib/events/FocusEvent.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventBase } from '@awayjs/core';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { IEntity, View, ITraversable, INode } from '@awayjs/view';
|
|
4
4
|
import FrameScriptManager from '../managers/FrameScriptManager';
|
|
5
5
|
/**
|
|
6
6
|
* A FocusEvent is dispatched when a entity is focused
|
|
@@ -24,12 +24,12 @@ export class FocusEvent extends EventBase {
|
|
|
24
24
|
/**
|
|
25
25
|
* The entity inside which the event took place.
|
|
26
26
|
*/
|
|
27
|
-
public entity:
|
|
27
|
+
public entity: IEntity;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* True if the focus was set by mouse-interaction
|
|
31
31
|
*/
|
|
32
|
-
public invokedByMouse:
|
|
32
|
+
public invokedByMouse: IEntity;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* The traversable owner inside which the event took place.
|
package/lib/events/MouseEvent.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContainerNode,
|
|
1
|
+
import { ContainerNode, IContainer } from '@awayjs/view';
|
|
2
2
|
|
|
3
3
|
import FrameScriptManager from '../managers/FrameScriptManager';
|
|
4
4
|
import { MouseButtons } from '../base/MouseButtons';
|
|
@@ -136,7 +136,7 @@ export class MouseEvent extends PointerEvent {
|
|
|
136
136
|
return result;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
public _dispatchEvent(dispatcher: ContainerNode, target:
|
|
139
|
+
public _dispatchEvent(dispatcher: ContainerNode, target: IContainer) {
|
|
140
140
|
if (!dispatcher.isMouseDisabled() || this.type == MouseEvent.MOUSE_OUT || this.type == MouseEvent.ROLL_OUT) {
|
|
141
141
|
dispatcher.container.dispatchEvent(this, target);
|
|
142
142
|
FrameScriptManager.execute_queue();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Point, Vector3D, EventBase } from '@awayjs/core';
|
|
2
2
|
|
|
3
|
-
import { ContainerNode, INode, ITraversable, View,
|
|
3
|
+
import { ContainerNode, INode, ITraversable, View, IContainer } from '@awayjs/view';
|
|
4
4
|
|
|
5
5
|
import { IMaterial } from '@awayjs/renderer';
|
|
6
6
|
|
|
@@ -141,6 +141,6 @@ export class PointerEvent extends EventBase {
|
|
|
141
141
|
return sceneNormal;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
public _dispatchEvent(dispatcher: INode, target:
|
|
144
|
+
public _dispatchEvent(dispatcher: INode, target: IContainer) {
|
|
145
145
|
}
|
|
146
146
|
}
|
package/lib/events/TouchEvent.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContainerNode,
|
|
1
|
+
import { ContainerNode, IContainer } from '@awayjs/view';
|
|
2
2
|
|
|
3
3
|
import FrameScriptManager from '../managers/FrameScriptManager';
|
|
4
4
|
import { PointerEvent } from './PointerEvent';
|
|
@@ -95,7 +95,7 @@ export class TouchEvent extends PointerEvent {
|
|
|
95
95
|
return result;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
public _dispatchEvent(dispatcher: ContainerNode, target:
|
|
98
|
+
public _dispatchEvent(dispatcher: ContainerNode, target: IContainer) {
|
|
99
99
|
if (!dispatcher.isMouseDisabled() || this.type == TouchEvent.TOUCH_OUT || this.type == TouchEvent.TOUCH_ROLL_OUT) {
|
|
100
100
|
dispatcher.container.dispatchEvent(this, target);
|
|
101
101
|
FrameScriptManager.execute_queue();
|
|
@@ -223,7 +223,7 @@ export class MouseManager {
|
|
|
223
223
|
// in FP6, a mouseclick on non focus-able object still steal the focus
|
|
224
224
|
// in newer FP they only steal the focus if the the new hit is focusable
|
|
225
225
|
if (this._allowFocusOnUnfocusable || this._focusNode.container.tabEnabled) {
|
|
226
|
-
if (this._focusNode) {
|
|
226
|
+
if (this._focusNode && this._focusNode.container) {
|
|
227
227
|
this.dispatchEvent(this._focusOut, this._focusNode);
|
|
228
228
|
this._focusNode.container.setFocus(false, true);
|
|
229
229
|
}
|