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,694 @@
|
|
|
1
|
+
import { game, renderer } from '../boot';
|
|
2
|
+
import { p, pointPixelsToPoints, rectPixelsToPoints, SHADER_SPRITE_POSITION_TEXTURECOLORALPHATEST, Size, sizePixelsToPoints, Sprite, UNIFORM_ALPHA_TEST_VALUE_S, } from '../core';
|
|
3
|
+
import { SpriteBatchNode } from '../core/sprites/SpriteBatchNode';
|
|
4
|
+
import { log } from '../helper/Debugger';
|
|
5
|
+
import { _renderType } from '../helper/engine';
|
|
6
|
+
import { defineGetterSetter } from '../helper/getset';
|
|
7
|
+
import { shaderCache } from '../shaders/ShaderCache';
|
|
8
|
+
import { textureCache } from '../textures';
|
|
9
|
+
import { TMXLayerWebGLRenderCmd } from './TMXLayerWebGLRenderCmd';
|
|
10
|
+
import { TMX_ORIENTATION_HEX, TMX_ORIENTATION_ISO, TMX_ORIENTATION_ORTHO } from './TMXTiledMap';
|
|
11
|
+
import { TMX_TILE_DIAGONAL_FLAG, TMX_TILE_FLIPPED_ALL, TMX_TILE_FLIPPED_MASK, TMX_TILE_HORIZONTAL_FLAG, TMX_TILE_VERTICAL_FLAG, } from './TMXXMLParser';
|
|
12
|
+
/**
|
|
13
|
+
* <p>TMXLayer represents the TMX layer. </p>
|
|
14
|
+
*
|
|
15
|
+
* <p>It is a subclass of SpriteBatchNode. By default the tiles are rendered using a TextureAtlas. <br />
|
|
16
|
+
* If you modify a tile on runtime, then, that tile will become a Sprite, otherwise no Sprite objects are created. <br />
|
|
17
|
+
* The benefits of using Sprite objects as tiles are: <br />
|
|
18
|
+
* - tiles (Sprite) can be rotated/scaled/moved with a nice API </p>
|
|
19
|
+
*
|
|
20
|
+
* <p>If the layer contains a property named "vertexz" with an integer (in can be positive or negative), <br />
|
|
21
|
+
* then all the tiles belonging to the layer will use that value as their OpenGL vertex Z for depth. </p>
|
|
22
|
+
*
|
|
23
|
+
* <p>On the other hand, if the "vertexz" property has the "automatic" value, then the tiles will use an automatic vertex Z value. <br />
|
|
24
|
+
* Also before drawing the tiles, GL_ALPHA_TEST will be enabled, and disabled after drawing them. The used alpha func will be: </p>
|
|
25
|
+
*
|
|
26
|
+
* glAlphaFunc( GL_GREATER, value ) <br />
|
|
27
|
+
*
|
|
28
|
+
* <p>"value" by default is 0, but you can change it from Tiled by adding the "cc_alpha_func" property to the layer. <br />
|
|
29
|
+
* The value 0 should work for most cases, but if you have tiles that are semi-transparent, then you might want to use a different value, like 0.5.</p>
|
|
30
|
+
* @class
|
|
31
|
+
* @extends SpriteBatchNode
|
|
32
|
+
*
|
|
33
|
+
* @property {Array} tiles - Tiles for layer
|
|
34
|
+
* @property {TMXTilesetInfo} tileset - Tileset for layer
|
|
35
|
+
* @property {Number} layerOrientation - Layer orientation
|
|
36
|
+
* @property {Array} properties - Properties from the layer. They can be added using tilemap editors
|
|
37
|
+
* @property {String} layerName - Name of the layer
|
|
38
|
+
* @property {Number} layerWidth - Width of the layer
|
|
39
|
+
* @property {Number} layerHeight - Height of the layer
|
|
40
|
+
* @property {Number} tileWidth - Width of a tile
|
|
41
|
+
* @property {Number} tileHeight - Height of a tile
|
|
42
|
+
*/
|
|
43
|
+
export class TMXLayer extends SpriteBatchNode {
|
|
44
|
+
tiles = null;
|
|
45
|
+
tileset = null;
|
|
46
|
+
layerOrientation = null;
|
|
47
|
+
properties = null;
|
|
48
|
+
layerName = '';
|
|
49
|
+
_textures = null;
|
|
50
|
+
_texGrids = null;
|
|
51
|
+
_spriteTiles = null;
|
|
52
|
+
//size of the layer in tiles
|
|
53
|
+
_layerSize = null;
|
|
54
|
+
_mapTileSize = null;
|
|
55
|
+
//TMX Layer supports opacity
|
|
56
|
+
_opacity = 255;
|
|
57
|
+
_minGID = null;
|
|
58
|
+
_maxGID = null;
|
|
59
|
+
//Only used when vertexZ is used
|
|
60
|
+
_vertexZvalue = null;
|
|
61
|
+
_useAutomaticVertexZ = null;
|
|
62
|
+
//used for optimization
|
|
63
|
+
_reusedTile = null;
|
|
64
|
+
_atlasIndexArray = null;
|
|
65
|
+
//used for retina display
|
|
66
|
+
_contentScaleFactor = null;
|
|
67
|
+
_className = 'TMXLayer';
|
|
68
|
+
/**
|
|
69
|
+
* Creates a TMXLayer with an tile set info, a layer info and a map info <br/>
|
|
70
|
+
* Constructor of TMXLayer
|
|
71
|
+
* @param {TMXTilesetInfo} tilesetInfo
|
|
72
|
+
* @param {TMXLayerInfo} layerInfo
|
|
73
|
+
* @param {TMXMapInfo} mapInfo
|
|
74
|
+
*/
|
|
75
|
+
constructor(tilesetInfo, layerInfo, mapInfo) {
|
|
76
|
+
super();
|
|
77
|
+
// this._descendants = []
|
|
78
|
+
this._layerSize = Size(0, 0);
|
|
79
|
+
this._mapTileSize = Size(0, 0);
|
|
80
|
+
this._spriteTiles = {};
|
|
81
|
+
if (mapInfo !== undefined)
|
|
82
|
+
this.initWithTilesetInfo(tilesetInfo, layerInfo, mapInfo);
|
|
83
|
+
}
|
|
84
|
+
_createRenderCmd() {
|
|
85
|
+
return new TMXLayerWebGLRenderCmd(this);
|
|
86
|
+
}
|
|
87
|
+
_fillTextureGrids(tileset, texId) {
|
|
88
|
+
const tex = this._textures[texId];
|
|
89
|
+
if (!tex.isLoaded()) {
|
|
90
|
+
tex.addEventListener('load', () => {
|
|
91
|
+
this._fillTextureGrids(tileset, texId);
|
|
92
|
+
}, this);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (!tileset.imageSize.width || !tileset.imageSize.height) {
|
|
96
|
+
tileset.imageSize.width = tex.width;
|
|
97
|
+
tileset.imageSize.height = tex.height;
|
|
98
|
+
}
|
|
99
|
+
const tw = tileset._tileSize.width;
|
|
100
|
+
const th = tileset._tileSize.height;
|
|
101
|
+
const imageW = tex._contentSize.width;
|
|
102
|
+
const imageH = tex._contentSize.height;
|
|
103
|
+
const spacing = tileset.spacing;
|
|
104
|
+
const margin = tileset.margin;
|
|
105
|
+
const cols = Math.floor((imageW - margin * 2 + spacing) / (tw + spacing));
|
|
106
|
+
const rows = Math.floor((imageH - margin * 2 + spacing) / (th + spacing));
|
|
107
|
+
const count = rows * cols;
|
|
108
|
+
let gid = tileset.firstGid;
|
|
109
|
+
const maxGid = tileset.firstGid + count;
|
|
110
|
+
const grids = this._texGrids;
|
|
111
|
+
let grid;
|
|
112
|
+
let override = grids[gid] ? true : false;
|
|
113
|
+
for (; gid < maxGid; ++gid) {
|
|
114
|
+
// Avoid overlapping
|
|
115
|
+
if (override && !grids[gid]) {
|
|
116
|
+
override = false;
|
|
117
|
+
}
|
|
118
|
+
if (!override && grids[gid]) {
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
grid = {
|
|
122
|
+
texId: texId,
|
|
123
|
+
x: 0,
|
|
124
|
+
y: 0,
|
|
125
|
+
width: tw,
|
|
126
|
+
height: th,
|
|
127
|
+
t: 0,
|
|
128
|
+
l: 0,
|
|
129
|
+
r: 0,
|
|
130
|
+
b: 0,
|
|
131
|
+
};
|
|
132
|
+
tileset.rectForGID(gid, grid);
|
|
133
|
+
grid.t = grid.y / imageH;
|
|
134
|
+
grid.l = grid.x / imageW;
|
|
135
|
+
grid.r = (grid.x + grid.width) / imageW;
|
|
136
|
+
grid.b = (grid.y + grid.height) / imageH;
|
|
137
|
+
grids[gid] = grid;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Initializes a TMXLayer with a tileset info, a layer info and a map info
|
|
142
|
+
* @param {TMXTilesetInfo} tilesetInfo
|
|
143
|
+
* @param {TMXLayerInfo} layerInfo
|
|
144
|
+
* @param {TMXMapInfo} mapInfo
|
|
145
|
+
* @return {Boolean}
|
|
146
|
+
*/
|
|
147
|
+
initWithTilesetInfo(tilesetInfo, layerInfo, mapInfo) {
|
|
148
|
+
const size = layerInfo._layerSize;
|
|
149
|
+
const totalNumberOfTiles = (size.width * size.height) | 0;
|
|
150
|
+
// layerInfo
|
|
151
|
+
this.layerName = layerInfo.name;
|
|
152
|
+
this.tiles = layerInfo._tiles;
|
|
153
|
+
this.properties = layerInfo.properties;
|
|
154
|
+
this._layerSize = size;
|
|
155
|
+
this._minGID = layerInfo._minGID;
|
|
156
|
+
this._maxGID = layerInfo._maxGID;
|
|
157
|
+
this._opacity = layerInfo._opacity;
|
|
158
|
+
// tilesetInfo
|
|
159
|
+
this.tileset = tilesetInfo;
|
|
160
|
+
// mapInfo
|
|
161
|
+
this.layerOrientation = mapInfo.orientation;
|
|
162
|
+
this._mapTileSize = mapInfo.getTileSize();
|
|
163
|
+
const tilesets = mapInfo._tilesets;
|
|
164
|
+
if (tilesets) {
|
|
165
|
+
this._textures = [];
|
|
166
|
+
this._texGrids = [];
|
|
167
|
+
const len = tilesets.length;
|
|
168
|
+
for (let i = 0; i < len; ++i) {
|
|
169
|
+
const tileset = tilesets[i];
|
|
170
|
+
const tex = textureCache.addImage(tileset.sourceImage);
|
|
171
|
+
this._textures.push(tex);
|
|
172
|
+
this._fillTextureGrids(tileset, i);
|
|
173
|
+
if (tileset === tilesetInfo) {
|
|
174
|
+
this._texture = tex;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
// offset (after layer orientation is set);
|
|
179
|
+
const offset = this._calculateLayerOffset(layerInfo.offset);
|
|
180
|
+
this.setPosition(pointPixelsToPoints(offset));
|
|
181
|
+
// Parse cocos2d properties
|
|
182
|
+
this._parseInternalProperties();
|
|
183
|
+
this.setContentSize(sizePixelsToPoints(Size(this._layerSize.width * this._mapTileSize.width, this._layerSize.height * this._mapTileSize.height)));
|
|
184
|
+
this._useAutomaticVertexZ = false;
|
|
185
|
+
this._vertexZvalue = 0;
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Gets layer size.
|
|
190
|
+
* @return {Size}
|
|
191
|
+
*/
|
|
192
|
+
getLayerSize() {
|
|
193
|
+
return Size(this._layerSize.width, this._layerSize.height);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Set layer size
|
|
197
|
+
* @param {Size} Var
|
|
198
|
+
*/
|
|
199
|
+
setLayerSize(Var) {
|
|
200
|
+
this._layerSize.width = Var.width;
|
|
201
|
+
this._layerSize.height = Var.height;
|
|
202
|
+
}
|
|
203
|
+
_getLayerWidth() {
|
|
204
|
+
return this._layerSize.width;
|
|
205
|
+
}
|
|
206
|
+
_setLayerWidth(width) {
|
|
207
|
+
this._layerSize.width = width;
|
|
208
|
+
}
|
|
209
|
+
_getLayerHeight() {
|
|
210
|
+
return this._layerSize.height;
|
|
211
|
+
}
|
|
212
|
+
_setLayerHeight(height) {
|
|
213
|
+
this._layerSize.height = height;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Size of the map's tile (could be different from the tile's size)
|
|
217
|
+
* @return {Size}
|
|
218
|
+
*/
|
|
219
|
+
getMapTileSize() {
|
|
220
|
+
return Size(this._mapTileSize.width, this._mapTileSize.height);
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Set the map tile size.
|
|
224
|
+
* @param {Size} Var
|
|
225
|
+
*/
|
|
226
|
+
setMapTileSize(Var) {
|
|
227
|
+
this._mapTileSize.width = Var.width;
|
|
228
|
+
this._mapTileSize.height = Var.height;
|
|
229
|
+
}
|
|
230
|
+
_getTileWidth() {
|
|
231
|
+
return this._mapTileSize.width;
|
|
232
|
+
}
|
|
233
|
+
_setTileWidth(width) {
|
|
234
|
+
this._mapTileSize.width = width;
|
|
235
|
+
}
|
|
236
|
+
_getTileHeight() {
|
|
237
|
+
return this._mapTileSize.height;
|
|
238
|
+
}
|
|
239
|
+
_setTileHeight(height) {
|
|
240
|
+
this._mapTileSize.height = height;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Pointer to the map of tiles
|
|
244
|
+
* @return {Array}
|
|
245
|
+
*/
|
|
246
|
+
getTiles() {
|
|
247
|
+
return this.tiles;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Pointer to the map of tiles
|
|
251
|
+
* @param {Array} Var
|
|
252
|
+
*/
|
|
253
|
+
setTiles(Var) {
|
|
254
|
+
this.tiles = Var;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Tile set information for the layer
|
|
258
|
+
* @return {TMXTilesetInfo}
|
|
259
|
+
*/
|
|
260
|
+
getTileset() {
|
|
261
|
+
return this.tileset;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Tile set information for the layer
|
|
265
|
+
* @param {TMXTilesetInfo} Var
|
|
266
|
+
*/
|
|
267
|
+
setTileset(Var) {
|
|
268
|
+
this.tileset = Var;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Layer orientation, which is the same as the map orientation
|
|
272
|
+
* @return {Number}
|
|
273
|
+
*/
|
|
274
|
+
getLayerOrientation() {
|
|
275
|
+
return this.layerOrientation;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Layer orientation, which is the same as the map orientation
|
|
279
|
+
* @param {Number} Var
|
|
280
|
+
*/
|
|
281
|
+
setLayerOrientation(Var) {
|
|
282
|
+
this.layerOrientation = Var;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* properties from the layer. They can be added using Tiled
|
|
286
|
+
* @return {Array}
|
|
287
|
+
*/
|
|
288
|
+
getProperties() {
|
|
289
|
+
return this.properties;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* properties from the layer. They can be added using Tiled
|
|
293
|
+
* @param {Array} Var
|
|
294
|
+
*/
|
|
295
|
+
setProperties(Var) {
|
|
296
|
+
this.properties = Var;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Return the value for the specific property name
|
|
300
|
+
* @param {String} propertyName
|
|
301
|
+
* @return {*}
|
|
302
|
+
*/
|
|
303
|
+
getProperty(propertyName) {
|
|
304
|
+
return this.properties[propertyName];
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Gets the layer name
|
|
308
|
+
* @return {String}
|
|
309
|
+
*/
|
|
310
|
+
getLayerName() {
|
|
311
|
+
return this.layerName;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Set the layer name
|
|
315
|
+
* @param {String} layerName
|
|
316
|
+
*/
|
|
317
|
+
setLayerName(layerName) {
|
|
318
|
+
this.layerName = layerName;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* <p>Dealloc the map that contains the tile position from memory. <br />
|
|
322
|
+
* Unless you want to know at runtime the tiles positions, you can safely call this method. <br />
|
|
323
|
+
* If you are going to call layer.getTileGIDAt() then, don't release the map</p>
|
|
324
|
+
*/
|
|
325
|
+
releaseMap() {
|
|
326
|
+
this._spriteTiles = {};
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* <p>Returns the tile (Sprite) at a given a tile coordinate. <br/>
|
|
330
|
+
* The returned Sprite will be already added to the TMXLayer. Don't add it again.<br/>
|
|
331
|
+
* The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc. <br/>
|
|
332
|
+
* You can remove either by calling: <br/>
|
|
333
|
+
* - layer.removeChild(sprite, cleanup); <br/>
|
|
334
|
+
* - or layer.removeTileAt(ccp(x,y)); </p>
|
|
335
|
+
* @param {Point|Number} pos or x
|
|
336
|
+
* @param {Number} [y]
|
|
337
|
+
* @return {Sprite}
|
|
338
|
+
*/
|
|
339
|
+
getTileAt(pos, y) {
|
|
340
|
+
if (pos === undefined) {
|
|
341
|
+
throw new Error('TMXLayer.getTileAt(): pos should be non-null');
|
|
342
|
+
}
|
|
343
|
+
let x = pos;
|
|
344
|
+
if (y === undefined) {
|
|
345
|
+
x = pos.x;
|
|
346
|
+
y = pos.y;
|
|
347
|
+
}
|
|
348
|
+
if (x >= this._layerSize.width || y >= this._layerSize.height || x < 0 || y < 0) {
|
|
349
|
+
throw new Error('TMXLayer.getTileAt(): invalid position');
|
|
350
|
+
}
|
|
351
|
+
if (!this.tiles) {
|
|
352
|
+
log('TMXLayer.getTileAt(): TMXLayer: the tiles map has been released');
|
|
353
|
+
return null;
|
|
354
|
+
}
|
|
355
|
+
let tile = null;
|
|
356
|
+
const gid = this.getTileGIDAt(x, y);
|
|
357
|
+
// if GID == 0, then no tile is present
|
|
358
|
+
if (gid === 0) {
|
|
359
|
+
return tile;
|
|
360
|
+
}
|
|
361
|
+
const z = 0 | (x + y * this._layerSize.width);
|
|
362
|
+
tile = this._spriteTiles[z];
|
|
363
|
+
// tile not created yet. create it
|
|
364
|
+
if (!tile) {
|
|
365
|
+
let rect = this._texGrids[gid];
|
|
366
|
+
const tex = this._textures[rect.texId];
|
|
367
|
+
rect = rectPixelsToPoints(rect);
|
|
368
|
+
tile = new Sprite(tex, rect);
|
|
369
|
+
tile.setPosition(this.getPositionAt(x, y));
|
|
370
|
+
const vertexZ = this._vertexZForPos(x, y);
|
|
371
|
+
tile.setVertexZ(vertexZ);
|
|
372
|
+
tile.setAnchorPoint(0, 0);
|
|
373
|
+
tile.setOpacity(this._opacity);
|
|
374
|
+
this.addChild(tile, vertexZ, z);
|
|
375
|
+
}
|
|
376
|
+
return tile;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Returns the tile gid at a given tile coordinate. <br />
|
|
380
|
+
* if it returns 0, it means that the tile is empty. <br />
|
|
381
|
+
* This method requires the the tile map has not been previously released (eg. don't call layer.releaseMap())<br />
|
|
382
|
+
* @param {Point|Number} pos or x
|
|
383
|
+
* @param {Number} [y]
|
|
384
|
+
* @return {Number}
|
|
385
|
+
*/
|
|
386
|
+
getTileGIDAt(pos, y) {
|
|
387
|
+
if (pos === undefined) {
|
|
388
|
+
throw new Error('TMXLayer.getTileGIDAt(): pos should be non-null');
|
|
389
|
+
}
|
|
390
|
+
let x = pos;
|
|
391
|
+
if (y === undefined) {
|
|
392
|
+
x = pos.x;
|
|
393
|
+
y = pos.y;
|
|
394
|
+
}
|
|
395
|
+
if (x >= this._layerSize.width || y >= this._layerSize.height || x < 0 || y < 0) {
|
|
396
|
+
throw new Error('TMXLayer.getTileGIDAt(): invalid position');
|
|
397
|
+
}
|
|
398
|
+
if (!this.tiles) {
|
|
399
|
+
log('TMXLayer.getTileGIDAt(): TMXLayer: the tiles map has been released');
|
|
400
|
+
return null;
|
|
401
|
+
}
|
|
402
|
+
const idx = 0 | (x + y * this._layerSize.width);
|
|
403
|
+
// Bits on the far end of the 32-bit global tile ID are used for tile flags
|
|
404
|
+
const tile = this.tiles[idx];
|
|
405
|
+
return (tile & TMX_TILE_FLIPPED_MASK) >>> 0;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* <p>Sets the tile gid (gid = tile global id) at a given tile coordinate.<br />
|
|
409
|
+
* The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor . Tileset Mgr +1.<br />
|
|
410
|
+
* If a tile is already placed at that position, then it will be removed.</p>
|
|
411
|
+
* @param {Number} gid
|
|
412
|
+
* @param {Point|Number} posOrX position or x
|
|
413
|
+
* @param {Number} flagsOrY flags or y
|
|
414
|
+
* @param {Number} [flags]
|
|
415
|
+
*/
|
|
416
|
+
setTileGID(gid, posOrX, flagsOrY, flags) {
|
|
417
|
+
if (posOrX === undefined) {
|
|
418
|
+
throw new Error('TMXLayer.setTileGID(): pos should be non-null');
|
|
419
|
+
}
|
|
420
|
+
let pos;
|
|
421
|
+
if (flags !== undefined) {
|
|
422
|
+
pos = p(posOrX, flagsOrY);
|
|
423
|
+
}
|
|
424
|
+
else {
|
|
425
|
+
pos = posOrX;
|
|
426
|
+
flags = flagsOrY;
|
|
427
|
+
}
|
|
428
|
+
if (pos.x >= this._layerSize.width || pos.y >= this._layerSize.height || pos.x < 0 || pos.y < 0) {
|
|
429
|
+
throw new Error('TMXLayer.setTileGID(): invalid position');
|
|
430
|
+
}
|
|
431
|
+
if (!this.tiles) {
|
|
432
|
+
log('TMXLayer.setTileGID(): TMXLayer: the tiles map has been released');
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
if (gid !== 0 && gid < this.tileset.firstGid) {
|
|
436
|
+
log(`TMXLayer.setTileGID(): invalid gid:${gid}`);
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
flags = flags || 0;
|
|
440
|
+
const currentFlags = this.getTileFlagsAt(pos);
|
|
441
|
+
const currentGID = this.getTileGIDAt(pos);
|
|
442
|
+
if (currentGID !== gid || currentFlags !== flags) {
|
|
443
|
+
const gidAndFlags = (gid | flags) >>> 0;
|
|
444
|
+
// setting gid=0 is equal to remove the tile
|
|
445
|
+
if (gid === 0)
|
|
446
|
+
this.removeTileAt(pos);
|
|
447
|
+
else if (currentGID === 0)
|
|
448
|
+
// empty tile. create a new one
|
|
449
|
+
this._updateTileForGID(gidAndFlags, pos);
|
|
450
|
+
else {
|
|
451
|
+
// modifying an existing tile with a non-empty tile
|
|
452
|
+
const z = pos.x + pos.y * this._layerSize.width;
|
|
453
|
+
const sprite = this.getChildByTag(z);
|
|
454
|
+
if (sprite) {
|
|
455
|
+
let rect = this._texGrids[gid];
|
|
456
|
+
const tex = this._textures[rect.texId];
|
|
457
|
+
rect = rectPixelsToPoints(rect);
|
|
458
|
+
sprite.setTexture(tex);
|
|
459
|
+
sprite.setTextureRect(rect, false);
|
|
460
|
+
if (flags != null)
|
|
461
|
+
this._setupTileSprite(sprite, pos, gidAndFlags);
|
|
462
|
+
this.tiles[z] = gidAndFlags;
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
this._updateTileForGID(gidAndFlags, pos);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
addChild(child, localZOrder, tag) {
|
|
471
|
+
super.addChild(child, localZOrder, tag);
|
|
472
|
+
if (tag !== undefined) {
|
|
473
|
+
this._spriteTiles[tag] = child;
|
|
474
|
+
child._vertexZ = this._vertexZ + (renderer.assignedZStep * tag) / this.tiles.length;
|
|
475
|
+
// child._renderCmd._needDraw = false;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
removeChild(child, cleanup) {
|
|
479
|
+
if (this._spriteTiles[child.tag]) {
|
|
480
|
+
this._spriteTiles[child.tag] = null;
|
|
481
|
+
// child._renderCmd._needDraw = true;
|
|
482
|
+
}
|
|
483
|
+
super.removeChild(child, cleanup);
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* lipped tiles can be changed dynamically
|
|
487
|
+
* @param {Point|Number} pos or x
|
|
488
|
+
* @param {Number} [y]
|
|
489
|
+
* @return {Number}
|
|
490
|
+
*/
|
|
491
|
+
getTileFlagsAt(pos, y) {
|
|
492
|
+
if (!pos)
|
|
493
|
+
throw new Error('TMXLayer.getTileFlagsAt(): pos should be non-null');
|
|
494
|
+
if (y !== undefined)
|
|
495
|
+
pos = p(pos, y);
|
|
496
|
+
if (pos.x >= this._layerSize.width || pos.y >= this._layerSize.height || pos.x < 0 || pos.y < 0)
|
|
497
|
+
throw new Error('TMXLayer.getTileFlagsAt(): invalid position');
|
|
498
|
+
if (!this.tiles) {
|
|
499
|
+
log('TMXLayer.getTileFlagsAt(): TMXLayer: the tiles map has been released');
|
|
500
|
+
return null;
|
|
501
|
+
}
|
|
502
|
+
const idx = 0 | (pos.x + pos.y * this._layerSize.width);
|
|
503
|
+
// Bits on the far end of the 32-bit global tile ID are used for tile flags
|
|
504
|
+
const tile = this.tiles[idx];
|
|
505
|
+
return (tile & TMX_TILE_FLIPPED_ALL) >>> 0;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Removes a tile at given tile coordinate
|
|
509
|
+
* @param {Point|Number} pos position or x
|
|
510
|
+
* @param {Number} [y]
|
|
511
|
+
*/
|
|
512
|
+
removeTileAt(pos, y) {
|
|
513
|
+
if (!pos) {
|
|
514
|
+
throw new Error('TMXLayer.removeTileAt(): pos should be non-null');
|
|
515
|
+
}
|
|
516
|
+
if (y !== undefined) {
|
|
517
|
+
pos = p(pos, y);
|
|
518
|
+
}
|
|
519
|
+
if (pos.x >= this._layerSize.width || pos.y >= this._layerSize.height || pos.x < 0 || pos.y < 0) {
|
|
520
|
+
throw new Error('TMXLayer.removeTileAt(): invalid position');
|
|
521
|
+
}
|
|
522
|
+
if (!this.tiles) {
|
|
523
|
+
log('TMXLayer.removeTileAt(): TMXLayer: the tiles map has been released');
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
const gid = this.getTileGIDAt(pos);
|
|
527
|
+
if (gid !== 0) {
|
|
528
|
+
const z = 0 | (pos.x + pos.y * this._layerSize.width);
|
|
529
|
+
// remove tile from GID map
|
|
530
|
+
this.tiles[z] = 0;
|
|
531
|
+
// remove it from sprites and/or texture atlas
|
|
532
|
+
const sprite = this._spriteTiles[z];
|
|
533
|
+
if (sprite) {
|
|
534
|
+
this.removeChild(sprite, true);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Returns the position in pixels of a given tile coordinate
|
|
540
|
+
* @param {Point|Number} pos position or x
|
|
541
|
+
* @param {Number} [y]
|
|
542
|
+
* @return {Point}
|
|
543
|
+
*/
|
|
544
|
+
getPositionAt(pos, y) {
|
|
545
|
+
if (y !== undefined)
|
|
546
|
+
pos = p(pos, y);
|
|
547
|
+
let ret = p(0, 0);
|
|
548
|
+
switch (this.layerOrientation) {
|
|
549
|
+
case TMX_ORIENTATION_ORTHO:
|
|
550
|
+
ret = this._positionForOrthoAt(pos);
|
|
551
|
+
break;
|
|
552
|
+
case TMX_ORIENTATION_ISO:
|
|
553
|
+
ret = this._positionForIsoAt(pos);
|
|
554
|
+
break;
|
|
555
|
+
case TMX_ORIENTATION_HEX:
|
|
556
|
+
ret = this._positionForHexAt(pos);
|
|
557
|
+
break;
|
|
558
|
+
}
|
|
559
|
+
return pointPixelsToPoints(ret);
|
|
560
|
+
}
|
|
561
|
+
_positionForIsoAt(pos) {
|
|
562
|
+
return p((this._mapTileSize.width / 2) * (this._layerSize.width + pos.x - pos.y - 1), (this._mapTileSize.height / 2) * (this._layerSize.height * 2 - pos.x - pos.y - 2));
|
|
563
|
+
}
|
|
564
|
+
_positionForOrthoAt(pos) {
|
|
565
|
+
return p(pos.x * this._mapTileSize.width, (this._layerSize.height - pos.y - 1) * this._mapTileSize.height);
|
|
566
|
+
}
|
|
567
|
+
_positionForHexAt(pos) {
|
|
568
|
+
const diffY = pos.x % 2 === 1 ? -this._mapTileSize.height / 2 : 0;
|
|
569
|
+
return p((pos.x * this._mapTileSize.width * 3) / 4, (this._layerSize.height - pos.y - 1) * this._mapTileSize.height + diffY);
|
|
570
|
+
}
|
|
571
|
+
_calculateLayerOffset(pos) {
|
|
572
|
+
let ret = p(0, 0);
|
|
573
|
+
switch (this.layerOrientation) {
|
|
574
|
+
case TMX_ORIENTATION_ORTHO:
|
|
575
|
+
ret = p(pos.x * this._mapTileSize.width, -pos.y * this._mapTileSize.height);
|
|
576
|
+
break;
|
|
577
|
+
case TMX_ORIENTATION_ISO:
|
|
578
|
+
ret = p((this._mapTileSize.width / 2) * (pos.x - pos.y), (this._mapTileSize.height / 2) * (-pos.x - pos.y));
|
|
579
|
+
break;
|
|
580
|
+
case TMX_ORIENTATION_HEX:
|
|
581
|
+
if (pos.x !== 0 || pos.y !== 0)
|
|
582
|
+
log('offset for hexagonal map not implemented yet');
|
|
583
|
+
break;
|
|
584
|
+
}
|
|
585
|
+
return ret;
|
|
586
|
+
}
|
|
587
|
+
_updateTileForGID(gid, pos) {
|
|
588
|
+
if (!this._texGrids[gid]) {
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
const idx = 0 | (pos.x + pos.y * this._layerSize.width);
|
|
592
|
+
if (idx < this.tiles.length) {
|
|
593
|
+
this.tiles[idx] = gid;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
//The layer recognizes some special properties, like cc_vertez
|
|
597
|
+
_parseInternalProperties() {
|
|
598
|
+
// if cc_vertex=automatic, then tiles will be rendered using vertexz
|
|
599
|
+
const vertexz = this.getProperty('cc_vertexz');
|
|
600
|
+
if (vertexz) {
|
|
601
|
+
if (vertexz === 'automatic') {
|
|
602
|
+
this._useAutomaticVertexZ = true;
|
|
603
|
+
const alphaFuncVal = this.getProperty('cc_alpha_func');
|
|
604
|
+
let alphaFuncValue = 0;
|
|
605
|
+
if (alphaFuncVal)
|
|
606
|
+
alphaFuncValue = parseFloat(alphaFuncVal);
|
|
607
|
+
if (_renderType === game.RENDER_TYPE_WEBGL) {
|
|
608
|
+
//todo: need move to WebGL render cmd
|
|
609
|
+
;
|
|
610
|
+
this.shaderProgram = shaderCache.programForKey(SHADER_SPRITE_POSITION_TEXTURECOLORALPHATEST);
|
|
611
|
+
this.shaderProgram.use();
|
|
612
|
+
this.shaderProgram.setUniformLocationWith1f(UNIFORM_ALPHA_TEST_VALUE_S, alphaFuncValue);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
else
|
|
616
|
+
this._vertexZvalue = parseInt(vertexz, 10);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
_setupTileSprite(sprite, pos, gid) {
|
|
620
|
+
const z = pos.x + pos.y * this._layerSize.width;
|
|
621
|
+
const posInPixel = this.getPositionAt(pos);
|
|
622
|
+
sprite.setPosition(posInPixel);
|
|
623
|
+
sprite.setVertexZ(this._vertexZForPos(pos));
|
|
624
|
+
sprite.setAnchorPoint(0, 0);
|
|
625
|
+
sprite.setOpacity(this._opacity);
|
|
626
|
+
sprite.setFlippedX(false);
|
|
627
|
+
sprite.setFlippedY(false);
|
|
628
|
+
sprite.setRotation(0.0);
|
|
629
|
+
// Rotation in tiled is achieved using 3 flipped states, flipping across the horizontal, vertical, and diagonal axes of the tiles.
|
|
630
|
+
if ((gid & TMX_TILE_DIAGONAL_FLAG) >>> 0) {
|
|
631
|
+
// put the anchor in the middle for ease of rotation.
|
|
632
|
+
sprite.setAnchorPoint(0.5, 0.5);
|
|
633
|
+
sprite.setPosition(posInPixel.x + sprite.width / 2, posInPixel.y + sprite.height / 2);
|
|
634
|
+
const flag = (gid & ((TMX_TILE_HORIZONTAL_FLAG | TMX_TILE_VERTICAL_FLAG) >>> 0)) >>> 0;
|
|
635
|
+
// handle the 4 diagonally flipped states.
|
|
636
|
+
if (flag === TMX_TILE_HORIZONTAL_FLAG)
|
|
637
|
+
sprite.setRotation(90);
|
|
638
|
+
else if (flag === TMX_TILE_VERTICAL_FLAG)
|
|
639
|
+
sprite.setRotation(270);
|
|
640
|
+
else if (flag === (TMX_TILE_VERTICAL_FLAG | TMX_TILE_HORIZONTAL_FLAG) >>> 0) {
|
|
641
|
+
sprite.setRotation(90);
|
|
642
|
+
sprite.setFlippedX(true);
|
|
643
|
+
}
|
|
644
|
+
else {
|
|
645
|
+
sprite.setRotation(270);
|
|
646
|
+
sprite.setFlippedX(true);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
else {
|
|
650
|
+
if ((gid & TMX_TILE_HORIZONTAL_FLAG) >>> 0) {
|
|
651
|
+
sprite.setFlippedX(true);
|
|
652
|
+
}
|
|
653
|
+
if ((gid & TMX_TILE_VERTICAL_FLAG) >>> 0) {
|
|
654
|
+
sprite.setFlippedY(true);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
_vertexZForPos(x, y) {
|
|
659
|
+
if (y === undefined) {
|
|
660
|
+
y = x.y;
|
|
661
|
+
x = x.x;
|
|
662
|
+
}
|
|
663
|
+
let ret = 0;
|
|
664
|
+
let maxVal;
|
|
665
|
+
if (this._useAutomaticVertexZ) {
|
|
666
|
+
switch (this.layerOrientation) {
|
|
667
|
+
case TMX_ORIENTATION_ISO:
|
|
668
|
+
maxVal = this._layerSize.width + this._layerSize.height;
|
|
669
|
+
ret = -(maxVal - (x + y));
|
|
670
|
+
break;
|
|
671
|
+
case TMX_ORIENTATION_ORTHO:
|
|
672
|
+
ret = -(this._layerSize.height - y);
|
|
673
|
+
break;
|
|
674
|
+
case TMX_ORIENTATION_HEX:
|
|
675
|
+
log('TMX Hexa zOrder not supported');
|
|
676
|
+
break;
|
|
677
|
+
default:
|
|
678
|
+
log('TMX invalid value');
|
|
679
|
+
break;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
else {
|
|
683
|
+
ret = this._vertexZvalue;
|
|
684
|
+
}
|
|
685
|
+
return ret;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
const _p = TMXLayer.prototype;
|
|
689
|
+
// Extended properties
|
|
690
|
+
defineGetterSetter(_p, 'layerWidth', _p._getLayerWidth, _p._setLayerWidth);
|
|
691
|
+
defineGetterSetter(_p, 'layerHeight', _p._getLayerHeight, _p._setLayerHeight);
|
|
692
|
+
defineGetterSetter(_p, 'tileWidth', _p._getTileWidth, _p._setTileWidth);
|
|
693
|
+
defineGetterSetter(_p, 'tileHeight', _p._getTileHeight, _p._setTileHeight);
|
|
694
|
+
//# sourceMappingURL=TMXLayer.js.map
|