2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module ClippingNode
|
2014-03-20 10:21:28 +08:00
|
|
|
-- @extend Node
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-09-22 17:23:14 +08:00
|
|
|
-- If stencil has no children it will not be drawn.<br>
|
2014-11-20 11:41:28 +08:00
|
|
|
-- If you have custom stencil-based node with stencil drawing mechanics other then children-based,<br>
|
|
|
|
-- then this method should return true every time you wish stencil to be visited.<br>
|
2015-03-23 16:32:54 +08:00
|
|
|
-- By default returns true if has any children attached.<br>
|
|
|
|
-- return If you have custom stencil-based node with stencil drawing mechanics other then children-based,<br>
|
|
|
|
-- then this method should return true every time you wish stencil to be visited.<br>
|
2015-03-31 12:01:57 +08:00
|
|
|
-- By default returns true if has any children attached.<br>
|
|
|
|
-- js NA
|
2014-11-20 11:41:28 +08:00
|
|
|
-- @function [parent=#ClippingNode] hasContent
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:32:54 +08:00
|
|
|
-- Set the ClippingNode whether or not invert.<br>
|
|
|
|
-- param inverted A bool Type,to set the ClippingNode whether or not invert.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ClippingNode] setInverted
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool inverted
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ClippingNode#ClippingNode self (return value: cc.ClippingNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:32:54 +08:00
|
|
|
-- Set the Node to use as a stencil to do the clipping.<br>
|
|
|
|
-- param stencil The Node to use as a stencil to do the clipping.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ClippingNode] setStencil
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node stencil
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ClippingNode#ClippingNode self (return value: cc.ClippingNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- The alpha threshold.<br>
|
|
|
|
-- The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.<br>
|
|
|
|
-- Should be a float between 0 and 1.<br>
|
2015-03-23 16:32:54 +08:00
|
|
|
-- This default to 1 (so alpha test is disabled).<br>
|
|
|
|
-- return The alpha threshold value,Should be a float between 0 and 1.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ClippingNode] getAlphaThreshold
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Initializes a clipping node with an other node as its stencil.<br>
|
|
|
|
-- The stencil node will be retained, and its parent will be set to this clipping node.
|
|
|
|
-- @function [parent=#ClippingNode] init
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Node stencil
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- The Node to use as a stencil to do the clipping.<br>
|
|
|
|
-- The stencil node will be retained.<br>
|
2015-03-23 16:32:54 +08:00
|
|
|
-- This default to nil.<br>
|
|
|
|
-- return The stencil node.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ClippingNode] getStencil
|
|
|
|
-- @param self
|
|
|
|
-- @return Node#Node ret (return value: cc.Node)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:32:54 +08:00
|
|
|
-- Set the alpha threshold. <br>
|
|
|
|
-- param alphaThreshold The alpha threshold.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ClippingNode] setAlphaThreshold
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float alphaThreshold
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ClippingNode#ClippingNode self (return value: cc.ClippingNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-11-20 11:41:28 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Inverted. If this is set to true,<br>
|
|
|
|
-- the stencil is inverted, so the content is drawn where the stencil is NOT drawn.<br>
|
2015-03-23 16:32:54 +08:00
|
|
|
-- This default to false.<br>
|
|
|
|
-- return If the clippingNode is Inverted, it will be return true.
|
2014-11-20 11:41:28 +08:00
|
|
|
-- @function [parent=#ClippingNode] isInverted
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, cc.Node
|
|
|
|
-- @overload self
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ClippingNode] create
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node stencil
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @return ClippingNode#ClippingNode ret (return value: cc.ClippingNode)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2015-03-18 13:55:07 +08:00
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#ClippingNode] setCameraMask
|
|
|
|
-- @param self
|
|
|
|
-- @param #unsigned short mask
|
|
|
|
-- @param #bool applyChildren
|
|
|
|
-- @return ClippingNode#ClippingNode self (return value: cc.ClippingNode)
|
|
|
|
|
2014-05-23 11:12:39 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-05-23 11:12:39 +08:00
|
|
|
-- @function [parent=#ClippingNode] visit
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Renderer renderer
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #mat4_table parentTransform
|
|
|
|
-- @param #unsigned int parentFlags
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ClippingNode#ClippingNode self (return value: cc.ClippingNode)
|
2014-05-23 11:12:39 +08:00
|
|
|
|
2015-05-05 11:31:53 +08:00
|
|
|
--------------------------------
|
|
|
|
-- Initializes a clipping node without a stencil.
|
|
|
|
-- @function [parent=#ClippingNode] init
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
return nil
|