mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
@@ -52,6 +52,8 @@ export {
|
||||
ParticleSystemComponent,
|
||||
RigidBodyComponent,
|
||||
SphereColliderComponent,
|
||||
|
||||
RenderableComponent,
|
||||
};
|
||||
|
||||
// cc.AnimationComponent = AnimationComponent;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ export * from './memop';
|
||||
import * as geometry from './geom-utils';
|
||||
import * as utils from './misc/utils';
|
||||
import * as primitives from './primitive';
|
||||
import './ui';
|
||||
export * from './ui';
|
||||
export { createRaycastResult } from './physics/instance';
|
||||
|
||||
export {
|
||||
|
||||
@@ -23,15 +23,7 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
// import { SpriteFrame } from '../../../assets/CCSpriteFrame';
|
||||
// import { Rect } from '../../../core/value-types';
|
||||
// import { IARenderData, RenderData } from '../../../renderer/ui/renderData';
|
||||
// import { UI } from '../../../renderer/ui/ui';
|
||||
// import { GraphicsComponent } from '../components/graphics-component';
|
||||
import { UIRenderComponent } from '../components/ui-render-component';
|
||||
// import { LineJoin } from './graphics/types';
|
||||
// import { Impl, Point } from './graphics/webgl/impl';
|
||||
// import { ISharedLabelData } from './label/ttfUtils';
|
||||
import { UIRenderComponent } from '../components';
|
||||
|
||||
export interface IAssembler {
|
||||
[key: string]: any;
|
||||
|
||||
@@ -27,7 +27,7 @@ import { Color, Mat4, Vec3 } from '../../../../../core/value-types';
|
||||
import { color4, vec3 } from '../../../../../core/vmath';
|
||||
import { IARenderData } from '../../../../../renderer/ui/renderData';
|
||||
import { UI } from '../../../../../renderer/ui/ui';
|
||||
import { GraphicsComponent } from '../../../components/graphics-component';
|
||||
import { GraphicsComponent } from '../../../components';
|
||||
import { IAssembler } from '../../assembler';
|
||||
import { LineCap, LineJoin, PointFlags } from '../types';
|
||||
import { earcut as Earcut } from './earcut';
|
||||
|
||||
@@ -23,12 +23,11 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { GraphicsComponent } from '../../../components/graphics-component';
|
||||
import { UIRenderComponent } from '../../../components/ui-render-component';
|
||||
import { GraphicsComponent, UIRenderComponent } from '../../../components';
|
||||
import { IAssemblerManager } from '../../assembler';
|
||||
import { graphicsAssembler } from './graphics-assembler';
|
||||
|
||||
const graphicsAssemblerManager: IAssemblerManager = {
|
||||
export const graphicsAssemblerManager: IAssemblerManager = {
|
||||
getAssembler (sprite: UIRenderComponent) {
|
||||
return graphicsAssembler;
|
||||
},
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
// require('./graphics');
|
||||
import './graphics/webgl/index';
|
||||
import './label/index';
|
||||
import './mask/index';
|
||||
import './sprite/index';
|
||||
import './graphics/webgl';
|
||||
import './label';
|
||||
export * from './mask';
|
||||
import './sprite';
|
||||
|
||||
export * from './assembler';
|
||||
// require('./motion-streak');
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { BitmapFont } from '../../../../assets/bitmap-font';
|
||||
import { LabelComponent} from '../../components/label-component';
|
||||
import { BitmapFont } from '../../../../assets';
|
||||
import { LabelComponent} from '../../components';
|
||||
import { IAssemblerManager } from '../assembler';
|
||||
import { bmfont } from './bmfont';
|
||||
import { letter } from './letter';
|
||||
|
||||
@@ -24,12 +24,11 @@
|
||||
****************************************************************************/
|
||||
|
||||
import { ImageAsset, SpriteFrame, Texture2D } from '../../../../assets';
|
||||
import { Color, Rect, Size, Vec2 } from '../../../../core';
|
||||
import { isUnicodeCJK, isUnicodeSpace, safeMeasureText} from '../../../../core/utils';
|
||||
import { mixin } from '../../../../core/utils/js';
|
||||
import { isUnicodeCJK, isUnicodeSpace, safeMeasureText} from '../../../../core/utils/text-utils';
|
||||
import { GFXBufferTextureCopy, GFXFormat, GFXTextureType } from '../../../../gfx/define';
|
||||
import { LabelComponent } from '../../components/label-component';
|
||||
import { LabelOutlineComponent } from '../../components/label-outline-component';
|
||||
import { Color, Rect, Size, Vec2 } from '../../../../core/value-types';
|
||||
import { GFXBufferTextureCopy, GFXFormat } from '../../../../gfx/define';
|
||||
import { LabelComponent, LabelOutlineComponent } from '../../components';
|
||||
// import { UIComponent } from '../../components/ui-component';
|
||||
import { ISharedLabelData } from './font-utils';
|
||||
|
||||
|
||||
@@ -23,12 +23,11 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { SpriteFrame } from '../../../../assets/sprite-frame';
|
||||
import { Component } from '../../../../components/component';
|
||||
import { fragmentText, safeMeasureText } from '../../../../core/utils/text-utils';
|
||||
import { SpriteFrame } from '../../../../assets';
|
||||
import { Component } from '../../../../components';
|
||||
import { fragmentText, safeMeasureText } from '../../../../core/utils';
|
||||
import { Color, Size } from '../../../../core/value-types';
|
||||
import { HorizontalTextAlignment, LabelComponent, VerticalTextAlignment } from '../../components/label-component';
|
||||
import { LabelOutlineComponent } from '../../components/label-outline-component';
|
||||
import { HorizontalTextAlignment, LabelComponent, LabelOutlineComponent, VerticalTextAlignment } from '../../components';
|
||||
import { CanvasPool, ISharedLabelData } from './font-utils';
|
||||
import { LetterRenderTexture } from './letter-font';
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
import './mask-assembler';
|
||||
export * from './mask-assembler';
|
||||
export * from './stencil-manager';
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
import { IRenderData, RenderData } from '../../../../renderer/ui/renderData';
|
||||
import { UI } from '../../../../renderer/ui/ui';
|
||||
import { Node } from '../../../../scene-graph/node';
|
||||
import { MaskComponent } from '../../components/mask-component';
|
||||
import { MaskComponent } from '../../components';
|
||||
import { IAssembler, IAssemblerManager } from '../assembler';
|
||||
import { StencilManager } from './stencil-manager';
|
||||
|
||||
|
||||
@@ -22,19 +22,18 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
// @ts-check
|
||||
import { SpriteComponent } from '../../components/sprite-component';
|
||||
const FillType = SpriteComponent.FillType;
|
||||
|
||||
// const dynamicAtlasManager = require('../../../../utils/dynamic-atlas/manager');
|
||||
import { Mat4 } from '../../../../core/value-types';
|
||||
import { color4, vec3 } from '../../../../core/vmath/index';
|
||||
import { color4, vec3 } from '../../../../core/vmath';
|
||||
import { IRenderData, RenderData } from '../../../../renderer/ui/renderData';
|
||||
import { UI } from '../../../../renderer/ui/ui';
|
||||
import { Node } from '../../../../scene-graph/node';
|
||||
import { SpriteComponent } from '../../components';
|
||||
import { IAssembler } from '../assembler';
|
||||
import { fillVerticesWithoutCalc3D } from '../utils';
|
||||
|
||||
const FillType = SpriteComponent.FillType;
|
||||
const matrix = new Mat4();
|
||||
const color_temp = color4.create();
|
||||
|
||||
|
||||
@@ -23,21 +23,18 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
// const Sprite = require('../../../../components/CCSprite');
|
||||
import { SpriteComponent } from '../../components/sprite-component';
|
||||
|
||||
const SpriteType = SpriteComponent.Type;
|
||||
const FillType = SpriteComponent.FillType;
|
||||
|
||||
import { UIRenderComponent } from '../../components/ui-render-component';
|
||||
import { SpriteComponent, UIRenderComponent } from '../../components';
|
||||
import { IAssemblerManager } from '../assembler';
|
||||
import { barFilled } from './bar-filled';
|
||||
import { radialFilled } from './radial-filled';
|
||||
import { simple } from './simple';
|
||||
import { sliced } from './sliced';
|
||||
import { tilled } from './tiled';
|
||||
// import { tilled } from './tiled';
|
||||
// import meshRenderUtil from './mesh';
|
||||
|
||||
const SpriteType = SpriteComponent.Type;
|
||||
const FillType = SpriteComponent.FillType;
|
||||
|
||||
// Inline all type switch to avoid jit deoptimization during inlined function change
|
||||
|
||||
export const spriteAssembler: IAssemblerManager = {
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
****************************************************************************/
|
||||
|
||||
// const dynamicAtlasManager = require('../../../../utils/dynamic-atlas/manager');
|
||||
import { SpriteFrame } from '../../../../assets/sprite-frame';
|
||||
import { SpriteFrame } from '../../../../assets';
|
||||
import { Vec2 } from '../../../../core/value-types';
|
||||
import { color4, vec2 } from '../../../../core/vmath';
|
||||
import { IRenderData, RenderData } from '../../../../renderer/ui/renderData';
|
||||
import { UI } from '../../../../renderer/ui/ui';
|
||||
import { SpriteComponent } from '../../components/sprite-component';
|
||||
import { SpriteComponent } from '../../components';
|
||||
import { IAssembler } from '../assembler';
|
||||
import { fillVertices3D } from '../utils';
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
****************************************************************************/
|
||||
|
||||
import { Vec3 } from '../../../../core/value-types';
|
||||
import { color4, vec3 } from '../../../../core/vmath/index';
|
||||
import { color4, vec3 } from '../../../../core/vmath';
|
||||
import { IRenderData, RenderData } from '../../../../renderer/ui/renderData';
|
||||
import { UI } from '../../../../renderer/ui/ui';
|
||||
import { Node } from '../../../../scene-graph/node';
|
||||
import { SpriteComponent } from '../../components/sprite-component';
|
||||
import { SpriteComponent } from '../../components';
|
||||
import { IAssembler } from '../assembler';
|
||||
// const dynamicAtlasManager = require('../../../../utils/dynamic-atlas/manager');
|
||||
const matrix = cc.mat4();
|
||||
|
||||
@@ -23,15 +23,13 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
// const dynamicAtlasManager = require('../../../utils/dynamic-atlas/manager');
|
||||
import { IUV, SpriteFrame } from '../../../../assets/sprite-frame';
|
||||
import { IUV, SpriteFrame } from '../../../../assets';
|
||||
import { Mat4 } from '../../../../core/value-types';
|
||||
import { color4, vec3 } from '../../../../core/vmath/index';
|
||||
import { color4, vec3 } from '../../../../core/vmath';
|
||||
import { IRenderData, RenderData } from '../../../../renderer/ui/renderData';
|
||||
import { UI } from '../../../../renderer/ui/ui';
|
||||
import { Node } from '../../../../scene-graph/node';
|
||||
import { SpriteComponent } from '../../components/sprite-component';
|
||||
import { MeshBuffer } from '../../mesh-buffer';
|
||||
import { SpriteComponent } from '../../components';
|
||||
import { IAssembler } from '../assembler';
|
||||
|
||||
const vec3_temp = vec3.create();
|
||||
|
||||
@@ -23,18 +23,15 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
// @ts-check
|
||||
//
|
||||
import { SpriteFrame } from '../../../assets/sprite-frame';
|
||||
import { Component} from '../../../components/component';
|
||||
import { EventHandler as ComponentEventHandler } from '../../../components/component-event-handler';
|
||||
|
||||
import { SpriteFrame } from '../../../assets';
|
||||
import { Component, EventHandler as ComponentEventHandler } from '../../../components';
|
||||
import { ccclass, executeInEditMode, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { EventMouse, EventTouch } from '../../../core/platform/event-manager';
|
||||
import { EventType } from '../../../core/platform/event-manager/event-enum';
|
||||
import { lerp } from '../../../core/utils/misc';
|
||||
import { EventMouse, EventTouch, EventType } from '../../../core/platform';
|
||||
import { lerp } from '../../../core/utils';
|
||||
import { Color, Vec3 } from '../../../core/value-types';
|
||||
import { ccenum } from '../../../core/value-types/enum';
|
||||
import { Color, Vec3 } from '../../../core/value-types/index';
|
||||
import * as math from '../../../core/vmath/index';
|
||||
import * as math from '../../../core/vmath';
|
||||
import { Node } from '../../../scene-graph';
|
||||
import { SpriteComponent } from './sprite-component';
|
||||
import { UIRenderComponent } from './ui-render-component';
|
||||
|
||||
@@ -24,13 +24,12 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { CameraComponent } from '../../../3d/framework/camera-component';
|
||||
import { Component } from '../../../components/component';
|
||||
import { Component } from '../../../components';
|
||||
import { ccclass, executeInEditMode, executionOrder, menu, property, requireComponent } from '../../../core/data/class-decorator';
|
||||
import { Size, Vec3 } from '../../../core/value-types';
|
||||
import { vec3 } from '../../../core/vmath';
|
||||
import { GFXClearFlag } from '../../../gfx/define';
|
||||
import { Camera } from '../../../renderer/scene/camera';
|
||||
import { Camera } from '../../../renderer';
|
||||
import { UITransformComponent } from './ui-transfrom-component';
|
||||
|
||||
const _worldPos = new Vec3();
|
||||
@@ -168,7 +167,7 @@ export class CanvasComponent extends Component {
|
||||
this._camera = cc.director.root.ui.renderScene.createCamera({
|
||||
name: 'ui',
|
||||
node: cameraNode,
|
||||
projection: CameraComponent.ProjectionType.ORTHO,
|
||||
projection: cc.CameraComponent.ProjectionType.ORTHO,
|
||||
targetDisplay: 0,
|
||||
priority: this._priority,
|
||||
isUI: true,
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { Vec3 } from '../../../core/value-types';
|
||||
import { GFXClearFlag } from '../../../gfx/define';
|
||||
import { CameraComponent } from '../../framework';
|
||||
import { CanvasComponent } from './canvas-component';
|
||||
|
||||
const _worldPos = new Vec3();
|
||||
export class DebugCanvasComponent extends CanvasComponent{
|
||||
export class DebugCanvasComponent extends CanvasComponent {
|
||||
constructor (){
|
||||
super();
|
||||
this._thisOnResized = this.alignWithScreen.bind(this);
|
||||
@@ -16,7 +15,7 @@ export class DebugCanvasComponent extends CanvasComponent{
|
||||
this._camera = cc.director.root.ui.renderScene.createCamera({
|
||||
name: 'ui',
|
||||
node: cameraNode,
|
||||
projection: CameraComponent.ProjectionType.ORTHO,
|
||||
projection: cc.CameraComponent.ProjectionType.ORTHO,
|
||||
targetDisplay: 0,
|
||||
priority: this._priority,
|
||||
isUI: true,
|
||||
@@ -94,3 +93,5 @@ export class DebugCanvasComponent extends CanvasComponent{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
cc.DebugCanvasComponent = DebugCanvasComponent;
|
||||
|
||||
@@ -28,13 +28,12 @@
|
||||
|
||||
import { ccclass } from '../../../../core/data/class-decorator';
|
||||
import macro from '../../../../core/platform/CCMacro';
|
||||
import { contains } from '../../../../core/utils/misc';
|
||||
import { contains } from '../../../../core/utils';
|
||||
import { Color, Mat4, Size, Vec3 } from '../../../../core/value-types';
|
||||
import * as math from '../../../../core/vmath';
|
||||
import { Node } from '../../../../scene-graph/node';
|
||||
import { UIRenderComponent } from '../ui-render-component';
|
||||
import { EditBoxComponent} from './edit-box-component';
|
||||
// import { InputMode, InputFlag, KeyboardReturnType } from './types';
|
||||
import { InputFlag, InputMode, KeyboardReturnType } from './types';
|
||||
|
||||
// https://segmentfault.com/q/1010000002914610
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
export { CanvasComponent } from './canvas-component';
|
||||
export { DebugCanvasComponent } from './debug-canvas-component';
|
||||
export { UIComponent } from './ui-component';
|
||||
export { ButtonComponent } from './button-component';
|
||||
export { EditBoxComponent } from './editbox/edit-box-component';
|
||||
export * from './label-component';
|
||||
export { LayoutComponent } from './layout-component';
|
||||
export { MaskComponent } from './mask-component';
|
||||
export { ProgressBarComponent } from './progress-bar-component';
|
||||
export { RichTextComponent } from './rich-text-component';
|
||||
export { ScrollBarComponent } from './scroll-bar-component';
|
||||
export { ScrollViewComponent } from './scroll-view-component';
|
||||
export { SliderComponent } from './slider-component';
|
||||
export { SpriteComponent } from './sprite-component';
|
||||
export { ToggleComponent } from './toggle-component';
|
||||
export { ToggleContainerComponent } from './toggle-container-component';
|
||||
export { UIModelComponent } from './ui-model-component';
|
||||
export { UIRenderComponent } from './ui-render-component';
|
||||
export { UITransformComponent } from './ui-transfrom-component';
|
||||
export { ViewGroupComponent } from './view-group-component';
|
||||
export { WebviewComponent } from './webview/webView-component';
|
||||
export { WidgetComponent } from './widget-component';
|
||||
export { LabelOutlineComponent } from './label-outline-component';
|
||||
export { GraphicsComponent } from './graphics-component';
|
||||
|
||||
export { widgetManager } from './widget-manager';
|
||||
@@ -24,10 +24,7 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { BitmapFont } from '../../../assets/bitmap-font';
|
||||
import { Font} from '../../../assets/font';
|
||||
import { ImageAsset } from '../../../assets/image-asset';
|
||||
import { SpriteFrame } from '../../../assets/sprite-frame';
|
||||
import { BitmapFont, Font, ImageAsset, SpriteFrame } from '../../../assets';
|
||||
import { ccclass, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { ccenum } from '../../../core/value-types/enum';
|
||||
import { UI } from '../../../renderer/ui/ui';
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
import { SpriteFrame } from '../../../assets/sprite-frame';
|
||||
import { SpriteFrame } from '../../../assets';
|
||||
import { ccclass, executionOrder, menu, property} from '../../../core/data/class-decorator';
|
||||
import { EventType } from '../../../core/platform/event-manager/event-enum';
|
||||
import { EventType } from '../../../core/platform';
|
||||
import { Mat4, Vec2, Vec3 } from '../../../core/value-types';
|
||||
import { ccenum } from '../../../core/value-types/enum';
|
||||
import * as vmath from '../../../core/vmath';
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { Component} from '../../../components/component';
|
||||
import { Component} from '../../../components';
|
||||
import { ccclass, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { clamp01 } from '../../../core/utils/misc';
|
||||
import { clamp01 } from '../../../core/utils';
|
||||
import { Enum, Size, Vec2, Vec3 } from '../../../core/value-types';
|
||||
import { SpriteComponent } from './sprite-component';
|
||||
|
||||
|
||||
@@ -24,13 +24,11 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { SpriteAtlas, TTFFont } from '../../../assets';
|
||||
import { Font } from '../../../assets/font';
|
||||
import { Font, SpriteAtlas, TTFFont } from '../../../assets';
|
||||
import { ccclass, executeInEditMode, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { EventTouch } from '../../../core/platform/event-manager';
|
||||
import { HtmlTextParser, IHtmlTextParserResultObj, IHtmlTextParserStack } from '../../../core/utils/html-text-parser';
|
||||
import { EventTouch } from '../../../core/platform';
|
||||
import { fragmentText, HtmlTextParser, IHtmlTextParserResultObj, IHtmlTextParserStack, isUnicodeCJK, isUnicodeSpace } from '../../../core/utils';
|
||||
import Pool from '../../../core/utils/pool';
|
||||
import { fragmentText, isUnicodeCJK, isUnicodeSpace } from '../../../core/utils/text-utils';
|
||||
import { Color, Vec2 } from '../../../core/value-types';
|
||||
import { Node, PrivateNode } from '../../../scene-graph';
|
||||
import { HorizontalTextAlignment, LabelComponent, VerticalTextAlignment } from './label-component';
|
||||
@@ -24,9 +24,9 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { Component } from '../../../components/component';
|
||||
import { Component } from '../../../components';
|
||||
import { ccclass, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { clamp01 } from '../../../core/utils/misc';
|
||||
import { clamp01 } from '../../../core/utils';
|
||||
import { Size, Vec2, Vec3 } from '../../../core/value-types';
|
||||
import { ccenum } from '../../../core/value-types/enum';
|
||||
import { vec3 } from '../../../core/vmath';
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
import { EventHandler as ComponentEventHandler } from '../../../components/component-event-handler';
|
||||
import { EventHandler as ComponentEventHandler } from '../../../components';
|
||||
import { ccclass, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { EventTouch } from '../../../core/platform/event-manager';
|
||||
import { EventTouch } from '../../../core/platform';
|
||||
import Touch from '../../../core/platform/event-manager/CCTouch';
|
||||
import { Enum, Size, Vec2, Vec3 } from '../../../core/value-types';
|
||||
import { vec3 } from '../../../core/vmath';
|
||||
|
||||
@@ -24,14 +24,12 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { Component } from '../../../components/component';
|
||||
import { EventHandler as ComponentEventHandler } from '../../../components/component-event-handler';
|
||||
import { Component, EventHandler as ComponentEventHandler } from '../../../components';
|
||||
import { ccclass, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { EventTouch } from '../../../core/platform/event-manager/CCEvent';
|
||||
import { EventTouch, EventType } from '../../../core/platform';
|
||||
import Touch from '../../../core/platform/event-manager/CCTouch';
|
||||
import { EventType } from '../../../core/platform/event-manager/event-enum';
|
||||
import { clamp01 } from '../../../core/utils/misc';
|
||||
import { Enum, Vec3 } from '../../../core/value-types/index';
|
||||
import { clamp01 } from '../../../core/utils';
|
||||
import { Enum, Vec3 } from '../../../core/value-types';
|
||||
import { vec3 } from '../../../core/vmath';
|
||||
import { SpriteComponent } from './sprite-component';
|
||||
|
||||
|
||||
@@ -23,12 +23,11 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
// @ts-check
|
||||
import { SpriteAtlas } from '../../../assets/sprite-atlas';
|
||||
import { SpriteFrame } from '../../../assets/sprite-frame';
|
||||
|
||||
import { SpriteAtlas, SpriteFrame } from '../../../assets';
|
||||
import { ccclass, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { EventType } from '../../../core/platform/event-manager/event-enum';
|
||||
import { clampf } from '../../../core/utils/misc';
|
||||
import { EventType } from '../../../core/platform';
|
||||
import { clampf } from '../../../core/utils';
|
||||
import { Vec2 } from '../../../core/value-types';
|
||||
import { ccenum } from '../../../core/value-types/enum';
|
||||
import { UI } from '../../../renderer/ui/ui';
|
||||
@@ -314,7 +313,6 @@ export class SpriteComponent extends UIRenderComponent {
|
||||
}
|
||||
set fillRange (value) {
|
||||
// ??? -1 ~ 1
|
||||
// this._fillRange = cc.misc.clampf(value, -1, 1);
|
||||
this._fillRange = clampf(value, 0, 1);
|
||||
if (this._type === SpriteType.FILLED && this._renderData) {
|
||||
this.markForUpdateRenderData();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
import { EventHandler as ComponentEventHandler } from '../../../components/component-event-handler';
|
||||
import { EventHandler as ComponentEventHandler } from '../../../components';
|
||||
import { ccclass, executeInEditMode, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { ButtonComponent} from './button-component';
|
||||
import { SpriteComponent} from './sprite-component';
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
import { Component} from '../../../components/component';
|
||||
import { EventHandler as ComponentEventHandler } from '../../../components/component-event-handler';
|
||||
import { Component, EventHandler as ComponentEventHandler } from '../../../components';
|
||||
import { ccclass, executeInEditMode, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { ToggleComponent} from './toggle-component';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from '../../../components/component';
|
||||
import { Component } from '../../../components';
|
||||
import { ccclass, executeInEditMode, executionOrder, property } from '../../../core/data/class-decorator';
|
||||
import { UI } from '../../../renderer/ui/ui';
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { ccclass, executionOrder, menu } from '../../../core/data/class-decorator';
|
||||
import { UIRenderComponent } from './ui-render-component';
|
||||
import { Component } from '../../../components/component';
|
||||
import { RenderableComponent } from '../../framework/renderable-component';
|
||||
import { UI } from '../../../renderer/ui/ui';
|
||||
import { Effect } from '../../../renderer';
|
||||
import { RenderPriority } from '../../../pipeline/define';
|
||||
import { Effect } from '../../../renderer';
|
||||
import { UI } from '../../../renderer/ui/ui';
|
||||
import { RenderableComponent } from '../../framework/renderable-component';
|
||||
import { UIComponent } from './ui-component';
|
||||
|
||||
@ccclass('cc.UIModelComponent')
|
||||
|
||||
@@ -30,13 +30,13 @@ import {
|
||||
property,
|
||||
requireComponent,
|
||||
} from '../../../core/data/class-decorator';
|
||||
import { EventType} from '../../../core/platform/event-manager/event-enum';
|
||||
import { EventType } from '../../../core/platform';
|
||||
import { Color } from '../../../core/value-types';
|
||||
import { ccenum } from '../../../core/value-types/enum';
|
||||
import { Color } from '../../../core/value-types/index';
|
||||
import { GFXBlendFactor } from '../../../gfx/define';
|
||||
import { RenderData } from '../../../renderer/ui/renderData';
|
||||
import { UI } from '../../../renderer/ui/ui';
|
||||
import { Material } from '../../assets/material';
|
||||
import { Material } from '../../assets';
|
||||
import { RenderableComponent } from '../../framework/renderable-component';
|
||||
import { IAssembler, IAssemblerManager } from '../assembler/assembler';
|
||||
import { CanvasComponent } from './canvas-component';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component} from '../../../components/component';
|
||||
import { Component } from '../../../components';
|
||||
import { ccclass, executeInEditMode, executionOrder, menu, property } from '../../../core/data/class-decorator';
|
||||
import { EventType } from '../../../core/platform/event-manager/event-enum';
|
||||
import { EventListener, ILinstenerMask } from '../../../core/platform/event-manager/event-listener';
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
* @extends Component
|
||||
*/
|
||||
|
||||
import { Component } from "../../../components/component";
|
||||
import { Component } from '../../../components';
|
||||
|
||||
export class ViewGroupComponent extends Component{
|
||||
export class ViewGroupComponent extends Component {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
import { ccclass} from '../../../../core/data/class-decorator';
|
||||
import sys from '../../../../core/platform/CCSys';
|
||||
import * as utils from '../../../../core/utils/misc';
|
||||
import * as utils from '../../../../core/utils';
|
||||
import * as vmath from '../../../../core/vmath';
|
||||
import { Node } from '../../../../scene-graph';
|
||||
import { UIRenderComponent } from '../ui-render-component';
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { Component} from '../../../components/component';
|
||||
import { Component} from '../../../components';
|
||||
import { ccclass, executeInEditMode, executionOrder, menu, property, requireComponent } from '../../../core/data/class-decorator';
|
||||
import { ccenum } from '../../../core/value-types/enum';
|
||||
import { Node } from '../../../scene-graph/node';
|
||||
|
||||
+3
-23
@@ -1,24 +1,4 @@
|
||||
|
||||
import './assembler/index';
|
||||
export { ButtonComponent } from './components/button-component';
|
||||
export { CanvasComponent } from './components/canvas-component';
|
||||
export { EditBoxComponent } from './components/editbox/edit-box-component';
|
||||
export { LabelComponent } from './components/label-component';
|
||||
export { LayoutComponent } from './components/layout-component';
|
||||
export { MaskComponent } from './components/mask-component';
|
||||
export { ProgressBarComponent } from './components/progress-bar-component';
|
||||
export { RichTextComponent } from './components/rich-text';
|
||||
export { ScrollBarComponent } from './components/scroll-bar-component';
|
||||
export { ScrollViewComponent } from './components/scroll-view-component';
|
||||
export { SliderComponent } from './components/slider-component';
|
||||
export { SpriteComponent } from './components/sprite-component';
|
||||
export { ToggleComponent } from './components/toggle-component';
|
||||
export { ToggleContainerComponent } from './components/toggle-container-component';
|
||||
export { UIModelComponent } from './components/ui-model-component';
|
||||
export { UIRenderComponent } from './components/ui-render-component';
|
||||
export { UITransformComponent } from './components/ui-transfrom-component';
|
||||
export { ViewGroupComponent } from './components/view-group-component';
|
||||
export { WebviewComponent } from './components/webview/webView-component';
|
||||
export { WidgetComponent } from './components/widget-component';
|
||||
export { LabelOutlineComponent } from './components/label-outline-component';
|
||||
export { DebugCanvasComponent } from './components/debug-canvas-component';
|
||||
export * from './assembler';
|
||||
export * from './components';
|
||||
export { MeshBuffer } from './mesh-buffer';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Asset, SpriteFrame } from '../assets';
|
||||
import { Vec2 } from '../core';
|
||||
import { ccclass, property } from '../core/data/class-decorator';
|
||||
import { errorID } from '../core/platform/CCDebug';
|
||||
import { Vec2 } from '../core/value-types';
|
||||
import Quat from '../core/value-types/quat';
|
||||
import Vec3, { v3 } from '../core/value-types/vec3';
|
||||
import { lerp } from '../core/vmath';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Quat, Vec3 } from '../core';
|
||||
import { Quat, Vec3 } from '../core/value-types';
|
||||
import { quat, vec3 } from '../core/vmath';
|
||||
import { PropertyBlendState } from './animation-blend-state';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Vec2 } from '../core';
|
||||
import { binarySearchEpsilon as binarySearch } from '../core/data/utils/binary-search';
|
||||
import { errorID } from '../core/platform/CCDebug';
|
||||
import { Vec2 } from '../core/value-types';
|
||||
import { computeRatioByType, CurveType, CurveValue, DynamicAnimCurve, ICurveTarget } from './animation-curve';
|
||||
import { bezier } from './bezier';
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ export { Asset } from './asset';
|
||||
export {default as Prefab} from './CCPrefab';
|
||||
export * from './CCScripts';
|
||||
export {default as SceneAsset} from './CCSceneAsset';
|
||||
export { SpriteFrame } from './sprite-frame';
|
||||
export * from './sprite-frame';
|
||||
export { SpriteAtlas } from './sprite-atlas';
|
||||
export {default as TextAsset} from './CCTextAsset';
|
||||
export {default as JsonAsset} from './CCJsonAsset';
|
||||
@@ -37,3 +37,6 @@ export {default as AssetLibrary} from './CCAssetLibrary';
|
||||
export { ImageAsset } from './image-asset';
|
||||
export { Texture2D } from './texture-2d';
|
||||
export { TTFFont } from './ttf-font';
|
||||
export { LabelAtlas } from './label-atlas';
|
||||
export { BitmapFont } from './bitmap-font';
|
||||
export { Font } from './font';
|
||||
|
||||
@@ -36,7 +36,7 @@ import NodeActivator from '../scene-graph/node-activator';
|
||||
import { PhysicsSystem } from '../3d/framework/physics/physics-system';
|
||||
import { getClassByName } from './utils/js';
|
||||
import { Root } from './root';
|
||||
import { widgetManager } from '../3d/ui/components/widget-manager';
|
||||
import { widgetManager } from '../3d';
|
||||
import Game from './game';
|
||||
|
||||
// const ComponentScheduler = require('./component-scheduler');
|
||||
@@ -207,7 +207,9 @@ class Director extends EventTarget {
|
||||
}
|
||||
|
||||
// widgetManager
|
||||
widgetManager.init(this);
|
||||
if (widgetManager) {
|
||||
widgetManager.init(this);
|
||||
}
|
||||
|
||||
// this.registerSystem('animation', AnimationSystem, ['AnimationComponent'], 200);
|
||||
// this.registerSystem('skinning-model', SkinningModelSystem, ['SkinningModelComponent'], 100);
|
||||
|
||||
@@ -29,6 +29,7 @@ export * from './input-manager';
|
||||
export * from './system-event';
|
||||
export * from './CCEvent';
|
||||
export * from './CCTouch';
|
||||
export * from './event-enum';
|
||||
|
||||
if (CC_TEST) {
|
||||
// cc._Test.eventManager = eventManager;
|
||||
|
||||
@@ -32,6 +32,9 @@ import * as js from './js';
|
||||
*/
|
||||
import * as path from './path';
|
||||
export * from './profiler/profiler';
|
||||
export * from './misc';
|
||||
export * from './text-utils';
|
||||
export * from './html-text-parser';
|
||||
|
||||
export * from './prefab-helper';
|
||||
export {
|
||||
|
||||
@@ -24,12 +24,9 @@
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
import { DebugCanvasComponent } from '../../../3d/ui/components/debug-canvas-component';
|
||||
import { LabelComponent } from '../../../3d/ui/components/label-component';
|
||||
import { UITransformComponent } from '../../../3d/ui/components/ui-transfrom-component';
|
||||
import { WidgetComponent } from '../../../3d/ui/components/widget-component';
|
||||
import { DebugCanvasComponent, LabelComponent, WidgetComponent } from '../../../3d';
|
||||
import { ImageAsset, SpriteFrame } from '../../../assets';
|
||||
import { LabelAtlas } from '../../../assets/label-atlas';
|
||||
import { LabelAtlas } from '../../../assets';
|
||||
import { GFXDevice } from '../../../gfx/device';
|
||||
import { Node } from '../../../scene-graph/node';
|
||||
import { ICounterOption } from './counter';
|
||||
@@ -170,16 +167,16 @@ function generateNode () {
|
||||
}
|
||||
|
||||
_rootNode = new Node('PROFILER-NODE');
|
||||
_rootNode.addComponent(UITransformComponent);
|
||||
const screen = _rootNode.addComponent(DebugCanvasComponent);
|
||||
_rootNode.addComponent('cc.UITransformComponent');
|
||||
const screen = _rootNode.addComponent('DebugCanvasComponent') as DebugCanvasComponent;
|
||||
cc.game.addPersistRootNode(_rootNode);
|
||||
// const camera = cc.director.root.
|
||||
|
||||
const managerNode = new Node('ROOT');
|
||||
managerNode.addComponent(UITransformComponent);
|
||||
managerNode.addComponent('cc.UITransformComponent');
|
||||
managerNode.parent = _rootNode;
|
||||
managerNode.anchorX = managerNode.anchorY = 0;
|
||||
const widgetComp = managerNode.addComponent(WidgetComponent);
|
||||
const widgetComp = managerNode.addComponent('cc.WidgetComponent') as WidgetComponent;
|
||||
if (widgetComp) {
|
||||
widgetComp.isAlignBottom = true;
|
||||
widgetComp.isAlignLeft = true;
|
||||
@@ -194,7 +191,7 @@ function generateNode () {
|
||||
|
||||
const left = new Node('LEFT-PANEL');
|
||||
left.parent = managerNode;
|
||||
const leftLabel = left.addComponent(LabelComponent);
|
||||
const leftLabel = left.addComponent('cc.LabelComponent') as LabelComponent;
|
||||
left.anchorX = left.anchorY = 0;
|
||||
if (leftLabel){
|
||||
leftLabel.font = _atlas;
|
||||
@@ -204,7 +201,7 @@ function generateNode () {
|
||||
|
||||
const right = new Node('RIGHT-PANEL');
|
||||
right.parent = managerNode;
|
||||
const rightLabel = right.addComponent(LabelComponent);
|
||||
const rightLabel = right.addComponent('cc.LabelComponent') as LabelComponent;
|
||||
right.anchorX = 1;
|
||||
right.anchorY = 0;
|
||||
const pos = right.getPosition();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { CameraComponent } from '../3d';
|
||||
import { UITransformComponent } from '../3d/ui/components/ui-transfrom-component';
|
||||
import { CameraComponent, UITransformComponent } from '../3d';
|
||||
import { Vec3 } from '../core';
|
||||
import { Node } from '../scene-graph';
|
||||
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
|
||||
import { CanvasComponent, IAssembler, MeshBuffer, StencilManager, UIComponent, UIRenderComponent } from '../../3d';
|
||||
import { Material } from '../../3d/assets/material';
|
||||
import { RenderableComponent } from '../../3d/framework/renderable-component';
|
||||
import Pool from '../../3d/memop/pool';
|
||||
import RecyclePool from '../../3d/memop/recycle-pool';
|
||||
import { IAssembler } from '../../3d/ui/assembler/assembler';
|
||||
import { StencilManager } from '../../3d/ui/assembler/mask/stencil-manager';
|
||||
import { CanvasComponent } from '../../3d/ui/components/canvas-component';
|
||||
import { UIComponent } from '../../3d/ui/components/ui-component';
|
||||
import { UIRenderComponent } from '../../3d/ui/components/ui-render-component';
|
||||
import { MeshBuffer } from '../../3d/ui/mesh-buffer';
|
||||
import { SpriteFrame } from '../../assets/sprite-frame';
|
||||
import { SpriteFrame } from '../../assets';
|
||||
import { CachedArray } from '../../core/memop/cached-array';
|
||||
import { Root } from '../../core/root';
|
||||
import { GFXBindingLayout } from '../../gfx/binding-layout';
|
||||
@@ -107,7 +101,7 @@ export class UI {
|
||||
private _uiModelPool: Pool<UIBatchModel> | null = null;
|
||||
private _modelInUse: CachedArray<UIBatchModel>;
|
||||
// batcher
|
||||
private _emptyMaterial = Material.getInstantiatedMaterial(new Material(), new RenderableComponent(), CC_EDITOR ? true : false);
|
||||
private _emptyMaterial = Material.getInstantiatedMaterial(new Material(), new cc.RenderableComponent(), CC_EDITOR ? true : false);
|
||||
private _currMeshBuffer: MeshBuffer | null = null;
|
||||
private _currMaterial: Material = this._emptyMaterial;
|
||||
private _currTexView: GFXTextureView | null = null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { UITransformComponent } from '../3d/ui/components/ui-transfrom-component';
|
||||
import { UITransformComponent } from '../3d';
|
||||
import { ccclass, property } from '../core/data/class-decorator';
|
||||
import Event from '../core/event/event';
|
||||
import { eventManager } from '../core/platform/event-manager';
|
||||
@@ -86,7 +86,7 @@ class Node extends BaseNode {
|
||||
|
||||
get uiTransfromComp () {
|
||||
if (!this._uiTransfromComp){
|
||||
this._uiTransfromComp = this.getComponent(UITransformComponent);
|
||||
this._uiTransfromComp = this.getComponent('cc.UITransformComponent') as UITransformComponent;
|
||||
}
|
||||
|
||||
return this._uiTransfromComp;
|
||||
@@ -857,7 +857,7 @@ class Node extends BaseNode {
|
||||
public off (type: string, callback: Function, target?: Object, useCapture?: any) {
|
||||
this._eventProcessor.off(type, callback, target, useCapture);
|
||||
|
||||
var hasListeners = this._eventProcessor.hasEventListener(type);
|
||||
const hasListeners = this._eventProcessor.hasEventListener(type);
|
||||
// All listener removed
|
||||
if (!hasListeners) {
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user