safex-webgl 1.0.0
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/.prettierrc +6 -0
- package/@types/index.d.ts +36 -0
- package/README.md +152 -0
- package/bun.lock +353 -0
- package/dist/actions/Action.d.ts +27 -0
- package/dist/actions/Action.d.ts.map +1 -0
- package/dist/actions/Action.js +62 -0
- package/dist/actions/Action.js.map +1 -0
- package/dist/actions/ActionBezier.d.ts +121 -0
- package/dist/actions/ActionBezier.d.ts.map +1 -0
- package/dist/actions/ActionBezier.js +221 -0
- package/dist/actions/ActionBezier.js.map +1 -0
- package/dist/actions/ActionBlink.d.ts +62 -0
- package/dist/actions/ActionBlink.d.ts.map +1 -0
- package/dist/actions/ActionBlink.js +96 -0
- package/dist/actions/ActionBlink.js.map +1 -0
- package/dist/actions/ActionCatmullRom.d.ts +242 -0
- package/dist/actions/ActionCatmullRom.d.ts.map +1 -0
- package/dist/actions/ActionCatmullRom.js +436 -0
- package/dist/actions/ActionCatmullRom.js.map +1 -0
- package/dist/actions/ActionFade.d.ts +126 -0
- package/dist/actions/ActionFade.d.ts.map +1 -0
- package/dist/actions/ActionFade.js +190 -0
- package/dist/actions/ActionFade.js.map +1 -0
- package/dist/actions/ActionInstant.d.ts +237 -0
- package/dist/actions/ActionInstant.d.ts.map +1 -0
- package/dist/actions/ActionInstant.js +386 -0
- package/dist/actions/ActionInstant.js.map +1 -0
- package/dist/actions/ActionInterval.d.ts +132 -0
- package/dist/actions/ActionInterval.d.ts.map +1 -0
- package/dist/actions/ActionInterval.js +254 -0
- package/dist/actions/ActionInterval.js.map +1 -0
- package/dist/actions/ActionJump.d.ts +146 -0
- package/dist/actions/ActionJump.d.ts.map +1 -0
- package/dist/actions/ActionJump.js +239 -0
- package/dist/actions/ActionJump.js.map +1 -0
- package/dist/actions/ActionMove.d.ts +73 -0
- package/dist/actions/ActionMove.d.ts.map +1 -0
- package/dist/actions/ActionMove.js +164 -0
- package/dist/actions/ActionMove.js.map +1 -0
- package/dist/actions/ActionRotate.d.ts +137 -0
- package/dist/actions/ActionRotate.d.ts.map +1 -0
- package/dist/actions/ActionRotate.js +214 -0
- package/dist/actions/ActionRotate.js.map +1 -0
- package/dist/actions/ActionScale.d.ts +110 -0
- package/dist/actions/ActionScale.d.ts.map +1 -0
- package/dist/actions/ActionScale.js +157 -0
- package/dist/actions/ActionScale.js.map +1 -0
- package/dist/actions/ActionSkew.d.ts +120 -0
- package/dist/actions/ActionSkew.d.ts.map +1 -0
- package/dist/actions/ActionSkew.js +185 -0
- package/dist/actions/ActionSkew.js.map +1 -0
- package/dist/actions/ActionTint.d.ts +132 -0
- package/dist/actions/ActionTint.d.ts.map +1 -0
- package/dist/actions/ActionTint.js +193 -0
- package/dist/actions/ActionTint.js.map +1 -0
- package/dist/actions/Animate.d.ts +77 -0
- package/dist/actions/Animate.d.ts.map +1 -0
- package/dist/actions/Animate.js +177 -0
- package/dist/actions/Animate.js.map +1 -0
- package/dist/actions/DelayTime.d.ts +95 -0
- package/dist/actions/DelayTime.d.ts.map +1 -0
- package/dist/actions/DelayTime.js +145 -0
- package/dist/actions/DelayTime.js.map +1 -0
- package/dist/actions/FiniteTimeAction.d.ts +11 -0
- package/dist/actions/FiniteTimeAction.d.ts.map +1 -0
- package/dist/actions/FiniteTimeAction.js +24 -0
- package/dist/actions/FiniteTimeAction.js.map +1 -0
- package/dist/actions/Follow.d.ts +23 -0
- package/dist/actions/Follow.d.ts.map +1 -0
- package/dist/actions/Follow.js +98 -0
- package/dist/actions/Follow.js.map +1 -0
- package/dist/actions/Repeat.d.ts +151 -0
- package/dist/actions/Repeat.d.ts.map +1 -0
- package/dist/actions/Repeat.js +276 -0
- package/dist/actions/Repeat.js.map +1 -0
- package/dist/actions/Sequence.d.ts +77 -0
- package/dist/actions/Sequence.d.ts.map +1 -0
- package/dist/actions/Sequence.js +190 -0
- package/dist/actions/Sequence.js.map +1 -0
- package/dist/actions/Spawn.d.ts +63 -0
- package/dist/actions/Spawn.d.ts.map +1 -0
- package/dist/actions/Spawn.js +146 -0
- package/dist/actions/Spawn.js.map +1 -0
- package/dist/actions/Speed.d.ts +19 -0
- package/dist/actions/Speed.d.ts.map +1 -0
- package/dist/actions/Speed.js +57 -0
- package/dist/actions/Speed.js.map +1 -0
- package/dist/actions/TargetedAction.d.ts +67 -0
- package/dist/actions/TargetedAction.d.ts.map +1 -0
- package/dist/actions/TargetedAction.js +99 -0
- package/dist/actions/TargetedAction.js.map +1 -0
- package/dist/actions/easing/ActionEase.d.ts +133 -0
- package/dist/actions/easing/ActionEase.d.ts.map +1 -0
- package/dist/actions/easing/ActionEase.js +184 -0
- package/dist/actions/easing/ActionEase.js.map +1 -0
- package/dist/actions/easing/Back.d.ts +174 -0
- package/dist/actions/easing/Back.d.ts.map +1 -0
- package/dist/actions/easing/Back.js +227 -0
- package/dist/actions/easing/Back.js.map +1 -0
- package/dist/actions/easing/Bezier.d.ts +94 -0
- package/dist/actions/easing/Bezier.d.ts.map +1 -0
- package/dist/actions/easing/Bezier.js +124 -0
- package/dist/actions/easing/Bezier.js.map +1 -0
- package/dist/actions/easing/Bounce.d.ts +203 -0
- package/dist/actions/easing/Bounce.d.ts.map +1 -0
- package/dist/actions/easing/Bounce.js +288 -0
- package/dist/actions/easing/Bounce.js.map +1 -0
- package/dist/actions/easing/Circle.d.ts +177 -0
- package/dist/actions/easing/Circle.d.ts.map +1 -0
- package/dist/actions/easing/Circle.js +220 -0
- package/dist/actions/easing/Circle.js.map +1 -0
- package/dist/actions/easing/Cubic.d.ts +165 -0
- package/dist/actions/easing/Cubic.d.ts.map +1 -0
- package/dist/actions/easing/Cubic.js +209 -0
- package/dist/actions/easing/Cubic.js.map +1 -0
- package/dist/actions/easing/Elastic.d.ts +269 -0
- package/dist/actions/easing/Elastic.d.ts.map +1 -0
- package/dist/actions/easing/Elastic.js +358 -0
- package/dist/actions/easing/Elastic.js.map +1 -0
- package/dist/actions/easing/Exponential.d.ts +181 -0
- package/dist/actions/easing/Exponential.d.ts.map +1 -0
- package/dist/actions/easing/Exponential.js +214 -0
- package/dist/actions/easing/Exponential.js.map +1 -0
- package/dist/actions/easing/InOut.d.ts +191 -0
- package/dist/actions/easing/InOut.d.ts.map +1 -0
- package/dist/actions/easing/InOut.js +254 -0
- package/dist/actions/easing/InOut.js.map +1 -0
- package/dist/actions/easing/Quartic.d.ts +232 -0
- package/dist/actions/easing/Quartic.d.ts.map +1 -0
- package/dist/actions/easing/Quartic.js +313 -0
- package/dist/actions/easing/Quartic.js.map +1 -0
- package/dist/actions/easing/Quintic.d.ts +168 -0
- package/dist/actions/easing/Quintic.d.ts.map +1 -0
- package/dist/actions/easing/Quintic.js +212 -0
- package/dist/actions/easing/Quintic.js.map +1 -0
- package/dist/actions/easing/Sine.d.ts +176 -0
- package/dist/actions/easing/Sine.d.ts.map +1 -0
- package/dist/actions/easing/Sine.js +206 -0
- package/dist/actions/easing/Sine.js.map +1 -0
- package/dist/actions/index.d.ts +16 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +16 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/audio/Audio.d.ts +47 -0
- package/dist/audio/Audio.d.ts.map +1 -0
- package/dist/audio/Audio.js +255 -0
- package/dist/audio/Audio.js.map +1 -0
- package/dist/audio/engine.d.ts +171 -0
- package/dist/audio/engine.d.ts.map +1 -0
- package/dist/audio/engine.js +556 -0
- package/dist/audio/engine.js.map +1 -0
- package/dist/audio/index.d.ts +3 -0
- package/dist/audio/index.d.ts.map +1 -0
- package/dist/audio/index.js +3 -0
- package/dist/audio/index.js.map +1 -0
- package/dist/boot.d.ts +80 -0
- package/dist/boot.d.ts.map +1 -0
- package/dist/boot.js +468 -0
- package/dist/boot.js.map +1 -0
- package/dist/clipping-nodes/ClippingNode.d.ts +114 -0
- package/dist/clipping-nodes/ClippingNode.d.ts.map +1 -0
- package/dist/clipping-nodes/ClippingNode.js +177 -0
- package/dist/clipping-nodes/ClippingNode.js.map +1 -0
- package/dist/clipping-nodes/ClippingNodeWebGLRenderCmd.d.ts +25 -0
- package/dist/clipping-nodes/ClippingNodeWebGLRenderCmd.d.ts.map +1 -0
- package/dist/clipping-nodes/ClippingNodeWebGLRenderCmd.js +157 -0
- package/dist/clipping-nodes/ClippingNodeWebGLRenderCmd.js.map +1 -0
- package/dist/core/ActionManager.d.ts +56 -0
- package/dist/core/ActionManager.d.ts.map +1 -0
- package/dist/core/ActionManager.js +253 -0
- package/dist/core/ActionManager.js.map +1 -0
- package/dist/core/Configuration.d.ts +108 -0
- package/dist/core/Configuration.d.ts.map +1 -0
- package/dist/core/Configuration.js +232 -0
- package/dist/core/Configuration.js.map +1 -0
- package/dist/core/Director.d.ts +130 -0
- package/dist/core/Director.d.ts.map +1 -0
- package/dist/core/Director.js +580 -0
- package/dist/core/Director.js.map +1 -0
- package/dist/core/DrawingPrimitivesWebGL.d.ts +32 -0
- package/dist/core/DrawingPrimitivesWebGL.d.ts.map +1 -0
- package/dist/core/DrawingPrimitivesWebGL.js +273 -0
- package/dist/core/DrawingPrimitivesWebGL.js.map +1 -0
- package/dist/core/Scheduler.d.ts +110 -0
- package/dist/core/Scheduler.d.ts.map +1 -0
- package/dist/core/Scheduler.js +687 -0
- package/dist/core/Scheduler.js.map +1 -0
- package/dist/core/base-nodes/BaseNodesPropertyDefine.d.ts +2 -0
- package/dist/core/base-nodes/BaseNodesPropertyDefine.d.ts.map +1 -0
- package/dist/core/base-nodes/BaseNodesPropertyDefine.js +37 -0
- package/dist/core/base-nodes/BaseNodesPropertyDefine.js.map +1 -0
- package/dist/core/base-nodes/CustomRenderCmd.d.ts +9 -0
- package/dist/core/base-nodes/CustomRenderCmd.d.ts.map +1 -0
- package/dist/core/base-nodes/CustomRenderCmd.js +16 -0
- package/dist/core/base-nodes/CustomRenderCmd.js.map +1 -0
- package/dist/core/base-nodes/Node.d.ts +285 -0
- package/dist/core/base-nodes/Node.d.ts.map +1 -0
- package/dist/core/base-nodes/Node.js +1112 -0
- package/dist/core/base-nodes/Node.js.map +1 -0
- package/dist/core/base-nodes/NodeRenderCmd.d.ts +65 -0
- package/dist/core/base-nodes/NodeRenderCmd.d.ts.map +1 -0
- package/dist/core/base-nodes/NodeRenderCmd.js +460 -0
- package/dist/core/base-nodes/NodeRenderCmd.js.map +1 -0
- package/dist/core/base-nodes/NodeWebGLRenderCmd.d.ts +17 -0
- package/dist/core/base-nodes/NodeWebGLRenderCmd.d.ts.map +1 -0
- package/dist/core/base-nodes/NodeWebGLRenderCmd.js +29 -0
- package/dist/core/base-nodes/NodeWebGLRenderCmd.js.map +1 -0
- package/dist/core/cocoa/AffineTransform.d.ts +201 -0
- package/dist/core/cocoa/AffineTransform.d.ts.map +1 -0
- package/dist/core/cocoa/AffineTransform.js +260 -0
- package/dist/core/cocoa/AffineTransform.js.map +1 -0
- package/dist/core/cocoa/Geometry.d.ts +176 -0
- package/dist/core/cocoa/Geometry.d.ts.map +1 -0
- package/dist/core/cocoa/Geometry.js +237 -0
- package/dist/core/cocoa/Geometry.js.map +1 -0
- package/dist/core/event-manager/Event.d.ts +57 -0
- package/dist/core/event-manager/Event.d.ts.map +1 -0
- package/dist/core/event-manager/Event.js +69 -0
- package/dist/core/event-manager/Event.js.map +1 -0
- package/dist/core/event-manager/EventCustom.d.ts +22 -0
- package/dist/core/event-manager/EventCustom.d.ts.map +1 -0
- package/dist/core/event-manager/EventCustom.js +31 -0
- package/dist/core/event-manager/EventCustom.js.map +1 -0
- package/dist/core/event-manager/EventExtension.d.ts +33 -0
- package/dist/core/event-manager/EventExtension.d.ts.map +1 -0
- package/dist/core/event-manager/EventExtension.js +80 -0
- package/dist/core/event-manager/EventExtension.js.map +1 -0
- package/dist/core/event-manager/EventFocus.d.ts +17 -0
- package/dist/core/event-manager/EventFocus.d.ts.map +1 -0
- package/dist/core/event-manager/EventFocus.js +21 -0
- package/dist/core/event-manager/EventFocus.js.map +1 -0
- package/dist/core/event-manager/EventHelper.d.ts +8 -0
- package/dist/core/event-manager/EventHelper.d.ts.map +1 -0
- package/dist/core/event-manager/EventHelper.js +92 -0
- package/dist/core/event-manager/EventHelper.js.map +1 -0
- package/dist/core/event-manager/EventListener.d.ts +53 -0
- package/dist/core/event-manager/EventListener.d.ts.map +1 -0
- package/dist/core/event-manager/EventListener.js +95 -0
- package/dist/core/event-manager/EventListener.js.map +1 -0
- package/dist/core/event-manager/EventListenerCustom.d.ts +11 -0
- package/dist/core/event-manager/EventListenerCustom.d.ts.map +1 -0
- package/dist/core/event-manager/EventListenerCustom.js +37 -0
- package/dist/core/event-manager/EventListenerCustom.js.map +1 -0
- package/dist/core/event-manager/EventListenerFocus.d.ts +10 -0
- package/dist/core/event-manager/EventListenerFocus.d.ts.map +1 -0
- package/dist/core/event-manager/EventListenerFocus.js +28 -0
- package/dist/core/event-manager/EventListenerFocus.js.map +1 -0
- package/dist/core/event-manager/EventListenerMouse.d.ts +13 -0
- package/dist/core/event-manager/EventListenerMouse.d.ts.map +1 -0
- package/dist/core/event-manager/EventListenerMouse.js +49 -0
- package/dist/core/event-manager/EventListenerMouse.js.map +1 -0
- package/dist/core/event-manager/EventListenerTouchAllAtOnce.d.ts +12 -0
- package/dist/core/event-manager/EventListenerTouchAllAtOnce.d.ts.map +1 -0
- package/dist/core/event-manager/EventListenerTouchAllAtOnce.js +28 -0
- package/dist/core/event-manager/EventListenerTouchAllAtOnce.js.map +1 -0
- package/dist/core/event-manager/EventListenerTouchOneByOne.d.ts +16 -0
- package/dist/core/event-manager/EventListenerTouchOneByOne.d.ts.map +1 -0
- package/dist/core/event-manager/EventListenerTouchOneByOne.js +38 -0
- package/dist/core/event-manager/EventListenerTouchOneByOne.js.map +1 -0
- package/dist/core/event-manager/EventListenerVector.d.ts +15 -0
- package/dist/core/event-manager/EventListenerVector.d.ts.map +1 -0
- package/dist/core/event-manager/EventListenerVector.js +38 -0
- package/dist/core/event-manager/EventListenerVector.js.map +1 -0
- package/dist/core/event-manager/EventManager.d.ts +140 -0
- package/dist/core/event-manager/EventManager.d.ts.map +1 -0
- package/dist/core/event-manager/EventManager.js +907 -0
- package/dist/core/event-manager/EventManager.js.map +1 -0
- package/dist/core/event-manager/EventMouse.d.ts +173 -0
- package/dist/core/event-manager/EventMouse.d.ts.map +1 -0
- package/dist/core/event-manager/EventMouse.js +200 -0
- package/dist/core/event-manager/EventMouse.js.map +1 -0
- package/dist/core/event-manager/EventTouch.d.ts +24 -0
- package/dist/core/event-manager/EventTouch.d.ts.map +1 -0
- package/dist/core/event-manager/EventTouch.js +33 -0
- package/dist/core/event-manager/EventTouch.js.map +1 -0
- package/dist/core/event-manager/Touch.d.ts +60 -0
- package/dist/core/event-manager/Touch.d.ts.map +1 -0
- package/dist/core/event-manager/Touch.js +94 -0
- package/dist/core/event-manager/Touch.js.map +1 -0
- package/dist/core/event-manager/index.d.ts +6 -0
- package/dist/core/event-manager/index.d.ts.map +1 -0
- package/dist/core/event-manager/index.js +6 -0
- package/dist/core/event-manager/index.js.map +1 -0
- package/dist/core/index.d.ts +16 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +16 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/kazmath/gl/mat4stack.d.ts +5 -0
- package/dist/core/kazmath/gl/mat4stack.d.ts.map +1 -0
- package/dist/core/kazmath/gl/mat4stack.js +53 -0
- package/dist/core/kazmath/gl/mat4stack.js.map +1 -0
- package/dist/core/kazmath/gl/matrix.d.ts +21 -0
- package/dist/core/kazmath/gl/matrix.d.ts.map +1 -0
- package/dist/core/kazmath/gl/matrix.js +121 -0
- package/dist/core/kazmath/gl/matrix.js.map +1 -0
- package/dist/core/kazmath/index.d.ts +7 -0
- package/dist/core/kazmath/index.d.ts.map +1 -0
- package/dist/core/kazmath/index.js +7 -0
- package/dist/core/kazmath/index.js.map +1 -0
- package/dist/core/kazmath/mat3.d.ts +45 -0
- package/dist/core/kazmath/mat3.d.ts.map +1 -0
- package/dist/core/kazmath/mat3.js +297 -0
- package/dist/core/kazmath/mat3.js.map +1 -0
- package/dist/core/kazmath/mat4.d.ts +175 -0
- package/dist/core/kazmath/mat4.d.ts.map +1 -0
- package/dist/core/kazmath/mat4.func.d.ts +44 -0
- package/dist/core/kazmath/mat4.func.d.ts.map +1 -0
- package/dist/core/kazmath/mat4.func.js +210 -0
- package/dist/core/kazmath/mat4.func.js.map +1 -0
- package/dist/core/kazmath/mat4.js +671 -0
- package/dist/core/kazmath/mat4.js.map +1 -0
- package/dist/core/kazmath/plane.d.ts +24 -0
- package/dist/core/kazmath/plane.d.ts.map +1 -0
- package/dist/core/kazmath/plane.js +96 -0
- package/dist/core/kazmath/plane.js.map +1 -0
- package/dist/core/kazmath/quaternion.d.ts +135 -0
- package/dist/core/kazmath/quaternion.d.ts.map +1 -0
- package/dist/core/kazmath/quaternion.js +407 -0
- package/dist/core/kazmath/quaternion.js.map +1 -0
- package/dist/core/kazmath/utility.d.ts +8 -0
- package/dist/core/kazmath/utility.d.ts.map +1 -0
- package/dist/core/kazmath/utility.js +14 -0
- package/dist/core/kazmath/utility.js.map +1 -0
- package/dist/core/kazmath/vec3.d.ts +26 -0
- package/dist/core/kazmath/vec3.d.ts.map +1 -0
- package/dist/core/kazmath/vec3.js +170 -0
- package/dist/core/kazmath/vec3.js.map +1 -0
- package/dist/core/kazmath/vec4.d.ts +22 -0
- package/dist/core/kazmath/vec4.d.ts.map +1 -0
- package/dist/core/kazmath/vec4.js +136 -0
- package/dist/core/kazmath/vec4.js.map +1 -0
- package/dist/core/labelttf/LabelTTF.d.ts +310 -0
- package/dist/core/labelttf/LabelTTF.d.ts.map +1 -0
- package/dist/core/labelttf/LabelTTF.js +818 -0
- package/dist/core/labelttf/LabelTTF.js.map +1 -0
- package/dist/core/labelttf/LabelTTFPropertyDefine.d.ts +2 -0
- package/dist/core/labelttf/LabelTTFPropertyDefine.d.ts.map +1 -0
- package/dist/core/labelttf/LabelTTFPropertyDefine.js +27 -0
- package/dist/core/labelttf/LabelTTFPropertyDefine.js.map +1 -0
- package/dist/core/labelttf/LabelTTFWebGLRenderCmd.d.ts +37 -0
- package/dist/core/labelttf/LabelTTFWebGLRenderCmd.d.ts.map +1 -0
- package/dist/core/labelttf/LabelTTFWebGLRenderCmd.js +367 -0
- package/dist/core/labelttf/LabelTTFWebGLRenderCmd.js.map +1 -0
- package/dist/core/layers/Layer.d.ts +35 -0
- package/dist/core/layers/Layer.d.ts.map +1 -0
- package/dist/core/layers/Layer.js +93 -0
- package/dist/core/layers/Layer.js.map +1 -0
- package/dist/core/layers/LayerColor.d.ts +61 -0
- package/dist/core/layers/LayerColor.d.ts.map +1 -0
- package/dist/core/layers/LayerColor.js +144 -0
- package/dist/core/layers/LayerColor.js.map +1 -0
- package/dist/core/layers/LayerGradient.d.ts +196 -0
- package/dist/core/layers/LayerGradient.d.ts.map +1 -0
- package/dist/core/layers/LayerGradient.js +482 -0
- package/dist/core/layers/LayerGradient.js.map +1 -0
- package/dist/core/layers/LayerMultiplex.d.ts +47 -0
- package/dist/core/layers/LayerMultiplex.d.ts.map +1 -0
- package/dist/core/layers/LayerMultiplex.js +87 -0
- package/dist/core/layers/LayerMultiplex.js.map +1 -0
- package/dist/core/layers/LayerWebGLRenderCmd.d.ts +26 -0
- package/dist/core/layers/LayerWebGLRenderCmd.d.ts.map +1 -0
- package/dist/core/layers/LayerWebGLRenderCmd.js +100 -0
- package/dist/core/layers/LayerWebGLRenderCmd.js.map +1 -0
- package/dist/core/layers/index.d.ts +5 -0
- package/dist/core/layers/index.d.ts.map +1 -0
- package/dist/core/layers/index.js +5 -0
- package/dist/core/layers/index.js.map +1 -0
- package/dist/core/platform/BlendFunc.d.ts +30 -0
- package/dist/core/platform/BlendFunc.d.ts.map +1 -0
- package/dist/core/platform/BlendFunc.js +50 -0
- package/dist/core/platform/BlendFunc.js.map +1 -0
- package/dist/core/platform/Color.d.ts +31 -0
- package/dist/core/platform/Color.d.ts.map +1 -0
- package/dist/core/platform/Color.js +71 -0
- package/dist/core/platform/Color.js.map +1 -0
- package/dist/core/platform/Common.d.ts +157 -0
- package/dist/core/platform/Common.d.ts.map +1 -0
- package/dist/core/platform/Common.js +180 -0
- package/dist/core/platform/Common.js.map +1 -0
- package/dist/core/platform/Config.d.ts +230 -0
- package/dist/core/platform/Config.d.ts.map +1 -0
- package/dist/core/platform/Config.js +231 -0
- package/dist/core/platform/Config.js.map +1 -0
- package/dist/core/platform/Dictionary.d.ts +16 -0
- package/dist/core/platform/Dictionary.d.ts.map +1 -0
- package/dist/core/platform/Dictionary.js +65 -0
- package/dist/core/platform/Dictionary.js.map +1 -0
- package/dist/core/platform/EGLView/ContainerStrategy.d.ts +30 -0
- package/dist/core/platform/EGLView/ContainerStrategy.d.ts.map +1 -0
- package/dist/core/platform/EGLView/ContainerStrategy.js +121 -0
- package/dist/core/platform/EGLView/ContainerStrategy.js.map +1 -0
- package/dist/core/platform/EGLView/ContentStrategy.d.ts +56 -0
- package/dist/core/platform/EGLView/ContentStrategy.d.ts.map +1 -0
- package/dist/core/platform/EGLView/ContentStrategy.js +117 -0
- package/dist/core/platform/EGLView/ContentStrategy.js.map +1 -0
- package/dist/core/platform/EGLView/EGLInstance.d.ts +8 -0
- package/dist/core/platform/EGLView/EGLInstance.d.ts.map +1 -0
- package/dist/core/platform/EGLView/EGLInstance.js +16 -0
- package/dist/core/platform/EGLView/EGLInstance.js.map +1 -0
- package/dist/core/platform/EGLView/ResolutionPolicy.d.ts +99 -0
- package/dist/core/platform/EGLView/ResolutionPolicy.d.ts.map +1 -0
- package/dist/core/platform/EGLView/ResolutionPolicy.js +116 -0
- package/dist/core/platform/EGLView/ResolutionPolicy.js.map +1 -0
- package/dist/core/platform/EGLView.d.ts +204 -0
- package/dist/core/platform/EGLView.d.ts.map +1 -0
- package/dist/core/platform/EGLView.js +669 -0
- package/dist/core/platform/EGLView.js.map +1 -0
- package/dist/core/platform/FontDefinition.d.ts +47 -0
- package/dist/core/platform/FontDefinition.d.ts.map +1 -0
- package/dist/core/platform/FontDefinition.js +59 -0
- package/dist/core/platform/FontDefinition.js.map +1 -0
- package/dist/core/platform/InputManager.d.ts +149 -0
- package/dist/core/platform/InputManager.d.ts.map +1 -0
- package/dist/core/platform/InputManager.js +558 -0
- package/dist/core/platform/InputManager.js.map +1 -0
- package/dist/core/platform/Loaders.d.ts +4 -0
- package/dist/core/platform/Loaders.d.ts.map +1 -0
- package/dist/core/platform/Loaders.js +141 -0
- package/dist/core/platform/Loaders.js.map +1 -0
- package/dist/core/platform/Macro.d.ts +634 -0
- package/dist/core/platform/Macro.d.ts.map +1 -0
- package/dist/core/platform/Macro.js +763 -0
- package/dist/core/platform/Macro.js.map +1 -0
- package/dist/core/platform/SAXParser.d.ts +44 -0
- package/dist/core/platform/SAXParser.d.ts.map +1 -0
- package/dist/core/platform/SAXParser.js +122 -0
- package/dist/core/platform/SAXParser.js.map +1 -0
- package/dist/core/platform/Types.d.ts +188 -0
- package/dist/core/platform/Types.d.ts.map +1 -0
- package/dist/core/platform/Types.js +425 -0
- package/dist/core/platform/Types.js.map +1 -0
- package/dist/core/platform/VisibleRect.d.ts +38 -0
- package/dist/core/platform/VisibleRect.d.ts.map +1 -0
- package/dist/core/platform/VisibleRect.js +66 -0
- package/dist/core/platform/VisibleRect.js.map +1 -0
- package/dist/core/platform/index.d.ts +7 -0
- package/dist/core/platform/index.d.ts.map +1 -0
- package/dist/core/platform/index.js +7 -0
- package/dist/core/platform/index.js.map +1 -0
- package/dist/core/platform/miniFramework.d.ts +28 -0
- package/dist/core/platform/miniFramework.d.ts.map +1 -0
- package/dist/core/platform/miniFramework.js +245 -0
- package/dist/core/platform/miniFramework.js.map +1 -0
- package/dist/core/platform/types/Quad2.d.ts +30 -0
- package/dist/core/platform/types/Quad2.d.ts.map +1 -0
- package/dist/core/platform/types/Quad2.js +62 -0
- package/dist/core/platform/types/Quad2.js.map +1 -0
- package/dist/core/platform/types/Quad3.d.ts +18 -0
- package/dist/core/platform/types/Quad3.d.ts.map +1 -0
- package/dist/core/platform/types/Quad3.js +30 -0
- package/dist/core/platform/types/Quad3.js.map +1 -0
- package/dist/core/platform/types/Tex2F.d.ts +20 -0
- package/dist/core/platform/types/Tex2F.d.ts.map +1 -0
- package/dist/core/platform/types/Tex2F.js +33 -0
- package/dist/core/platform/types/Tex2F.js.map +1 -0
- package/dist/core/platform/types/Vertex2F.d.ts +12 -0
- package/dist/core/platform/types/Vertex2F.d.ts.map +1 -0
- package/dist/core/platform/types/Vertex2F.js +25 -0
- package/dist/core/platform/types/Vertex2F.js.map +1 -0
- package/dist/core/platform/types/Vertex3F.d.ts +14 -0
- package/dist/core/platform/types/Vertex3F.d.ts.map +1 -0
- package/dist/core/platform/types/Vertex3F.js +31 -0
- package/dist/core/platform/types/Vertex3F.js.map +1 -0
- package/dist/core/platform/types/WebGLColor.d.ts +17 -0
- package/dist/core/platform/types/WebGLColor.d.ts.map +1 -0
- package/dist/core/platform/types/WebGLColor.js +40 -0
- package/dist/core/platform/types/WebGLColor.js.map +1 -0
- package/dist/core/renderer/GlobalVertexBuffer.d.ts +19 -0
- package/dist/core/renderer/GlobalVertexBuffer.d.ts.map +1 -0
- package/dist/core/renderer/GlobalVertexBuffer.js +99 -0
- package/dist/core/renderer/GlobalVertexBuffer.js.map +1 -0
- package/dist/core/renderer/RendererWebGL.d.ts +47 -0
- package/dist/core/renderer/RendererWebGL.d.ts.map +1 -0
- package/dist/core/renderer/RendererWebGL.js +389 -0
- package/dist/core/renderer/RendererWebGL.js.map +1 -0
- package/dist/core/scenes/Scene.d.ts +6 -0
- package/dist/core/scenes/Scene.d.ts.map +1 -0
- package/dist/core/scenes/Scene.js +12 -0
- package/dist/core/scenes/Scene.js.map +1 -0
- package/dist/core/sprites/Animation.d.ts +147 -0
- package/dist/core/sprites/Animation.d.ts.map +1 -0
- package/dist/core/sprites/Animation.js +277 -0
- package/dist/core/sprites/Animation.js.map +1 -0
- package/dist/core/sprites/AnimationCache.d.ts +37 -0
- package/dist/core/sprites/AnimationCache.d.ts.map +1 -0
- package/dist/core/sprites/AnimationCache.js +159 -0
- package/dist/core/sprites/AnimationCache.js.map +1 -0
- package/dist/core/sprites/Sprite.d.ts +104 -0
- package/dist/core/sprites/Sprite.d.ts.map +1 -0
- package/dist/core/sprites/Sprite.js +388 -0
- package/dist/core/sprites/Sprite.js.map +1 -0
- package/dist/core/sprites/SpriteBatchNode.d.ts +194 -0
- package/dist/core/sprites/SpriteBatchNode.d.ts.map +1 -0
- package/dist/core/sprites/SpriteBatchNode.js +332 -0
- package/dist/core/sprites/SpriteBatchNode.js.map +1 -0
- package/dist/core/sprites/SpriteFrame.d.ts +47 -0
- package/dist/core/sprites/SpriteFrame.d.ts.map +1 -0
- package/dist/core/sprites/SpriteFrame.js +223 -0
- package/dist/core/sprites/SpriteFrame.js.map +1 -0
- package/dist/core/sprites/SpriteFrameCache.d.ts +102 -0
- package/dist/core/sprites/SpriteFrameCache.d.ts.map +1 -0
- package/dist/core/sprites/SpriteFrameCache.js +333 -0
- package/dist/core/sprites/SpriteFrameCache.js.map +1 -0
- package/dist/core/sprites/SpriteLoadManager.d.ts +8 -0
- package/dist/core/sprites/SpriteLoadManager.d.ts.map +1 -0
- package/dist/core/sprites/SpriteLoadManager.js +37 -0
- package/dist/core/sprites/SpriteLoadManager.js.map +1 -0
- package/dist/core/sprites/SpriteWebGLRenderCmd.d.ts +35 -0
- package/dist/core/sprites/SpriteWebGLRenderCmd.d.ts.map +1 -0
- package/dist/core/sprites/SpriteWebGLRenderCmd.js +286 -0
- package/dist/core/sprites/SpriteWebGLRenderCmd.js.map +1 -0
- package/dist/core/sprites/SpritesPropertyDefine.d.ts +2 -0
- package/dist/core/sprites/SpritesPropertyDefine.d.ts.map +1 -0
- package/dist/core/sprites/SpritesPropertyDefine.js +19 -0
- package/dist/core/sprites/SpritesPropertyDefine.js.map +1 -0
- package/dist/core/support/PointExtension.d.ts +296 -0
- package/dist/core/support/PointExtension.d.ts.map +1 -0
- package/dist/core/support/PointExtension.js +443 -0
- package/dist/core/support/PointExtension.js.map +1 -0
- package/dist/core/support/Vertex.d.ts +24 -0
- package/dist/core/support/Vertex.d.ts.map +1 -0
- package/dist/core/support/Vertex.js +120 -0
- package/dist/core/support/Vertex.js.map +1 -0
- package/dist/core/utils/BinaryLoader.d.ts +9 -0
- package/dist/core/utils/BinaryLoader.d.ts.map +1 -0
- package/dist/core/utils/BinaryLoader.js +116 -0
- package/dist/core/utils/BinaryLoader.js.map +1 -0
- package/dist/core/utils/Profiler.d.ts +13 -0
- package/dist/core/utils/Profiler.d.ts.map +1 -0
- package/dist/core/utils/Profiler.js +140 -0
- package/dist/core/utils/Profiler.js.map +1 -0
- package/dist/helper/AsyncPool.d.ts +22 -0
- package/dist/helper/AsyncPool.d.ts.map +1 -0
- package/dist/helper/AsyncPool.js +101 -0
- package/dist/helper/AsyncPool.js.map +1 -0
- package/dist/helper/Base64.d.ts +29 -0
- package/dist/helper/Base64.d.ts.map +1 -0
- package/dist/helper/Base64.js +71 -0
- package/dist/helper/Base64.js.map +1 -0
- package/dist/helper/Debugger.d.ts +179 -0
- package/dist/helper/Debugger.d.ts.map +1 -0
- package/dist/helper/Debugger.js +250 -0
- package/dist/helper/Debugger.js.map +1 -0
- package/dist/helper/ZipUtils.d.ts +2 -0
- package/dist/helper/ZipUtils.d.ts.map +1 -0
- package/dist/helper/ZipUtils.js +20 -0
- package/dist/helper/ZipUtils.js.map +1 -0
- package/dist/helper/async.d.ts +49 -0
- package/dist/helper/async.d.ts.map +1 -0
- package/dist/helper/async.js +95 -0
- package/dist/helper/async.js.map +1 -0
- package/dist/helper/checkType.d.ts +8 -0
- package/dist/helper/checkType.d.ts.map +1 -0
- package/dist/helper/checkType.js +31 -0
- package/dist/helper/checkType.js.map +1 -0
- package/dist/helper/engine.d.ts +6 -0
- package/dist/helper/engine.d.ts.map +1 -0
- package/dist/helper/engine.js +115 -0
- package/dist/helper/engine.js.map +1 -0
- package/dist/helper/getset.d.ts +2 -0
- package/dist/helper/getset.d.ts.map +1 -0
- package/dist/helper/getset.js +51 -0
- package/dist/helper/getset.js.map +1 -0
- package/dist/helper/global.d.ts +6 -0
- package/dist/helper/global.d.ts.map +1 -0
- package/dist/helper/global.js +6 -0
- package/dist/helper/global.js.map +1 -0
- package/dist/helper/index.d.ts +3 -0
- package/dist/helper/index.d.ts.map +1 -0
- package/dist/helper/index.js +3 -0
- package/dist/helper/index.js.map +1 -0
- package/dist/helper/loader.d.ts +102 -0
- package/dist/helper/loader.d.ts.map +1 -0
- package/dist/helper/loader.js +447 -0
- package/dist/helper/loader.js.map +1 -0
- package/dist/helper/path.d.ts +12 -0
- package/dist/helper/path.d.ts.map +1 -0
- package/dist/helper/path.js +75 -0
- package/dist/helper/path.js.map +1 -0
- package/dist/helper/string.d.ts +2 -0
- package/dist/helper/string.d.ts.map +1 -0
- package/dist/helper/string.js +32 -0
- package/dist/helper/string.js.map +1 -0
- package/dist/helper/sys.d.ts +446 -0
- package/dist/helper/sys.d.ts.map +1 -0
- package/dist/helper/sys.js +691 -0
- package/dist/helper/sys.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/motion-streak/MotionStreak.d.ts +56 -0
- package/dist/motion-streak/MotionStreak.d.ts.map +1 -0
- package/dist/motion-streak/MotionStreak.js +301 -0
- package/dist/motion-streak/MotionStreak.js.map +1 -0
- package/dist/motion-streak/MotionStreakWebGLRenderCmd.d.ts +9 -0
- package/dist/motion-streak/MotionStreakWebGLRenderCmd.d.ts.map +1 -0
- package/dist/motion-streak/MotionStreakWebGLRenderCmd.js +52 -0
- package/dist/motion-streak/MotionStreakWebGLRenderCmd.js.map +1 -0
- package/dist/motion-streak/index.d.ts +2 -0
- package/dist/motion-streak/index.d.ts.map +1 -0
- package/dist/motion-streak/index.js +2 -0
- package/dist/motion-streak/index.js.map +1 -0
- package/dist/particle/PNGReader.d.ts +30 -0
- package/dist/particle/PNGReader.d.ts.map +1 -0
- package/dist/particle/PNGReader.js +304 -0
- package/dist/particle/PNGReader.js.map +1 -0
- package/dist/particle/Particle.d.ts +27 -0
- package/dist/particle/Particle.d.ts.map +1 -0
- package/dist/particle/Particle.js +50 -0
- package/dist/particle/Particle.js.map +1 -0
- package/dist/particle/ParticleBatchNode.d.ts +163 -0
- package/dist/particle/ParticleBatchNode.d.ts.map +1 -0
- package/dist/particle/ParticleBatchNode.js +447 -0
- package/dist/particle/ParticleBatchNode.js.map +1 -0
- package/dist/particle/ParticleBatchNodeWebGLRenderCmd.d.ts +8 -0
- package/dist/particle/ParticleBatchNodeWebGLRenderCmd.d.ts.map +1 -0
- package/dist/particle/ParticleBatchNodeWebGLRenderCmd.js +33 -0
- package/dist/particle/ParticleBatchNodeWebGLRenderCmd.js.map +1 -0
- package/dist/particle/ParticleSystem.d.ts +941 -0
- package/dist/particle/ParticleSystem.d.ts.map +1 -0
- package/dist/particle/ParticleSystem.js +2017 -0
- package/dist/particle/ParticleSystem.js.map +1 -0
- package/dist/particle/ParticleSystemWebGLRenderCmd.d.ts +29 -0
- package/dist/particle/ParticleSystemWebGLRenderCmd.d.ts.map +1 -0
- package/dist/particle/ParticleSystemWebGLRenderCmd.js +346 -0
- package/dist/particle/ParticleSystemWebGLRenderCmd.js.map +1 -0
- package/dist/particle/TIFFReader.d.ts +138 -0
- package/dist/particle/TIFFReader.d.ts.map +1 -0
- package/dist/particle/TIFFReader.js +596 -0
- package/dist/particle/TIFFReader.js.map +1 -0
- package/dist/particle/examples/ParticleFire.d.ts +60 -0
- package/dist/particle/examples/ParticleFire.d.ts.map +1 -0
- package/dist/particle/examples/ParticleFire.js +188 -0
- package/dist/particle/examples/ParticleFire.js.map +1 -0
- package/dist/particle/examples/ParticleGalaxy.d.ts +60 -0
- package/dist/particle/examples/ParticleGalaxy.d.ts.map +1 -0
- package/dist/particle/examples/ParticleGalaxy.js +199 -0
- package/dist/particle/examples/ParticleGalaxy.js.map +1 -0
- package/dist/particle/examples/ParticleSmoke.d.ts +60 -0
- package/dist/particle/examples/ParticleSmoke.d.ts.map +1 -0
- package/dist/particle/examples/ParticleSmoke.js +195 -0
- package/dist/particle/examples/ParticleSmoke.js.map +1 -0
- package/dist/particle/examples/ParticleSpiral.d.ts +38 -0
- package/dist/particle/examples/ParticleSpiral.d.ts.map +1 -0
- package/dist/particle/examples/ParticleSpiral.js +130 -0
- package/dist/particle/examples/ParticleSpiral.js.map +1 -0
- package/dist/particle/examples/index.d.ts +5 -0
- package/dist/particle/examples/index.d.ts.map +1 -0
- package/dist/particle/examples/index.js +5 -0
- package/dist/particle/examples/index.js.map +1 -0
- package/dist/particle/index.d.ts +2 -0
- package/dist/particle/index.d.ts.map +1 -0
- package/dist/particle/index.js +2 -0
- package/dist/particle/index.js.map +1 -0
- package/dist/polyfills.d.ts +34 -0
- package/dist/polyfills.d.ts.map +1 -0
- package/dist/polyfills.js +102 -0
- package/dist/polyfills.js.map +1 -0
- package/dist/progress-timer/ActionProgressTimer.d.ts +118 -0
- package/dist/progress-timer/ActionProgressTimer.d.ts.map +1 -0
- package/dist/progress-timer/ActionProgressTimer.js +173 -0
- package/dist/progress-timer/ActionProgressTimer.js.map +1 -0
- package/dist/progress-timer/ProgressTimer.d.ts +143 -0
- package/dist/progress-timer/ProgressTimer.d.ts.map +1 -0
- package/dist/progress-timer/ProgressTimer.js +228 -0
- package/dist/progress-timer/ProgressTimer.js.map +1 -0
- package/dist/progress-timer/ProgressTimerWebGLRenderCmd.d.ts +56 -0
- package/dist/progress-timer/ProgressTimerWebGLRenderCmd.d.ts.map +1 -0
- package/dist/progress-timer/ProgressTimerWebGLRenderCmd.js +445 -0
- package/dist/progress-timer/ProgressTimerWebGLRenderCmd.js.map +1 -0
- package/dist/progress-timer/index.d.ts +3 -0
- package/dist/progress-timer/index.d.ts.map +1 -0
- package/dist/progress-timer/index.js +3 -0
- package/dist/progress-timer/index.js.map +1 -0
- package/dist/render-texture/RenderTexture.d.ts +226 -0
- package/dist/render-texture/RenderTexture.d.ts.map +1 -0
- package/dist/render-texture/RenderTexture.js +332 -0
- package/dist/render-texture/RenderTexture.js.map +1 -0
- package/dist/render-texture/RenderTextureWebGLRenderCmd.d.ts +28 -0
- package/dist/render-texture/RenderTextureWebGLRenderCmd.d.ts.map +1 -0
- package/dist/render-texture/RenderTextureWebGLRenderCmd.js +276 -0
- package/dist/render-texture/RenderTextureWebGLRenderCmd.js.map +1 -0
- package/dist/render-texture/index.d.ts +2 -0
- package/dist/render-texture/index.d.ts.map +1 -0
- package/dist/render-texture/index.js +2 -0
- package/dist/render-texture/index.js.map +1 -0
- package/dist/shaders/GLProgram.d.ts +288 -0
- package/dist/shaders/GLProgram.d.ts.map +1 -0
- package/dist/shaders/GLProgram.js +794 -0
- package/dist/shaders/GLProgram.js.map +1 -0
- package/dist/shaders/GLProgramState.d.ts +58 -0
- package/dist/shaders/GLProgramState.d.ts.map +1 -0
- package/dist/shaders/GLProgramState.js +255 -0
- package/dist/shaders/GLProgramState.js.map +1 -0
- package/dist/shaders/GLStateCache.d.ts +97 -0
- package/dist/shaders/GLStateCache.d.ts.map +1 -0
- package/dist/shaders/GLStateCache.js +255 -0
- package/dist/shaders/GLStateCache.js.map +1 -0
- package/dist/shaders/ShaderCache.d.ts +111 -0
- package/dist/shaders/ShaderCache.d.ts.map +1 -0
- package/dist/shaders/ShaderCache.js +273 -0
- package/dist/shaders/ShaderCache.js.map +1 -0
- package/dist/shaders/Shaders.d.ts +84 -0
- package/dist/shaders/Shaders.d.ts.map +1 -0
- package/dist/shaders/Shaders.js +250 -0
- package/dist/shaders/Shaders.js.map +1 -0
- package/dist/shaders/index.d.ts +5 -0
- package/dist/shaders/index.d.ts.map +1 -0
- package/dist/shaders/index.js +5 -0
- package/dist/shaders/index.js.map +1 -0
- package/dist/shape-nodes/DrawNode.d.ts +61 -0
- package/dist/shape-nodes/DrawNode.d.ts.map +1 -0
- package/dist/shape-nodes/DrawNode.js +597 -0
- package/dist/shape-nodes/DrawNode.js.map +1 -0
- package/dist/shape-nodes/DrawNodeWebGLRenderCmd.d.ts +11 -0
- package/dist/shape-nodes/DrawNodeWebGLRenderCmd.d.ts.map +1 -0
- package/dist/shape-nodes/DrawNodeWebGLRenderCmd.js +27 -0
- package/dist/shape-nodes/DrawNodeWebGLRenderCmd.js.map +1 -0
- package/dist/text-input/IMEDispatcher.d.ts +180 -0
- package/dist/text-input/IMEDispatcher.d.ts.map +1 -0
- package/dist/text-input/IMEDispatcher.js +454 -0
- package/dist/text-input/IMEDispatcher.js.map +1 -0
- package/dist/text-input/TextFieldTTF.d.ts +219 -0
- package/dist/text-input/TextFieldTTF.d.ts.map +1 -0
- package/dist/text-input/TextFieldTTF.js +381 -0
- package/dist/text-input/TextFieldTTF.js.map +1 -0
- package/dist/textures/Texture2D.d.ts +10 -0
- package/dist/textures/Texture2D.d.ts.map +1 -0
- package/dist/textures/Texture2D.js +10 -0
- package/dist/textures/Texture2D.js.map +1 -0
- package/dist/textures/TextureAtlas.d.ts +204 -0
- package/dist/textures/TextureAtlas.d.ts.map +1 -0
- package/dist/textures/TextureAtlas.js +602 -0
- package/dist/textures/TextureAtlas.js.map +1 -0
- package/dist/textures/TextureCache.d.ts +147 -0
- package/dist/textures/TextureCache.d.ts.map +1 -0
- package/dist/textures/TextureCache.js +327 -0
- package/dist/textures/TextureCache.js.map +1 -0
- package/dist/textures/TexturesPropertyDefine.d.ts +2 -0
- package/dist/textures/TexturesPropertyDefine.d.ts.map +1 -0
- package/dist/textures/TexturesPropertyDefine.js +39 -0
- package/dist/textures/TexturesPropertyDefine.js.map +1 -0
- package/dist/textures/TexturesWebGL.d.ts +349 -0
- package/dist/textures/TexturesWebGL.d.ts.map +1 -0
- package/dist/textures/TexturesWebGL.js +765 -0
- package/dist/textures/TexturesWebGL.js.map +1 -0
- package/dist/textures/WebGLTextureCache.d.ts +2 -0
- package/dist/textures/WebGLTextureCache.d.ts.map +1 -0
- package/dist/textures/WebGLTextureCache.js +79 -0
- package/dist/textures/WebGLTextureCache.js.map +1 -0
- package/dist/textures/index.d.ts +3 -0
- package/dist/textures/index.d.ts.map +1 -0
- package/dist/textures/index.js +3 -0
- package/dist/textures/index.js.map +1 -0
- package/dist/tilemap/TGAlib.d.ts +103 -0
- package/dist/tilemap/TGAlib.d.ts.map +1 -0
- package/dist/tilemap/TGAlib.js +338 -0
- package/dist/tilemap/TGAlib.js.map +1 -0
- package/dist/tilemap/TMXLayer.d.ts +225 -0
- package/dist/tilemap/TMXLayer.d.ts.map +1 -0
- package/dist/tilemap/TMXLayer.js +694 -0
- package/dist/tilemap/TMXLayer.js.map +1 -0
- package/dist/tilemap/TMXLayerInfo.d.ts +42 -0
- package/dist/tilemap/TMXLayerInfo.d.ts.map +1 -0
- package/dist/tilemap/TMXLayerInfo.js +57 -0
- package/dist/tilemap/TMXLayerInfo.js.map +1 -0
- package/dist/tilemap/TMXLayerWebGLRenderCmd.d.ts +17 -0
- package/dist/tilemap/TMXLayerWebGLRenderCmd.d.ts.map +1 -0
- package/dist/tilemap/TMXLayerWebGLRenderCmd.js +209 -0
- package/dist/tilemap/TMXLayerWebGLRenderCmd.js.map +1 -0
- package/dist/tilemap/TMXMapInfo.d.ts +210 -0
- package/dist/tilemap/TMXMapInfo.d.ts.map +1 -0
- package/dist/tilemap/TMXMapInfo.js +614 -0
- package/dist/tilemap/TMXMapInfo.js.map +1 -0
- package/dist/tilemap/TMXObjectGroup.d.ts +70 -0
- package/dist/tilemap/TMXObjectGroup.d.ts.map +1 -0
- package/dist/tilemap/TMXObjectGroup.js +106 -0
- package/dist/tilemap/TMXObjectGroup.js.map +1 -0
- package/dist/tilemap/TMXTiledMap.d.ts +163 -0
- package/dist/tilemap/TMXTiledMap.d.ts.map +1 -0
- package/dist/tilemap/TMXTiledMap.js +347 -0
- package/dist/tilemap/TMXTiledMap.js.map +1 -0
- package/dist/tilemap/TMXTilesetInfo.d.ts +38 -0
- package/dist/tilemap/TMXTilesetInfo.d.ts.map +1 -0
- package/dist/tilemap/TMXTilesetInfo.js +59 -0
- package/dist/tilemap/TMXTilesetInfo.js.map +1 -0
- package/dist/tilemap/TMXXMLParser.d.ts +52 -0
- package/dist/tilemap/TMXXMLParser.d.ts.map +1 -0
- package/dist/tilemap/TMXXMLParser.js +52 -0
- package/dist/tilemap/TMXXMLParser.js.map +1 -0
- package/dist/tilemap/index.d.ts +4 -0
- package/dist/tilemap/index.d.ts.map +1 -0
- package/dist/tilemap/index.js +4 -0
- package/dist/tilemap/index.js.map +1 -0
- package/dist/ui/base/FocusNavigationController.d.ts +12 -0
- package/dist/ui/base/FocusNavigationController.d.ts.map +1 -0
- package/dist/ui/base/FocusNavigationController.js +54 -0
- package/dist/ui/base/FocusNavigationController.js.map +1 -0
- package/dist/ui/base/ProtectedNode.d.ts +66 -0
- package/dist/ui/base/ProtectedNode.d.ts.map +1 -0
- package/dist/ui/base/ProtectedNode.js +248 -0
- package/dist/ui/base/ProtectedNode.js.map +1 -0
- package/dist/ui/base/ProtectedNodeWebGLRenderCmd.d.ts +13 -0
- package/dist/ui/base/ProtectedNodeWebGLRenderCmd.d.ts.map +1 -0
- package/dist/ui/base/ProtectedNodeWebGLRenderCmd.js +136 -0
- package/dist/ui/base/ProtectedNodeWebGLRenderCmd.js.map +1 -0
- package/dist/ui/base/UIHelper.d.ts +48 -0
- package/dist/ui/base/UIHelper.d.ts.map +1 -0
- package/dist/ui/base/UIHelper.js +128 -0
- package/dist/ui/base/UIHelper.js.map +1 -0
- package/dist/ui/base/UIScale9Sprite.d.ts +224 -0
- package/dist/ui/base/UIScale9Sprite.d.ts.map +1 -0
- package/dist/ui/base/UIScale9Sprite.js +825 -0
- package/dist/ui/base/UIScale9Sprite.js.map +1 -0
- package/dist/ui/base/UIScale9SpriteWebGLRenderCmd.d.ts +15 -0
- package/dist/ui/base/UIScale9SpriteWebGLRenderCmd.d.ts.map +1 -0
- package/dist/ui/base/UIScale9SpriteWebGLRenderCmd.js +119 -0
- package/dist/ui/base/UIScale9SpriteWebGLRenderCmd.js.map +1 -0
- package/dist/ui/base/UIWidget.d.ts +794 -0
- package/dist/ui/base/UIWidget.d.ts.map +1 -0
- package/dist/ui/base/UIWidget.js +1634 -0
- package/dist/ui/base/UIWidget.js.map +1 -0
- package/dist/ui/base/UIWidgetRenderCmd.d.ts +9 -0
- package/dist/ui/base/UIWidgetRenderCmd.d.ts.map +1 -0
- package/dist/ui/base/UIWidgetRenderCmd.js +41 -0
- package/dist/ui/base/UIWidgetRenderCmd.js.map +1 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +9 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/layout/UILayout.d.ts +486 -0
- package/dist/ui/layout/UILayout.d.ts.map +1 -0
- package/dist/ui/layout/UILayout.js +1430 -0
- package/dist/ui/layout/UILayout.js.map +1 -0
- package/dist/ui/layout/UILayoutParameter.d.ts +344 -0
- package/dist/ui/layout/UILayoutParameter.d.ts.map +1 -0
- package/dist/ui/layout/UILayoutParameter.js +444 -0
- package/dist/ui/layout/UILayoutParameter.js.map +1 -0
- package/dist/ui/layout/UILayoutWebGLRenderCmd.d.ts +30 -0
- package/dist/ui/layout/UILayoutWebGLRenderCmd.d.ts.map +1 -0
- package/dist/ui/layout/UILayoutWebGLRenderCmd.js +136 -0
- package/dist/ui/layout/UILayoutWebGLRenderCmd.js.map +1 -0
- package/dist/ui/layout/constant.d.ts +30 -0
- package/dist/ui/layout/constant.d.ts.map +1 -0
- package/dist/ui/layout/constant.js +31 -0
- package/dist/ui/layout/constant.js.map +1 -0
- package/dist/ui/widget/UIButton.d.ts +248 -0
- package/dist/ui/widget/UIButton.d.ts.map +1 -0
- package/dist/ui/widget/UIButton.js +727 -0
- package/dist/ui/widget/UIButton.js.map +1 -0
- package/dist/ui/widget/UIRichText.d.ts +216 -0
- package/dist/ui/widget/UIRichText.d.ts.map +1 -0
- package/dist/ui/widget/UIRichText.js +549 -0
- package/dist/ui/widget/UIRichText.js.map +1 -0
- package/dist/ui/widget/UIScrollView.d.ts +547 -0
- package/dist/ui/widget/UIScrollView.d.ts.map +1 -0
- package/dist/ui/widget/UIScrollView.js +1544 -0
- package/dist/ui/widget/UIScrollView.js.map +1 -0
- package/dist/ui/widget/UIScrollViewBar.d.ts +101 -0
- package/dist/ui/widget/UIScrollViewBar.d.ts.map +1 -0
- package/dist/ui/widget/UIScrollViewBar.js +277 -0
- package/dist/ui/widget/UIScrollViewBar.js.map +1 -0
- package/dist/ui/widget/UIScrollViewWebGLRenderCmd.d.ts +10 -0
- package/dist/ui/widget/UIScrollViewWebGLRenderCmd.d.ts.map +1 -0
- package/dist/ui/widget/UIScrollViewWebGLRenderCmd.js +42 -0
- package/dist/ui/widget/UIScrollViewWebGLRenderCmd.js.map +1 -0
- package/dist/ui/widget/UISlider.d.ts +229 -0
- package/dist/ui/widget/UISlider.d.ts.map +1 -0
- package/dist/ui/widget/UISlider.js +667 -0
- package/dist/ui/widget/UISlider.js.map +1 -0
- package/dist/ui/widget/UIText.d.ts +90 -0
- package/dist/ui/widget/UIText.d.ts.map +1 -0
- package/dist/ui/widget/UIText.js +325 -0
- package/dist/ui/widget/UIText.js.map +1 -0
- package/dist/ui/widget/UITextField.d.ts +282 -0
- package/dist/ui/widget/UITextField.d.ts.map +1 -0
- package/dist/ui/widget/UITextField.js +549 -0
- package/dist/ui/widget/UITextField.js.map +1 -0
- package/dist/ui/widget/UITextFieldRenderer.d.ts +41 -0
- package/dist/ui/widget/UITextFieldRenderer.d.ts.map +1 -0
- package/dist/ui/widget/UITextFieldRenderer.js +150 -0
- package/dist/ui/widget/UITextFieldRenderer.js.map +1 -0
- package/eslint.config.ts +59 -0
- package/index.html +22 -0
- package/package.json +38 -0
- package/res/Button.mp3 +0 -0
- package/res/SmallSun.plist +108 -0
- package/res/Spiral.plist +102 -0
- package/res/base.png +0 -0
- package/res/button.png +0 -0
- package/res/button_plus.png +0 -0
- package/res/ortho-test1.png +0 -0
- package/res/orthogonal-test1.tmx +9 -0
- package/res/orthogonal-test1.tsx +4 -0
- package/res/particle.png +0 -0
- package/res/sliderThumb.png +0 -0
- package/res/sliderTrack.png +0 -0
- package/res/streak.png +0 -0
- package/res/ui.plist +578 -0
- package/res/ui.png +0 -0
- package/res/vite.svg +1 -0
- package/test/ActionScene.ts +15 -0
- package/test/DemoScene.ts +108 -0
- package/test/GraphicsTest.ts +17 -0
- package/test/ParticleScene.ts +24 -0
- package/test/TiledMapScene.ts +14 -0
- package/test/index.ts +28 -0
- package/vite.config.ts +13 -0
|
@@ -0,0 +1,1112 @@
|
|
|
1
|
+
import { director, renderer } from '../..';
|
|
2
|
+
import { _LogInfos, assert, log } from '../../helper/Debugger';
|
|
3
|
+
import { ActionManager } from '../ActionManager';
|
|
4
|
+
import { affineTransformConcat, affineTransformConcatIn, affineTransformInvert, affineTransformMakeIdentity, pointApplyAffineTransform, rectApplyAffineTransform, rectApplyAffineTransformIn, } from '../cocoa/AffineTransform';
|
|
5
|
+
import { p, Point, Rect, rectUnion, Size } from '../cocoa/Geometry';
|
|
6
|
+
import { EventHelper } from '../event-manager/EventHelper';
|
|
7
|
+
import { eventManager } from '../event-manager/EventManager';
|
|
8
|
+
import { Color, color } from '../platform/Color';
|
|
9
|
+
import { arrayRemoveObject, REPEAT_FOREVER } from '../platform/Macro';
|
|
10
|
+
import { Scheduler } from '../Scheduler';
|
|
11
|
+
import { pAdd, pSub } from '../support/PointExtension';
|
|
12
|
+
import { dirtyFlags } from './NodeRenderCmd';
|
|
13
|
+
import { NodeWebGLRenderCmd } from './NodeWebGLRenderCmd';
|
|
14
|
+
export const NODE_TAG_INVALID = -1;
|
|
15
|
+
export let s_globalOrderOfArrival = 1;
|
|
16
|
+
export function s_globalOrderOfArrivalPP() {
|
|
17
|
+
return s_globalOrderOfArrival++;
|
|
18
|
+
}
|
|
19
|
+
export class Node extends EventHelper {
|
|
20
|
+
// Static members
|
|
21
|
+
static _stateCallbackType = { onEnter: 1, onExit: 2, cleanup: 3, onEnterTransitionDidFinish: 4, onExitTransitionDidStart: 5, max: 6 };
|
|
22
|
+
static _performStacks = [[]];
|
|
23
|
+
static _performing = 0;
|
|
24
|
+
static _dirtyFlags = dirtyFlags;
|
|
25
|
+
// instance id used by scheduler keys
|
|
26
|
+
__instanceId = Math.random().toString(36).slice(2);
|
|
27
|
+
// fields (initialized to sensible defaults)
|
|
28
|
+
_localZOrder = 0;
|
|
29
|
+
_globalZOrder = 0;
|
|
30
|
+
_vertexZ = 0.0;
|
|
31
|
+
_customZ = NaN;
|
|
32
|
+
_rotationX = 0;
|
|
33
|
+
_rotationY = 0.0;
|
|
34
|
+
_scaleX = 1.0;
|
|
35
|
+
_scaleY = 1.0;
|
|
36
|
+
_usingNormalizedPosition = false;
|
|
37
|
+
_normalizedPositionDirty = false;
|
|
38
|
+
_skewX = 0.0;
|
|
39
|
+
_skewY = 0.0;
|
|
40
|
+
_children = [];
|
|
41
|
+
_visible = true;
|
|
42
|
+
_running = false;
|
|
43
|
+
_parent = null;
|
|
44
|
+
_ignoreAnchorPointForPosition = false;
|
|
45
|
+
tag = NODE_TAG_INVALID;
|
|
46
|
+
_reorderChildDirty = false;
|
|
47
|
+
arrivalOrder = 0;
|
|
48
|
+
_additionalTransformDirty = false;
|
|
49
|
+
_isTransitionFinished = false;
|
|
50
|
+
_className = 'Node';
|
|
51
|
+
_showNode = false;
|
|
52
|
+
_name = '';
|
|
53
|
+
_realOpacity = 255;
|
|
54
|
+
_cascadeColorEnabled = false;
|
|
55
|
+
_cascadeOpacityEnabled = false;
|
|
56
|
+
constructor() {
|
|
57
|
+
super();
|
|
58
|
+
this._anchorPoint = p(0, 0);
|
|
59
|
+
this._contentSize = Size(0, 0);
|
|
60
|
+
this._position = p(0, 0);
|
|
61
|
+
this._normalizedPosition = p(0, 0);
|
|
62
|
+
this._children = [];
|
|
63
|
+
this._additionalTransform = affineTransformMakeIdentity();
|
|
64
|
+
// if (globalThis.ComponentContainer) {
|
|
65
|
+
// this._componentContainer = new globalThis.ComponentContainer(this);
|
|
66
|
+
// }
|
|
67
|
+
this._realColor = color(255, 255, 255, 255);
|
|
68
|
+
this._renderCmd = this._createRenderCmd();
|
|
69
|
+
}
|
|
70
|
+
init() {
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
attr(attrs) {
|
|
74
|
+
for (const key in attrs) {
|
|
75
|
+
this[key] = attrs[key];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
getSkewX() {
|
|
79
|
+
return this._skewX;
|
|
80
|
+
}
|
|
81
|
+
setSkewX(newSkewX) {
|
|
82
|
+
this._skewX = newSkewX;
|
|
83
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
84
|
+
}
|
|
85
|
+
getSkewY() {
|
|
86
|
+
return this._skewY;
|
|
87
|
+
}
|
|
88
|
+
setSkewY(newSkewY) {
|
|
89
|
+
this._skewY = newSkewY;
|
|
90
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
91
|
+
}
|
|
92
|
+
setLocalZOrder(localZOrder) {
|
|
93
|
+
if (localZOrder === this._localZOrder)
|
|
94
|
+
return;
|
|
95
|
+
if (this._parent)
|
|
96
|
+
this._parent.reorderChild(this, localZOrder);
|
|
97
|
+
else
|
|
98
|
+
this._localZOrder = localZOrder;
|
|
99
|
+
eventManager._setDirtyForNode(this);
|
|
100
|
+
}
|
|
101
|
+
_setLocalZOrder(localZOrder) {
|
|
102
|
+
this._localZOrder = localZOrder;
|
|
103
|
+
}
|
|
104
|
+
getLocalZOrder() {
|
|
105
|
+
return this._localZOrder;
|
|
106
|
+
}
|
|
107
|
+
getZOrder() {
|
|
108
|
+
log(_LogInfos.Node_getZOrder);
|
|
109
|
+
return this.getLocalZOrder();
|
|
110
|
+
}
|
|
111
|
+
setZOrder(z) {
|
|
112
|
+
log(_LogInfos.Node_setZOrder);
|
|
113
|
+
this.setLocalZOrder(z);
|
|
114
|
+
}
|
|
115
|
+
setGlobalZOrder(globalZOrder) {
|
|
116
|
+
if (this._globalZOrder !== globalZOrder) {
|
|
117
|
+
this._globalZOrder = globalZOrder;
|
|
118
|
+
eventManager._setDirtyForNode(this);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
getGlobalZOrder() {
|
|
122
|
+
return this._globalZOrder;
|
|
123
|
+
}
|
|
124
|
+
getVertexZ() {
|
|
125
|
+
return this._vertexZ;
|
|
126
|
+
}
|
|
127
|
+
setVertexZ(Var) {
|
|
128
|
+
this._customZ = this._vertexZ = Var;
|
|
129
|
+
}
|
|
130
|
+
getRotation() {
|
|
131
|
+
if (this._rotationX !== this._rotationY)
|
|
132
|
+
log(_LogInfos.Node_getRotation);
|
|
133
|
+
return this._rotationX;
|
|
134
|
+
}
|
|
135
|
+
setRotation(newRotation) {
|
|
136
|
+
this._rotationX = this._rotationY = newRotation;
|
|
137
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
138
|
+
}
|
|
139
|
+
getRotationX() {
|
|
140
|
+
return this._rotationX;
|
|
141
|
+
}
|
|
142
|
+
setRotationX(rotationX) {
|
|
143
|
+
this._rotationX = rotationX;
|
|
144
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
145
|
+
}
|
|
146
|
+
getRotationY() {
|
|
147
|
+
return this._rotationY;
|
|
148
|
+
}
|
|
149
|
+
setRotationY(rotationY) {
|
|
150
|
+
this._rotationY = rotationY;
|
|
151
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
152
|
+
}
|
|
153
|
+
getScale() {
|
|
154
|
+
if (this._scaleX !== this._scaleY)
|
|
155
|
+
log(_LogInfos.Node_getScale);
|
|
156
|
+
return this._scaleX;
|
|
157
|
+
}
|
|
158
|
+
setScale(scale, scaleY) {
|
|
159
|
+
this._scaleX = scale;
|
|
160
|
+
this._scaleY = scaleY || scaleY === 0 ? scaleY : scale;
|
|
161
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
162
|
+
}
|
|
163
|
+
getScaleX() {
|
|
164
|
+
return this._scaleX;
|
|
165
|
+
}
|
|
166
|
+
setScaleX(newScaleX) {
|
|
167
|
+
this._scaleX = newScaleX;
|
|
168
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
169
|
+
}
|
|
170
|
+
getScaleY() {
|
|
171
|
+
return this._scaleY;
|
|
172
|
+
}
|
|
173
|
+
setScaleY(newScaleY) {
|
|
174
|
+
this._scaleY = newScaleY;
|
|
175
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
176
|
+
}
|
|
177
|
+
setPosition(newPosOrxValue, yValue) {
|
|
178
|
+
const locPosition = this._position;
|
|
179
|
+
if (yValue === undefined) {
|
|
180
|
+
if (locPosition.x === newPosOrxValue.x && locPosition.y === newPosOrxValue.y)
|
|
181
|
+
return;
|
|
182
|
+
locPosition.x = newPosOrxValue.x;
|
|
183
|
+
locPosition.y = newPosOrxValue.y;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
if (locPosition.x === newPosOrxValue && locPosition.y === yValue)
|
|
187
|
+
return;
|
|
188
|
+
locPosition.x = newPosOrxValue;
|
|
189
|
+
locPosition.y = yValue;
|
|
190
|
+
}
|
|
191
|
+
this._usingNormalizedPosition = false;
|
|
192
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
193
|
+
}
|
|
194
|
+
setNormalizedPosition(posOrX, y) {
|
|
195
|
+
const locPosition = this._normalizedPosition;
|
|
196
|
+
if (y === undefined) {
|
|
197
|
+
locPosition.x = posOrX.x;
|
|
198
|
+
locPosition.y = posOrX.y;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
locPosition.x = posOrX;
|
|
202
|
+
locPosition.y = y;
|
|
203
|
+
}
|
|
204
|
+
this._normalizedPositionDirty = this._usingNormalizedPosition = true;
|
|
205
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
206
|
+
}
|
|
207
|
+
getPosition() {
|
|
208
|
+
return p(this._position);
|
|
209
|
+
}
|
|
210
|
+
getNormalizedPosition() {
|
|
211
|
+
return p(this._normalizedPosition);
|
|
212
|
+
}
|
|
213
|
+
getPositionX() {
|
|
214
|
+
return this._position.x;
|
|
215
|
+
}
|
|
216
|
+
setPositionX(x) {
|
|
217
|
+
this._position.x = x;
|
|
218
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
219
|
+
}
|
|
220
|
+
getPositionY() {
|
|
221
|
+
return this._position.y;
|
|
222
|
+
}
|
|
223
|
+
setPositionY(y) {
|
|
224
|
+
this._position.y = y;
|
|
225
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
226
|
+
}
|
|
227
|
+
getChildrenCount() {
|
|
228
|
+
return this._children.length;
|
|
229
|
+
}
|
|
230
|
+
getChildren() {
|
|
231
|
+
return this._children;
|
|
232
|
+
}
|
|
233
|
+
isVisible() {
|
|
234
|
+
return this._visible;
|
|
235
|
+
}
|
|
236
|
+
setVisible(visible) {
|
|
237
|
+
if (this._visible !== visible) {
|
|
238
|
+
this._visible = visible;
|
|
239
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
240
|
+
renderer.childrenOrderDirty = true;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
getAnchorPoint() {
|
|
244
|
+
return p(this._anchorPoint);
|
|
245
|
+
}
|
|
246
|
+
setAnchorPoint(point, y) {
|
|
247
|
+
const locAnchorPoint = this._anchorPoint;
|
|
248
|
+
if (y === undefined) {
|
|
249
|
+
if (point.x === locAnchorPoint.x && point.y === locAnchorPoint.y)
|
|
250
|
+
return;
|
|
251
|
+
locAnchorPoint.x = point.x;
|
|
252
|
+
locAnchorPoint.y = point.y;
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
if (point === locAnchorPoint.x && y === locAnchorPoint.y)
|
|
256
|
+
return;
|
|
257
|
+
locAnchorPoint.x = point;
|
|
258
|
+
locAnchorPoint.y = y;
|
|
259
|
+
}
|
|
260
|
+
this._renderCmd._updateAnchorPointInPoint();
|
|
261
|
+
}
|
|
262
|
+
_getAnchorX() {
|
|
263
|
+
return this._anchorPoint.x;
|
|
264
|
+
}
|
|
265
|
+
_setAnchorX(x) {
|
|
266
|
+
if (this._anchorPoint.x === x)
|
|
267
|
+
return;
|
|
268
|
+
this._anchorPoint.x = x;
|
|
269
|
+
this._renderCmd._updateAnchorPointInPoint();
|
|
270
|
+
}
|
|
271
|
+
_getAnchorY() {
|
|
272
|
+
return this._anchorPoint.y;
|
|
273
|
+
}
|
|
274
|
+
_setAnchorY(y) {
|
|
275
|
+
if (this._anchorPoint.y === y)
|
|
276
|
+
return;
|
|
277
|
+
this._anchorPoint.y = y;
|
|
278
|
+
this._renderCmd._updateAnchorPointInPoint();
|
|
279
|
+
}
|
|
280
|
+
getAnchorPointInPoints() {
|
|
281
|
+
return this._renderCmd.getAnchorPointInPoints();
|
|
282
|
+
}
|
|
283
|
+
_getWidth() {
|
|
284
|
+
return this._contentSize.width;
|
|
285
|
+
}
|
|
286
|
+
_setWidth(width) {
|
|
287
|
+
this._contentSize.width = width;
|
|
288
|
+
this._renderCmd._updateAnchorPointInPoint();
|
|
289
|
+
}
|
|
290
|
+
_getHeight() {
|
|
291
|
+
return this._contentSize.height;
|
|
292
|
+
}
|
|
293
|
+
_setHeight(height) {
|
|
294
|
+
this._contentSize.height = height;
|
|
295
|
+
this._renderCmd._updateAnchorPointInPoint();
|
|
296
|
+
}
|
|
297
|
+
getContentSize() {
|
|
298
|
+
return Size(this._contentSize);
|
|
299
|
+
}
|
|
300
|
+
setContentSize(sz, height) {
|
|
301
|
+
const locContentSize = this._contentSize;
|
|
302
|
+
if (height === undefined) {
|
|
303
|
+
if (sz.width === locContentSize.width && sz.height === locContentSize.height)
|
|
304
|
+
return;
|
|
305
|
+
locContentSize.width = sz.width;
|
|
306
|
+
locContentSize.height = sz.height;
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
if (sz === locContentSize.width && height === locContentSize.height)
|
|
310
|
+
return;
|
|
311
|
+
locContentSize.width = sz;
|
|
312
|
+
locContentSize.height = height;
|
|
313
|
+
}
|
|
314
|
+
this._renderCmd._updateAnchorPointInPoint();
|
|
315
|
+
}
|
|
316
|
+
isRunning() {
|
|
317
|
+
return this._running;
|
|
318
|
+
}
|
|
319
|
+
getParent() {
|
|
320
|
+
return this._parent;
|
|
321
|
+
}
|
|
322
|
+
setParent(parent) {
|
|
323
|
+
this._parent = parent;
|
|
324
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
325
|
+
}
|
|
326
|
+
isIgnoreAnchorPointForPosition() {
|
|
327
|
+
return this._ignoreAnchorPointForPosition;
|
|
328
|
+
}
|
|
329
|
+
ignoreAnchorPointForPosition(newValue) {
|
|
330
|
+
if (newValue !== this._ignoreAnchorPointForPosition) {
|
|
331
|
+
this._ignoreAnchorPointForPosition = newValue;
|
|
332
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
getTag() {
|
|
336
|
+
return this.tag;
|
|
337
|
+
}
|
|
338
|
+
setTag(tag) {
|
|
339
|
+
this.tag = tag;
|
|
340
|
+
}
|
|
341
|
+
setName(name) {
|
|
342
|
+
this._name = name;
|
|
343
|
+
}
|
|
344
|
+
getName() {
|
|
345
|
+
return this._name;
|
|
346
|
+
}
|
|
347
|
+
getUserData() {
|
|
348
|
+
return this.userData;
|
|
349
|
+
}
|
|
350
|
+
setUserData(Var) {
|
|
351
|
+
this.userData = Var;
|
|
352
|
+
}
|
|
353
|
+
getUserObject() {
|
|
354
|
+
return this.userObject;
|
|
355
|
+
}
|
|
356
|
+
setUserObject(newValue) {
|
|
357
|
+
if (this.userObject !== newValue)
|
|
358
|
+
this.userObject = newValue;
|
|
359
|
+
}
|
|
360
|
+
getOrderOfArrival() {
|
|
361
|
+
return this.arrivalOrder;
|
|
362
|
+
}
|
|
363
|
+
setOrderOfArrival(Var) {
|
|
364
|
+
this.arrivalOrder = Var;
|
|
365
|
+
}
|
|
366
|
+
getActionManager() {
|
|
367
|
+
return this._actionManager || director.getActionManager();
|
|
368
|
+
}
|
|
369
|
+
setActionManager(actionManager) {
|
|
370
|
+
if (this._actionManager !== actionManager) {
|
|
371
|
+
this.stopAllActions();
|
|
372
|
+
this._actionManager = actionManager;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
// legacy property accessors kept for compatibility with older code
|
|
376
|
+
get actionManager() {
|
|
377
|
+
return this.getActionManager();
|
|
378
|
+
}
|
|
379
|
+
set actionManager(v) {
|
|
380
|
+
this.setActionManager(v);
|
|
381
|
+
}
|
|
382
|
+
getScheduler() {
|
|
383
|
+
return this._scheduler || director.getScheduler();
|
|
384
|
+
}
|
|
385
|
+
setScheduler(scheduler) {
|
|
386
|
+
if (this._scheduler !== scheduler) {
|
|
387
|
+
this.unscheduleAllCallbacks();
|
|
388
|
+
this._scheduler = scheduler;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
get scheduler() {
|
|
392
|
+
return this.getScheduler();
|
|
393
|
+
}
|
|
394
|
+
set scheduler(v) {
|
|
395
|
+
this.setScheduler(v);
|
|
396
|
+
}
|
|
397
|
+
boundingBox() {
|
|
398
|
+
log(_LogInfos.Node_boundingBox);
|
|
399
|
+
return this.getBoundingBox();
|
|
400
|
+
}
|
|
401
|
+
getBoundingBox() {
|
|
402
|
+
const r = Rect(0, 0, this._contentSize.width, this._contentSize.height);
|
|
403
|
+
return rectApplyAffineTransformIn(r, this.getNodeToParentTransform());
|
|
404
|
+
}
|
|
405
|
+
cleanup() {
|
|
406
|
+
this.stopAllActions();
|
|
407
|
+
this.unscheduleAllCallbacks();
|
|
408
|
+
eventManager.removeListeners(this);
|
|
409
|
+
}
|
|
410
|
+
getChildByTag(aTag) {
|
|
411
|
+
const __children = this._children;
|
|
412
|
+
if (__children !== null) {
|
|
413
|
+
for (let i = 0; i < __children.length; i++) {
|
|
414
|
+
const node = __children[i];
|
|
415
|
+
if (node && node.tag === aTag)
|
|
416
|
+
return node;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return null;
|
|
420
|
+
}
|
|
421
|
+
getChildByName(name) {
|
|
422
|
+
if (!name) {
|
|
423
|
+
log('Invalid name');
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
const locChildren = this._children;
|
|
427
|
+
for (let i = 0, len = locChildren.length; i < len; i++)
|
|
428
|
+
if (locChildren[i]._name === name)
|
|
429
|
+
return locChildren[i];
|
|
430
|
+
return null;
|
|
431
|
+
}
|
|
432
|
+
addChild(child, localZOrder, tag) {
|
|
433
|
+
localZOrder = localZOrder === undefined ? child._localZOrder : localZOrder;
|
|
434
|
+
let name, setTag = false;
|
|
435
|
+
if (tag === undefined) {
|
|
436
|
+
name = child._name;
|
|
437
|
+
}
|
|
438
|
+
else if (typeof tag === 'string') {
|
|
439
|
+
name = tag;
|
|
440
|
+
tag = undefined;
|
|
441
|
+
}
|
|
442
|
+
else if (typeof tag === 'number') {
|
|
443
|
+
setTag = true;
|
|
444
|
+
name = '';
|
|
445
|
+
}
|
|
446
|
+
assert(child, _LogInfos.Node_addChild_3);
|
|
447
|
+
assert(child._parent === null, 'child already added. It cant be added again');
|
|
448
|
+
this._addChildHelper(child, localZOrder, tag, name, setTag);
|
|
449
|
+
}
|
|
450
|
+
_addChildHelper(child, localZOrder, tag, name, setTag) {
|
|
451
|
+
if (!this._children)
|
|
452
|
+
this._children = [];
|
|
453
|
+
this._insertChild(child, localZOrder);
|
|
454
|
+
if (setTag)
|
|
455
|
+
child.setTag(tag);
|
|
456
|
+
else
|
|
457
|
+
child.setName(name);
|
|
458
|
+
child.setParent(this);
|
|
459
|
+
child.setOrderOfArrival(s_globalOrderOfArrival++);
|
|
460
|
+
if (this._running) {
|
|
461
|
+
child._performRecursive(Node._stateCallbackType.onEnter);
|
|
462
|
+
if (this._isTransitionFinished)
|
|
463
|
+
child._performRecursive(Node._stateCallbackType.onEnterTransitionDidFinish);
|
|
464
|
+
}
|
|
465
|
+
child._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
466
|
+
if (this._cascadeColorEnabled)
|
|
467
|
+
child._renderCmd.setDirtyFlag(Node._dirtyFlags.colorDirty);
|
|
468
|
+
if (this._cascadeOpacityEnabled)
|
|
469
|
+
child._renderCmd.setDirtyFlag(Node._dirtyFlags.opacityDirty);
|
|
470
|
+
}
|
|
471
|
+
removeFromParent(cleanup) {
|
|
472
|
+
if (this._parent) {
|
|
473
|
+
if (cleanup === undefined)
|
|
474
|
+
cleanup = true;
|
|
475
|
+
this._parent.removeChild(this, cleanup);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
removeFromParentAndCleanup(cleanup) {
|
|
479
|
+
log(_LogInfos.Node_removeFromParentAndCleanup);
|
|
480
|
+
this.removeFromParent(cleanup);
|
|
481
|
+
}
|
|
482
|
+
removeChild(child, cleanup) {
|
|
483
|
+
if (this._children.length === 0)
|
|
484
|
+
return;
|
|
485
|
+
if (cleanup === undefined)
|
|
486
|
+
cleanup = true;
|
|
487
|
+
if (this._children.indexOf(child) > -1)
|
|
488
|
+
this._detachChild(child, cleanup);
|
|
489
|
+
renderer.childrenOrderDirty = true;
|
|
490
|
+
}
|
|
491
|
+
removeChildByTag(tag, cleanup) {
|
|
492
|
+
if (tag === NODE_TAG_INVALID)
|
|
493
|
+
log(_LogInfos.Node_removeChildByTag);
|
|
494
|
+
const child = this.getChildByTag(tag);
|
|
495
|
+
if (!child)
|
|
496
|
+
log(_LogInfos.Node_removeChildByTag_2, tag);
|
|
497
|
+
else
|
|
498
|
+
this.removeChild(child, cleanup);
|
|
499
|
+
}
|
|
500
|
+
removeAllChildrenWithCleanup(cleanup) {
|
|
501
|
+
this.removeAllChildren(cleanup);
|
|
502
|
+
}
|
|
503
|
+
removeAllChildren(cleanup) {
|
|
504
|
+
const __children = this._children;
|
|
505
|
+
if (__children !== null) {
|
|
506
|
+
if (cleanup === undefined)
|
|
507
|
+
cleanup = true;
|
|
508
|
+
for (let i = 0; i < __children.length; i++) {
|
|
509
|
+
const node = __children[i];
|
|
510
|
+
if (node) {
|
|
511
|
+
if (this._running) {
|
|
512
|
+
node._performRecursive(Node._stateCallbackType.onExitTransitionDidStart);
|
|
513
|
+
node._performRecursive(Node._stateCallbackType.onExit);
|
|
514
|
+
}
|
|
515
|
+
if (cleanup)
|
|
516
|
+
node._performRecursive(Node._stateCallbackType.cleanup);
|
|
517
|
+
node._parent = null;
|
|
518
|
+
node._renderCmd.detachFromParent();
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
this._children.length = 0;
|
|
522
|
+
renderer.childrenOrderDirty = true;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
_detachChild(child, doCleanup) {
|
|
526
|
+
if (this._running) {
|
|
527
|
+
child._performRecursive(Node._stateCallbackType.onExitTransitionDidStart);
|
|
528
|
+
child._performRecursive(Node._stateCallbackType.onExit);
|
|
529
|
+
}
|
|
530
|
+
if (doCleanup)
|
|
531
|
+
child._performRecursive(Node._stateCallbackType.cleanup);
|
|
532
|
+
child.parent = null;
|
|
533
|
+
child._renderCmd.detachFromParent();
|
|
534
|
+
arrayRemoveObject(this._children, child);
|
|
535
|
+
}
|
|
536
|
+
_insertChild(child, z) {
|
|
537
|
+
renderer.childrenOrderDirty = this._reorderChildDirty = true;
|
|
538
|
+
this._children.push(child);
|
|
539
|
+
child._setLocalZOrder(z);
|
|
540
|
+
}
|
|
541
|
+
setNodeDirty() {
|
|
542
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
543
|
+
}
|
|
544
|
+
reorderChild(child, zOrder) {
|
|
545
|
+
assert(child, _LogInfos.Node_reorderChild);
|
|
546
|
+
if (this._children.indexOf(child) === -1) {
|
|
547
|
+
log(_LogInfos.Node_reorderChild_2);
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
renderer.childrenOrderDirty = this._reorderChildDirty = true;
|
|
551
|
+
child.arrivalOrder = s_globalOrderOfArrival;
|
|
552
|
+
s_globalOrderOfArrival++;
|
|
553
|
+
child._setLocalZOrder(zOrder);
|
|
554
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.orderDirty);
|
|
555
|
+
}
|
|
556
|
+
sortAllChildren() {
|
|
557
|
+
if (this._reorderChildDirty) {
|
|
558
|
+
const _children = this._children;
|
|
559
|
+
const len = _children.length;
|
|
560
|
+
let i, j, tmp;
|
|
561
|
+
for (i = 1; i < len; i++) {
|
|
562
|
+
tmp = _children[i];
|
|
563
|
+
j = i - 1;
|
|
564
|
+
while (j >= 0) {
|
|
565
|
+
if (tmp._localZOrder < _children[j]._localZOrder) {
|
|
566
|
+
_children[j + 1] = _children[j];
|
|
567
|
+
}
|
|
568
|
+
else if (tmp._localZOrder === _children[j]._localZOrder && tmp.arrivalOrder < _children[j].arrivalOrder) {
|
|
569
|
+
_children[j + 1] = _children[j];
|
|
570
|
+
}
|
|
571
|
+
else {
|
|
572
|
+
break;
|
|
573
|
+
}
|
|
574
|
+
j--;
|
|
575
|
+
}
|
|
576
|
+
_children[j + 1] = tmp;
|
|
577
|
+
}
|
|
578
|
+
this._reorderChildDirty = false;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
draw() { }
|
|
582
|
+
transformAncestors() {
|
|
583
|
+
if (this._parent !== null) {
|
|
584
|
+
this._parent.transformAncestors();
|
|
585
|
+
this._parent.transform();
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
onEnter() {
|
|
589
|
+
this._isTransitionFinished = false;
|
|
590
|
+
this._running = true;
|
|
591
|
+
this.resume();
|
|
592
|
+
}
|
|
593
|
+
_performRecursive(callbackType) {
|
|
594
|
+
const nodeCallbackType = Node._stateCallbackType;
|
|
595
|
+
if (callbackType >= nodeCallbackType.max)
|
|
596
|
+
return;
|
|
597
|
+
let index = 0;
|
|
598
|
+
let children, child, curr, i, len;
|
|
599
|
+
let stack = Node._performStacks[Node._performing];
|
|
600
|
+
if (!stack) {
|
|
601
|
+
stack = [];
|
|
602
|
+
Node._performStacks.push(stack);
|
|
603
|
+
}
|
|
604
|
+
stack.length = 0;
|
|
605
|
+
Node._performing++;
|
|
606
|
+
curr = stack[0] = this;
|
|
607
|
+
while (curr) {
|
|
608
|
+
children = curr._children;
|
|
609
|
+
if (children && children.length > 0) {
|
|
610
|
+
for (i = 0, len = children.length; i < len; ++i) {
|
|
611
|
+
child = children[i];
|
|
612
|
+
stack.push(child);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
children = curr._protectedChildren;
|
|
616
|
+
if (children && children.length > 0) {
|
|
617
|
+
for (i = 0, len = children.length; i < len; ++i) {
|
|
618
|
+
child = children[i];
|
|
619
|
+
stack.push(child);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
index++;
|
|
623
|
+
curr = stack[index];
|
|
624
|
+
}
|
|
625
|
+
for (i = stack.length - 1; i >= 0; --i) {
|
|
626
|
+
curr = stack[i];
|
|
627
|
+
stack[i] = null;
|
|
628
|
+
if (!curr)
|
|
629
|
+
continue;
|
|
630
|
+
switch (callbackType) {
|
|
631
|
+
case nodeCallbackType.onEnter:
|
|
632
|
+
curr.onEnter();
|
|
633
|
+
break;
|
|
634
|
+
case nodeCallbackType.onExit:
|
|
635
|
+
curr.onExit();
|
|
636
|
+
break;
|
|
637
|
+
case nodeCallbackType.onEnterTransitionDidFinish:
|
|
638
|
+
curr.onEnterTransitionDidFinish();
|
|
639
|
+
break;
|
|
640
|
+
case nodeCallbackType.cleanup:
|
|
641
|
+
curr.cleanup();
|
|
642
|
+
break;
|
|
643
|
+
case nodeCallbackType.onExitTransitionDidStart:
|
|
644
|
+
curr.onExitTransitionDidStart();
|
|
645
|
+
break;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
Node._performing--;
|
|
649
|
+
}
|
|
650
|
+
onEnterTransitionDidFinish() {
|
|
651
|
+
this._isTransitionFinished = true;
|
|
652
|
+
}
|
|
653
|
+
onExitTransitionDidStart() { }
|
|
654
|
+
onExit() {
|
|
655
|
+
this._running = false;
|
|
656
|
+
this.pause();
|
|
657
|
+
this.removeAllComponents();
|
|
658
|
+
}
|
|
659
|
+
runAction(action) {
|
|
660
|
+
assert(action, _LogInfos.Node_runAction);
|
|
661
|
+
this.actionManager.addAction(action, this, !this._running);
|
|
662
|
+
return action;
|
|
663
|
+
}
|
|
664
|
+
stopAllActions() {
|
|
665
|
+
this.actionManager && this.actionManager.removeAllActionsFromTarget(this);
|
|
666
|
+
}
|
|
667
|
+
stopAction(action) {
|
|
668
|
+
this.actionManager.removeAction(action);
|
|
669
|
+
}
|
|
670
|
+
stopActionByTag(tag) {
|
|
671
|
+
if (tag === ACTION_TAG_INVALID) {
|
|
672
|
+
log(_LogInfos.Node_stopActionByTag);
|
|
673
|
+
return;
|
|
674
|
+
}
|
|
675
|
+
this.actionManager.removeActionByTag(tag, this);
|
|
676
|
+
}
|
|
677
|
+
getActionByTag(tag) {
|
|
678
|
+
if (tag === ACTION_TAG_INVALID) {
|
|
679
|
+
log(_LogInfos.Node_getActionByTag);
|
|
680
|
+
return null;
|
|
681
|
+
}
|
|
682
|
+
return this.actionManager.getActionByTag(tag, this);
|
|
683
|
+
}
|
|
684
|
+
getNumberOfRunningActions() {
|
|
685
|
+
return this.actionManager.numberOfRunningActionsInTarget(this);
|
|
686
|
+
}
|
|
687
|
+
scheduleUpdate() {
|
|
688
|
+
this.scheduleUpdateWithPriority(0);
|
|
689
|
+
}
|
|
690
|
+
scheduleUpdateWithPriority(priority) {
|
|
691
|
+
this.scheduler.scheduleUpdate(this, priority, !this._running);
|
|
692
|
+
}
|
|
693
|
+
unscheduleUpdate() {
|
|
694
|
+
this.scheduler.unscheduleUpdate(this);
|
|
695
|
+
}
|
|
696
|
+
schedule(callback, interval, repeat, delay, key) {
|
|
697
|
+
const len = arguments.length;
|
|
698
|
+
if (typeof callback === 'function') {
|
|
699
|
+
if (len === 1) {
|
|
700
|
+
interval = 0;
|
|
701
|
+
repeat = REPEAT_FOREVER;
|
|
702
|
+
delay = 0;
|
|
703
|
+
key = this.__instanceId;
|
|
704
|
+
}
|
|
705
|
+
else if (len === 2) {
|
|
706
|
+
if (typeof interval === 'number') {
|
|
707
|
+
repeat = REPEAT_FOREVER;
|
|
708
|
+
delay = 0;
|
|
709
|
+
key = this.__instanceId;
|
|
710
|
+
}
|
|
711
|
+
else {
|
|
712
|
+
key = interval;
|
|
713
|
+
interval = 0;
|
|
714
|
+
repeat = REPEAT_FOREVER;
|
|
715
|
+
delay = 0;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
else if (len === 3) {
|
|
719
|
+
if (typeof repeat === 'string') {
|
|
720
|
+
key = repeat;
|
|
721
|
+
repeat = REPEAT_FOREVER;
|
|
722
|
+
}
|
|
723
|
+
else {
|
|
724
|
+
key = this.__instanceId;
|
|
725
|
+
}
|
|
726
|
+
delay = 0;
|
|
727
|
+
}
|
|
728
|
+
else if (len === 4) {
|
|
729
|
+
key = this.__instanceId;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
else {
|
|
733
|
+
if (len === 1) {
|
|
734
|
+
interval = 0;
|
|
735
|
+
repeat = REPEAT_FOREVER;
|
|
736
|
+
delay = 0;
|
|
737
|
+
}
|
|
738
|
+
else if (len === 2) {
|
|
739
|
+
repeat = REPEAT_FOREVER;
|
|
740
|
+
delay = 0;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
assert(callback, _LogInfos.Node_schedule);
|
|
744
|
+
assert(interval >= 0, _LogInfos.Node_schedule_2);
|
|
745
|
+
interval = interval || 0;
|
|
746
|
+
repeat = isNaN(repeat) ? REPEAT_FOREVER : repeat;
|
|
747
|
+
delay = delay || 0;
|
|
748
|
+
this.scheduler.schedule(callback, this, interval, repeat, delay, !this._running, key);
|
|
749
|
+
}
|
|
750
|
+
scheduleOnce(callback, delay, key) {
|
|
751
|
+
if (key === undefined)
|
|
752
|
+
key = this.__instanceId;
|
|
753
|
+
this.schedule(callback, 0, 0, delay, key);
|
|
754
|
+
}
|
|
755
|
+
unschedule(callback_fn) {
|
|
756
|
+
if (!callback_fn)
|
|
757
|
+
return;
|
|
758
|
+
this.scheduler.unschedule(callback_fn, this);
|
|
759
|
+
}
|
|
760
|
+
unscheduleAllCallbacks() {
|
|
761
|
+
this.scheduler.unscheduleAllForTarget(this);
|
|
762
|
+
}
|
|
763
|
+
resumeSchedulerAndActions() {
|
|
764
|
+
log(_LogInfos.Node_resumeSchedulerAndActions);
|
|
765
|
+
this.resume();
|
|
766
|
+
}
|
|
767
|
+
resume() {
|
|
768
|
+
this.scheduler.resumeTarget(this);
|
|
769
|
+
this.actionManager && this.actionManager.resumeTarget(this);
|
|
770
|
+
eventManager.resumeTarget(this);
|
|
771
|
+
}
|
|
772
|
+
pauseSchedulerAndActions() {
|
|
773
|
+
log(_LogInfos.Node_pauseSchedulerAndActions);
|
|
774
|
+
this.pause();
|
|
775
|
+
}
|
|
776
|
+
pause() {
|
|
777
|
+
this.scheduler.pauseTarget(this);
|
|
778
|
+
this.actionManager && this.actionManager.pauseTarget(this);
|
|
779
|
+
eventManager.pauseTarget(this);
|
|
780
|
+
}
|
|
781
|
+
setAdditionalTransform(additionalTransform) {
|
|
782
|
+
if (additionalTransform === undefined)
|
|
783
|
+
return (this._additionalTransformDirty = false);
|
|
784
|
+
this._additionalTransform = additionalTransform;
|
|
785
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.transformDirty);
|
|
786
|
+
this._additionalTransformDirty = true;
|
|
787
|
+
}
|
|
788
|
+
getParentToNodeTransform() {
|
|
789
|
+
return this._renderCmd.getParentToNodeTransform();
|
|
790
|
+
}
|
|
791
|
+
parentToNodeTransform() {
|
|
792
|
+
return this.getParentToNodeTransform();
|
|
793
|
+
}
|
|
794
|
+
getNodeToWorldTransform() {
|
|
795
|
+
let t = this.getNodeToParentTransform();
|
|
796
|
+
for (let p = this._parent; p !== null; p = p._parent)
|
|
797
|
+
t = affineTransformConcat(t, p.getNodeToParentTransform());
|
|
798
|
+
return t;
|
|
799
|
+
}
|
|
800
|
+
nodeToWorldTransform() {
|
|
801
|
+
return this.getNodeToWorldTransform();
|
|
802
|
+
}
|
|
803
|
+
getWorldToNodeTransform() {
|
|
804
|
+
return affineTransformInvert(this.getNodeToWorldTransform());
|
|
805
|
+
}
|
|
806
|
+
worldToNodeTransform() {
|
|
807
|
+
return this.getWorldToNodeTransform();
|
|
808
|
+
}
|
|
809
|
+
convertToNodeSpace(worldPoint) {
|
|
810
|
+
return pointApplyAffineTransform(worldPoint, this.getWorldToNodeTransform());
|
|
811
|
+
}
|
|
812
|
+
convertToWorldSpace(nodePoint) {
|
|
813
|
+
nodePoint = nodePoint || p(0, 0);
|
|
814
|
+
return pointApplyAffineTransform(nodePoint, this.getNodeToWorldTransform());
|
|
815
|
+
}
|
|
816
|
+
convertToNodeSpaceAR(worldPoint) {
|
|
817
|
+
return pSub(this.convertToNodeSpace(worldPoint), this._renderCmd.getAnchorPointInPoints());
|
|
818
|
+
}
|
|
819
|
+
convertToWorldSpaceAR(nodePoint) {
|
|
820
|
+
nodePoint = nodePoint || p(0, 0);
|
|
821
|
+
const pt = pAdd(nodePoint, this._renderCmd.getAnchorPointInPoints());
|
|
822
|
+
return this.convertToWorldSpace(pt);
|
|
823
|
+
}
|
|
824
|
+
_convertToWindowSpace(nodePoint) {
|
|
825
|
+
const worldPoint = this.convertToWorldSpace(nodePoint);
|
|
826
|
+
return director.convertToUI(worldPoint);
|
|
827
|
+
}
|
|
828
|
+
convertTouchToNodeSpace(touch) {
|
|
829
|
+
const point = touch.getLocation();
|
|
830
|
+
return this.convertToNodeSpace(point);
|
|
831
|
+
}
|
|
832
|
+
convertTouchToNodeSpaceAR(touch) {
|
|
833
|
+
const point = director.convertToGL(touch.getLocation());
|
|
834
|
+
return this.convertToNodeSpaceAR(point);
|
|
835
|
+
}
|
|
836
|
+
update(dt) {
|
|
837
|
+
if (this._componentContainer && !this._componentContainer.isEmpty())
|
|
838
|
+
this._componentContainer.visit(dt);
|
|
839
|
+
}
|
|
840
|
+
updateTransform() {
|
|
841
|
+
const children = this._children;
|
|
842
|
+
for (let i = 0; i < children.length; i++) {
|
|
843
|
+
const node = children[i];
|
|
844
|
+
if (node)
|
|
845
|
+
node.updateTransform();
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
retain() { }
|
|
849
|
+
release() { }
|
|
850
|
+
getComponent(name) {
|
|
851
|
+
if (this._componentContainer)
|
|
852
|
+
return this._componentContainer.getComponent(name);
|
|
853
|
+
return null;
|
|
854
|
+
}
|
|
855
|
+
addComponent(component) {
|
|
856
|
+
if (this._componentContainer)
|
|
857
|
+
this._componentContainer.add(component);
|
|
858
|
+
}
|
|
859
|
+
removeComponent(component) {
|
|
860
|
+
if (this._componentContainer)
|
|
861
|
+
return this._componentContainer.remove(component);
|
|
862
|
+
return false;
|
|
863
|
+
}
|
|
864
|
+
removeAllComponents() {
|
|
865
|
+
if (this._componentContainer)
|
|
866
|
+
this._componentContainer.removeAll();
|
|
867
|
+
}
|
|
868
|
+
visit(parent) {
|
|
869
|
+
const cmd = this._renderCmd, parentCmd = parent ? parent._renderCmd : null;
|
|
870
|
+
if (!this._visible) {
|
|
871
|
+
cmd._propagateFlagsDown(parentCmd);
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
cmd.visit(parentCmd);
|
|
875
|
+
let i;
|
|
876
|
+
const children = this._children, len = children.length;
|
|
877
|
+
let child;
|
|
878
|
+
if (len > 0) {
|
|
879
|
+
if (this._reorderChildDirty)
|
|
880
|
+
this.sortAllChildren();
|
|
881
|
+
for (i = 0; i < len; i++) {
|
|
882
|
+
child = children[i];
|
|
883
|
+
if (child._localZOrder < 0)
|
|
884
|
+
child.visit(this);
|
|
885
|
+
else
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
888
|
+
renderer.pushRenderCommand(cmd);
|
|
889
|
+
for (; i < len; i++)
|
|
890
|
+
children[i].visit(this);
|
|
891
|
+
}
|
|
892
|
+
else {
|
|
893
|
+
renderer.pushRenderCommand(cmd);
|
|
894
|
+
}
|
|
895
|
+
cmd._dirtyFlag = 0;
|
|
896
|
+
}
|
|
897
|
+
transform(parentCmd, recursive) {
|
|
898
|
+
this._renderCmd.transform(parentCmd, recursive);
|
|
899
|
+
}
|
|
900
|
+
nodeToParentTransform() {
|
|
901
|
+
return this.getNodeToParentTransform();
|
|
902
|
+
}
|
|
903
|
+
getNodeToParentTransform(ancestor) {
|
|
904
|
+
const t = this._renderCmd.getNodeToParentTransform();
|
|
905
|
+
if (ancestor) {
|
|
906
|
+
const T = { a: t.a, b: t.b, c: t.c, d: t.d, tx: t.tx, ty: t.ty };
|
|
907
|
+
for (let p = this._parent; p != null && p != ancestor; p = p.getParent())
|
|
908
|
+
affineTransformConcatIn(T, p.getNodeToParentTransform());
|
|
909
|
+
return T;
|
|
910
|
+
}
|
|
911
|
+
else {
|
|
912
|
+
return t;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
getNodeToParentAffineTransform(ancestor) {
|
|
916
|
+
return this.getNodeToParentTransform(ancestor);
|
|
917
|
+
}
|
|
918
|
+
getCamera() {
|
|
919
|
+
return null;
|
|
920
|
+
}
|
|
921
|
+
getGrid() {
|
|
922
|
+
return this.grid;
|
|
923
|
+
}
|
|
924
|
+
setGrid(grid) {
|
|
925
|
+
this.grid = grid;
|
|
926
|
+
}
|
|
927
|
+
getShaderProgram() {
|
|
928
|
+
return this._renderCmd.getShaderProgram();
|
|
929
|
+
}
|
|
930
|
+
setShaderProgram(newShaderProgram) {
|
|
931
|
+
this._renderCmd.setShaderProgram(newShaderProgram);
|
|
932
|
+
}
|
|
933
|
+
setGLProgramState(glProgramState) {
|
|
934
|
+
this._renderCmd.setGLProgramState(glProgramState);
|
|
935
|
+
}
|
|
936
|
+
getGLProgramState() {
|
|
937
|
+
return this._renderCmd.getGLProgramState();
|
|
938
|
+
}
|
|
939
|
+
getGLServerState() {
|
|
940
|
+
return 0;
|
|
941
|
+
}
|
|
942
|
+
setGLServerState() { }
|
|
943
|
+
getBoundingBoxToWorld() {
|
|
944
|
+
let r = Rect(0, 0, this._contentSize.width, this._contentSize.height);
|
|
945
|
+
const trans = this.getNodeToWorldTransform();
|
|
946
|
+
r = rectApplyAffineTransform(r, trans);
|
|
947
|
+
if (!this._children)
|
|
948
|
+
return r;
|
|
949
|
+
const locChildren = this._children;
|
|
950
|
+
for (let i = 0; i < locChildren.length; i++) {
|
|
951
|
+
const child = locChildren[i];
|
|
952
|
+
if (child && child._visible) {
|
|
953
|
+
const childRect = child._getBoundingBoxToCurrentNode(trans);
|
|
954
|
+
if (childRect)
|
|
955
|
+
r = rectUnion(r, childRect);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
return r;
|
|
959
|
+
}
|
|
960
|
+
_getBoundingBoxToCurrentNode(parentTransform) {
|
|
961
|
+
let r = Rect(0, 0, this._contentSize.width, this._contentSize.height);
|
|
962
|
+
const trans = parentTransform === undefined
|
|
963
|
+
? this.getNodeToParentTransform()
|
|
964
|
+
: affineTransformConcat(this.getNodeToParentTransform(), parentTransform);
|
|
965
|
+
r = rectApplyAffineTransform(r, trans);
|
|
966
|
+
if (!this._children)
|
|
967
|
+
return r;
|
|
968
|
+
const locChildren = this._children;
|
|
969
|
+
for (let i = 0; i < locChildren.length; i++) {
|
|
970
|
+
const child = locChildren[i];
|
|
971
|
+
if (child && child._visible) {
|
|
972
|
+
const childRect = child._getBoundingBoxToCurrentNode(trans);
|
|
973
|
+
if (childRect)
|
|
974
|
+
r = rectUnion(r, childRect);
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
return r;
|
|
978
|
+
}
|
|
979
|
+
getOpacity() {
|
|
980
|
+
return this._realOpacity;
|
|
981
|
+
}
|
|
982
|
+
getDisplayedOpacity() {
|
|
983
|
+
return this._renderCmd.getDisplayedOpacity();
|
|
984
|
+
}
|
|
985
|
+
setOpacity(opacity) {
|
|
986
|
+
this._realOpacity = opacity;
|
|
987
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.opacityDirty);
|
|
988
|
+
}
|
|
989
|
+
updateDisplayedOpacity(parentOpacity) {
|
|
990
|
+
this._renderCmd._updateDisplayOpacity(parentOpacity);
|
|
991
|
+
}
|
|
992
|
+
isCascadeOpacityEnabled() {
|
|
993
|
+
return this._cascadeOpacityEnabled;
|
|
994
|
+
}
|
|
995
|
+
setCascadeOpacityEnabled(cascadeOpacityEnabled) {
|
|
996
|
+
if (this._cascadeOpacityEnabled === cascadeOpacityEnabled)
|
|
997
|
+
return;
|
|
998
|
+
this._cascadeOpacityEnabled = cascadeOpacityEnabled;
|
|
999
|
+
this._renderCmd.setCascadeOpacityEnabledDirty();
|
|
1000
|
+
}
|
|
1001
|
+
getColor() {
|
|
1002
|
+
const locRealColor = this._realColor;
|
|
1003
|
+
return color(locRealColor.r, locRealColor.g, locRealColor.b, locRealColor.a);
|
|
1004
|
+
}
|
|
1005
|
+
getDisplayedColor() {
|
|
1006
|
+
return this._renderCmd.getDisplayedColor();
|
|
1007
|
+
}
|
|
1008
|
+
setColor(col) {
|
|
1009
|
+
if (!col)
|
|
1010
|
+
return;
|
|
1011
|
+
const locRealColor = this._realColor;
|
|
1012
|
+
locRealColor.r = col.r;
|
|
1013
|
+
locRealColor.g = col.g;
|
|
1014
|
+
locRealColor.b = col.b;
|
|
1015
|
+
this._renderCmd.setDirtyFlag(Node._dirtyFlags.colorDirty);
|
|
1016
|
+
}
|
|
1017
|
+
updateDisplayedColor(parentColor) {
|
|
1018
|
+
this._renderCmd._updateDisplayColor(parentColor);
|
|
1019
|
+
}
|
|
1020
|
+
isCascadeColorEnabled() {
|
|
1021
|
+
return this._cascadeColorEnabled;
|
|
1022
|
+
}
|
|
1023
|
+
setCascadeColorEnabled(cascadeColorEnabled) {
|
|
1024
|
+
if (this._cascadeColorEnabled === cascadeColorEnabled)
|
|
1025
|
+
return;
|
|
1026
|
+
this._cascadeColorEnabled = cascadeColorEnabled;
|
|
1027
|
+
this._renderCmd.setCascadeColorEnabledDirty();
|
|
1028
|
+
}
|
|
1029
|
+
setOpacityModifyRGB(opacityValue) { }
|
|
1030
|
+
isOpacityModifyRGB() {
|
|
1031
|
+
return false;
|
|
1032
|
+
}
|
|
1033
|
+
_createRenderCmd() {
|
|
1034
|
+
return new NodeWebGLRenderCmd(this);
|
|
1035
|
+
}
|
|
1036
|
+
enumerateChildren(name, callback) {
|
|
1037
|
+
assert(name && name.length != 0, 'Invalid name');
|
|
1038
|
+
assert(callback != null, 'Invalid callback function');
|
|
1039
|
+
const length = name.length;
|
|
1040
|
+
let subStrStartPos = 0;
|
|
1041
|
+
let subStrlength = length;
|
|
1042
|
+
let searchRecursively = false;
|
|
1043
|
+
if (length > 2 && name[0] === '/' && name[1] === '/') {
|
|
1044
|
+
searchRecursively = true;
|
|
1045
|
+
subStrStartPos = 2;
|
|
1046
|
+
subStrlength -= 2;
|
|
1047
|
+
}
|
|
1048
|
+
let searchFromParent = false;
|
|
1049
|
+
if (length > 3 && name[length - 3] === '/' && name[length - 2] === '.' && name[length - 1] === '.') {
|
|
1050
|
+
searchFromParent = true;
|
|
1051
|
+
subStrlength -= 3;
|
|
1052
|
+
}
|
|
1053
|
+
let newName = name.substr(subStrStartPos, subStrlength);
|
|
1054
|
+
if (searchFromParent)
|
|
1055
|
+
newName = `[[:alnum:]]+/${newName}`;
|
|
1056
|
+
if (searchRecursively)
|
|
1057
|
+
this.doEnumerateRecursive(this, newName, callback);
|
|
1058
|
+
else
|
|
1059
|
+
this.doEnumerate(newName, callback);
|
|
1060
|
+
}
|
|
1061
|
+
doEnumerateRecursive(node, name, callback) {
|
|
1062
|
+
let ret = false;
|
|
1063
|
+
if (node.doEnumerate(name, callback))
|
|
1064
|
+
ret = true;
|
|
1065
|
+
else {
|
|
1066
|
+
let child;
|
|
1067
|
+
const children = node.getChildren(), length = children.length;
|
|
1068
|
+
for (let i = 0; i < length; i++) {
|
|
1069
|
+
child = children[i];
|
|
1070
|
+
if (this.doEnumerateRecursive(child, name, callback)) {
|
|
1071
|
+
ret = true;
|
|
1072
|
+
break;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
return ret;
|
|
1077
|
+
}
|
|
1078
|
+
doEnumerate(name, callback) {
|
|
1079
|
+
const pos = name.indexOf('/');
|
|
1080
|
+
let searchName = name;
|
|
1081
|
+
let needRecursive = false;
|
|
1082
|
+
if (pos !== -1) {
|
|
1083
|
+
searchName = name.substr(0, pos);
|
|
1084
|
+
needRecursive = true;
|
|
1085
|
+
}
|
|
1086
|
+
let ret = false;
|
|
1087
|
+
let child;
|
|
1088
|
+
const children = this._children, length = children.length;
|
|
1089
|
+
for (let i = 0; i < length; i++) {
|
|
1090
|
+
child = children[i];
|
|
1091
|
+
if (child._name.indexOf(searchName) !== -1) {
|
|
1092
|
+
if (!needRecursive) {
|
|
1093
|
+
if (callback(child)) {
|
|
1094
|
+
ret = true;
|
|
1095
|
+
break;
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
else {
|
|
1099
|
+
ret = child.doEnumerate(name, callback);
|
|
1100
|
+
if (ret)
|
|
1101
|
+
break;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
return ret;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
// PrototypeCCNode()
|
|
1109
|
+
// Minimal runtime fallbacks used during migration
|
|
1110
|
+
// export const REPEAT_FOREVER = -1
|
|
1111
|
+
export const ACTION_TAG_INVALID = -1;
|
|
1112
|
+
//# sourceMappingURL=Node.js.map
|